How do I scroll to a specific X, Y coordinate in WDIO in automation tests?
Hi Dipen Soni,
You can use the below command to scroll to any X Y coordinate in Wdio. It should demonstrate the scroll command -
async () => {
await browser.url('https://webdriver.io')
console.log(await browser.execute(() => window.scrollY)) // returns 0
await browser.scroll(0, 200)
console.log(await browser.execute(() => window.scrollY)) // returns 200
});