முக்கிய உள்ளடக்கத்திற்குச் செல்லவும்
🇺🇦  We stand with the people of Ukraine. We encourage compassion, and hope for peace.   🇺🇦
Please support humanitarian efforts for the Ukraine crisis through the International Committee of the Red Cross! #StandWithUkraine

திரையில் இடமாற்று

Switch focus to a particular tab / window.

Usage
browser.switchWindow(matcher)
Parameters
NameTypeDetails
matcherString, RegExpString or regular expression that matches either the page title or URL, the window name, or the window handle
Example
switchWindow.js
it('should switch to another window', async () => {
// open url
await browser.url('https://google.com')

// get window handle
const handle = await browser.getWindowHandle()

// create new window
await browser.newWindow('https://webdriver.io')

// switch back via url match
await browser.switchWindow('google.com')

// switch back via title match
await browser.switchWindow('Next-gen browser and mobile automation test framework for Node.js')

// switch back via window handle
await browser.switchWindow(handle)
});

Welcome! How can I help?

WebdriverIO AI Copilot
Morty Proxy This is a proxified and sanitized view of the page, visit original site.