In the code below, the exception “Exception in thread “main” org.openqa.selenium.NoSuchElementException: Unable to locate element: {“method”:”tag name”,”selector”:”button”}” is appearing on console. Can anyone help?

System.out.println(“Partial Link Text pass”);
//String s=driver.findElement(By.tagName(“button”)).getText();
String s=driver.findElement(By.tagName(“button”)).getText();
driver.findElement(By.linkText(“Link Text”)).click();
System.out.println(“Link text pass”);

Default Asked on January 13, 2016 in Selenium WebDriver.
Add Comment
  • 0 Answer(s)
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.