WebDriverAgent multi session and parralel execution of command
See original GitHub issueThe problem
My problem, question concerns WebDriverAgent sub repository.
We can’t perform several actions simultaneously because when executing an action with a Session ID the latter will wait for the screen of the Device to stop moving again before sending back a response to the call and performing pending action in the pipe.
For example, with the device you test, open a long website using Chrome and perform a Swipe from top to bottom. The action will take 11second to send back a response to the caller and start executing the second action in the pipe that we would have executed in parralel. Those 11s are due to the fact that the IOS screen keep moving. (If you positionned the scroll at the bottom of the page, because there is nothing to scroll down anymore, the action will be executed way quicker (s).
So I was hoping that we could have several session in parralel to perform simultaneous action. But whenever we execute a POST command to generate a new Session ID it invalidates the previous one.
Could you please help us how to deal with it ?
Thank you in advance
Environment
- WDA version (or git revision) that exhibits the issue: Not using Appium but WebDriverAgent only: 3.16.0
- Desktop OS/version used to run WDA: MACOS BigSur 11.6
- Node.js version (unless using Appium.app|exe): 12.22.1
- Npm or Yarn package manager: 6.14.12
- Real device or emulator/simulator:IPhone 6 Plus
- Appium CLI or Appium.app|exe: N/A
Code To Reproduce Issue [ Good To Have ]
Generate Session ID
curl -X POST $JSON_HEADER -d "{\"desiredCapabilities\":{\"bundleId\":\" jp.asurion.hako.nonprod\"}, \"capabilities\":{}}" $DEVICE_URL/session -s -w 'Total: %{time_total}s\n'
Simulating a SWIPE from top to bottom (just updating the y value
url -X POST $DEVICE_URL/session/$SESSION_ID/wda/touch/perform -H 'content-type: application/json' -d '{"actions":[[{"action": "tap","options": { "x": 314.8047105073929, "y": 480.46292304992676 }}, {"action": "wait","options": { "ms": 17 }}, {"action": "moveTo","options": { "x": 252.25136697292328, "y": 479.13202476501465 }}, {"action": "wait","options": { "ms": 17 }}, {"action": "release","options": { }} ]]}' -s -w 'Total: %{time_total}s\n'
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top GitHub Comments
It has nothing to do with Appium. It simply proxies all requests to XCTest framework. Btw the latter does not even provide any public APIs for touch actions, just a couple of shortcuts
Nothing I know of.
I would try to play with
waitForIdleTimeout
/animationCoolOffTimeout
settings to cut off delays. Although, this might possibly create another issues.