Skip to main content
Solved

RPA - close browser window

  • 5 June 2024
  • 3 replies
  • 32 views

I have a wizard that uses the chrome browser.  When I have finished all the tasks within, the wizard signs out of the application and needs to close the browser window.  How can I do that, please?  It could be in the documentation but I don’t know what to look for.  The windows ALT + F4 is what I am using now but I don’t know how to hold the ALT while the F4 is entered.  I am sure it is something simple but I am still new at this :)

3 replies

Badge +2

@CherylH you can use the handle of the Chrome browser to close it using advanced command. For each application/browser that you open in Windows, there’s always a unique identifier called the windows handle that you can use to identify the window. So after launching your Chrome browser, use the advanced command “Get step window handle” and grab the handle. Do note that this command MUST exist only at the step end of a recorded step.

You can now use the same handle to close the browser at the end of your wizard. To do so, you can use the advanced command “Control window state” and select the Close option with the defined handle that was earlier identified.

This advanced command does not need to be used on a recorded step. It is advisable to put it in an advanced command step after you have completed all steps that require the Chrome browser.

Have fun!

Badge +5

WOW!  I did not expect such a speedy response!  Thank you VERY much!

This sounds too easy!  I just didn’t know what to look for in the documentation.  I appreciate your notes, too!

Badge +5

Danny Toh - your answer is the “BEST” but the screen shifted on me and I accidentally hit it on my response.  And I don’t know how to fix it.  

Reply