我很擅长使用 Nightwatch.js 我想点击Facebook图标并在新页面中打开它。
如何测试是否点击了图标链接?感谢。
module.exports = {
"Facebook link" : function (browser) {
browser
.url(http://m.unitel.ao/fit/)
.waitForElementVisible('.socal', 3000)
.waitForElementPresent('.fa.fa-facebook', 15000)
.useCss().click('.fa.fa-facebook')
.pause(3000)
.assert.urlContains('facebook')
.end()}};
安达我得到的是:
> Running: Facebook link
? Element <.socal> was visible after 118 milliseconds.
? Element <.fa.fa-facebook> was present after 21 milliseconds.
? Testing if the URL contains "facebook". - expected "facebook" but got: http: //m.unitel.ao/fit/
它没有打开Facebook页面。有人可以帮帮我吗?