How about this: You use a driver script (has OR Association) that calls
the function library.
In a message dated 2/16/10 11:54:58 A.M. Eastern Standard Time,
[email protected] writes:
Hi Chinna,
The function which you have created for Login is not a appropriate
solution for a QTP script.
Usually in QTP function library (.vbs) is used for generic functions ,Why
becoz u could not able to associate the Object Repository to the function
library .So,If u specify objects Ex:Browser("Google"),Page("Gmail: Email
from Google"),WebEdit("Passwd") in function library file will not work
Example for generic functions:
Function HoDisplayFutureDate()
DisplayFutureDate=AddDate()
End Func
tion
You have to create the Login Reusable action for reusable purpose instead
of specifying a login function.
Hoping that i have clarified the use of function library
Thanks
Sridhar
On 2/16/10, chinna <[email protected]_
(mailto:[email protected]) > wrote:
acutally I developed script for gmail longing page and i save that script
in .vbs
after that i can associate the script using setting options
which code i want write in qtp to run below function
Function gmail_login()
Browser("Google").Page("Google").Sync
Browser("Google").Navigate "_http://www.gmail.com/_
(http://www.gmail.com/) "
Browser("Google").Page("Gmail: Email from Google").WebEdit("Email").Set
"chinna"
Browser("Google").Page("Gmail: Email from
Google").WebEdit("Passwd").SetSecure
"4b794bc217051ee02a5f36e7f80642cf4e1d887102eff397"
Browser("Google").Page("Gmail: Email from Google").WebButton("Sign
in").Click
If Browser("Google").Page("New! Google Buzz in Gmail").Link("Nah, go to my
inbox").Exist(3) Then
Browser("Google").Page("New! Google Buzz in Gmail").Link("Nah, go to my
inbox").Click
End If
Browser("Google").Page("Gmail - Inbox (5)").Frame("v1").Link("Sign
out").Click
Browser("Google").Page("Gmail: Email from Google_2").Sync
Browser("Google").Close
End Function
--
Thanks & Regards,
Chinna,
Mob:9739656841
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en