appium / appium-windows-driver

Appium's interface to WindowsAppDriver provided by Microsoft
Apache License 2.0
131 stars 35 forks source link

[windows: clickAndDrag] could you please give another "durationMs" to this function #233

Open pppppino opened 11 months ago

pppppino commented 11 months ago

Hi,

In function [windows: clickAndDrag], you only provide the wait time between pressing the left mouse button and moving the cursor to the ending drag point.

However, I want to have a wait time between moving the cursor to the ending drag point and release mouse., which means you may need add a delay between below code

 toMouseMoveInput({x: endAbsoluteX, y: endAbsoluteY}, screenSize),
 toMouseButtonInput({button: MOUSE_BUTTON.LEFT, action: MOUSE_BUTTON_ACTION.UP}),

otherwise, I can not use it in my test cases automation.

thanks a lot

mykola-mokhnach commented 11 months ago

You are welcome to propose a PR. It should not be too complicated to add such feature. You could also test it locally properly.

pppppino commented 11 months ago

@mykola-mokhnach , Thanks, I will test it once you add this params to this function

mykola-mokhnach commented 11 months ago

I mean you can try to change the source code yourself.

pppppino commented 11 months ago

@mykola-mokhnach , My JS is so poor, but I will have a try on it; Could you kindly tell me how to package your source code to driver package in my local machine?

mykola-mokhnach commented 11 months ago

@mykola-mokhnach , My JS is so poor, but I will have a try on it; Could you kindly tell me how to package your source code to driver package in my local machine?

Something similar to https://github.com/appium/appium-windows-driver/blob/677d39a14ffe6e3080cfe0698c8d2180f68385ef/.github/workflows/functional-test.yml#L32