Package org.jboss.arquillian.graphene.page

Examples of org.jboss.arquillian.graphene.page.RequestType


                final long timeout = System.currentTimeMillis()
                        + TimeUnit.SECONDS.toMillis(GrapheneConfigurationContext.getProxy().getWaitGuardInterval());
                final long toSleep = Math.min(GrapheneConfigurationContext.getProxy().getWaitGuardInterval() * 100, 200);

                while (System.currentTimeMillis() < timeout) {
                    RequestType requestDone = guard.getRequestDone();
                    if (!requestDone.equals(RequestType.NONE)) {
                        if (requestDone.equals(requestExpected)) {
                            if (requestDone.equals(RequestType.HTTP)) {
                                waitModel().withMessage("Document didn't become ready").until(documentReady);
                            }
                            return result;
                        } else {
                            throw new RequestGuardException(requestExpected, guard.getRequestDone());
View Full Code Here


                guard.clearRequestDone();

                Object result = context.invoke();

                RequestType requestType;

                if (strict) {
                    requestType = waitForRequestChange();
                } else {
                    requestType = waitForRequestType(requestExpected);
                }

                if (requestType.equals(requestExpected)) {
                    waitForRequestFinished();
                } else {
                    throw new RequestGuardException(requestExpected, requestType);
                }
View Full Code Here

        }
    }

    private static class RequestChange implements Function<WebDriver, RequestType> {
        public RequestType apply(WebDriver driver) {
            RequestType type = guard.getRequestType();
            return (RequestType.NONE.equals(type)) ? null : type;
        }
View Full Code Here

        public RequestTypeDone(RequestType requestExpected) {
            this.requestExpected = requestExpected;
        }

        public RequestType apply(WebDriver driver) {
            RequestType type = guard.getRequestType();
            if (!requestExpected.equals(type)) {
                return null;
            }
            return type;
        }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.graphene.page.RequestType

Copyright © 2018 www.massapicom. 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.