Results 1 to 2 of 2

Thread: VB script within QTP

  1. #1
    Junior Member
    Join Date
    May 2008
    Answers
    10

    VB script within QTP

    If I am going to need a VB sub routine or Function,

    1) Can I create it anywhere within a test script - Very top or Bottom?
    2) If I have a VB sub routine or Function in a test script "A", Can I call it
    from Test Script "B"? Why and Why not?


  2. #2
    Contributing Member
    Join Date
    Feb 2008
    Answers
    36

    Re: VB script within QTP

    Hi there,

    1. Yes you can create a function anywhere in the script, and Make a call to it wherever it is necessay.

    2. No! You cannot write a function in one test script and call it in another.

    There's a easy way in which you can use a single function in two or more scripts.

    Create a new function and save it, then associate the function with all the scripts in which you want to use it.
    You can call the function simply by using Call Function_name()


    Regards,
    Tina Mahajan.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact