Package com.thoughtworks.selenium

Examples of com.thoughtworks.selenium.Selenium.waitForCondition()


    try {
      selenium.start();
      getLog().debug("Opening " + testsHtmlUrl);
      selenium.open(testsHtmlUrl);
      getLog().debug("Waiting for test results for " + jooUnitTestExecutionTimeout + "ms ...");
      selenium.waitForCondition("selenium.browserbot.getCurrentWindow().result != null || selenium.browserbot.getCurrentWindow().classLoadingError != null", "" + jooUnitTestExecutionTimeout);
      String classLoadingError = selenium.getEval("selenium.browserbot.getCurrentWindow().classLoadingError");
      if (classLoadingError != null && !classLoadingError.equals("null")) {
        throw new MojoExecutionException(classLoadingError);
      }
View Full Code Here


        int height = content.evalIntExpression("offsetHeight");
        content.assertExpressionEquals("offsetWidth", windowSize.width / 2 - 6, 1);
        content.assertExpressionEquals("offsetHeight", windowSize.height / 2 - 5, 1);
        window().evalExpression("resizeBy(-100, -100)");
        sleep(2000);
        selenium.waitForCondition("window.document.getElementById('textDiv').innerHTML == \"window resized\"", "10000");
        content.assertExpressionEquals("offsetWidth", width - 50);
        content.assertExpressionEquals("offsetHeight", height - 50);
    }

}
View Full Code Here

////                    }
////                });
//        sleep(2000);
        sleep(500); // wait a little while Ajax request starts asynchronously
        Selenium selenium = SeleniumHolder.getInstance().getSelenium();
        selenium.waitForCondition("var value = window.document._ajaxInProgressMessage ? window.document._ajaxInProgressMessage.style.display : 'none'; value == 'none';", "30000");
        sleep(2000);
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.