Java 类org.openqa.selenium.ScriptTimeoutException 实例源码

项目:snippets    文件:AngularWait.java   
private static ExpectedCondition<Boolean> requestIsFinished() {
    return new ExpectedCondition<Boolean>() {

        @Override
        public Boolean apply(WebDriver webDriver) {
            try {
                executeAsyncScript(getWaitForRequestToFinishScript());
                return true;
            } catch (ScriptTimeoutException e) {
                return false;
            }
        }

        @Override
        public String toString() {
            return "wait for angular request to finish";
        }
    };
}
项目:hsac-fitnesse-fixtures    文件:RichFacesTest.java   
@Override
protected Object invoke(FixtureInteraction interaction, Method method, Object[] arguments) throws Throwable {
    Object result = super.invoke(interaction, method, arguments);
    if (shouldWaitForAjax()) {
        try {
            waitForJsfAjaxImpl(true);
        } catch (ScriptTimeoutException e) {
            if (ignoreImplicitAjaxWaitTimeouts) {
                // log message but do not throw
                System.err.println("Timeout while waiting for ajax call after: " + method.getName() + " with arguments: " + Arrays.toString(arguments));
                String msg = createAjaxTimeoutMessage(e);
                System.err.println("Exception not forwarded to wiki: " + msg);
            } else {
                throw createAjaxTimeout(e);
            }
        }
    }
    return result;
}
项目:hsac-fitnesse-fixtures    文件:RichFacesTest.java   
public void waitForJsfAjax() {
    try {
        waitForJsfAjaxImpl(false);
    } catch (ScriptTimeoutException e) {
        throw createAjaxTimeout(e);
    }
}
项目:hsac-fitnesse-fixtures    文件:RichFacesTest.java   
protected AjaxTimeout createAjaxTimeout(ScriptTimeoutException e) {
    return new AjaxTimeout(createAjaxTimeoutMessage(e), e);
}
项目:hsac-fitnesse-fixtures    文件:RichFacesTest.java   
protected String createAjaxTimeoutMessage(ScriptTimeoutException e) {
    String messageBase = "Did not detect completion of RichFaces ajax call: " + e.getMessage();
    return getSlimFixtureExceptionMessage("timeouts", "rfAjaxTimeout", messageBase, e);
}
项目:hsac-fitnesse-fixtures    文件:RichFacesTest.java   
public AjaxTimeout(String message, ScriptTimeoutException e) {
    super(false, message, e);
}