How to use Regular Expressions in QTP? give an example.
Answer Posted / umasankar
Regular expressions enable QuickTest to identify objects
and text strings with varying values.You can use regular
expressions only for values of type string.
You can use regular expressions when:
1) Defining the property values of an object in dialog
boxes or in programmatic descriptions.
2) Parameterizing a step.
3) Creating checkpoints with varying values.
Example:
your site may include a form in which the user inputs data
and clicks the Send button to submit the form. When a
required field is not completed, the form is displayed
again for the user to complete. When resubmitting the form,
the user clicks the Resend button. You can define the value
of the button's name property as a regular expression, so
that QuickTest ignores variations in the button name when
clicking the button.
Is This Answer Correct ? | 34 Yes | 5 No |
Post New Answer View All Answers
What is the script for database check point, bitmapchek point, regular expression ?
What are the key elements available in test result window?
I used the below code to open QTP through VBscript?But i can unable to Invoke QTP...PLZ help me with the correct code to invoke QTP through VBS with description of the code aswell. Dim qtApp 'As QuickTest.Application 'Declare the Application object variable Dim qtTest 'As QuickTest.Test 'Declare a Test object variable Dim qtResultsOpt 'Declare a Run Results Options object variable Set qtApp = CreateObject("QuickTest.Application") 'Create the Application object qtApp.Launch 'Start QuickTest qtApp.Visible = False 'Make the QuickTest application visible qtApp.Open "C:\form", True 'Open the test in read-only mode 'set run settings for the test Set qtTest = qtApp.Test qtTest.Run 'Run the test 'WScript.StdOut.Write "Status is: " & qtTest.LastRunResults.Status 'Check the results of the test run qtTest.Close 'Close the test qtApp.quit 'Close QuickTest Pro Set qtResultsOpt = Nothing 'Release the Run Results Options object Set qtTest = Nothing 'Release the Test object Set qtApp = Nothing 'Release the Application object
Explain different checkpoints in qtp.
How to read a text file from QC using QTP. I would like to do something like this. But instead read a file from QC and NOT from my local drive. Set fso = CreateObject("Scripting.FileSystemObject") Set InputFile = fso.OpenTextFile("C:\test.txt", ForReading) Thanks
What is the default object synchronization timeout in qtp?
What is object spy in quicktest professional (qtp)?
what is description object?
How many types of run modes are there in qtp?
How to test fly out menu in qtp?
what and how to answer for the question "tell me about yourself ?" for 3 years experience. can anyone say inj detail please... its urgent
What is the short cut keys for the following?
Will down time for server and content maintenance/upgrades be allowed? how much?
Which scripting language used by quicktest professional (qtp)?
In a flight window we have to enter the name and meal request for every passenger.In that window if we give Total passengers=1 then the Psngr1 name field and psngr1 meal request field will reflects.if we give Total passengers=2 then Psngr1 name field and psngr1 meal request field,Psngr2 name field and psngr2 meal request field and so on. how we can handle this scenerio thru Descriptive programming?