0

I am trying to write at test case in java script.

Code:

'should verify login dropdown is not visible after clicking away': function (browser) { var welcome = browser.page.welcome(); welcome.navigate() .waitForElementVisible('@loginButton', 5000) welcome.click('@loginButton') welcome.expect.element('@logoutButton').text.to.equal('Logout').after(500) welcome.click('@usersButton') welcome.element('@logoutButton').to.not.be.present },

For the last line I am getting an error like below. No idea why to.not.be.present is not recognized while it's described in NightWatch documentation. Any advice from anyone ?

TypeError: undefined is not a function at Object.module.exports.should verify login dropdown is not visible after clicking away ...

Michau
  • 59
  • 1
  • 9

1 Answers1

0

Problem solved. Forgot about expect in last line. Solution: welcome.expect.element('@logoutButton').to.not.be.present

Michau
  • 59
  • 1
  • 9