Examples of registerInterceptor()


Examples of org.jboss.arquillian.graphene.proxy.GrapheneProxyInstance.registerInterceptor()

    private void registerInFrameInterceptor(Object objectToEnrich, Field field, int index, String nameOrId)
        throws IllegalAccessException, ClassNotFoundException {
        GrapheneProxyInstance proxy = (GrapheneProxyInstance) field.get(objectToEnrich);

        if (index != -1) {
            proxy.registerInterceptor(new InFrameInterceptor(index));
        } else {
            proxy.registerInterceptor(new InFrameInterceptor(nameOrId));
        }
    }
View Full Code Here

Examples of org.jboss.arquillian.graphene.proxy.GrapheneProxyInstance.registerInterceptor()

        GrapheneProxyInstance proxy = (GrapheneProxyInstance) field.get(objectToEnrich);

        if (index != -1) {
            proxy.registerInterceptor(new InFrameInterceptor(index));
        } else {
            proxy.registerInterceptor(new InFrameInterceptor(nameOrId));
        }
    }

    private void checkInFrameParameters(Field field, int index, String nameOrId) {
        if ((nameOrId.trim().equals("") && index < 0)) {
View Full Code Here

Examples of org.jboss.arquillian.graphene.proxy.GrapheneProxyInstance.registerInterceptor()

        Interceptor builtInterceptor = builder.build();

        WebDriver driverProxy = GrapheneProxy.getProxyForTargetWithInterfaces(context, driver, WebDriver.class);
        GrapheneProxyInstance proxy = (GrapheneProxyInstance) driverProxy;

        proxy.registerInterceptor(builtInterceptor);
        driverProxy.findElement(by);

        Mockito.inOrder(interceptor1, interceptor2);
        verify(interceptor1).intercept(Mockito.any(InvocationContext.class));
        verify(interceptor2).intercept(Mockito.any(InvocationContext.class));
View Full Code Here

Examples of org.jboss.arquillian.graphene.proxy.GrapheneProxyInstance.registerInterceptor()

        throws IllegalAccessException, ClassNotFoundException {
        GrapheneProxyInstance proxy = (GrapheneProxyInstance) field.get(objectToEnrich);

        Class<?> fieldType = field.getType();
        if (index != -1) {
            proxy.registerInterceptor(new InFrameInterceptor(index));
        } else {
            proxy.registerInterceptor(new InFrameInterceptor(nameOrId));
        }
        if (!DO_NOT_ENRICH_FURTHER.contains(fieldType)) {
            enrichRecursivelyGrapheneProxyInstances(proxy, nameOrId, index, field);
View Full Code Here

Examples of org.jboss.arquillian.graphene.proxy.GrapheneProxyInstance.registerInterceptor()

        Class<?> fieldType = field.getType();
        if (index != -1) {
            proxy.registerInterceptor(new InFrameInterceptor(index));
        } else {
            proxy.registerInterceptor(new InFrameInterceptor(nameOrId));
        }
        if (!DO_NOT_ENRICH_FURTHER.contains(fieldType)) {
            enrichRecursivelyGrapheneProxyInstances(proxy, nameOrId, index, field);
            enrichRecursivelyGrapheneProxyInstances(proxy.unwrap(), nameOrId, index, field);
        }
View Full Code Here

Examples of org.jboss.arquillian.graphene.proxy.GrapheneProxyInstance.registerInterceptor()

                }
                return result;
            }
        }), List.class);
        GrapheneProxyInstance proxy = (GrapheneProxyInstance) elements;
        proxy.registerInterceptor(new StaleElementInterceptor());
        return elements;
    }

    public static WebElement findElementLazily(GrapheneContext context, final By by, final GrapheneProxy.FutureTarget searchContextFuture, final int indexInList) {
        return findElement(context, new GrapheneProxy.FutureTarget() {
View Full Code Here

Examples of org.jboss.arquillian.graphene.proxy.GrapheneProxyInstance.registerInterceptor()

        final GrapheneProxyInstance elementProxy = (GrapheneProxyInstance) element;

        InterceptorBuilder b = new InterceptorBuilder();
        b.interceptInvocation(WrapsElement.class, new WrapsElementInterceptor(elementProxy)).getWrappedElement();

        elementProxy.registerInterceptor(b.build());
        elementProxy.registerInterceptor(new StaleElementInterceptor());
        elementProxy.registerInterceptor(new SearchContextInterceptor());
        return element;
    }
View Full Code Here

Examples of org.jboss.arquillian.graphene.proxy.GrapheneProxyInstance.registerInterceptor()

        InterceptorBuilder b = new InterceptorBuilder();
        b.interceptInvocation(WrapsElement.class, new WrapsElementInterceptor(elementProxy)).getWrappedElement();

        elementProxy.registerInterceptor(b.build());
        elementProxy.registerInterceptor(new StaleElementInterceptor());
        elementProxy.registerInterceptor(new SearchContextInterceptor());
        return element;
    }

    protected static WebElement dropProxyAndFindElement(By by, SearchContext searchContext) {
View Full Code Here

Examples of org.jboss.arquillian.graphene.proxy.GrapheneProxyInstance.registerInterceptor()

        InterceptorBuilder b = new InterceptorBuilder();
        b.interceptInvocation(WrapsElement.class, new WrapsElementInterceptor(elementProxy)).getWrappedElement();

        elementProxy.registerInterceptor(b.build());
        elementProxy.registerInterceptor(new StaleElementInterceptor());
        elementProxy.registerInterceptor(new SearchContextInterceptor());
        return element;
    }

    protected static WebElement dropProxyAndFindElement(By by, SearchContext searchContext) {
        if (searchContext instanceof GrapheneProxyInstance) {
View Full Code Here

Examples of org.jboss.arquillian.graphene.proxy.GrapheneProxyInstance.registerInterceptor()

        final GrapheneProxyInstance elementProxy = (GrapheneProxyInstance) element;

        InterceptorBuilder b = new InterceptorBuilder();
        b.interceptInvocation(WrapsElement.class, new WrapsElementInterceptor(elementProxy)).getWrappedElement();

        elementProxy.registerInterceptor(b.build());
        elementProxy.registerInterceptor(new StaleElementInterceptor());

        return element;
    }
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.