Class WebElementListMethodInterceptor

  • All Implemented Interfaces:
    org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor

    public class WebElementListMethodInterceptor
    extends java.lang.Object
    implements org.aopalliance.intercept.MethodInterceptor
    Ensures that the web elements which are contained in the proxied list are proxied by themselves. The WebElementListMethodInterceptor ensures this by calling WebElementProxyFactory.getWebElementProxy(Supplier) for each contained web element. It intercepts the following methods:
    • Iterable.iterator()
    • Iterable.spliterator()
    • Iterable.forEach(Consumer)
    • List.get(int)
    • List.listIterator()
    • List.listIterator(int)
    Since:
    2.0.0
    Author:
    Oliver Libutzki <[email protected]>
    • Constructor Summary

      Constructors 
      Constructor Description
      WebElementListMethodInterceptor​(com.google.common.base.Supplier<java.util.List<org.openqa.selenium.WebElement>> webElementListSupplier)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object invoke​(org.aopalliance.intercept.MethodInvocation invocation)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WebElementListMethodInterceptor

        public WebElementListMethodInterceptor​(com.google.common.base.Supplier<java.util.List<org.openqa.selenium.WebElement>> webElementListSupplier)
    • Method Detail

      • invoke

        public java.lang.Object invoke​(org.aopalliance.intercept.MethodInvocation invocation)
                                throws java.lang.Throwable
        Specified by:
        invoke in interface org.aopalliance.intercept.MethodInterceptor
        Throws:
        java.lang.Throwable