Class WebElementHandler

  • All Implemented Interfaces:
    net.sf.cglib.proxy.Callback, net.sf.cglib.proxy.MethodInterceptor

    public class WebElementHandler
    extends Object
    implements net.sf.cglib.proxy.MethodInterceptor
    Binds the WebElementEnhanced. Provides the same behavior as the WebElement for the WebElementEnhanced: The WebElementEnhanced is initially only created as a proxy. Only when accessing a method in the proxy object the element in the DOM is accessed. Thus, as in the WebElement, an exception occurs with a failed DOM access when a method is called.
    Author:
    Daniel Keiss <daniel.keiss@telekom.de>

    Copyright (c) 2019 Daniel Keiss, Deutsche Telekom AG This file is distributed under the conditions of the Apache License, Version 2.0. For details see the file license on the toplevel.

    • Constructor Detail

      • WebElementHandler

        public WebElementHandler​(org.openqa.selenium.WebDriver webDriver,
                                 org.openqa.selenium.support.pagefactory.ElementLocator locator)
    • Method Detail

      • intercept

        public Object intercept​(Object o,
                                Method method,
                                Object[] objects,
                                net.sf.cglib.proxy.MethodProxy methodProxy)
                         throws Throwable
        Specified by:
        intercept in interface net.sf.cglib.proxy.MethodInterceptor
        Throws:
        Throwable
      • invokeListContainingWebElementEnhanced

        protected Object invokeListContainingWebElementEnhanced​(Object[] objects,
                                                                net.sf.cglib.proxy.MethodProxy methodProxy)
                                                         throws Throwable
        Throws:
        Throwable