I'm using nightwatch to test the frontend of an application. I'm testing that some buttons are clickable or not.
Is it possible with nightwatch, to know if there was a network request made by the click, or more generally, to watch the network.
Nightwatch. js is an integrated, easy to use End-to-End testing solution for web applications and websites, written in Node. js. It uses the W3C WebDriver API to drive browsers and perform commands and assertions on DOM elements.
Nightwatch. js framework is a Selenium-based test automation framework, written in Node. js and uses the W3C WebDriver API (formerly Selenium WebDriver). It works by communicating over a restful HTTP API with a WebDriver server (such as ChromeDriver or Selenium Server).
What is Nightwatch API? Nightwatch API is JavaScript (Node. js) programming interface for controlling Nightwatch. js which is an End-to-End (E2E) testing solution for browser based apps and websites.
Yes, you can use https://www.npmjs.com/package/nightwatch-xhr in order to watch for Ajax requests from Nightwatch.js.
(I'm one of the maintainers)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With