Switch window

const assert = require('assert')

describe('v5.webdriver.io', () => {

    it('should switch to another window', async () => {

         // open url
        await browser.url('https://google.com')

        // create new window
         await browser.newWindow('https://v5.webdriver.io');
         await browser.pause(2000);

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

         // switch back via title match
         await browser.switchWindow('Next-gen WebDriver test framework for Node.js')
        
         await browser.pause(2000);

        })
    
})
Vivacious Vicuña