Take this Testcafe code:
test
.page('https://testsite.com')
('button hidden after clicked', async t => {
await t
.expect(await Selector('button.cc-banner__button-accept').visible).ok({ timeout: 5000 })
.setNativeDialogHandler(() => true)
.click(await Selector('button.cc-banner__button-accept'))
.expect(await Selector('button.cc-banner__button-accept').visible).notOk({ timeout:1000 });
The above fails when Testcafe runs.
However, the code below passes:
test
.page('https://testsite.com')
('button hidden after clicked', async t => {
await t
.expect(await Selector('button.cc-banner__button-accept').visible).ok({ timeout: 5000 })
.setNativeDialogHandler(() => true)
.click(await Selector('button.cc-banner__button-accept'));
await t
.expect(await Selector('button.cc-banner__button-accept').visible).notOk({ timeout:1000 });
Why is this? Any ideas?
