title: Find and click element based on @onclick w/ Selenium
body: <p>I am trying to find a element using Selenium in Python that has the html like this:</p>
  
  <pre><code>&lt;td class="td1" onclick="window.location.href = 'work_area.php?SID';"&gt;Work area&lt;/td&gt;
  </code></pre>
  
  <p>Contained in a simple <code>&lt;tr&gt;&lt;/tr&gt;</code> tag.</p>
  
  <p>I have tried using</p>
  
  <pre><code>work_area = driver.find_element_by_css_selector('td[contains(@onclick, "work_area.php?SID"]')
  </code></pre>
  
  <p>and using an absolute xpath</p>
  
  <pre><code>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")
  </code></pre>
  
  <p>My buttons structure:</p>
  
  <pre><code>+---------------------+
  |       Menu          |
  +---------------------+
  |     Work Area       |
  +---------------------+
  |     Details         |
  +---------------------+
  </code></pre>
  
  <p>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.</p>