Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error in Calling function Libraries
#1
Not Solved
Using QTP 9.2 Windows 7
Im learning how to create and use functions libraries in QTP.
I have created log in and log out functions for my application

Code:
Function login()
Browser("Login Form").Page("Login Form").WebList("Login1$Company").Select "095 - TEXPO – 095"
Browser("Login Form").Page("Login Form").WebEdit("Login1$Password").SetSecure "4f45d60061419cac90ecb62f"
Browser("Login Form").Page("Login Form").WebEdit("Login1$UserName").Set "madeeha"
Browser("Login Form").Page("Login Form").Image("Login1$LoginButton").Click 22,13
End Function

Code:
Function logout()
Browser("Softronic - HCMS").Page("Softronic - HCMS_2").Sync
Browser("Softronic - HCMS").Close
Browser("Login Form").Page("Softronic Applications").Link("Logout").Click
Browser("Login Form").Page("Login Form").Sync
Browser("Login Form").Close
End Function
When im calling the function in any other test it generates an error that Login object not found in the object repository.
I know these objects are not present in the OR, how can I used these Functions in my test?
Need guidance for it.
Thanks.
Reply


Messages In This Thread
Error in Calling function Libraries - by Anum Saleem - 02-23-2012, 12:24 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Calling a function in a Test Script from a function library anupam4j 3 5,908 06-26-2015, 12:31 AM
Last Post: babu123
  Getting run error passing a Frame into a user defined function!!! sepgs2004 1 2,718 10-14-2013, 06:37 PM
Last Post: anil2u
  Get the function name calling the function Shridevi.Salagare 1 3,622 09-07-2013, 05:07 AM
Last Post: jacosta
  Calling a HP Service Test Skript Gandalf2005 0 2,030 09-05-2012, 07:53 PM
Last Post: Gandalf2005
  Calling of function hamzaz 5 4,393 07-25-2012, 12:44 PM
Last Post: Shridevi.Salagare

Forum Jump:


Users browsing this thread: 2 Guest(s)