Micro Focus QTP (UFT) Forums
Opening web page with changing name - 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: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Opening web page with changing name (/Thread-Opening-web-page-with-changing-name)



Opening web page with changing name - mv8167 - 05-10-2011

I am opening a Zip file using Windows Zip. As I continually test, the page that gets created when opening a new zip file is called Doc[1].zip, then Doc[2].zip ... etc

How can I ignore the [#] part of the page name?
Can I use:

Code:
Window("ALL IMAGED CLIENT DOCUMENTS*").Activate

see attachment


RE: Opening web page with changing name - Saket - 05-10-2011

you can use regular expression here for the file names/page name.


RE: Opening web page with changing name - mv8167 - 05-10-2011

Saket,

Can you please give me an idea what regular expression is? Im new to this part of QTP.

Thx!

L


RE: Opening web page with changing name - UFTEnthusiast - 05-10-2011

Hi there!

Use Doc.*. Hope this helps in resolving your issue.

Have a great day!
Thank you !!!
UFTEnthusiast


RE: Opening web page with changing name - supputuri - 05-10-2011

Hi,
You can use the descriptive program or you can add the object to OR and use regular expression in the OR.

Code:
'Descriptive Program
Window("regexpwndtitle:=ALL IMAGED CLIENT DOCUMENTS.*").Activate

'Add Object to OR with regexpwndtitle and add regular expression and now you can use the sam object for any window.
Please have a look at the attached snapshot.

Please let me know if you need any more info.


RE: Opening web page with changing name - Saket - 05-11-2011

following posts will help you to understand Regular expression
Regular Expressions Regularized!!!
8 tips on advanced Regular Expressions