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



i have to pass the testcases into userid anf password of gmail login page using functions you can t..

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

i have to pass the testcases into userid anf password of gmail login page using functions you can t..

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

Post New Answer

More QTP Interview Questions

Hi, How to give drop down values as input [Variable] from data table in QTP? If u know share with me.

3 Answers  


What is the pros and cons between QTP and Rational Robot

0 Answers   Virtusa,


what is the extension for QTP files?

11 Answers   AppLabs,


How do you handle XML exceptions in QTP (Here it is Exception, not the checkpoint)

2 Answers   CFC, CTS,


I have 5 no.of Action in my Test. Out off which i should make 3rd action as my start-up action. How should i make it?

5 Answers  


What are the problems / difficulties faced when you used Smart Identification ?

2 Answers   Keane India Ltd,


What test cases can you automate using QTP?

0 Answers  


Username field having some string mistake like"user naem".what type of testing i prefer to test spell check.

6 Answers   GE,


what is the diff between manual test plan document and automation test plan doc.can u explain indetail.

0 Answers   Value Labs,


What is QTP’s model for test creation?

0 Answers  


How to find if given number is prime or not

1 Answers  


What are the QTP advantages and disadvantages?

6 Answers  


Categories