2014-09-23 68 views
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的新手。

回答