Timed out after 30000ms when I tried to go next pa

2019-02-27 08:42发布

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条回答
Ridiculous、
2楼-- · 2019-02-27 09:06

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

查看更多
登录 后发表回答