Page 1 of 1

Window Count

Posted: 22 Feb 2017, 14:59
by DanVazRobot
Hello everybody!

I´m developing a script to automate a file upload process under Windows Internet Explorer;
Using the "Window Condition" command, I can detect if the "Choose file" window is open;
After that, the script types the file name, press "Return" and the file is uploaded. :D

But I wish I could add a validation to detect if the file wasn´t found, wich pops up a msg box warning this.
The problem is that this msg box has the SAME window title of the "Choose file" window.

I wonder if there´s a way to search for a window title, and detect if there´s more than one with the same title, wich would redirect the script to another line.

Thnks in advance!
:D

Re: Window Cont

Posted: 23 Feb 2017, 13:00
by francois
Hello,

There is perhaps a solution with the action 'find Image'.

For example, if no file :
msg_not_found.jpg
msg_not_found.jpg (5.45 KiB) Viewed 2432 times
You create the image :
not_found.jpg
not_found.jpg (3.56 KiB) Viewed 2432 times
And with the action 'find Image', you look for this image :
find_image.gif
find_image.gif (17.1 KiB) Viewed 2432 times
This part of script could look like :
script.gif
script.gif (5.55 KiB) Viewed 2432 times

Re: Window Count

Posted: 23 Feb 2017, 14:22
by DanVazRobot
Thanks a lot, Francois!

I can manage the "File not found" issue using the "Find image" command...

The question is:

Is there a way to count how many a specifc window title is open, and if there´s more than 1 redirect to another line of the script?