mercredi 4 novembre 2015

find text in id then find class in the same id

is there a way to first check if the text (2014) in the div class is that PagePostsSectionPaglet and if yes, find div class="_5sem" to perform action on its other webelements?

i have tried this but it does not return me any value when i tried printing it out.

   List <WebElement> PagePostsSectionPagelet = driver.findElements(By.id("PagePostsSectionPagelet")); 
   List <WebElement> tds = PagePostsSectionPagelet.get(0).findElements(By.className("clearfix"));

enter image description here

Aucun commentaire:

Enregistrer un commentaire