07-02-2009, 06:12 PM
Suma -
I am not sure how you would be expecting a complete code base for your requirement. Normally on a forum you can expect a quick hint or a part of the code or resolved issues from your code. Plus, you would need to supply enough information in terms of the application & the QTP version you use.
I will show you an simple example for one of the scenarios you listed.("Enter min 3 char and max 10 char")
1. Calculate the length of the string you are passing.
if len(firstname) > 2 And len(firstname)<=10 Then
Reporter.reporterevent micpass, "First Name", "Entered First Name is valid"
Else
Reporter.Reporterevent micfail, "First Name", "Enter min 3 char and max 10 char"
End if
Hope this helps.
Let me know if you need anything else.
I am not sure how you would be expecting a complete code base for your requirement. Normally on a forum you can expect a quick hint or a part of the code or resolved issues from your code. Plus, you would need to supply enough information in terms of the application & the QTP version you use.
I will show you an simple example for one of the scenarios you listed.("Enter min 3 char and max 10 char")
1. Calculate the length of the string you are passing.
if len(firstname) > 2 And len(firstname)<=10 Then
Reporter.reporterevent micpass, "First Name", "Entered First Name is valid"
Else
Reporter.Reporterevent micfail, "First Name", "Enter min 3 char and max 10 char"
End if
Hope this helps.
Let me know if you need anything else.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.