I am trying to extract the text contained in a table with class name "infoBoxContents". However, there are multiple tables with this class name, and I am trying to extract text from the third table with this class name. I have tried the following code
String actual = browser.findElement(By.className("infoBoxContents")).getText();
which is naturally returning the text for the first table with the above-mentioned class name. I have done a lot of research on how to reference the particular element of an array but I have not found anything.
How can I correctly access the text within the third table containing that class name?