GithubHelp home page GithubHelp logo

Comments (14)

diego-epicura avatar diego-epicura commented on August 17, 2024 2

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.

Nisthar avatar Nisthar commented on August 17, 2024

updates?

from wd.

Nisthar avatar Nisthar commented on August 17, 2024

Is this library maintained?

from wd.

admc avatar admc commented on August 17, 2024

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.

Nisthar avatar Nisthar commented on August 17, 2024

@admc Thanks. i have tried webdriverio before. They don't support selecting elements by id. Its hard to use it with appium.

from wd.

Nisthar avatar Nisthar commented on August 17, 2024

@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.

imurchie avatar imurchie commented on August 17, 2024

@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.

Nisthar avatar Nisthar commented on August 17, 2024

@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.

Nisthar avatar Nisthar commented on August 17, 2024

@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.

imurchie avatar imurchie commented on August 17, 2024

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.

Nisthar avatar Nisthar commented on August 17, 2024

@imurchie i also tried that code. Its the same error.

from wd.

Nisthar avatar Nisthar commented on August 17, 2024

any updates on this? @admc

from wd.

brunojbarros avatar brunojbarros commented on August 17, 2024

@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.

admc avatar admc commented on August 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.