User Mohammed Sha (firstname.lastname@example.org) posted:
Re: WIndow Elimination
User misha (email@example.com) posted:
WinRunner's regular expressions are not comprehensive enough to
express what you want.
If you know that all other windows will not start with "C", for
example, you could "![^C].*", or no other window will have "A" as the
second letter, you could use "!.[^A].*", but this sort of rule is
Usually you can find another property of the window to distinguish it
If all else fails, at runtime have a loop on location or index
property, and match everything with "!.*", then check the title of
each matched item to ensure its not the one you want.
Kind regards, Misha
--- In winrunner@y..., Mohammed Sha <msha@a...> wrote:
Re: WIndow Elimination
User Richard McCrae (firstname.lastname@example.org) posted:
I'm not sure what your ultimate goal is, but it is easy enough to
untangle windows based on their names.
order the windows based on index
(GUI_add(window description, increasing index);
}while(win_exists ( just added window) == E_OK);
delete the last added window - i.e., when the win_exists is false)
So now you know how many windows there are and you have them arranged on
an index. All you need do now is identify which window has 'CAM systems' as
its label, and then that is the index of the special window. Its not clear
whether you want to do something just to that window, or to all the rest
except that window, but it doesn't matter. You will know which one is the
'CAM systems' window, and which are not. By the way, if there are more than
one window with the 'CAM systems' designation, the same sort of routine will
work. Just keep a list of which are 'CAM systems' and which are not, then go
If you are closing the windows, remember that the index for a particular
window may change as you eliminate other windows. E.G., eliminate window 0,
and all others will be reordered (decremented), while eliminating the last
window will not cause any of the others to change.
Hope this helps.
By the way, Misha's suggestions might be easier to implement - it depends
on what you are trying to do and how proficient you are with coding and
regular expressions. My comments should be read in addition to Misha's, not
instead of them.
Questions, View http://groups.yahoo.com/group/winrunner/?yguid=7144566
Rick McCrae MSC MBA
Quality Center CPC