0
我使用Selenium RC来测试网站。但它总是显示以下错误:下面Selenium超时错误
com.thoughtworks.selenium.SeleniumException: Timed out after 30000ms
我的示例代码给出:
public static void main(String[] args) {
try {
startRC();
testCase_RC();
} catch (Exception e) {
System.out.println("Exception : " + e.getMessage());
}
public static void startRC() {
selenium = new DefaultSelenium("localhost", 4444, "*firefox", "https://www.example.com");
selenium.start();
}
public static void testCase_RC() throws Exception {
try {
selenium.open("/login");
selenium.waitForPageToLoad("200000");
} catch (Exception e) {
System.out.println("Message: " + e.getMessage());
e.printStackTrace();
}
}
它显示在open()函数错误。我在互联网上尝试了很多解决方案,但没有解决方案适用于我。请帮忙,我是Selenium RC的新手。