javascript - How to navigate back in history with Nightwatch? - Stack Overflow

admin2025-04-26  19

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?

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?

Share Improve this question asked Mar 8, 2016 at 16:10 MatsemannMatsemann 21.9k20 gold badges59 silver badges90 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 7

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

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1745658503a312596.html

最新回复(0)