Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Functions
#1
Not Solved
I am trying to create functions to perform tasks like Login, Logout, URL Selection, etc. But I cannot seem to find help anywhere. either I am not searching correctly, or QTP cannot do Functions (I highly doubdt)

This is what I have:
Code:
'CTE Testing

Call Function CloseAllOpenWindows ()

Call Function LaunchCTEBrowser ()

'Run tests here
Call Function LoginImageAccessCTE ()

Call Function ActivityReportByReportI ()
'End

Call Function LogoutCTE ()

Call Function CloseAllOpenWindows ()

Do I need to "Call" a function?
Where are Functions suppose to live? (I have them in my Test dir)
Do I need code to tell where these Functions live?
Is there any material around on how to perform Functions?

MUST all of my Functions be in one file? At present, I have each Fjnction going to its own QTP file. If so, and I think it is, how do I assoc 10-20 functions in one file to the test scripts I plan to build. I do not want to have every script to have its own login, close all logout text that I must update. I want one login, one close all and one logout script.

Depending on which scripts I want to run at night, I was hoping to comment or uncomment a script in my Main script above to determine which scripts would execute.

Anyone have a good way to handle this? ;-)
thx
Reply


Messages In This Thread
Functions - by mv8167 - 04-27-2011, 01:43 AM
RE: Functions - by Saket - 04-27-2011, 10:38 AM
RE: Functions - by vIns - 04-27-2011, 02:11 PM
RE: Functions - by UFTEnthusiast - 04-27-2011, 02:51 PM
RE: Functions - by mv8167 - 04-27-2011, 10:13 PM
RE: Functions - by vIns - 04-28-2011, 07:13 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Perform some functions whenever QTP Stop button is pressed smartkarthi 2 2,960 08-22-2013, 11:43 AM
Last Post: smartkarthi
  exit parent functions as well Shridevi.Salagare 3 3,623 07-31-2013, 12:15 AM
Last Post: Ankur
  Datatable in functions shwetasharma 2 3,315 03-26-2013, 08:00 AM
Last Post: sams001
  Problem with using two functions in the same action mhanaan 2 2,861 09-14-2012, 10:09 PM
Last Post: mhanaan
  Can you do functions by calling filename or any other better ways? chong67 2 2,979 05-29-2012, 11:41 PM
Last Post: chong67

Forum Jump:


Users browsing this thread: 1 Guest(s)