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
Answer Posted / 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 |
Post New Answer View All Answers
how to know no.of mails in our g mail by using vb-script
How does qtp identify objects in the application?
hi all can anyone explain how to write the code for finding the mandatory columns in table which are having (red*) (red Astrik)
in a web page hoe to check the dynamic links that rechabging with out using regular expressions
"What are the common constrains that we need to consider when we prepare testcases for ASP application". Thanks in Advance...
What is test object model in quicktest professional (qtp)?
Explain quicktest professional testing process?
Can you brief the hurdles you faced during Automation testing?
what is meant by function library?Public and private functions in function library? if private functions are applicable for only for the particular test means then y we have to add those to function library?
How Can I find the least value in a bunch of variables using qtp.. E.g.:- A = 210, B = 212, C = 60, D = 111 I don’t want to write bunch of lines for this…. Is there a way to get the result in one line…..
Is any limitation to xml checkpoints?
Is it possible to call from one action to another action in qtp?
Want to verify notepad reports using QTP framework or any other BV script method. Can anyone share the method to achieve it? Eg. Person Name is the header and the actual name is John then how can we verify weather person name is John
How to interact tool & application build in QTP?
Hybrid framework supports Descriptive programming. Is it true?