Selenium testing (screen size)

jezz.santos's Avatar

jezz.santos

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: https://github.com/FeodorFitsner/selenium-tests/blob/screen-resolut...

  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

Generic

? 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

Recent Discussions

16 Jul, 2019 05:17 PM
16 Jul, 2019 10:17 AM
16 Jul, 2019 07:46 AM
16 Jul, 2019 04:51 AM
15 Jul, 2019 06:33 PM

 

15 Jul, 2019 06:09 PM
15 Jul, 2019 05:53 PM
15 Jul, 2019 05:46 PM
15 Jul, 2019 05:21 PM
15 Jul, 2019 04:29 PM
15 Jul, 2019 03:12 PM