Selenium - Browser not maximized as part of CI using VSTS and Octopus

51 views
Skip to first unread message

Anfas Ansary

unread,
Mar 19, 2019, 3:29:25 AM3/19/19
to Selenium Users
Browser is not maximized if the test execution is in background, ie started execution as part of CI. And so some of my test cases are failed.

But if i manually trigger my tests from command line, all the tests are executed in maximized window.

I tried below options:
Driver.Manage().Window.Maximize();
Driver.Manage().Window.FullScreen();

System.Drawing.Size size = _parallelConfig.Driver.Manage().Window.Size;
Driver.Manage().Window.Size = new System.Drawing.Size(size.Width, size.Height);

Please suggest me a solution for this. Most of my test cases are failed due to this.

Regards

Anfas

Mark Collin

unread,
Mar 19, 2019, 5:50:28 AM3/19/19
to Selenium Users
Have you check the resolution of the screen on CI?  It may well be that the browser is being full screened, but you have a tiny resolution on your CI machine and the site under test just does not work at that resolution.

Anfas Ansary

unread,
Mar 19, 2019, 6:09:07 AM3/19/19
to Selenium Users
I checked the resolution and provide like "Driver.Manage().Window.Size = new System.Drawing.Size(1296, 1000);" but it returns an error 
"
Error: The HTTP request to the remote WebDriver server for URL http://localhost:4444/wd/hub/session/a6c6de82ecab17cfdd026116c8ebf8c6/window/current/size timed out after 60 seconds
"


Regards

Anfas
Reply all
Reply to author
Forward
0 new messages