From conversation:
Error Handling
- Never Error Out: Record when errors occurred (on what elements and during which actions), but should always be able to complete its search (try all events on all discovered interactive elements)
- Config option to allow fatal erroring?
- Define some custom exceptions for different errors that occur
- Bubbling errors to the builder
- WebAccess State Manager?
Errors to handle: -- Doing this for public functions only
WebAccess::capture_screenshot
- Could not capture screenshot (this can happen with a pdf for example)
WebAccess::load
- Failed to load url.
- Failed to save dom to local.
- Failed to load initial state from local.
- Page did not have valid dom.
WebAccess::perform_action_on_element
- This element doesn't exist on the page.
- This element exists but isn't reachable.
- Selenium: Timed out performing this action.
- Selenium: Could not interact with this element.
- This action tried to inject JavaScript that did not run correctly.
- This action tried to load a new page, but the page timed out (Okay for now since we don't care so much about stub states).
- This action loaded a new page that did not have a valid dom.
WebAccess::set_state
- Failed to load initial state. Could be a problem with the local server?
- Could not follow path to target state
WebAccess::run_js
- Selenium: Failed to run JavaScript
From conversation:
Error Handling
Errors to handle: -- Doing this for public functions only
WebAccess::capture_screenshotWebAccess::loadWebAccess::perform_action_on_elementWebAccess::set_stateWebAccess::run_js