what is the syntax for regular expression in QTP?
how to create user defined functions in QTP?
Answers were Sorted based on User's Feedback
Answer / seethas
Uday is exactly correct.........
I m giving one example 4 regular exp.........
[1-9]--------->it accepts all 1 to 9 numbers......
Is This Answer Correct ? | 10 Yes | 1 No |
Answer / uday
Regular expressions enable QuickTest to identify objects
and text strings with varying values.
You can use regular expressions when defining the
properties of an object, the methods of an argument, when
parameterizing a step, and when creating checkpoints with
varying values.
A regular expression is a string that specifies a complex
search phrase. By using special characters such as a period
(.), asterisk (*), caret (^), and brackets ([ ]), you
define the conditions of the search.
we can write the user defined in a notepad and save the
file as .vbs and we then associate that to Test-Settings-
Resources-Associate Library Files by clicking plus and
select the .vbs file. In the script we can call the
function with function name ()
Is This Answer Correct ? | 10 Yes | 7 No |
Answer / ram
By using regular expression we can handle dynamic objects
in object repositiry.
When an object property will changing freaquently based on
input values that time we use regular expression.
we have nuber of regular expressions , But we are using 4
types of regular expressions * . ( )
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / naren
RE enables us to find objects and Text strings with varying
values
Dim re As New RegExp
Dim ma As Match
re.Pattern = "[A-Z][0-9][0-9][0-9]" ' uppercase char
followed by 2 digits
re.IgnoreCase = False ' case sensitive search
re.Global = True ' find all the
occurrences
For Each ma In re.Execute(txtSource.Text)
Msgbox "Found '" & ma.Value & "' at index " & ma.FirstIndex
Next
Is This Answer Correct ? | 3 Yes | 3 No |
Answer / saravanaraja
Regular Expression is used only for the dynamically
changeable element like Time.
This is the Regular Expression for Time ("1[012]|[1-9]):[0-
5][0-9](am|pm")
Is This Answer Correct ? | 2 Yes | 4 No |
Hi,All How to create a link in excel sheet using qtp
when do we write a script in qtp?(plz give me more then 2 reasons)
Can you do more than just capture and playback?
how to reverse a string with out using string or predefined function,ex:string is " i love india". the output should be like this "i evol aidni"
10 Answers Aspire, MNC, Omega,
how to do spell check in QTP? reply please
Hi, I have 2 dropdown listboxes called region and city/area. It needs to select one region(Santa Clara) and one city/Area (Sunnyvale).So I put this in the for loop and I am storing the Items in the variable called itemname. The regions value will get changed,so I used reg expression for this regions. This is my code Browser("MLSListings.com").Page("MLSListings.com").Link("» County/Area").Click Browser("MLSListings.com").Page("MLSListings.com").WebList ("regions").Check CheckPoint("regions") ListSize=Browser("MLSListings.com").Page ("MLSListings.com").WebList("regions").GetTOProperty("items count") For i = 1 To ListSize-1 Itemname =Browser("MLSListings.com").Page ("MLSListings.com").WebList("regions").GetItem(i+1) Browser("MLSListings.com").Page("MLSListings.com").WebList ("regions").Select Itemname ................. If I run the script,I am getting the following error, Cannot identify the specified item of the regions object. Confirm that the specified item is included in the object's item collection. Any Help? Thank you, Uma
How do you do batch testing in wr and is it possible to do in qtp, if so explain?
In Datatable having the data like this S.no Name Address 1 raj hyderabad 2 suresh Mumbai 3 shyam chennai 4 dev banglore i want to get the shyam row id & column id using scipting i.e 3,3
Explain getroproperty and gettoproperty & settoproperty?
How to retrieve the property of an object?
anybody give me the real time example for descriptive programming of web application
In QTP what is the difference between Step-in, Step-out, Step-over ?