forked from SeleniumHQ/selenium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix up bugs to with Actions when using JSON or W3C commands
There were a number of bugs in the recently-landed updates to `Actions`. The major ones were: * If the `WebDriver` instance implemented both `Interactive` and `HasInputDevices` the wrong set of W3C actions would be constructed. * It was occasionally possible for multiple `Action` instances to be added where only one was needed. The solution makes the implementation of `Actions` uglier but does resolve the problem. What we do is ensure that each public method correctly populates both the `CompositeAction` and the action sequences required for the W3C implementation. To make it trivially easy to determine that each method is doing this, we avoid delegation to other methods, even when this would make life easier (eg. "click()" -> "click(null)") as this would require additional logic in each of the methods to figure out what the intended behaviour (already given by the method call!) would be. This isn't my neatest work, but I think it works.
- Loading branch information
Showing
1 changed file
with
75 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters