Assert that an text or element is NOT visible

Ignores casing and white-spaces. This behavior is not configurable at the moment.


I.dontSee(target, options)
Parameter Type Remarks
target string Text or element to find
options object Optional
Additional options, see below.

# Don't see text


Asserts that the text "Loading" does not appear on the screen.

# Don't see element with CSS / XPATH


Asserts that the element with the CSS class "loading-animation" does not appear on the screen.

Using options

I.dontSee(target, options)
Option Type Remarks
forAtLeast number Optional
Mininum number of seconds that the text should not be visible before passing the assertion.

# Don't see ... for at least X seconds

Sometimes the content takes a bit of time to show up, especially when waiting for requested information from the server, so you might want to specify some amount of time to wait for the element to show up first.

I.dontSee("Loading", {forAtLeast: 15})

This waits for at least 15 seconds for the "Loading" text to first show up. Onces the text is seen, the command will pass successfully once it's not longer visible. Or if the text is never seen within 15 seconds, the command will pass successfully.