Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can we call a function stored in another test ?
#1
Solved: 11 Years, 4 Months, 3 Weeks ago
If say our script is stored as Test1 in QTP

And we want to call a function stored in Test1 from Test2.
Is it possible to call such a function ?

As far as i know we can call Action from different test. But is it possible to call function ??
Reply
#2
Solved: 11 Years, 4 Months, 3 Weeks ago
Hello,

No, you cannot call a function from another test. All the functions should be written in library file and that library file can be attached to your test from File>>Setting>>Resources

This file is the global file and you can call the functions from this file in any test you want.

Regards,
Parminder
Reply
#3
Solved: 11 Years, 4 Months, 3 Weeks ago
(08-25-2011, 12:23 PM)parminderdhiman84 Wrote: [quote='akhilsoni776' pid='17739' dateline='1314208702']
If say our script is stored as Test1 in QTP

Hello,

No, you cannot call a function from another test. All the functions should be written in library file and that library file can be attached to your test from File>>Setting>>Resources

This file is the global file and you can call the functions from this file in any test you want.

Regards,
Parminder

Thanks Parminder for your valuable response.

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Calling a Function in Function Library when function is defined in an Action jitenderkkr 0 3,034 11-27-2014, 12:53 PM
Last Post: jitenderkkr
  Need to put a value in editbox and the value is stored in a variable anushreebehura 2 2,772 05-10-2013, 03:03 PM
Last Post: SweetyChowdhury
  calling stored procedure from Oracle borisk 3 6,511 03-19-2013, 12:41 PM
Last Post: gaveyom
  Run Error on Function call in QTP essentials cnujonnala 1 2,354 12-31-2012, 02:38 PM
Last Post: krr
  call function from another library y1799 2 5,597 08-19-2010, 06:43 PM
Last Post: y1799

Forum Jump:


Users browsing this thread: 1 Guest(s)