Class WebElementDecorator

  • All Implemented Interfaces:
    org.openqa.selenium.support.pagefactory.FieldDecorator

    public class WebElementDecorator
    extends Object
    implements org.openqa.selenium.support.pagefactory.FieldDecorator
    Provides the extended WebElement via the WebElementHandler. The WebElementEnhanced is integrated into the page objects using the @FindBy Annotation. The use of WebElementEnhanced is not mandatory.
    Author:
    Daniel Keiss <daniel.keiss@telekom.de>

    Copyright (c) 2020 Daniel Keiss, Deutsche Telekom IT GmbH 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

      • WebElementDecorator

        public WebElementDecorator​(@NonNull
                                   @NonNull org.openqa.selenium.WebDriver webDriver)
    • Method Detail

      • decorate

        public Object decorate​(ClassLoader loader,
                               Field field)
        Specified by:
        decorate in interface org.openqa.selenium.support.pagefactory.FieldDecorator
      • isWebElementEnhanced

        protected boolean isWebElementEnhanced​(Field field)
      • isListWithWebElementEnhanced

        protected boolean isListWithWebElementEnhanced​(Field field)
      • getEnhancedObject

        protected Object getEnhancedObject​(Field field,
                                           org.openqa.selenium.support.pagefactory.DefaultElementLocatorFactory defaultElementLocatorFactory)