Selenium webdriver 在SeleniumWebDriver中查找元素

Selenium webdriver 在SeleniumWebDriver中查找元素,selenium-webdriver,Selenium Webdriver,我正在使用Selenium导航一个网页,该网页有一个名为“编辑”的链接,使用WebDriver(最近刚从RC切换到WebDriver)。我想点击链接,但testcase总是失败,并出现以下错误: org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"link text","selector":"Edit"} 使用Firebug检查元素时,我得到了以下HTML: <a href="/

我正在使用Selenium导航一个网页,该网页有一个名为“编辑”的链接,使用WebDriver(最近刚从RC切换到WebDriver)。我想点击链接,但testcase总是失败,并出现以下错误:

org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"link text","selector":"Edit"}
使用Firebug检查元素时,我得到了以下HTML:

<a href="/00kn00000039X4j/e?retURL=%2F006n0000002BuKq" class="actionLink" title="Edit - Record 1 - Collaborator - Concurrent User License (Includes 1 year Maintenance)">Edit</a>
我可以看到元素出现在屏幕上,但测试用例仍然失败


有人知道我在这里遗漏了什么或找到链接元素的替代方法吗?

链接文本是
编辑
而不是
邮件

driver.findElement(By.linkText("Edit"));

请提供此链接的html源代码提供示例html。
driver.findElement(By.linkText("Edit"));