Comments (14)
I wonder if anyone test its own code before posting it. The above does not work, the only code I tried that is also working is
await driver.touchAction([{ action: 'longPress', x: 30, y: 500 }, { action: 'moveTo', x: 20, y: 100 }, 'release'])
from wd.
updates?
from wd.
Is this library maintained?
from wd.
Hi @Nisthar - there are a few amazing folks who review and take PR's, but there's very little new development. If you want something that has active development, I would check out @webdriverio. Cheers.
from wd.
@admc Thanks. i have tried webdriverio before. They don't support selecting elements by id. Its hard to use it with appium.
from wd.
@admc I posted an issue for this on appium. They said the parameters used by wd for scroll command is invalid. Do you think its possible to fix this?
from wd.
@Nisthar Can you post the logs for this? There is no way to fix anything without seeing what you are doing and what is going to the server.
from wd.
@imurchie This is the logs from the appium server:
[HTTP] --> POST /wd/hub/session/5d8de3de-6084-4a10-ac7b-0ebd470e2249/touch/scroll
[HTTP] {"xoffset":10,"yoffset":200}
[MJSONWP (5d8de3de)] Driver proxy active, passing request on via HTTP proxy
[WD Proxy] Proxying [POST /wd/hub/session/5d8de3de-6084-4a10-ac7b-0ebd470e2249/touch/scroll] to [POST http://localhost:8207/wd/hub/session/ae0d684e-bdf3-4f30-85ac-0eaea3b622ff/touch/scroll] with body: {"xoffset":10,"yoffset":200}
[WD Proxy] Got an unexpected response with status 500: {"sessionId":"ae0d684e-bdf3-4f30-85ac-0eaea3b622ff","value":{"error":"unknown error","message":"com.jayway.jsonpath.InvalidPathException: invalid path","stacktrace":"com.jayway.jsonpath.InvalidPathException: invalid path\n\tat com.jayway.jsonpath.internal.filter.FieldFilter.filter(FieldFilter.java:59)\n\tat com.jayway.jsonpath.JsonPath.read(JsonPath.java:191)\n\tat com.jayway.jsonpath.JsonPath.read(JsonPath.java:211)\n\tat io.appium.uiautomator2.handler.ScrollTo.safeHandle(ScrollTo.java:40)\n\tat io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:38)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:252)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:242)\n\tat io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:44)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)\n\tat io.netty.channel.AbstractChannelHandlerContext...
I created an issue for this in appium. But they are saying its an issue with wd library.
This is the issue on appium: appium/appium#13900
from wd.
@imurchie @admc I also tried the code await new wd.TouchAction(driver).press(750,1750 ).moveTo(0,-75).perform();
This is the server logs for it. It seems like wd is not sending the correct parameters to the server:
[HTTP] <-- POST /wd/hub/session/9a27a189-d3ab-4b32-9bb9-9b68994135f3/element/27e3d359-8505-4054-ba66-b87e21197393/click 200 78 ms - 76
[HTTP]
[HTTP] --> POST /wd/hub/session/9a27a189-d3ab-4b32-9bb9-9b68994135f3/touch/perform
[HTTP] {"actions":[{"action":"press","options":{}},{"action":"moveTo","options":{}}]}
[MJSONWP (9a27a189)] Calling AppiumDriver.performTouch() with args: [[{"action":"press","options":{}},{"action":"moveTo","options":{}}],"9a27a189-d3ab-4b32-9bb9-9b68994135f3"]
[WD Proxy] Matched '/touch/down' to command name 'touchDown'
[WD Proxy] Proxying [POST /touch/down] to [POST http://localhost:8207/wd/hub/session/c478494e-2a91-4fa3-ac4d-8984e64e03f0/touch/down] with body: {"params":{"x":0,"y":0}}
[WD Proxy] Got response with status 200: {"sessionId":"c478494e-2a91-4fa3-ac4d-8984e64e03f0","value":null}
[WD Proxy] Matched '/touch/move' to command name 'touchMove'
[WD Proxy] Proxying [POST /touch/move] to [POST http://localhost:8207/wd/hub/session/c478494e-2a91-4fa3-ac4d-8984e64e03f0/touch/move] with body: {"params":{"x":0,"y":0}}
[WD Proxy] Got response with status 200: {"sessionId":"c478494e-2a91-4fa3-ac4d-8984e64e03f0","value":null}
[MJSONWP (9a27a189)] Responding to client with driver.performTouch() result: null
[HTTP] <-- POST /wd/hub/session/9a27a189-d3ab-4b32-9bb9-9b68994135f3/touch/perform 200 1681 ms - 76
from wd.
For touch actions the functions take objects with x
and y
properties.
await new wd.TouchAction(driver).press({x: 750, y: 1750}).moveTo({x: 0, y: -75}).perform();
from wd.
@imurchie i also tried that code. Its the same error.
from wd.
any updates on this? @admc
from wd.
@Nisthar
This is an example using webdriverIO:
driver.touchAction([
{ action: 'press', x: 500, y: 1400 },
{ action: 'moveTo', x: 500, y: 300 },
'release',
{ action: 'press', x: 500, y: 1400 },
{ action: 'moveTo', x: 500, y: 300 },
'release',
{ action: 'press', x: 500, y: 1400 },
{ action: 'moveTo', x: 500, y: 300 },
'release'
])
Hope this can help you.
Regards.
from wd.
hi @diego-epicura this project hasn't been working for a very long time, I suggest you check out the webdriver.io ecosystem!
from wd.
Related Issues (20)
- waitForElementByXPath/id/name does not poll as per the poll frequency provided.
- How to select spinner value in wd
- synchronous REPL mode?
- promiseChainRemote does not allow https HOT 1
- execute script with arguments not work
- 404 HTTP appium No route found HOT 1
- Running test suites
- promiseChainRemote do not work
- can't work with selenium grid
- WaitForElement -functions do not apply timeout on element lookup
- Consider removing request (as it is deprecated) HOT 1
- Two vulnerabilities are introduced in the package HOT 3
- client.moveTo() is not working on latest version of word 2106 HOT 1
- WD does not get the session id with appium. HOT 1
- is v1.14.0 tag missing?
- Getting 'npm ERR! Cannot read properties of null (reading 'pickAlgorithm')' when running `npm install wd` HOT 1
- [Appium] W3C capabilities should be provided HOT 1
- Missing typescript support HOT 1
- Request has been deprecated and is raising security vulnerabilities HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wd.