Class HealingManager
java.lang.Object
com.shaft.gui.internal.healing.HealingManager
Guards optional SHAFT Heal provider calls and preserves deterministic fallback.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidclear(org.openqa.selenium.WebDriver driver) Clears optional provider state for a driver.static voidobserve(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 voidobserveFingerprint(HealingFingerprintObservation observation) Records a recorded fingerprint seed when SHAFT Heal is available, without a live driver or element (issue #4161).static voidrecordOutcome(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.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.
-
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 driverlocator- failed locatoraction- intended actionvisibilityRequired- whether visibility and enabled state are requiredframeLocator- active frame locatorshadowHostLocator- active shadow host locatorshadowContentLocator- 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 driverlocator- successful locatorelements- matching elementsaction- action nameframeLocator- active frame locatorshadowHostLocator- active shadow host locatorshadowContentLocator- active shadow content locator
-
observeFingerprint
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 otherHealingManagerentry 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 driverresolution- recovery resolutionoriginalLocator- original locatoraction- action namesuccessful- action resultfailure- safe failure category
-
clear
public static void clear(org.openqa.selenium.WebDriver driver) Clears optional provider state for a driver.- Parameters:
driver- closing driver
-