I am trying to find a element using Selenium in Python that has the html like this:
<td class="td1" onclick="window.location.href = 'work_area.php?SID';">Work area</td>
Contained in a simple <tr></tr>
tag.
I have tried using
work_area = driver.find_element_by_css_selector('td[contains(@onclick, "work_area.php?SID"]')
and using an absolute xpath
work_area = driver.find_element_by_xpath("/html/body/table/tbody/tr[2]/td[1]/div/table/tbody/tr[2]/td/table/tbody/tr[3]/td")
My buttons structure:
+---------------------+
| Menu |
+---------------------+
| Work Area |
+---------------------+
| Details |
+---------------------+
I am using Python 3.6, and Selenium is up to date, any suggestions? I have also tried different suggestions that I could find on stackoverflow but nothing helped.