refresh - Nightwatch-friendly command or javascript function to reload a page - Stack Overflow

I have been trying the various suggestions for reloading a page.Reload a page manuallyWith Nightwatch m

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.

Share Improve this question edited Apr 29, 2019 at 17:46 QualiT asked Feb 22, 2016 at 17:38 QualiTQualiT 1,9552 gold badges20 silver badges38 bronze badges 1
  • 2 You need to show us your code. – jcubic Commented Feb 22, 2016 at 17:41
Add a ment  | 

2 Answers 2

Reset to default 6

Embarrassingly 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();

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744309646a4567888.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信