முக்கிய உள்ளடக்கத்திற்குச் செல்லவும்

உருட்டு

உலாவி காட்சியில் உருட்டவும். கவனிக்கவும், x மற்றும் y ஆயங்கள் தற்போதைய உருட்டு நிலைக்கு தொடர்புடையதாக இருக்கும், எனவே browser.scroll(0, 0) என்பது எந்த செயலும் செய்யாது.

பயன்பாடு
browser.scroll(x, y)
அளபுருக்கள்
பெயர்வகைவிவரங்கள்
x=0
விருப்பத்தேர்வு
numberகிடைமட்ட உருட்டு நிலை (இயல்புநிலை: 0)
y=0
விருப்பத்தேர்வு
numberசெங்குத்து உருட்டு நிலை (இயல்புநிலை: 0)
எடுத்துக்காட்டு
scroll.js
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
});

Welcome! How can I help?

WebdriverIO AI Copilot