我在玩夜表,我有一个如下的测试设置:
module.exports = {
'Load index page with default category' : function(browser)
{
browser
.url(browser.launch_url)
.waitForElementPresent('body', 1000)
.url((result)=>
{
console.log(result.value) // http://example.com/something/
browser.expect.result.value.to.contain("something");
// TypeError: Cannot read property 'to' of undefined
})
.end();
}
}
我不知道该怎么用结果值带着期待。
result.value
日志与预期一致,但我无法验证。
使用
browser.assert.urlContains("something")
,但我想用
expect
相反。