Class JsWebElementInvocationHandler

java.lang.Object
io.github.giulong.spectrum.utils.js.JsWebElementInvocationHandler
All Implemented Interfaces:
InvocationHandler, org.openqa.selenium.SearchContext, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.WebElement

public class JsWebElementInvocationHandler extends Object implements org.openqa.selenium.WebElement, InvocationHandler
  • Constructor Details

    • JsWebElementInvocationHandler

      public JsWebElementInvocationHandler()
  • Method Details

    • 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(@NotNull CharSequence... keysToSend)
      Specified by:
      sendKeys in interface org.openqa.selenium.WebElement
    • clear

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

      @NotNull public String getTagName()
      Specified by:
      getTagName in interface org.openqa.selenium.WebElement
    • getDomProperty

      public String getDomProperty(@NotNull String name)
      Specified by:
      getDomProperty in interface org.openqa.selenium.WebElement
    • getDomAttribute

      public String getDomAttribute(@NotNull String name)
      Specified by:
      getDomAttribute in interface org.openqa.selenium.WebElement
    • getAttribute

      public String getAttribute(@NotNull String name)
      Specified by:
      getAttribute in interface org.openqa.selenium.WebElement
    • getAriaRole

      public String getAriaRole()
      Specified by:
      getAriaRole in interface org.openqa.selenium.WebElement
    • getAccessibleName

      public String getAccessibleName()
      Specified by:
      getAccessibleName 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

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

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

      @NotNull public org.openqa.selenium.WebElement findElement(@NotNull org.openqa.selenium.By by)
      Specified by:
      findElement in interface org.openqa.selenium.SearchContext
      Specified by:
      findElement in interface org.openqa.selenium.WebElement
    • getShadowRoot

      @NotNull public org.openqa.selenium.SearchContext getShadowRoot()
      Specified by:
      getShadowRoot in interface org.openqa.selenium.WebElement
    • isDisplayed

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

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

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

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

      @NotNull public String getCssValue(@NotNull String propertyName)
      Specified by:
      getCssValue in interface org.openqa.selenium.WebElement
    • getScreenshotAs

      @NotNull public <X> X getScreenshotAs(@NotNull 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
    • invoke

      public Object invoke(Object proxy, Method method, Object[] args)
      Specified by:
      invoke in interface InvocationHandler