Does not locate element with findElementById

Asked

Viewed 483 times

0

Expensive,

I am trying to fill two text fields (login and password) of a given page. Using the following code. (Both by byID, bySelector, neither works)

driver.findElementByName("usuario").SendKeys MyLoggin

When debugging the code, when it arrives on this line returns the following error.

Element not found. Method=name, value=user

I tested this same code on the Google page and managed to perform. The page may have some kind of lock?

1 answer

1

Expensive,

Solved, I identified that the page has several frames, and the input’s were located within a specific frame. So I used the following code before running findElement.

driver.switchToFrame ("login")
driver.findElementByName("usuario").SendKeys MyLoggin

Browser other questions tagged

You are not signed in. Login or sign up in order to post.