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.
In the below repo I've created a simple test to show the errors experienced.
[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.