My protractor tests work fine on my local machine and on Azure VM Windows Server 2012R2 when accessed via RDP. I explicitly set browser window resolution in my tests using browser.driver.manage().window().setSize(1600, 900);
and it allows tests to work properly.
However, when the VM mentioned above is used as build machine, controlled by VSO (VSTS) agent, my protractor tests are failing. I suspect it happens because screen resolution for VSO agent session is smaller then desired resolution specified in my tests and WebDriver(ChromeDriver) can't set resolution higher than OS limitation.
My question is how to change screen resolution of Azure VM for VSO agent session?
I tried custom utility for changing screen resolution from here and it works on my PC, however when it is executed by VSTS agent on Azure VM it throws error:
System.InvalidOperationException: The display driver failed the specified graphics mode.