Webdriver command batches suggestion
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 718
- Forks
- 228
- PR merge metrics
- No merged PRs in 30d
Description
https://www.w3.org/Bugs/Public/show_bug.cgi?id=26266
Anton Zhuravsky:
Hi guys,
I have recently encountered an challenge while implementing automated tests and think we can design a pretty useful generic feature out of it.
The idea is pretty simple: create an interface to be able to create a batch of commands and get a notification upon their completion. So, basically the approach is:
- An API consumer requests WebDriver to notice batch start
- WebDriver replies with a unique batch id
- All the commands executed later on are associated with this batch
- An API consumer requests WebDriver to notice batch finish
- An API consumer is able to ask if the batched commands have been completed
- (Optional) WebDriver can notify API consumer about batch finalization
The motivation behind this is pretty simple: executing some actions can produce delayed side effects (send an AJAX request and handling a callback once it finishes; submitting the form into an iframe and handling onload event; etc). Unfortunately, currently there is no way to know that a command (or a set of commands) have finished working completely (including all side effects produced directly or indirectly by them).
Why do we need this is real world? Well, a number of examples can be provided: the simpliest is writing automated tests for javascript code, which requires asserting some values only after all asynchronous activity has completed.
Please note it is different from page loading modes as the effects are not limited to network / parser / DOM – one can set a delayed executing (via setTimeout) and aim to check if it worked properly (and, of course, only after setTimeout has fired), which gets handled by the proposed functionality.
If anyone could provide his thoughts on the suggestion it would be great – I am keen to discuss and polish the design of this feature :)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository files, tests, or entry points are identified. Start by reviewing the linked W3C bug and the existing WebDriver specification to understand how command execution and completion are defined; done would require an agreed batch API and its specification scope.
Written by the indexing model from the issue text.
Assessment
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100