添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
重感情的羊肉串  ·  Structure (JNA API)·  19 小时前    · 
打盹的领带  ·  Structure (JNA API)·  19 小时前    · 
欢快的椅子  ·  [🐛 Bug]: ...·  20 小时前    · 
打篮球的甘蔗  ·  Use getaddrinfo to ...·  22 小时前    · 
八块腹肌的大葱  ·  C# ...·  昨天    · 
想表白的楼房  ·  自动化运维- ...·  7 月前    · 
讲道义的山羊  ·  ElanGroup Blog: ...·  1 年前    · 

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

Have you read the Contributing Guidelines on issues?

  • I have read the Contributing Guidelines on issues .
  • WebdriverIO Version

    8.8.1

    Node.js Version

    18.7.0

    Standalone Mode

    Which capabilities are you using?

    maxInstances : 1 , browserName : "chrome" , acceptInsecureCerts : true , "goog:chromeOptions" : { "mobileEmulation" : { "deviceName" : "iPhone 8 Plus" "args" : [ "--window-size=414,736" ]

    What happened?

    Executing a test on a mobile emulated device in Chrome that uses the ScrollIntoView() method results in a series on warnings and an error when executed.

    What is your expected behavior?

    No response

    How to reproduce the bug.

    In the below repo I've created a simple test to show the errors experienced.

    https://github.com/ben-jardine/wdio-scrollintoview-bug

    Relevant log output

    [0-0] RUNNING in chrome - file:///tests/bug.spec.js
    [0-0] 2023-04-12T13:48:28.975Z WARN webdriver: Request failed with status 400 due to invalid argument: Invalid parameters
    [0-0]   (Session info: chrome=112.0.5615.49)
    [0-0] 2023-04-12T13:48:29.029Z WARN webdriver: Request failed with status 400 due to invalid argument: Invalid parameters
    [0-0]   (Session info: chrome=112.0.5615.49)
    [0-0] 2023-04-12T13:48:29.078Z WARN webdriver: Request failed with status 400 due to invalid argument: Invalid parameters
    [0-0]   (Session info: chrome=112.0.5615.49)
    [0-0] 2023-04-12T13:48:29.127Z ERROR webdriver: Request failed with status 400 due to invalid argument: invalid argument: Invalid parameters
    [0-0]   (Session info: chrome=112.0.5615.49)
    [0-0] 2023-04-12T13:48:29.127Z WARN webdriverio: Failed to execute "scrollIntoView" using WebDriver Actions API: invalid argument: Invalid parameters
    [0-0]   (Session info: chrome=112.0.5615.49)!
    [0-0] Re-attempting using `Element.scrollIntoView` via Web API.
    [0-0] PASSED in chrome - file:///tests/bug.spec.js

    Code of Conduct

  • I agree to follow this project's Code of Conduct
  • Is there an existing issue for this?

  • I have searched the existing issues
  • Thanks for reporting!

    It seems that WebdriverIO sends the following performAction params:

    [0-0] {
    [0-0]     "id": "action1",
    [0-0]     "type": "wheel",
    [0-0]     "parameters": {},
    [0-0]     "actions": [
    [0-0]         {
    [0-0]             "type": "scroll",
    [0-0]             "x": 0,
    [0-0]             "y": 0,
    [0-0]             "deltaX": 0,
    [0-0]             "deltaY": 2504,
    [0-0]             "duration": 200
    [0-0]         }
    [0-0]     ]
    [0-0] }
    

    which fails in Chromedriver due to:

    [1681317382.355][DEBUG]: DevTools WebSocket Response: Input.dispatchTouchEvent (id=58) (session_id=B8E9BA2AE01C422EBE666B21238D088B) 5D57DB72A1368C4A6D9F64B5D46168D5 {"code":-32602,"data":"Failed to deserialize params.type - BINDINGS: mandatory field missing at position 55","message":"Invalid parameters"}
    

    I am not sure why this input is invalid. Chromedriver should support the scroll action.

    Any contributions that resolves the bug are highly appreciated. Don't expect this to be picked up by active contributors as they have their own priorities. If you depend on this bug to be fixed, your contribution is required. Please take a look into our contribution guidelines and let us know if you have any questions. Cheers!

    Also having the same issue on v8.16.20 on Chrome v117

    We are doing the following:

    async click(scrollIntoViewOptions: ScrollIntoViewOptions = { block: 'center' }) {
        const element = await this.get();
        await element.scrollIntoView(scrollIntoViewOptions);
        await element.waitForClickable();
        await element.click();
    

    We also are using mobileEmulation as per op. Without it, Chrome has no errors (including Android Chrome), with it I have same errorsr as above.

    Here's the capabilities for our mobile emulation in case anyone needs it for further diagnosing:

        'goog:chromeOptions': {
          mobileEmulation: {
            deviceMetrics: {
              width: 360,
              height: 800,
              pixelRatio: 3.0,
    

    We have exactly the same problem in the project, this is one of the reasons that does not allow us to migrate to wdio 8 from wdio 7 :(

    This should not be a reason why you can't upgrade since you always can call the v7 implementation like this:

    await browser.execute((el) => el.scrollIntoView(), await $('elem'))

    or overwrite the command.

    Apologies for the delay, I no longer get the 400 error but I do now get a bunch of 500's like the ones shown below. It does scrollIntoView and the test passes still.

    [0-0]   (Session info: chrome=119.0.6045.159)
    [0-0] 2023-11-21T08:19:10.604Z WARN webdriver: Request failed with status 500 due to move target out of bounds
    [0-0]   (Session info: chrome=119.0.6045.159)
    [0-0] 2023-11-21T08:19:10.998Z WARN webdriver: Request failed with status 500 due to move target out of bounds
    [0-0]   (Session info: chrome=119.0.6045.159)
    [0-0] 2023-11-21T08:19:11.346Z ERROR webdriver: Request failed with status 500 due to move target out of bounds: move target out of bounds
    [0-0]   (Session info: chrome=119.0.6045.159)
    [0-0] 2023-11-21T08:19:11.346Z WARN webdriverio: Failed to execute "scrollIntoView" using WebDriver Actions API: move target out of bounds
    [0-0]   (Session info: chrome=119.0.6045.159)!
    [0-0] Re-attempting using `Element.scrollIntoView` via Web API.