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

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

我正在使用 Mac EI Captain,Pycharm 作为 IDE 和 Robotframework。我收到一个错误

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

这只是Gmail.com的情况,其他网站没有。我在 Facebook 和 Linkedin 上使用了相同的脚本,并且有效。

这是我的脚本:

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

点击下一步后,等待密码字段出现,然后点击启用。我将这些行添加到您的测试中以使其正常工作。

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