Reputation: 4643
Reading the CLI Docs, there doesn't appear to be a way to set the default browser window size. Is there a way to do this so that each test or each test fixture doesn't have to?
I should point out that adding a resizeWindow
call in each test, or even once per test fixture is not a scalable solution across many fixtures so the "proper" solution should/would involve some sort of config so it only needs to be set once.
Upvotes: 6
Views: 5484
Reputation: 2348
TestCafe does not have such an option out of the box. However, you can put the t.resizeWindow action into the beforeEach test hook.
Another way is to run a browser with the special command line argument. For example, the command line for Chrome:
testcafe "chrome '--window-size=800,600'" test.js
Upvotes: 7