We recently moved from Webdriver to Nightmare. It seems that Nightmare is lacking the seeNumberOfElements method.
Previously, using Webdriver & seeNumberOfElements we could verify an exact number of specific element. This is very useful for testing form validation (for example: test that we see 5 validation errors, fill some field, see that we now only see 4 validation errors.)
Since moving to Nightmare, we now have to use seeElement. This is binary and makes the tests much less robust.
What are you trying to achieve?
We recently moved from Webdriver to Nightmare. It seems that Nightmare is lacking the
seeNumberOfElements
method.Previously, using Webdriver &
seeNumberOfElements
we could verify an exact number of specific element. This is very useful for testing form validation (for example: test that we see 5 validation errors, fill some field, see that we now only see 4 validation errors.)Since moving to Nightmare, we now have to use
seeElement
. This is binary and makes the tests much less robust.