mardi 14 mai 2019

TestCafe - Error in fixture.beforeEach hook

I'm doing some e2e testing with Testcafe for an application. I'm using a beforeEach for one of my fixture.

fixtureIngredient Details [En]
.page${url}en/something
.beforeEach(async t => {
await t
.click(button1)
.wait(1000) })

When I'm running the test, usually it works perfectly but sometimes I get this error:

1) - Error in fixture.beforeEach hook - The specified selector does not match any element in the DOM tree.
 > | Selector('#accept-button')

I wonder what's causing this error and how it only happens sometimes.

p.s I'm running my tests on chromium and firefox (Ubuntu).

Thanks.

Aucun commentaire:

Enregistrer un commentaire