Interface HealingProvider
public interface HealingProvider
SHAFT-owned contract for optional explainable element recovery providers.
Providers are discovered through ServiceLoader. They may
inspect the current page and return already-derived candidates, but they must
never execute the intended user action.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidclear(org.openqa.selenium.WebDriver driver) Clears provider session state for a closed driver.default Optional<HealingExplanation> Returns a safe explanation for a recovery attempt.voidobserve(HealingObservation observation) Records evidence from a unique successful original resolution.voidrecordOutcome(HealingActionOutcome outcome) Records the action outcome after SHAFT, not the provider, executes it.resolve(HealingRequest request) Attempts recovery for a locator-not-found failure.
-
Method Details
-
resolve
Attempts recovery for a locator-not-found failure.- Parameters:
request- recovery request- Returns:
- a unique validated resolution, or empty to preserve the original failure
-
explain
Returns a safe explanation for a recovery attempt.- Parameters:
attemptId- provider-owned safe correlation identifier- Returns:
- explanation when available
-
observe
Records evidence from a unique successful original resolution.- Parameters:
observation- successful observation
-
recordOutcome
Records the action outcome after SHAFT, not the provider, executes it.- Parameters:
outcome- action outcome
-
clear
default void clear(org.openqa.selenium.WebDriver driver) Clears provider session state for a closed driver.- Parameters:
driver- closed driver
-