[quote:36klyx0g] if(!driver.findElements(By.xpath(".//*[@id='responsiveHeader']/div[1]/div[1]/ul/li[4]/a/span[1]")).isEmpty()){
System.out.println("Link present");
}else{
System.out.println("Link not present");
}
driver.findElement(By.xpath(".//*[@id='responsiveHeader']/div[1]/div[1]/ul/li[4]/a/span[1]")).click();
} [/quote:36klyx0g]
what are you trying to do? just click on the sign in button.
I want to click on the Sign In link and providing the username and password.
But I'm unable to click on the 'Sign In' link please suggest.
send a screen shot of where you want to click and also the line of selenium code you have tried.
I have used the below line of code to click on the [b:59slueym]'Sign In'[/b:59slueym] link as highlighted in the screen shot attached.
[b:59slueym][u:59slueym]URL:[/u:59slueym][/b:59slueym] http://www.quikr.com/
[code:59slueym]driver.findElement(By.xpath(".//*[@id='responsiveHeader']/div[1]/div[1]/ul/li[4]/a/span[1]")).click();[/code:59slueym]
use this code. this is working.
[code:26el0fwx]WebDriver driver = new FirefoxDriver();
driver.get("http://www.quikr.com/");
driver.findElement(
By.xpath("//*[@id='responsiveHeader']/div[1]/div[1]/ul/li[4]/a/span[@class='sign-in']"))
.click();
[/code:26el0fwx]
Its not working for me. Whats the FireFox Browser version and Selenium version you are using?
[b:1fypoi6q]I'm using [/b:1fypoi6q]
Firefox Version: 49.01
Selenium: 3.0.0-beta3