mikegray mikegray - 5 months ago 22
Python Question

Use Python- Selenium to select span style object

Team,

I am trying to select one table object using

python
+
selenium-webdriver
. I tried to use the following method but it is not working:

select = browser.findElement(By.xpath("//tr/td[contains(text(), 'ALL_incidents')]"))


This is the HTML:
HTML

Answer

Try following XPath:

//td/nobr/span[text()="ALL_incidents"]