Timed out after 30000ms when I tried to go next page by clicking Submit button using Selenium RC

我是研究僧i 提交于 2020-01-21 14:56:26

问题


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

Can anybody pls help me?


回答1:


Selenium.waitforpagetoload("30000");

means you are giving time 30000 m.s= 30 seconds

It means your page is taking more than 30 seconds to load completely.

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").



来源:https://stackoverflow.com/questions/5165623/timed-out-after-30000ms-when-i-tried-to-go-next-page-by-clicking-submit-button-u

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!