Navigation

session.navigateTo(targetUrl)

Navigate to a new URL.

PARAMETERS

  • targetUrl: string - New URL to navigate

RETURNS

Promise<void>

EXAMPLES

await session.navigateTo('http://localhost:8080');

SEE ALSO

session.getCurrentUrl()

Get current page URL

RETURNS

Promise<string>

EXAMPLES

const currentUrl = await session.getCurrentUrl();
// currentUrl = 'http://localhost:8080'

SEE ALSO

session.back()

Navigate to previous url from history

RETURNS

Promise<void>

EXAMPLES

await session.back();

SEE ALSO

session.forward()

Navigate forward to next url from history

RETURNS

Promise<void>

EXAMPLES

await session.forward();

SEE ALSO

session.refresh()

Refresh the current page

RETURNS

Promise<void>

EXAMPLES

await session.refresh();

SEE ALSO

session.getTitle()

Get the current page title.

RETURNS

Promise<string>

EXAMPLES

const title = await session.getTitle();
// title = 'web page title'

SEE ALSO

Last updated