Expect: does not get the actual value

若如初见. 提交于 2019-12-06 11:53:14
Sergey Teplyakov

I fixed this with waiting directly to text to change:

browser.wait(function() {
    return viewBookingDetailsPage.totalCostSection.depositDue.getText().then(function(text) {
        return text === '592.00USD';
    });
}, 15000);

I am sure that something goes wrong here, but it worked for me. If I will have some free time I will try to enhance the answer and investigate it deeper.

This post hints at the fact that one of the steps could be blocked waiting to complete: http://makandracards.com/makandra/1709-single-step-and-slow-motion-for-cucumber-scenarios-using-javascript-selenium. Not sure if that helps at all.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!