7292/not-able-to-find-web-element-in-span-tag
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.
driver.findElement(By.cssSelector(".login-link")).click();
hash is used for referring id in css js. You must use dot(.) for directly referencing the element.
I am trying to locate an element ...READ MORE
I wrote below javascript code to fetch ...READ MORE
Error is throwing as Element not found ...READ MORE
To wait until the entire data has ...READ MORE
The better way to handle this element ...READ MORE
enable trusted connection in internet explorer by ...READ MORE
To Allow or Block the notification, access using Selenium and you have to ...READ MORE
xpath are two types. 1) Absolute XPath: /html/b ...READ MORE
You are using wrong xpath expression. This ...READ MORE
To pass customized dates e.g. 2017/07/14. You have ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.