我正在使用量角器和 cucumberjs 的组合在注销 Angular 应用程序时为浏览器后退按钮编写一个自动化测试.
I am writing an automated test for the browser back button on logout of an angular application using a combination of protractor and cucumberjs.
当尝试使用命令 history.back() 我得到以下错误:
When trying to use the command history.back() I get the following error:
ReferenceError: history is not defined
at World.<anonymous> (/Users/&&&&&/&&&&&/features/step_definitions/browsers.js:62:16)
这指向我调用 history.back();功能.
This points to where I'm calling the history.back(); function.
如何解决这个问题,或者使用黄瓜js正确实现浏览器返回功能?
How do I fix this, or correctly implement a browser back function using cucumber js?
在你的量角器测试中:
browser.navigate().back();
这篇关于使用量角器或 javascript 的浏览器后退按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
即使在调用 abort (jQuery) 之后,浏览器也会等待Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在调用 abort (jQuery) 之后,浏览器也会等待 ajax 调用
JavaScript innerHTML 不适用于 IE?JavaScript innerHTML is not working for IE?(JavaScript innerHTML 不适用于 IE?)
XMLHttpRequest 无法加载,请求的资源上不存在“AXMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 无法加载,请求的资
XHR HEAD 请求是否有可能不遵循重定向 (301 302)Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 请求是否有可能不遵循重定向 (301 302))
XMLHttpRequest 206 部分内容XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分内容)
XMLHttpRequest 的 getResponseHeader() 的限制?Restrictions of XMLHttpRequest#39;s getResponseHeader()?(XMLHttpRequest 的 getResponseHeader() 的限制?)