SPONSORS:






User Tag List

Results 1 to 10 of 10
  1. #1
    Junior Member
    Join Date
    Sep 2001
    Location
    Shrewsbury, MA, USA
    Posts
    19
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Passing arguments to window declarations

    Is there a way to pass an agrument to a window declaration?

    ------------------

  2. #2
    Senior Member
    Join Date
    Jul 2001
    Location
    Elizabeth, CO, USA
    Posts
    653
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Passing arguments to window declarations

    Um...you may need to define this question a bit more.

    There is definitely a way to pass an argument to a method that's written inside of a window declaration. For example...
    But I guess I don't get what you mean by "pass an argument to a window declaration" if you don't mean what I just described above.

    - Dave


    ------------------
    Amelior Technology
    dreed@ameliortech.com
    WaltzingRhino.com
    A concerned Borland customer, a fly in the ointment, a wrench in the works.

  3. #3
    Junior Member
    Join Date
    Sep 2001
    Location
    Shrewsbury, MA, USA
    Posts
    19
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Passing arguments to window declarations

    I actually meant passing one at this level
    But it really doesn't seem as though this will work.

    What would be a bigger help is this: I have a global variable defined in the INC file. But I would love to pass the argument for this global variable in the PLN file. This way I can change the arguments for these global variables through the PLN file. Right now I have to manually go into the INC file and change its value each time. Is there a way to do this??

    ------------------

  4. #4
    Senior Member
    Join Date
    Aug 2000
    Location
    NY,NY,USA
    Posts
    103
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Passing arguments to window declarations

    Yes you can pass function values, variable and constants to window declarations

    ie

    tag GetSomeValue()

    tag sSomeString

    tag cSomeConstant


    ------------------

  5. #5
    Senior Member
    Join Date
    Jul 2001
    Location
    Elizabeth, CO, USA
    Posts
    653
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Passing arguments to window declarations

    Ah...I see. Um. No.

    So you've got a variable in a .pln file that you'd like to pass to the frame file. Is this what you're getting at? (Maybe I haven't had enough coffee today. Or too much.)

    There's really no simple way to do this as each testcase executed from a .pln file refreshes the frame file as to what's been saved. That is, if Testcase A executed from the .pln changes global variable b from "foo" to "guido," when you run Testcase B from the .pln file, Variable b will be "foo" again.

    A really awful way of tackling this (might want to wash your hands after doing it) is have the testplan call a function in a .t (or .inc) file that sets a variable in a .ini file. They're pretty easy to work with. Then, at the start of your .inc file you can retrieve values from the .ini file.

    Something like this:

    It's an imperfect solution, but it is a way of carrying values from one testplan-executed testcase over to another testplan-executed testcase. You could also create your own ScriptEnter to load the variables from the .ini file.

    - Dave



    ------------------
    Amelior Technology
    dreed@ameliortech.com
    WaltzingRhino.com
    A concerned Borland customer, a fly in the ointment, a wrench in the works.

  6. #6
    Senior Member
    Join Date
    Aug 2000
    Location
    NY,NY,USA
    Posts
    103
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Passing arguments to window declarations

    Ah,ummmmm Yes, I use it extensively

    ------------------

  7. #7
    Junior Member
    Join Date
    Sep 2001
    Location
    Shrewsbury, MA, USA
    Posts
    19
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Passing arguments to window declarations

    We want it so that the Value is in the PLN file, but the global variable is defined in the Frame file.

    We would like to pass the value from the PLN file to the Window Dec. Right now we have a global variable in the Frame file that the Window Decs use, but we want to use the PLN file to pass this instead.

    ------------------

  8. #8
    Senior Member
    Join Date
    Aug 2000
    Location
    NY,NY,USA
    Posts
    103
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Passing arguments to window declarations

    Define the global and include the file in both the plan and the window descs, you have access to it from both places

    ------------------

  9. #9
    Junior Member
    Join Date
    Sep 2001
    Location
    Shrewsbury, MA, USA
    Posts
    19
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Passing arguments to window declarations

    Could you through me an example Russ? Thanks


    ------------------

  10. #10
    Senior Member
    Join Date
    Aug 2000
    Location
    NY,NY,USA
    Posts
    103
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Passing arguments to window declarations

    MY apologies to you and dcreed, it is the verification process that you can do this.


    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 12:32 PM.

Copyright BetaSoft Inc.