![]() |
| |||||||
Automation Anywhere Post messages and questions related to Automation Software here. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
|
I have a task that may open a website multiple times. I want to eliminate "all but one" of the Internet Explorer windows that have exactly the same name. what's the best way to do that? |
| |||
| Quote:
the windows are already open due to manage webcontrol commands of the web recorder. I want to be able CLOSE all but one of them (so that I stay logged in). Phil |
| |||
|
Hi Phil, in most of my tasks I check to see if any browsers are open that are already pointing to the page I want to go and I close them before opening a new one... it prevents me from getting a whole bunch of browsers open and bogging down the machine. In your case though, because you want to stay logged in, you'll have to do something more fancy so that you always have at least one open. Here an idea: Confirm that there is at least one browser that is logged in and that you can access it using navigate URL. If you temporarily navigate it to another page, like say Google then you can close all other windows that match the title of the page you want to be logged into. Then go to the google window and navigate it back to the logged in page. It may keep you logged in depending on how the website works. Make sense? Not sure if it will work, but worth a shot. |
| |||
|
Hi Phil, in most of my tasks I check to see if any browsers are open that are already pointing to the page I want to go and I close them before opening a new one... it prevents me from getting a whole bunch of browsers open and bogging down the machine. In your case though, because you want to stay logged in, you'll have to do something more fancy so that you always have at least one open. Here an idea: Confirm that there is at least one browser that is logged in and that you can access it using navigate URL. If you temporarily navigate it to another page, like say Google then you can close all other windows that match the title of the page you want to be logged into. Then go to the google window and navigate it back to the logged in page. It may keep you logged in depending on how the website works. Make sense? Not sure if it will work, but worth a shot. |
| |||
|
yup - makes sense and I'm doing something like that by navigating to a typically unused tab at the site that has a different window name. I'm just not sure that I can generalize that at sites where the window name doesn't vary. As a side note, I have found that "sometimes" it is better to have an Excel VBA macro drive my processes and invoke a clean new AA exe for each row in the EXCEL. However, again, I would like to "kill" all unfinished prior AA exes and Browser windows while retaining ONE logged in window. Is there a way to get a Window number for each window? |
| |||
| but, how do I know how many to close while leaving ONE still open and logged in?
|
| |||
|
Hello, You can use, 'Loop while window exists' and inside loop block, put 'Close Window' command. That way the task will loop and close that particular window until it exists. Text format of task would appear something like this, Open "http://www.ABC.com/" Loop While Window Exists("ABC - Windows Internet Explorer") Close Window: "ABC - Windows Internet Explorer" Delay: (1000 ms) End Loop Navigate URL "http://www.XYZ.com/" We have also attached sample task for reference. Before running this task keep open 2-3 instances of IE window with following webpage, Automation Anywhere - Leader in Automation Software, Automated Testing. Automate with ease. Hope that helps. |
| |||
| Quote:
Isn't this loop going to destroy ALL open instances? Loop While Window Exists("ABC - Windows Internet Explorer") Close Window: "ABC - Windows Internet Explorer" Delay: (1000 ms) End Loop |
![]() |
| Thread Tools | |
| Display Modes | |
| |