Hello @okakosolioks ,
I agree that this a bit of a quirky thing get our hands around. The Window modes (Restore, Maximize, Minimize, Close) are functions of a Window object and not the site within the Browser itself. In this case, it’s the Chrome Browser Window application named chrome.exe .
Therefore, you have to take a slight detour and use the Window Activities :
Here is how I did it and I’ve confirmed that it works with Chrome. (Testing info below along with the xaml file attachment)
- Open the Browser as you would normally do using Open Browser activity
- Add an Attach Window Activity and select your Website window - In this case I have selected the uipath.com browser window that is already open
These are the two important steps:
2.1 In the properties of the Attach Window, create and assign a variable to the ApplicationWindow property - this is your Window handle
3. Next, add a Maximize Window activity inside the Attach Window and then assign the variable you created in step 2.1 to it!
Note: The sequence will run even if you don’t assign the variable to Maximize Window activity, but the Window will not remain in the foreground once it’s maximized.
Do all your Browser actions outside of the Attach Window , because these are Browser actions and will not work inside an Attach Window scope
- Open Chrome Browser.
- Reduce it’s size and then close it
- Run Automation
When the Robot opens the window, it will opened in a smaller size and then maximized to appear in the foreground
- Close the Browser Window after Maximizing it
- Run Automation
When the Robot opens it, the Window will show up maximized in the foreground straight way.
Seq_Maximize_or_Restore_Window.xaml (8.2 KB)