title: Selecting a link with Selenium Webdriver?
body: <p>How can I select a link with selenium webdriver?</p>
  
  <p>Selenium before would be done by:</p>
  
  <pre><code>    selenium.click("link=Users");
  </code></pre>
  
  <p>But how can I do the same with webdriver?</p>
  
  <p>I thought about</p>
  
  <pre><code>    driver.findElement(By.partialLinkText("Users")).click();
  </code></pre>
  
  <p>but this does not work. No link is clicked!</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  &lt;div id="mainpage" class="mainpage"&gt;
  &lt;div id="pageid" class="pageid"&gt;
  &lt;div id="body"&gt;
  
  &lt;table&gt;
  &lt;tbody&gt;
  &lt;tr&gt;
  &lt;td&gt;
  &lt;table&gt;
  &lt;tbody&gt;
  &lt;tr&gt;
  &lt;td&gt;
  &lt;div id="id_menu" class="mymenu"&gt;
  &lt;ul&gt;
  &lt;li class="li_class "&gt;
  &lt;a href="/user.xhtml"&gt;Users&lt;/a&gt;
  </code></pre>
  
  <p>stacktrace:</p>
  
  <pre><code>    org.openqa.selenium.NoSuchElementException: Unable to locate element: 
  {"method":"partial link text","selector":"Users"} Command duration or timeout: 11.36 
  seconds For documentation on this error, please visit: http://seleniumhq.org/exceptions
  /no_such_element.html Build info: version: '2.24.1', revision: '17205', time: '2012-06-19 
  17:28:14' System info: os.name: 'Windows XP', os.arch: 'x86', os.version: '5.1', 
  java.version: '1.7.0_02' Driver info: driver.version: RemoteWebDriver Session ID: 
  178449d1-4ff3-44f3-b35c-6a158db7c430 error at line: 34
  </code></pre>