'For TestCafe, is it possible to get a hook before the browser is launched?
Is it possible to get a hook on e.g. fixture before the browser is launched? The hooks on fixture (e.g. before) and test all happen after the browser is launched.
The only thing I can see to use is the --app switch but I'm not sure that's enough for me. Any help appreciated.
m
Solution 1:[1]
Could you please describe why you need this usage scenario? Currently, there is no way to run the fixture hooks before the browser is launched. As a workaround, you can use the `createTestCafe function to run TestCafe tests from script. In this script, you can run any JS code you want before the tests start. Please refer to the following article for details: https://testcafe.io/documentation/402662/reference/testcafe-api/global/createtestcafe
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Alex Kamaev |
