I am unable to locate the sign in element on HTTPS.
This code
WebElement signin =driver.findElement(By.xpath(".//*[@id='mc_mainWrapper']/header/div[1]/div/div[2]/div[2]/div[4]/a/strong"));
causes this error
java.lang.NullPointerException
I am unable to locate the sign in element on HTTPS.
This code
WebElement signin =driver.findElement(By.xpath(".//*[@id='mc_mainWrapper']/header/div[1]/div/div[2]/div[2]/div[4]/a/strong"));
causes this error
java.lang.NullPointerException
I have tried this and link text is working.
public static void main(String[] args)
{
System.setProperty("webdriver.chrome.driver", "/home/santhoshkumar/Softwares/Selenium/drivers/chromedriver2.29");
WebDriver driver = new ChromeDriver();
driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
driver.get("http://www.moneycontrol.com");
driver.findElement(By.linkText("Sign in")).click();
}
The same xpath that you have written also works well for me.