i have to pass the testcases into userid anf password of
gmail login page using functions you can take your own
testcaseslike
userdid should take only lowerletters it should not take
special charactors and uppercase letters and password should
take only numericvalues it should not take alphanumeric and
alphabets
Answers were Sorted based on User's Feedback
Answer / m.hemakumar
Login_Info "asaddd","1531565"
Public Function Login_Info(UserId,PassWord)
Browser("title:=.*").Page(("title:=.*").WebEdit
(oEdtUserid).Set UserId
Browser("title:=.*").Page(("title:=.*").WebEdit
(oEdtPassWord).Set PassWord
End Function
Note: 1)where oEdtUserid and oEdtPassWord are descriptive
objects
2)Login_Info "asaddd","1531565"
when function is not returning any value
3)Login_Info ("asaddd","1531565")
when function is returning value
Ex:
Val=Login_Info ("asaddd","1531565")
Public Function Login_Info(UserId,PassWord)
Browser("title:=.*").Page(("title:=.*").WebEdit
(oEdtUserid).Set UserId
Browser("title:=.*").Page(("title:=.*").WebEdit
(oEdtPassWord).Set PassWord
Login_Info=1
End Function
Val Variable contains 1
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / shavali
hear i cant understand val function can u please explain 3
function from val_info on wareds when the function is
retuning a value
| Is This Answer Correct ? | 1 Yes | 0 No |
How to load object properties to object repository through scripting.give one example
How many types of Recordings are there in QTP and what are they?
7 Answers Dangote, First Indian Corporation,
What are the types of object repositories? Which one is you using?
What is Associate Repository in QTP 9.2 ?
In qtp what type of data tables are used , name and list out them
What are the environment variables?
if there r 10 windows open in QTP write a command to close all 10 windows at a time ?
Explain how you can delete excel file in qtp?
What is regular expression?
What are the main features we have to compulsory test by using qtp in an web based application
How will u declare a variable to access multiple actions? a)Dim b)Global c)Public d)Private
In qtp, how you can use xpath to identify objects?