java.lang.Object
com.zingtongroup.loggingseleniumwebdriver.loggingseleniumcomponents.LoggingWebElement
All Implemented Interfaces:
LoggingSeleniumComponent, org.openqa.selenium.SearchContext, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.WebElement

public class LoggingWebElement
extends java.lang.Object
implements LoggingSeleniumComponent, org.openqa.selenium.WebElement
  • Field Summary

    Fields
    Modifier and Type Field Description
    java.lang.String elementString  
    LoggerList loggerList  
    org.openqa.selenium.WebElement webElement  
  • Constructor Summary

    Constructors
    Constructor Description
    LoggingWebElement​(org.openqa.selenium.WebElement webElement, LoggerList loggerList)  
  • Method Summary

    Modifier and Type Method Description
    void clear()  
    void click()  
    org.openqa.selenium.WebElement findElement​(org.openqa.selenium.By by)  
    java.util.List<org.openqa.selenium.WebElement> findElements​(org.openqa.selenium.By by)  
    java.lang.String getAttribute​(java.lang.String name)  
    java.lang.String getCssValue​(java.lang.String propertyName)  
    org.openqa.selenium.Point getLocation()  
    org.openqa.selenium.Rectangle getRect()  
    <X> X getScreenshotAs​(org.openqa.selenium.OutputType<X> target)  
    org.openqa.selenium.Dimension getSize()  
    java.lang.String getTagName()  
    java.lang.String getText()  
    boolean isDisplayed()  
    boolean isEnabled()  
    boolean isSelected()  
    void log​(java.lang.String logMessage)  
    void pauseLogging()  
    void resumeLogging()  
    void sendKeys​(java.lang.CharSequence... keysToSend)  
    void sendSecretKeys​(java.lang.CharSequence... keysToSend)
    Hides sent characters in log by utilizing the *** pattern rather than actual characters.
    void submit()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.openqa.selenium.WebElement

    getAccessibleName, getAriaRole, getDomAttribute, getDomProperty, getShadowRoot
  • Field Details

    • webElement

      public final org.openqa.selenium.WebElement webElement
    • loggerList

      public final LoggerList loggerList
    • elementString

      public java.lang.String elementString
  • Constructor Details

    • LoggingWebElement

      public LoggingWebElement​(org.openqa.selenium.WebElement webElement, LoggerList loggerList)
  • Method Details

    • pauseLogging

      public void pauseLogging()
      Specified by:
      pauseLogging in interface LoggingSeleniumComponent
    • resumeLogging

      public void resumeLogging()
      Specified by:
      resumeLogging in interface LoggingSeleniumComponent
    • log

      public void log​(java.lang.String logMessage)
      Specified by:
      log in interface LoggingSeleniumComponent
    • click

      public void click()
      Specified by:
      click in interface org.openqa.selenium.WebElement
    • submit

      public void submit()
      Specified by:
      submit in interface org.openqa.selenium.WebElement
    • sendKeys

      public void sendKeys​(java.lang.CharSequence... keysToSend)
      Specified by:
      sendKeys in interface org.openqa.selenium.WebElement
    • sendSecretKeys

      public void sendSecretKeys​(java.lang.CharSequence... keysToSend)
      Hides sent characters in log by utilizing the *** pattern rather than actual characters.
      Parameters:
      keysToSend - Characters to send to the element
    • clear

      public void clear()
      Specified by:
      clear in interface org.openqa.selenium.WebElement
    • getTagName

      public java.lang.String getTagName()
      Specified by:
      getTagName in interface org.openqa.selenium.WebElement
    • getAttribute

      public java.lang.String getAttribute​(java.lang.String name)
      Specified by:
      getAttribute in interface org.openqa.selenium.WebElement
    • isSelected

      public boolean isSelected()
      Specified by:
      isSelected in interface org.openqa.selenium.WebElement
    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface org.openqa.selenium.WebElement
    • getText

      public java.lang.String getText()
      Specified by:
      getText in interface org.openqa.selenium.WebElement
    • findElements

      public java.util.List<org.openqa.selenium.WebElement> findElements​(org.openqa.selenium.By by)
      Specified by:
      findElements in interface org.openqa.selenium.SearchContext
      Specified by:
      findElements in interface org.openqa.selenium.WebElement
    • findElement

      public org.openqa.selenium.WebElement findElement​(org.openqa.selenium.By by)
      Specified by:
      findElement in interface org.openqa.selenium.SearchContext
      Specified by:
      findElement in interface org.openqa.selenium.WebElement
    • isDisplayed

      public boolean isDisplayed()
      Specified by:
      isDisplayed in interface org.openqa.selenium.WebElement
    • getLocation

      public org.openqa.selenium.Point getLocation()
      Specified by:
      getLocation in interface org.openqa.selenium.WebElement
    • getSize

      public org.openqa.selenium.Dimension getSize()
      Specified by:
      getSize in interface org.openqa.selenium.WebElement
    • getRect

      public org.openqa.selenium.Rectangle getRect()
      Specified by:
      getRect in interface org.openqa.selenium.WebElement
    • getCssValue

      public java.lang.String getCssValue​(java.lang.String propertyName)
      Specified by:
      getCssValue in interface org.openqa.selenium.WebElement
    • getScreenshotAs

      public <X> X getScreenshotAs​(org.openqa.selenium.OutputType<X> target) throws org.openqa.selenium.WebDriverException
      Specified by:
      getScreenshotAs in interface org.openqa.selenium.TakesScreenshot
      Throws:
      org.openqa.selenium.WebDriverException