Class HealingManager

java.lang.Object
com.shaft.gui.internal.healing.HealingManager

public final class HealingManager extends Object
Guards optional SHAFT Heal provider calls and preserves deterministic fallback.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    clear(org.openqa.selenium.WebDriver driver)
    Clears optional provider state for a driver.
    static void
    observe(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By locator, List<org.openqa.selenium.WebElement> elements, String action, org.openqa.selenium.By frameLocator, org.openqa.selenium.By shadowHostLocator, org.openqa.selenium.By shadowContentLocator)
    Records a unique successful original resolution when SHAFT Heal is active.
    static void
    Records a recorded fingerprint seed when SHAFT Heal is available, without a live driver or element (issue #4161).
    static void
    recordOutcome(org.openqa.selenium.WebDriver driver, HealingResolution resolution, org.openqa.selenium.By originalLocator, String action, boolean successful, String failure)
    Records the result of an action performed by SHAFT on a recovered element.
    resolve(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By locator, String action, boolean visibilityRequired, org.openqa.selenium.By frameLocator, org.openqa.selenium.By shadowHostLocator, org.openqa.selenium.By shadowContentLocator)
    Attempts recovery only for locator-not-found failures at SHAFT-owned element-resolution boundaries.

    Methods inherited from class Object

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

    • resolve

      public static Optional<HealingResolution> resolve(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By locator, String action, boolean visibilityRequired, org.openqa.selenium.By frameLocator, org.openqa.selenium.By shadowHostLocator, org.openqa.selenium.By shadowContentLocator)
      Attempts recovery only for locator-not-found failures at SHAFT-owned element-resolution boundaries.
      Parameters:
      driver - active driver
      locator - failed locator
      action - intended action
      visibilityRequired - whether visibility and enabled state are required
      frameLocator - active frame locator
      shadowHostLocator - active shadow host locator
      shadowContentLocator - active shadow content locator
      Returns:
      validated optional resolution
    • observe

      public static void observe(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By locator, List<org.openqa.selenium.WebElement> elements, String action, org.openqa.selenium.By frameLocator, org.openqa.selenium.By shadowHostLocator, org.openqa.selenium.By shadowContentLocator)
      Records a unique successful original resolution when SHAFT Heal is active.
      Parameters:
      driver - active driver
      locator - successful locator
      elements - matching elements
      action - action name
      frameLocator - active frame locator
      shadowHostLocator - active shadow host locator
      shadowContentLocator - active shadow content locator
    • observeFingerprint

      public static void observeFingerprint(HealingFingerprintObservation observation)
      Records a recorded fingerprint seed when SHAFT Heal is available, without a live driver or element (issue #4161). Optional-provider failures are swallowed, matching every other HealingManager entry point -- seeding must never fail generation or replay.
      Parameters:
      observation - recorded seed evidence
    • recordOutcome

      public static void recordOutcome(org.openqa.selenium.WebDriver driver, HealingResolution resolution, org.openqa.selenium.By originalLocator, String action, boolean successful, String failure)
      Records the result of an action performed by SHAFT on a recovered element.
      Parameters:
      driver - active driver
      resolution - recovery resolution
      originalLocator - original locator
      action - action name
      successful - action result
      failure - safe failure category
    • clear

      public static void clear(org.openqa.selenium.WebDriver driver)
      Clears optional provider state for a driver.
      Parameters:
      driver - closing driver