Class ByShadow

java.lang.Object
org.openqa.selenium.By
com.codeborne.selenide.selector.ByShadow
All Implemented Interfaces:
Serializable

public class ByShadow extends org.openqa.selenium.By implements Serializable
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.openqa.selenium.By

    org.openqa.selenium.By.ByClassName, org.openqa.selenium.By.ByCssSelector, org.openqa.selenium.By.ById, org.openqa.selenium.By.ByLinkText, org.openqa.selenium.By.ByName, org.openqa.selenium.By.ByPartialLinkText, org.openqa.selenium.By.ByTagName, org.openqa.selenium.By.ByXPath, org.openqa.selenium.By.Remotable
  • Constructor Summary

    Constructors
    Constructor
    Description
    ByShadow(org.openqa.selenium.By target, org.openqa.selenium.By shadowHost, org.openqa.selenium.By... innerShadowHosts)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.openqa.selenium.By
    cssSelector(String target, String shadowHost, String... innerShadowHosts)
     
    org.openqa.selenium.WebElement
    findElement(org.openqa.selenium.SearchContext context)
     
    List<org.openqa.selenium.WebElement>
    findElements(org.openqa.selenium.SearchContext context)
     
    static Optional<org.openqa.selenium.SearchContext>
    getShadowRoot(org.openqa.selenium.WebElement element)
    Returns a shadow root of the given element if it presents.
     

    Methods inherited from class org.openqa.selenium.By

    className, cssSelector, equals, getJavascriptExecutor, getWebDriver, hashCode, id, linkText, name, partialLinkText, tagName, xpath

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ByShadow

      public ByShadow(org.openqa.selenium.By target, org.openqa.selenium.By shadowHost, org.openqa.selenium.By... innerShadowHosts)
  • Method Details

    • findElement

      public org.openqa.selenium.WebElement findElement(org.openqa.selenium.SearchContext context)
      Overrides:
      findElement in class org.openqa.selenium.By
    • findElements

      public List<org.openqa.selenium.WebElement> findElements(org.openqa.selenium.SearchContext context)
      Specified by:
      findElements in class org.openqa.selenium.By
    • getShadowRoot

      public static Optional<org.openqa.selenium.SearchContext> getShadowRoot(org.openqa.selenium.WebElement element)
      Returns a shadow root of the given element if it presents.
      Parameters:
      element - element whose shadow root has to be obtained
      Returns:
      shadow root context if it presents
      See Also:
      • GET_SHADOW_ROOT_SCRIPT
    • toString

      public String toString()
      Overrides:
      toString in class org.openqa.selenium.By
    • cssSelector

      public static org.openqa.selenium.By cssSelector(String target, String shadowHost, String... innerShadowHosts)