RE: 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”);
Try this instead:
driver.findElement(By.xpath(“.//*[@id=’signin_info’]/a[2]”)).click();