Below is the tag I have in my html :
<span class="login-link">Log in</span>
And below is the code :
driver.findElement(By.cssSelector("#login > span")).click();
but I tried xPath, cssSelector and id, but it is not working.
Try using class selector also.
hash is used for referring id in css js. You must use dot(.) for directly referencing the element.
To wait until the entire data has ...READ MORE
The element should be located with any ...READ MORE
You are probably looking at the WebDriver interface alone. But, ...READ MORE
The better way to handle this element ...READ MORE
In order to use IE Driver you ...READ MORE
To Allow or Block the notification, access using Selenium and you have to ...READ MORE
It's much simpler to use:
#MyDiv123 > div.super
or ...READ MORE
You are using wrong xpath expression. This ...READ MORE
To pass customized dates e.g. 2017/07/14. You have ...READ MORE
Already have an account? Sign in.