Class ImprovedRemoteWebElement

java.lang.Object
org.openqa.selenium.remote.RemoteWebElement
software.xdev.selenium.elements.remote.ImprovedRemoteWebElement
All Implemented Interfaces:
org.openqa.selenium.interactions.Locatable, org.openqa.selenium.SearchContext, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.WebElement, org.openqa.selenium.WrapsDriver, CanFindElements

public class ImprovedRemoteWebElement extends org.openqa.selenium.remote.RemoteWebElement implements CanFindElements
An improved RemoteWebElement that
  • Waits for the page to be loaded properly
  • Automatically scrolls elements into the visible area if needed
  • Uses the fallback JavaScript click function if the element couldn't be clicked
  • Field Details

    • logger

      protected org.slf4j.Logger logger
    • waitForServerLoadToFinishFunction

      protected final String waitForServerLoadToFinishFunction
    • autoScrollIntoView

      protected boolean autoScrollIntoView
  • Constructor Details

    • ImprovedRemoteWebElement

      public ImprovedRemoteWebElement(String waitForServerLoadToFinishFunction)
  • Method Details

    • withAutoScrollIntoView

      public ImprovedRemoteWebElement withAutoScrollIntoView(boolean autoScrollIntoView)
    • logger

      protected org.slf4j.Logger logger()
    • getWebDriver

      public org.openqa.selenium.WebDriver getWebDriver()
      Specified by:
      getWebDriver in interface CanFindElements
    • click

      public void click()
      Specified by:
      click in interface org.openqa.selenium.WebElement
      Overrides:
      click in class org.openqa.selenium.remote.RemoteWebElement
    • performJsClick

      public void performJsClick()
    • getText

      public String getText()
      Specified by:
      getText in interface org.openqa.selenium.WebElement
      Overrides:
      getText in class org.openqa.selenium.remote.RemoteWebElement
    • sendKeys

      public void sendKeys(CharSequence... keysToSend)
      Specified by:
      sendKeys in interface org.openqa.selenium.WebElement
      Overrides:
      sendKeys in class org.openqa.selenium.remote.RemoteWebElement
    • prepareForOperation

      public void prepareForOperation()
    • scrollIntoViewIfRequired

      public void scrollIntoViewIfRequired()
    • waitForServerLoadToFinish

      public void waitForServerLoadToFinish()