You are on page 1of 1

How to pass objects to a function in QTP

I have a function for Login screen which will take the objects as well as data as input parameters.
How can I capture the objects and pass username, password and Login buttons as parameters to
the function.

7/18/10

Jay

Set objUsername = Browser(brName).Page(pgName).WebEdit(userName)


Set objPasswd = Browser(brName).Page(pgName).WebEdit(passwod)

Call Login(objUsername, objPasswd, "newUser", "hello123")

Public Function Login(userNameObject, passwordObject, paraUser, paraPassword)

userNameObject.Set paraUser
passwordObject.Set paraPassword
loginButtonObject.Click

End Function
first  |  < previous  |  next >  |  last
4D077AB1D981A rqYDS5B6EymC7 54939227541377
report spam

You might also like