Micro Focus QTP (UFT) Forums
Is it possible to make a dynamic name for~Window("asdf")~ - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Is it possible to make a dynamic name for~Window("asdf")~ (/Thread-Is-it-possible-to-make-a-dynamic-name-for-Window-asdf)



Is it possible to make a dynamic name for~Window("asdf")~ - KonstantinF - 02-27-2009

hey, my question is:
Is it possible to make a dynamic name for Window("winrar").Activate
I would like to make it winrar* -->?? so if i would have "winrar lite" It will be used.


I hope you all unterstand what i mean. It is hard to explain.


best greets.
Konstantin


RE: Is it possible to make a dynamic name for~Window("asdf")~ - Ankur - 02-27-2009

Yes, use regular expression for that property.

For this case, In OR change the value of the corresponding property to winrar.* If there are any special characters in fixed part of the value make sure to escape them with \ (back slash).


RE: Is it possible to make a dynamic name for~Window("asdf")~ - KonstantinF - 03-23-2009

Hi Ankur,
here is my solution.
I made it with the objekt reprository.
At the detail description of my window I add as title: winrar[A-Za-z\s]*
With that it worked great.

Thanks for your help.