what is the syntax for regular expression in QTP?
how to create user defined functions in QTP?
Answer Posted / 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 |
Post New Answer View All Answers
how to find that tools work well with ur existing system?
what is supply chain management?
Hi could some one explan what is the use of the function Defination generator, And how to use the function defination generator.. Explan with the example..
What is the use of Debug Viewer?
Hi we are running tests remotely from quality center and pushing tests into qtp boxes remotely, and it does execution but while uploading results back into quality center it hangs in qtp box.If any one come across similar problem, please send me details how to handle this. Thanks kris
What are the views available in quicktest professional (qtp)?
Is there anyway to automatically update the Datasource name in Database Checkpoints object when we migrate tests to a new release?
Hi, Can we open a test in qtp10 which is saved in qtp 9.2?
1. What is the difference between Keyword and function in the keyword driven framework? 2. How do you associate Keywords to the script ?
How to integrate QTP with QC using VB Scripting? What are the prerequisites to connect with QC?
1.How do u prepare the test suits in QC? 2.How do u convert requirements to test plan in QC?
i have to login into gmail loginpage i have to pass testcase into userid and password by using functions. the test case of user id is it should take only lowerletters alphabetin between 4 to 6 length.it should not take spectial letters.it should not take numbers.testcase for password is it should take numbers and it should not take alphabets note the following things must happen 1 when i give correct password and userid that password and userid should be seen in QTP result and notepad,xl sheet 2 when i gave in valid password the system willgive message please give valid password that particular messaage should be seen in QTP result,norepa and xl sheet
How reliable are the site's Internet connections required to be? And how does that affect backup system or redundant connection requirements and testing?
Explain in brief about the quicktest professional automation object model?
when I try to run below script in QTP "totalPages" value is 2. But i am getting error message (Type mismatch: 'totalPages' Line (): "For i=1 to totalPages".) totalPages=Browser("Name:=User").Page("Title:=User").WebElem ent("innertext:=of.*").GetROProperty("InnerText") msgbox totalPages For i=1 to totalPages rnum=Browser("Name:=User").Page("Title:=User").WebTa ble("column names:=User Name;ID;Last Name;First Name").GetRowWithCellText("store4") If rnum>0 Then r=rnum Exit for End If Browser("Name:=User").Page("Title:=User").WebElement ("html tag:=A","x:=471").Click MsgBox "Exit" Next