最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin10浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论