2016-08-01 23 views
-1

我正在使用Mac EI Captain和Pycharm作爲IDE和Robotframework。我收到錯誤ValueError:元素定位器'id = Passwd'與gmail中的任何元素都不匹配(robotframework,Pycharm)

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 

回答

1

點擊下一步後,等待密碼字段出現,然後點擊它來啓用它。我將這些行添加到您的測試中以使其正常工作。

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

非常感謝...你救了我! – Rath

+0

是否有可能告訴我如何使用for循環來檢查另一個用戶名和密碼?我嘗試了很長時間,但仍然無法完成它。我會很感激。謝謝! – Rath

相關問題