Trying to test with Nightwatch.js
, that a dropdown has a given number of items before a certain amount of time.
On way is to :
browser
.pause(300)
.assert.elementCount('#project_switch .dropdown-item', 3)
But this is ugly, forcing to spread so many .pause(value)
in the test code thus making the e2e test far longer than what is necessary!
I think I should switch from browser.assert
to browser.expect
which offers the before(ms)
but what is the way to count the elements with browser.expect
?
Aucun commentaire:
Enregistrer un commentaire