Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

watch network with nightwatch

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.

like image 996
kokito Avatar asked Mar 26 '15 18:03

kokito


People also ask

What is Nightwatch js used for?

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.

Does Nightwatch js use Selenium?

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?

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.


1 Answers

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)

like image 181
Jalil Avatar answered Oct 01 '22 00:10

Jalil