Class ShadowLocatorBuilder

java.lang.Object
com.shaft.gui.internal.locator.ShadowLocatorBuilder

public class ShadowLocatorBuilder extends Object
Builds shadow DOM locators by pairing a shadow host locator with a CSS selector for elements inside the shadow root.

Thread safety: Uses ThreadLocal fields to isolate locator state per thread.

See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static ThreadLocal<org.openqa.selenium.By>
     
    static ThreadLocal<org.openqa.selenium.By>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ShadowLocatorBuilder(org.openqa.selenium.By shadowDomLocator, org.openqa.selenium.By cssSelector)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.openqa.selenium.By
     
    static void
    Removes all thread-local state held by this builder, preventing memory leaks in long-running or parallel test environments.

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • shadowDomLocator

      public static ThreadLocal<org.openqa.selenium.By> shadowDomLocator
    • cssSelector

      public static ThreadLocal<org.openqa.selenium.By> cssSelector
  • Constructor Details

    • ShadowLocatorBuilder

      public ShadowLocatorBuilder(org.openqa.selenium.By shadowDomLocator, org.openqa.selenium.By cssSelector)
  • Method Details

    • cleanup

      public static void cleanup()
      Removes all thread-local state held by this builder, preventing memory leaks in long-running or parallel test environments.
    • build

      public org.openqa.selenium.By build()