vendredi 25 mai 2018

Selenium table count

I am testing a Java 7 web application developed with Vaadin 7 and I used to calculate the total number of rows in a table with the following code:

      WebElement table= driver.findElement(By.xpath("//* [@id='grdEvRequestSearchView']/div[3]/table"));

     List <WebElement> gridrow = table.findElements(By.tagName("tr"));
     int rowNumber= gridrow.size();

Now the new version of the application put in a page a Vaadin grid component instead of table, now what I obtain from the count is the number of elements that currently visible: if I have a grid of 50 elements and only 10 are visible I obtain 10 and not 50 as I got in the past when table component. Is there any way to get the effective count of rows and not the visible ones?

Andres

Aucun commentaire:

Enregistrer un commentaire