Intelligent Automation & Macro Software  

Go Back   Automation Anywhere, Inc. Forums > Products Zone > Automation Anywhere
Register FAQ Search Today's Posts Mark Forums Read

Automation Anywhere Post messages and questions related to Automation Software here.


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-03-2010, 11:35 AM
philkryder philkryder is online now
Senior Member
 
Join Date: Sep 2007
Posts: 456
Default how can get a COUNT of windows open?

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?
Reply With Quote
  #2 (permalink)  
Old 03-03-2010, 11:59 PM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

Hello,

Use 'Navigate URL' Web Recorder command to open multiple websites in a single Internet Explorer window.

Hope that helps.
Reply With Quote
  #3 (permalink)  
Old 03-04-2010, 08:42 AM
philkryder philkryder is online now
Senior Member
 
Join Date: Sep 2007
Posts: 456
Default

Quote:
Originally Posted by forumsupport View Post
Hello,

Use 'Navigate URL' Web Recorder command to open multiple websites in a single Internet Explorer window.

Hope that helps.
I don't think it does.

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
Reply With Quote
  #4 (permalink)  
Old 03-04-2010, 10:00 AM
TylerMitton TylerMitton is online now
Senior Member
 
Join Date: Nov 2009
Posts: 102
Default

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.
Reply With Quote
  #5 (permalink)  
Old 03-04-2010, 10:01 AM
TylerMitton TylerMitton is online now
Senior Member
 
Join Date: Nov 2009
Posts: 102
Default

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.
Reply With Quote
  #6 (permalink)  
Old 03-04-2010, 06:57 PM
philkryder philkryder is online now
Senior Member
 
Join Date: Sep 2007
Posts: 456
Default

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?
Reply With Quote
  #7 (permalink)  
Old 03-05-2010, 05:10 AM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

Hello,

You can also use 'Close Window' Window Actions command to close the browser windows with similar title before navigating to web page that matches the title of the window.

Hope that helps.
Reply With Quote
  #8 (permalink)  
Old 03-05-2010, 11:48 AM
philkryder philkryder is online now
Senior Member
 
Join Date: Sep 2007
Posts: 456
Default

Quote:
Originally Posted by forumsupport View Post
Hello,

You can also use 'Close Window' Window Actions command to close the browser windows with similar title before navigating to web page that matches the title of the window.

Hope that helps.
but, how do I know how many to close while leaving ONE still open and logged in?
Reply With Quote
  #9 (permalink)  
Old 03-07-2010, 08:34 PM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

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.
Attached Files
File Type: atmn Sample.atmn (872 Bytes, 0 views)
Reply With Quote
  #10 (permalink)  
Old 03-08-2010, 10:19 AM
philkryder philkryder is online now
Senior Member
 
Join Date: Sep 2007
Posts: 456
Default

Quote:
Originally Posted by forumsupport View Post
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.
But,
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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -7. The time now is 07:19 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.0 ©2007, Crawlability, Inc.
Copyright © 2003-2011 Automation Anywhere, Inc. All rights reserved