使用Selenium RC的windowMaximize超时错误

时间:2014-08-01 18:58:35

标签: java selenium-rc

我正在尝试导航到一个页面并最大化并聚焦页面。我的代码如下 - 。

public class DynamicTableHandling
{
    public static void main(String[] args) throws InterruptedException
    {
        Selenium selenium = new DefaultSelenium("localhost",4444,"*firefox","http://scores.sify.com"); 
        selenium.start();       
        selenium.open("/match/scorecard/ENG_IND_JUL27_JUL31_2014.shtml");
        selenium.waitForPageToLoad("180000");      
        selenium.windowMaximize();
        selenium.windowFocus();
    }
}

它会打开URL,但不会最大化或聚焦窗口。我一直在研究gmail和其他网站,windowMAximize()和windowFocus都运行得很好。此外,我收到如下错误:

Exception in thread "main" com.thoughtworks.selenium.SeleniumException: Timed out after 30000ms
    at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:109)
    at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:103)
    at com.thoughtworks.selenium.DefaultSelenium.open(DefaultSelenium.java:369)
    at DynamicTableHandling.main(DynamicTableHandling.java:13)

0 个答案:

没有答案