-
Notifications
You must be signed in to change notification settings - Fork 0
Consider improving JavaScript workarounds #36
Description
Background
In a number of places it has become apparent that browsers and/or web drivers have bugs which mean that normal interactions don't work as they would be expected.
Just looking at the browser flags shows where this is the case.
Often, there is a JavaScript-based workaround available for the action which the web driver would otherwise perform. One such workaround is currently in use for setting date values (some browsers need to set it directly via script).
This workaround currently only works for an element selected by ID. However JavaScript has come some way and native selection by CSS selector is also possible.
This ticket
This ticket is to look into the feasibility of expanding upon that 'JavaScript workaround' concept into some kind of service which can provide workarounds to-order. The outcome would be a feasibility assessment as well as a rough architectural plan to implement it.
Notes so far
Workarounds are expected to be based upon:
- Workaround name
- Each workaround would have a name by which it is registered
- Those names would actually be related to a concrete type which provides that workaround, so actually it wouldn't use a string name, but rather a type name
- Web element adapter (target element)
- Browse the web ability (web driver)
Indeed, the signature of a workaround may well be very similar to the signature of a performable. It might be that I can use the base performable interfaces as the base type for these.
What I expect is a factory which creates the workaround instances, assembling JavaScript from a number of snippets stored in the application. This would return an instance of a type which executes that workaround on the browser.