0

I'm using Selenium to navigate a webpage which has a link named "Edit", using WebDriver (just recently switched from RC to WebDriver). I want to click on the link but the testcase always fails with the error:

org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"link text","selector":"Edit"}

When inspecting the element with Firebug I got the following HTML:

<a href="/00kn00000039X4j/e?retURL=%2F006n0000002BuKq" class="actionLink" title="Edit - Record 1 - Collaborator - Concurrent User License (Includes 1 year Maintenance)">Edit</a>

This is the Java which attempts to click the link:

driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
driver.findElement(By.linkText("Mail")); 

I can see that the element is present on screen but still, the test case fails.

Does anyone know what I might be missing here or an alternative way to find the link element?

2
  • Please, provide html source of this link Commented Sep 15, 2014 at 9:38
  • Provide sample html. Commented Sep 15, 2014 at 10:01

1 Answer 1

1

The link text is Edit not Mail

driver.findElement(By.linkText("Edit"));
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.