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?

driver.get(“http://toolsqa.com/automation-practice-form/”);
//driver.manage().window().maximize();
driver.findElement(By.partialLinkText(“Partial”)).click();
System.out.println(“Partial Link Text pass”);
//String s=driver.findElement(By.tagName(“button”)).getText();
String s=driver.findElement(By.tagName(“button”)).getText();
System.out.println(s);
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.