Skip to content

Feature: Self-healing Lazy Elements #325

@wroske

Description

@wroske

Had an idea from an article I read about using AI to scan a dom to try to self heal a broken locator. I'm thinking of adding the ability to register a "heal" method that, if an element is not found we could call to have it try to get us a better locator... I'll add the link when I find it again, but wanted to get the idea floating....

The idea is that I can register a method that takes the offending locator (By) and hand it and do my own magic (like call OpenAI) to try to find a fixed locator... As I recall the response would be a tuple:[new_locator|null, ByType|null). null,null indicates no better replacement... Then, in our functions we send to the waits, if the method is registered, we would call and either re-try with the new locator, or rethrow the exception.

This would augment abstractLE, so would support both mobile and web.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions