UNPKG

devtools

Version:

A Chrome DevTools protocol binding that maps WebDriver commands into Chrome DevTools commands using Puppeteer

19 lines (18 loc) 649 B
/** * The navigateTo (go) command is used to cause the user agent to navigate the current * top-level browsing context a new location. * * @alias browser.navigateTo * @see https://w3c.github.io/webdriver/#dfn-navigate-to * @param {string} url current top-level browsing context’s active document’s document URL * @return {string} current document URL of the top-level browsing context. */ export default async function navigateTo({ url }) { /** * when navigating to a new url get out of frame scope */ delete this.currentFrame; const page = this.getPageHandle(); await page.goto(url); return null; }