Ask a Question

How do i make a browser window maximized?

SOLVED
kevin_kapell
Frequent Contributor

How do i make a browser window maximized?

How do i make a browser window maximized?

Currently when I open the browser (Edge in this particular case) it always opens at the size it was last in when it is closed. Is there a way to force the browser to be maximized after it is opined?

1 ACCEPTED SOLUTION

Accepted Solutions
tristaanogre
Community Hero

Re: How do i make a browser window maximized?

Aliases.browser.BrowserWindow.Maximize();

 

This assumes that you have such a thing mapped in aliases... basically, off the Sys.Browser() object (https://support.smartbear.com/testcomplete/docs/reference/test-objects/controls/web/general/browser/...) , there is a method call to BrowserWindow (https://support.smartbear.com/testcomplete/docs/reference/test-objects/controls/web/general/browser-...) where you pass in the index of the browser window... if you only have one, that would be BrowserWindow(0).  That object then allows you to call the Maximize method.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

View solution in original post

2 REPLIES 2
tristaanogre
Community Hero

Re: How do i make a browser window maximized?

Aliases.browser.BrowserWindow.Maximize();

 

This assumes that you have such a thing mapped in aliases... basically, off the Sys.Browser() object (https://support.smartbear.com/testcomplete/docs/reference/test-objects/controls/web/general/browser/...) , there is a method call to BrowserWindow (https://support.smartbear.com/testcomplete/docs/reference/test-objects/controls/web/general/browser-...) where you pass in the index of the browser window... if you only have one, that would be BrowserWindow(0).  That object then allows you to call the Maximize method.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

View solution in original post

kevin_kapell
Frequent Contributor

Re: How do i make a browser window maximized?

That worked. Thanks

cancel
Showing results for 
Search instead for 
Did you mean: