Testcafe: resizeWindow not working

Created on 15 Nov 2017  路  8Comments  路  Source: DevExpress/testcafe

Are you requesting a feature or reporting a bug?

Bug

What is the current behavior?

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.

What is the expected behavior?

The browser window should be resized to the given pixel values.

How would you reproduce the current behavior (if this is a bug)?

See test code below.

Provide the test code and the tested page URL (if applicable)

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)
})

Specify your

  • operating system: MacOS Sierra 10.12.6
  • testcafe version: 0.18.3
  • node.js version: v8.1.4
Need clarification bug

Most helpful comment

Experiencing this as well, neither maximizeWindow nor resizeWindow has any effect. OSX High Sierra, Testcafe version 0.18.5

All 8 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chebum picture chebum  路  3Comments

inikulin picture inikulin  路  3Comments

devmondo picture devmondo  路  3Comments

xalvarez picture xalvarez  路  3Comments

madroneropaulo picture madroneropaulo  路  3Comments