maxgalbu / nightwatch-custom-commands-assertions

Nightwatch.js custom commands and assertions
MIT License
136 stars 32 forks source link

Suppress error messages while waiting for element #4

Closed drorm closed 9 years ago

drorm commented 9 years ago

I'm using .waitForText and it works correctly except that it displays error messages while waiting for the element to load.

Running:  Job adding
ERROR: Unable to locate element: "#foobar" using: css selector
ERROR: Unable to locate element: "#foobar" using: css selector
...
 ✔ waitForText: #foobar. Expression was true after 1588 ms.

My guess is that these are coming from api.getText()

Is there a way to suppress these error messages?

maxgalbu commented 9 years ago

I guess there's no easy way, you could probably use waitForElementPresent() before using waitForText(). I could use it too but that would add another timeout to the call...