optics-framework
Use an AI model to relocate a UI element after a locator fails and continue the test.
What does it do?
When a locator fails during a test, the framework sends the failed locator, screen rows, and a screenshot to the model. If the model chooses the correct row, the test continues, and a validation step on the next screen can check the choice. In the described example, a small model using LoRA runs on a compatible server for a Google Clock test on a Pixel 4a. After the run, recovery details can be reviewed in the log and the locator updated.
Key features
- Send the locator, screen rows, and screenshot to an AI model when element lookup fails
- Have the model select the screen row corresponding to a replacement element
- Connect a model running on an OpenAI-compatible server
- Review recovery results in the test run log