Capture outgoing network calls from the browser.

captureNetworkRequests() is only available when using Chrome or Edge drivers.

Usage

.captureNetworkRequests(callback)

Parameters

Name Type description
callback function

callback function to be called whenever a outgoing network call is made.

Example

Or run locally with:

git clone https://github.com/pineviewlabs/nightwatch-examples.git
cd nightwatch-examples
npm install
npx nightwatch tests/api/captureNetworkRequests.js --env chrome

Recommended content