問題描述
我正在通過 java 使用 Selenium RC.在第一頁填寫必要的數據-->點擊
提交按鈕進入下一頁.我的代碼是:
I am using Selenium RC by java. Fill up necessary data on 1st page-->Click
Submit button to go next page. My code is:
selenium.click("Submit");
selenium.waitForPageToLoad("30000");
點擊提交按鈕后發現錯誤:
After clicking Submit button I found the error:
com.thoughtworks.selenium.SeleniumException: Timed out after 30000ms
誰能幫幫我?
推薦答案
Selenium.waitforpagetoload("30000");
Selenium.waitforpagetoload("30000");
表示您給時間 30000 m.s= 30 秒
這意味著您的頁面需要 30 多秒才能完全加載.
It means your page is taking more than 30 seconds to load completely.
所以為了避免錯誤給更多的時間.比如 60 秒或 90 秒.
So in order to avoid the error give more time. like 60 seconds or 90 seconds.
通過手動單擊提交大致查看頁面完全加載所需的時間并記下時間.(如果您的互聯網連接較低,則可能需要很長時間).
Once roughly see how much time the page is taking to load completely by clicking on the Submit manually and note down the time.(it may take long time if your internet connection is low).
所以在檢查了加載時間之后,在
So after checking the time it is taking to load, Give that time in
selenium.waitforpagetoload("time in m.sec")
.
這篇關于當我嘗試通過使用 Selenium RC 單擊提交按鈕進入下一頁時,在 30000 毫秒后超時的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!