I want to automatically click on an email from [email protected] and I know there will be only one email from that person so it won’t be a problem with two identical emails.
I have tried to locate the XPath for the email and that works fine. But when i try to click on it with webdriver.find_element_by_xpath("XPath of the email").click()
the XPath is not clickable.
As far as I tried I was only able to specify which row <tr></tr>
i wanted to click on webdriver.find element_by_xpath("XPath of row").click()
and it clicks on it.
Is it somehow possible to click on a row that contains a specific email?
You can use the below xpath to get the row that contains [email protected]
span.
Option 1:
//span[@email='[email protected]']/ancestor::tr[@role='row']
Option 2:
//tr[@role='row'][.//span[@email='[email protected]']]