ReuseAutomator
ReuseAutomator

Reputation: 420

Selenium-Browser not maximized as part of CI

Implemented CI using Selenium C#. the issue we face is the browser is not maximized when it runs as part of CI, since it runs as background process.The browser is always minimized as per failure screenshots. Since our application not designed for minimized window or mobile, few buttons are not even visible in the browser when minimized, but exist during max mode. Tried forcing chrome to start in maximized mode by using maximize method , also tried passing the chrome options, but no success. These are known issues with our app,but is there a work around to handle this in Selenium C#?

Upvotes: 1

Views: 785

Answers (1)

Jamie Rees
Jamie Rees

Reputation: 8183

When you new up your WebDriver do the following:

webDriver.Manage().Window.Maximize();

That will then make the browser full screen.

Upvotes: 1

Related Questions