Search code examples
javascriptautomated-testse2e-testingweb-testingtestcafe

How to click a button before running tests with testcafe


I want to test the pages of my website application. However, I have a disclaimer page that needs to be accepted before you can access the actual application. Is there a way to execute a task (click the accept button in my case) before doing the tests.

Currently, all my tasks fail because they can't pass the page.

Thanks.


Solution

  • You can do this in a BeforeEach Step