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 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
-
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
-