Tag Error and Element Not Clickable
Learn how to deal with tag and element errors using Selenium.
We'll cover the following...
Unexpected tag name input
This error occurs because there is another control matching your findElement
, and it is a different control type than desired input
. For example:
Press + to interact
<input type="checkbox" name="vip" value="on"> VIP?<!-- ... --><select name="vip"><option value="true">Yes</option><option value="false">No/option></select>
The intention of the test script below is to select “Yes” in the dropdown list, but it is not aware of another checkbox control sharing exactly the same name attribute like:
driver.get("file://" + __dirname + "/../../site/gotchas.html");
var selElem = driver.findElement(By.name("vip"));
s
...