Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Opening web page with changing name
#1
Solved: 10 Years, 9 Months ago
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


Attached Files
.doc   I am opening a Zip file using Windows Zip.doc (Size: 47 KB / Downloads: 59)
Reply
#2
Solved: 10 Years, 9 Months ago
you can use regular expression here for the file names/page name.

Reply
#3
Solved: 10 Years, 9 Months ago
Saket,

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

Thx!

L
Reply
#4
Solved: 10 Years, 9 Months ago
Hi there!

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

Have a great day!
Thank you !!!
UFTEnthusiast
Reply
#5
Solved: 10 Years, 9 Months ago
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.
Thanks,
SUpputuri
Reply
#6
Solved: 10 Years, 9 Months ago
following posts will help you to understand Regular expression
Regular Expressions Regularized!!!
8 tips on advanced Regular Expressions

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  click each web link in a page using Index or other method in QTP smeijer 13 23,666 04-29-2017, 04:53 PM
Last Post: kowshik
  Page element keep changing chong67 4 4,272 11-08-2016, 09:17 PM
Last Post: Paul Rammone
  VB Script to count number of links in a web page. Suma Parimal 4 24,747 07-01-2015, 12:59 PM
Last Post: govind
  Error while opening test run results vkalyankar 3 3,984 11-12-2014, 09:49 AM
Last Post: vinod123
  QTP Stuck at Opening stage TurtleRock 4 3,428 05-27-2014, 08:42 PM
Last Post: mauler69

Forum Jump:


Users browsing this thread: 1 Guest(s)