Search code examples
gmailpycharmrobotframework

ValueError: Element locator 'id=Passwd' did not match any elements in gmail (robotframework, Pycharm)


I am using Mac EI Captain with Pycharm as IDE and Robotframework. I am getting an error

ValueError: Element locator 'id=Passwd' did not match any elements.

This is only with the case of Gmail.com but not other websites. I used my same script for Facebook and Linkedin and it worked.

Here is my script:

Open Browser  https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/&ss=1&scc=1&ltmpl=default&ltmplcache=2&emr=1&osid=1#identifier  firefox
Page Should Contain  Sign in to continue to Gmail
Input Text  id=Email  user
Click Button  id=next
Wait Until Page Contains  Sign in with a different account
Input Password  id=Passwd  fdsfs
Click Button  id=signIn

Solution

  • After clicking Next, wait for the password field to appear and then click on it to enable it. I added these lines to your test to make it work.

    Wait Until Page Contains Element    id=Passwd
    Click Element    id=Passwd