New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[🚀 Feature]: Consolidate Actions class features #10724
Comments
Just wonder if how to draw a picture based on above features? e.g. drive the Pointer to do the signature on webpage. |
@alaahong You could do it with a combination of "move by offset from viewport" (or element), "click and hold," "move by offset from current pointer location," and "release," though likely it's more trouble than it's worth? https://www.selenium.dev/documentation/webdriver/actions_api/mouse/ |
It was agreed in TLC meeting from Aug 17 to implement proposals 1 & 2 |
…nput device Related to SeleniumHQ#10724
…nput device Related to SeleniumHQ#10724
…nput device Related to SeleniumHQ#10724
…nput device Related to SeleniumHQ#10724
…nput device Related to SeleniumHQ#10724
* [java] Add move to location method to Actions Related to #10724 * [dotnet] Add move to location method to Actions class * [java] only support one implementation of moveToLocation pointer action Co-authored-by: titusfortner <titus.fortner@gmail.com>
Ok, finally closing out this issue since we've implemented everything we said we would. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Dependencies
Feature and motivation
Did a comparative analysis of Actions class functionality between languages:
https://www.selenium.dev/documentation/webdriver/actions_api/
Differences of note
Proposal 1: Allow setting default pointer in Python & .NET
This saves the step of needing to define the action and add to the input and then perform.
Note: this example is Python, I haven't looked to see how difficult in .NET
Proposal 2: Move to Location method in Java & .NET
Adds one method to Actions class
Currently no option for moving based on Viewport origin, only Element origin
The parameter could be x, y integers or a single Coordinate/Point object instance
Proposal 3: Allow changing of default duration in Java & .NET (tracking in #12118)
Adds one constructor to Actions class
Appium wants a default of 50ms instead of 250ms
Putting it in Actions constructor is much lower impact than adding the parameter to each method
Discuss with Appium Devs First
Proposal 4: Provide a better way to perform action sequences in Java
The
Collections.singletonList
requirement just feels clunky and unintuitive to me.It is extra overhead, and might be worth waiting to implement until after we do #10808 since that's where we're going to want to add multiple sequences.
instead of:
Wrap it with this:
Proposal 5: Allow PointerEvents to be used with Actions Convenience class
This would be lots more methods, and since PointerEvents are mostly not useful at this point, I don't think we should do this one
Proposal 6: Specify Buttons
Add parameter for which button to click to
clickAndHold()
,release()
, andclick()
(Java & .NET)Adds three methods to Actions class (which is a lot, so probably we shouldn't do this one)
Note: this one is probably not worth it because the use cases are not that interesting.
The text was updated successfully, but these errors were encountered: