0

I am trying to maximize the desktop application window.

The Maximize() function has worked so far, but recently windows have started going fullscreen, obscuring the taskbar.

I have tried to replicate this bug manually but with no success. It only occurs in automation tests when using the Maximize() function.

This is the code I use to maximize window:

IWindow desktopAWindow = this._driver.Manage().Window;
desktopAWindow.Maximize();

Can you replace Maximize() with something similar anyway? Also how the Maximize function works. I don't think it just clicks on the maximize button as I tried it manually and couldn't get this bug to show it to the development team.

1 Answers1

0

Try this:

ChromeOptions options = new ChromeOptions();
options.addArguments("--start-maximized");
driver = new ChromeDriver(options)
HarrY
  • 607
  • 4
  • 14
  • Maybe I didn't make myself clear but I'm not testing browsers. I am working on a dedicated desktop application that my company is developing so Chrome Driver won't work. – Sebastian Litwiniuk Nov 17 '21 at 07:41