Bug
I have a simple test which should only resizes the browser window to 1920x1080 pixels.
When I run the test it opens the specified URL but don't resizes the browser.
The browser window should be resized to the given pixel values.
See test code below.
Tested page URL: http://www.google.com
Test code
import { Selector } from 'testcafe'
fixture `Window Resize`
.page('http://www.google.com')
test('Resize to fit desktop', async t => {
await t.resizeWindow(1920, 1080)
})
Hello @hauptrolle! What is your display resolution?
Hey @AndreyBelym , it's 1920x1080.
Actual usable screen area is actually smaller, because some place is reserved for Dock and menu bar. It's better to use t.maximizeWindow() in this case.
The problem is that there should be a warning in this case, but I got hanging test on my machine.
I used maximizeWindow() before, but this doesn't work in chrome:headless ...
The problem is that there should be a warning in this case, but I got hanging test on my machine.
A warning here would be nice ;)
@AndreyBelym But should't resizeWindow(1920, 1080) work in the headless chrome?
Experiencing this as well, neither maximizeWindow nor resizeWindow has any effect. OSX High Sierra, Testcafe version 0.18.5
Unfortunately, this information is not enough. Could you please try to install a debug build (npm install [email protected]), run your test, and post the contents of the testcafe-browser-tools.log and find-window.log files from your home directory?
I'm closing this since there were no activity here for a long time. Feel free to reopen the issue if it's still needed.
Also, you can try to run your tests on the latest TestCafe version.
Most helpful comment
Experiencing this as well, neither
maximizeWindownorresizeWindowhas any effect. OSX High Sierra, Testcafe version 0.18.5