webdriver
webdriver copied to clipboard
"move target out of bounds" error applies to wheels too
In chapter 6. Protocol, section 6.6 Errors:
The target for mouse interaction is not in the browser’s viewport and cannot be brought into that viewport.
I can make a PR for this, but should it be "target for the wheel or pointer interaction" or just "target for the interaction"?
I am actually getting a weird error with that. It seems that scrolling to an element using origin always fails due to move target out of bounds, here is an example log:
// navigate to website
[POST] http://localhost:4444/session/5a1ec7a7d105a245be7533e7245377f4/url
DATA { url: 'https://www.stateful.com/' }
// fetch element
[POST] http://localhost:4444/session/5a1ec7a7d105a245be7533e7245377f4/element
DATA { using: 'xpath', value: './/p[normalize-space() = "Our Blog"]' }
RESULT {
'element-6066-11e4-a52e-4f735466cecf': '6a94f640-6527-4dbc-9008-9689099a1c59'
}
// run wheel action
COMMAND performActions(<object>)
[POST] http://localhost:4444/session/5a1ec7a7d105a245be7533e7245377f4/actions
DATA {
actions: [
{ id: 'action1', type: 'wheel', parameters: {}, actions: [
{
"type": "scroll",
"x": 0,
"y": 0,
"deltaX": 0,
"deltaY": 0,
"duration": 0,
"origin": {
"element-6066-11e4-a52e-4f735466cecf": "6a94f640-6527-4dbc-9008-9689099a1c59"
}
}
]
}
With Chromedriver I am getting always:
Request failed with status 500 due to move target out of bounds: move target out of bounds
(Session info: chrome=103.0.5060.134)
However the scroll animations till happens.
@christian-bromann, please note that the scroll action doesn't allow to scroll to an element but can be used to scroll at the position of an element. To actually scroll to an element we would need a new action primitive as requested in https://github.com/w3c/webdriver/issues/1005.
In chapter 6. Protocol, section 6.6 Errors:
The target for mouse interaction is not in the browser’s viewport and cannot be brought into that viewport.
I can make a PR for this, but should it be "target for the wheel or pointer interaction" or just "target for the interaction"?
@titusfortner it would actually apply to all pointer and wheel input sources. If you could provide a patch I would happily review it. Thanks.
I don't remember what I was thinking I would PR, I definitely conflated the scroll wheel support with that TPAC conversation. I guess because Chrome does it the way I expected it to, I just went with it. How much work would #1005 take to implement?