Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Calling a function in a Test Script from a function library
#1
Not Solved
Hi,

I have a function library that calls a function which is defined in a Test Script.

But its not working. Its giving an error message that the function was not found.
Can a function be called this way?


Thanks,
Anupam
Reply
#2
Not Solved
Instead of attaching the function library, you should dynamically load the library using ExecuteFile statement or LoadFunctionLibrary statement AFTER your function call in the given script.

Benefit with the latter being you will be able to debug your library.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#3
Not Solved
Hi ,

I have created a a gmail login function and saved in function library of qtp.
Code:
gmaillogin (sUserName,sPassword)

How to call this in test..Please tell me the code..i am new to qtp..
i am calling like :
"
Code:
sUserName = "email id"
sPassword ="xxxx"
Function gmaillogin (sUserName,sPassword)

"
Please let know the code is right or not
Reply
#4
Not Solved
in Function library function

Code:
public fuction gmaillogin(username,password)
.................
.....................
End function
associate the function to script and use below line to call the function

Code:
sUserName = "email id"
sPassword ="xxxx"
Call gmaillogin(sUserName,sPassword)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Split function in string nidhishnair 13 64,505 07-07-2020, 03:47 PM
Last Post: helmzshelmz
Question Split Function Chaithra N 0 1,160 12-18-2019, 11:33 AM
Last Post: Chaithra N
  Click after CheckProperty to a WebElement passed via Function argument fails naruoga 0 1,152 02-28-2019, 11:46 AM
Last Post: naruoga
  Select case is not being executed in a Function Anupama 1 1,599 05-25-2018, 11:15 AM
Last Post: Anupama
Shy Cint function in UFT rinatk 9 6,539 11-09-2015, 05:08 PM
Last Post: rinatk

Forum Jump:


Users browsing this thread: 1 Guest(s)