Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using Regular Expressions
#1


Attached Files Image(s)
   
Reply
#2
Please help me on the above thread. Your help is highly appreciated
Reply
#3
Hi,
Locate the Inbox(5) object in the object repository and select the name property and then click on <hash> then you get value configuration options select Regular Expression option.

Hope this solves your problem..
Reply
#4
You can use in the Object Repositiory something like below:
Inbox(6) will be in your obj rep. Change it to Inbox.* using the regular expression format. So whatever comes after Inbox, QTP will not care. It will look only for Inbox

Thanks
Reply
#5
the best way for this is you can change the Object REpository to Regular Expressions with the format

Inbox(\d*)
Reply
#6
Follow these steps
1. Open OR
2. Select the Fax Order No
3. In Test object details select the text value
4. Open the Value configuration options
5. Change the value [0-9]
change only numeric value
if fax order no is two digit no then write [0-9][0-9]
6. Check on Regular expression check box
7. Click No

Run your script


Attached Files Image(s)
       
Reply
#7
Hey All,

This is all good stuff. I was wondering about the difference between your solution of:
Inbox(\d*)

and the solution of the previous thread of:

Inbox.*

What are the benefits and drawbacks of each of these very similar solutions?

Thanks,
Brian
Reply
#8
The difference would be:

Inbox(/d*) -- /d* means "digits"...0-9 and any length "*"
Inbox* -- anything after "Inbox" alpha, numeric, or special chars and any length
Reply
#9
Thanks for the reply. Does the Inbox(\d*) speed up the execution of the statement in the script at all?
So if you have say 1000 of these expressions and you are more specific in regards to what the following character can be (digits, character) (\d*) rather than just .* does that help optimize your scripts? Or does QTP not really care?
Reply
#10
To the best of my knowledge one does not process any faster/slower than the other. the only difference would be in the pass/fail with what is allowed after "Inbox".
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
At Regular Expressions for e-mail address ganesh.dengale 6 20,700 08-23-2022, 02:51 PM
Last Post: ahmad3029
  How to disable regular expressions in a text? ttralor 6 8,028 07-05-2013, 02:44 PM
Last Post: Staff
  Need help on using regular expressions on Java Window's title qa_tester 3 5,877 02-13-2012, 10:56 PM
Last Post: madsenfr
  java window titles & regular expressions jotdog2 1 4,789 02-13-2012, 10:55 PM
Last Post: madsenfr
  Process to use Regular Expressions in QTP using screen shots. yvslraotesting@gmail.com 1 4,004 01-31-2012, 12:45 PM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 1 Guest(s)