PuppeteerPage

PuppeteerPage

BrowserPage implementation for Puppeteer.

Constructor

new PuppeteerPage()

Source:

Members

FinderClass

Source:

nativeObject

Source:

socket

Source:

window

Source:

Methods

_waitForDialog() → {Promise.<string>}

Source:
Returns:

resolved by confirm message

Type
Promise.<string>

executeJavaScript() → {Promise.<(string|number|boolean)>}

Source:
Returns:
Type
Promise.<(string|number|boolean)>

getURL() → {string}

Source:
Returns:
Type
string

isClosed() → {boolean}

Source:
Returns:

whether this page has been closed

Type
boolean

loadURL() → {Promise.<BrowserPage>}

Source:
Returns:
Type
Promise.<BrowserPage>

openDevTools()

Description:
  • show developer tool, not supported yet.

Source:

reload() → {Promise.<object>}

Source:
Returns:
Type
Promise.<object>

waitForAlert() → {Promise.<string>}

Source:
Returns:

resolved by alert message

Type
Promise.<string>

waitForConfirm() → {Promise.<string>}

Source:
Returns:

resolved by confirm message

Type
Promise.<string>

waitForDownload() → {Promise.<object>}

Description:
  • Wait for a file to be downloaded by the given action.

    A "Content-Disposition: attachment" response is received by the browser as a download, and it is detected by the download events of CDP. The "response" event is not used for it: the browser detaches such a resource for downloading, and the event does not fire at all when the download is begun by a[download], target="_blank" or window.open. A "inline" response is not a download (the browser shows it), so the body is saved here.

Source:
Returns:
Type
Promise.<object>