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


Please Help Members By Posting Answers For Below Questions

how to know no.of mails in our g mail by using vb-script

1775


How does qtp identify objects in the application?

583


hi all can anyone explain how to write the code for finding the mandatory columns in table which are having (red*) (red Astrik)

1397


in a web page hoe to check the dynamic links that rechabging with out using regular expressions

1774


"What are the common constrains that we need to consider when we prepare testcases for ASP application". Thanks in Advance...

1440






What is test object model in quicktest professional (qtp)?

544


Explain quicktest professional testing process?

558


Can you brief the hurdles you faced during Automation testing?

575


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?

1373


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…..

1621


Is any limitation to xml checkpoints?

555


Is it possible to call from one action to another action in qtp?

556


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

2165


How to interact tool & application build in QTP?

1460


Hybrid framework supports Descriptive programming. Is it true?

647