(webdriverio): fix scrollIntoView#11120
(webdriverio): fix scrollIntoView#11120christian-bromann merged 5 commits intowebdriverio:mainfrom erwinheitzman:fix-scrollintoview-command
Conversation
fix scrollIntoView by aligning it with it's native counterpart for both horizontal and vertical scrolling as well as scrolling multiple times. Changed scroll and scrollIntoView duration to 0
|
This is amazing 🎉 let's adjust the coverage treshold if it keeps failing for Windows. |
| try { | ||
| return await browser.action('wheel') | ||
| .scroll({ duration: 200, x: windowX, y: windowY, deltaX, deltaY, origin }) | ||
| .scroll({ duration: 0, x: deltaX, deltaY, origin: this }) |
There was a problem hiding this comment.
Hello, @christian-bromann, @erwinheitzman
Could you please tell me what's the reason for using x: deltaX here?
Why can't we just use deltaX, deltaY instead?
There was a problem hiding this comment.
I think I made when changing this, it should be y: deltaY
There was a problem hiding this comment.
i see. So it will be changed in future releases?
I just didn't want to create a bug for this minor thing. Scroll is working for me, but with warning and fallback to web api
There was a problem hiding this comment.
Yeah I can correct this, thing is it won't show up in the release notes because we use the issues to generate the release notes.
Regarding the warning, it falls back to the native web scrollIntoView when the webdriver approach throws an error so it would be interesting to find out why it's failing at that attempt and with what error.
fix scrollIntoView by aligning it with it's native counterpart for both horizontal and vertical scrolling as well as scrolling multiple times. Changed scroll and scrollIntoView duration to 0
Proposed changes
Types of changes
Checklist
Reviewers: @webdriverio/project-committers