Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to navigate back in history with Nightwatch?

I have a test that clicks some links that navigate the browser in a single-page-application. In the test, I want the browser to go back to the original page, and then assert that the state is correct.

How can I make Nightwatch go back as if it clicked the back button in the browser?

like image 833
Matsemann Avatar asked Mar 13 '23 00:03

Matsemann


1 Answers

A simple client.back() should work, as documented in the API/Protocol reference.

like image 144
Matsemann Avatar answered Mar 24 '23 13:03

Matsemann