Search code examples
selenium-rc

Selenium XPath for a table


Given this html segment:

<strong style="background-color: transparent;">53°F</strong>

How to retrieve the 53°F text? I tried

sel.getText("//parent_selector/**strong[text()**]"))

but this is not working.


Solution

  • Try this one :)

    selenium.getText("xpath=//table[@class='twc-forecast-table twc-second']//tr[4]//strong");