webdriverio/webdriverio

[🐛 Bug]: ScrollIntoView in mobile emulated displays warnings and errors

Open

#10.178 aperta il 12 apr 2023

Vedi su GitHub
 (8 commenti) (0 reazioni) (0 assegnatari)JavaScript (1793 fork)batch import
Bug 🐛help wanted

Metriche repository

Star
 (6029 star)
Metriche merge PR
 (Merge medio 15g 15h) (48 PR mergiate in 30 g)

Descrizione

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

8.8.1

Node.js Version

18.7.0

Mode

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

Guida contributor