admin管理员组文章数量:1401652
I have been trying the various suggestions for reloading a page.
Reload a page manually
With Nightwatch magellan testarmada. The error I see is "TypeError: Cannot read property 'apply' of undefined"
Has anyone else run into this problem/ solved it?
EDIT: client.navigate().refresh();
does not work.
I have been trying the various suggestions for reloading a page.
Reload a page manually
With Nightwatch magellan testarmada. The error I see is "TypeError: Cannot read property 'apply' of undefined"
Has anyone else run into this problem/ solved it?
EDIT: client.navigate().refresh();
does not work.
- 2 You need to show us your code. – jcubic Commented Feb 22, 2016 at 17:41
2 Answers
Reset to default 6Embarrassingly obvious, once I fixed it. I was calling it in an external function but the problem amounted to this:
module.exports = new Test({
'@disabled': false,
"test page that needs a reload" : function(client){
client
// set url
.url(this.url)
.pause(this.timeout)
.navigate().refresh() // does not work
.refresh() // does work.
},
});
Refrain yourself from using navigate here. Use the mentioned code below:
return client.refresh();
本文标签: refreshNightwatchfriendly command or javascript function to reload a pageStack Overflow
版权声明:本文标题:refresh - Nightwatch-friendly command or javascript function to reload a page - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744309646a2599969.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论