Hello, I recently started working with Nightwatch.js . I want to test the click on the facebook icon.
The code is this:
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()}};
Result is this:
> 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/
While running the test it does not open the facebook page. Can someone help and tell you what is wrong?