0

My tests has been working well for over a year, today I started to get the following error in numerous parts of my test suits:

Error: Error while running "waitForElementVisible" command: "Error: Provided locating strategy "//span[contains(text(),'Element')]" is not supported for .waitForElementVisible(). It must be one of the following: id, css selector, link text, partial link text, tag name, xpath

All Xpath locators are valid (worked before, checked in a browser console). If I replace .waitForElementVisible() with verify.elementPresent() - it works

Does anyone have any idea what could've possibly happened?

  • This is strange. Try specifying the locator strategy with `.waitForElementVisible('xpath', "//span[contains(text(),'Element')]")`? – C. Peck May 14 '21 at 10:48
  • The error goes away if I either remove the message parameter or add abortOnFailure false. Seems like this could be a bug, filed with nightwatch here: https://github.com/nightwatchjs/nightwatch/issues/2695 – T Georgia May 17 '21 at 13:15
  • What Version of nightwatch do you use? so far version `1.6.3` didn't give me any trouble – Vladislav Bulanov Jul 26 '21 at 11:13

0 Answers0