Interview Questions   Tutorials   Discussions   Programs   Videos   

QTP - What is the syntax for regular expression in QTP? how to create user defined functions in QTP?




230
views
asked marvit August 19, 2014 12:02 AM  

What is the syntax for regular expression in QTP? how to create user defined functions in QTP?


           

1 Answers



 
answered By Dharma   0  

This is the Regular Expression for Time ("1[012]|[1-9]):[0-
5][0-9](am|pm")
User Defined Function
Here is the Example of User defined Function
Set obj_WebEdit = Description.Create()
obj_WebEdit ("Class Name").value = "WebEdit"
obj_WebEdit ("name").value= strWebEdit1
obj_WebEdit ("html tag").value="INPUT"
Browser(strBrow1).Page(strPage1).WebEdit(obj_WebEdit).Set strInValue1

1. You should convert the above script as a function.
2. Save the above script with .vbs extension
3. Attach the function in the File->Settings ->Resources
4. Then call the function where ever necessary.
flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert