Selenium testing (screen size)

jezz.santos's Avatar


28 Dec, 2015 08:34 PM

We have some automated UI tests using Selenium that break when running (only) in CI.

They work fine on any developer workstation.
They work fine in CI , when we are watching the testing in the AppVeyor VM over RDP.
They fail every time in CI, when we DON'T watch them in the AppVeyor VM over RDP.

Our tests instruct the WebDriver to run at 1000px in height (and 320px wide), but we know that Windows won't let the browser window height exceed the actual desktop resolution.

The errors are that certain fixed elements (like a top NavBar) is obscuring other elements in the page when we go to click them. We have already modified the testing framework to automatically scroll all elements into the view before clicking them. But in these failing tests the elements are still obscured by other elements (we can't tell precisely which - so we assume the fixed elements).

We know the tests fail (in the way we see them fail in CI) when the browser is restricted vertically less than about 600pixels in height. (from manual testing on our developer desktops.)

I am wondering what resolution Selenium is running the browser at in the AppVeyor machine, and if that is the cause of the failures?

BTW: When we RDP into the tests in the AppVeyor VM, the desktop resolution is fine, and the tests pass.

  1. Support Staff 1 Posted by Feodor Fitsner on 28 Dec, 2015 10:54 PM

    Feodor Fitsner's Avatar

    You can change screen resolution from PowerShell like that:

  2. 2 Posted by jezz.santos on 29 Dec, 2015 01:08 AM

    jezz.santos's Avatar

    That fixed it! thanks

  3. jezz.santos closed this discussion on 29 Dec, 2015 01:08 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac