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

tell me QTP standards ?plz

1522


How many tabs are available in debug viewer pane?

649


hi to all, i need a code.. in flight application 1.i need to login first then i need to insert 3 new orders... 2.i have to log out 3.i have to login again with different user 4.need to insert 2 new orders 5.then need to log out 6.then again login with different user 7.3 new orders create and log out 8.but we hv to do this using data table and actions please help me

1762


What are the different recording modes and how do they work?

622


What is checkpoint in qtp?

556






When we r doing data driven test with chkpts, i want to insert formulae in data sheet but i didn't get. How we wil do that plz. explain in detail.

1607


In qtp, how you can remove the spaces from string?

549


How to add verification steps to tests?

9130


what function you write to do database testing with the help of qtp?

1364


Is the qtp course will help to create a virtual object?

1520


Hi All, I need code for how to execute qtp scripts from excell sheet

1467


write a script to validate the content in the web application. (do it by OR method) and (do it by Descriptive method by creating a description object.. (give a filter condition only WEbelement- not easy need to use some more property while giving filter condtions- use google for your help...))

1507


When and why to use descriptive programming?

612


I am getting the "test object property" Description properties "toolkit class" value By using "gettoproperty" in run time But my problem is how to get Ordinal Identyfier's type and value Type is index, value is 0 How can i keep this values in to required place How can i get these values in runtime I have to insert these "index" and "value" into another area Is there any script for this like "gettoproperties","Getroproperties" If anybody knows,please help me .

1731


How to execute a winrunner script in quicktest professional?

558