Getting NoSuchElementException: Unable to locate element: eventhough able to identify that element uniquely in FireBug

Selenium code:

public class FormPractice {

public static void main(String[] args) {
System.setProperty(“webdriver.gecko.driver”,
“C:\\Users\\ABHISHEK\\Desktop\\Garbage\\UDMEY-QA CLICKACADEMY\\geckodriver.exe”);
WebDriver driver = new FirefoxDriver();
driver.get(“http://www.rediff.com/”);
driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
driver.findElement(By.xpath(“.//*[@id=’signin_info’]/a[text()=’Create a Rediffmail account’]”)).click();
driver.findElement(By.name(“name139286f5″)).sendKeys(“Abhishek”);

ABHISHEK04 Default Asked on January 8, 2017 in Selenium WebDriver.
Add Comment
1 Answer(s)

Try this instead:
driver.findElement(By.xpath(“.//*[@id=’signin_info’]/a[2]”)).click();

ollo Default Answered on January 12, 2017.
Add Comment

Your Answer

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