1
Hello,
I am developing an application with java + Selenium I have the second web element:
WebElement results = ( new WebDriverWait( driver, timeout ) ).until( ExpectedConditions.visibilityOfElementLocated( By.id( "local" ) ) );
Where id=local is a div that contains an html list, like:
<div id="local">
<ul>
<li>
<span>texto</span>
</li>
<li>
<span>texto</span>
</li>
<li>
<span>texto</span>
</li>
</ul>
</div>
I wanted to extract the text from all . I don’t know how to get the list of li’s with xpath from the div in Webelement. Then wanted to get a list in java with all the li, to iterate and thus get each span.
Any idea how to do ? I don’t know how to search with xpath the names I want.
It is possible to extract all span at once with xpath?
Thank you!
It worked, thanks for the reply and the explanation :)
– alves