SPONSORS:






User Tag List

Results 1 to 5 of 5

Thread: Dynamic tag

  1. #1
    Super Member
    Join Date
    Jul 2001
    Location
    Earth
    Posts
    1,882
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dynamic tag

    Use dynamic instantiation...

    for instance...
    where 'var' is the variable being received by testcase that is the tag for the object in question.

    ------------------
    James Soderborg
    http://www.ameliortech.com
    jamesso@ameliortech.com

  2. #2
    Member
    Join Date
    Aug 2001
    Location
    Itasca, IL
    Posts
    61
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Dynamic tag



    Does some one know How to dynamically define the tag by assigning variable and then fed the variable through parameter at Run time through plan file or some other way?

    Example

    HtmlText Text1
    tag var //where var is the variable

    And then I want this variable to be get the parameter value through the plan file?


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

  3. #3
    Junior Member
    Join Date
    Jan 2003
    Posts
    27
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dynamic tag

    You could also replace the tag with a function that returns a string, and have that function return the variable value you want. For Example:

    Note: Since every time the object Text1 is referneced in yoru script, the above function is run, the performance of the script can degrade a little. Try not to make tag functions too complex.

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

  4. #4
    USB
    USB is offline
    Junior Member
    Join Date
    Dec 2001
    Location
    waltham, MA, USA
    Posts
    24
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dynamic tag

    If you know that the test data is passed through the plan file you could use the GetTestCaseArgs() method to return that data.

    For Example:

    HtmlText Text1
    tag "{GetTestCaseArgs()}[1]"
    So it always returns the first value that you passed as data.

    --seshu
    --Seshu

  5. #5
    Member
    Join Date
    Aug 2001
    Location
    Itasca, IL
    Posts
    61
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dynamic tag

    Thanks James.

    That way is much simpler and easier to work with.
    What I am doing now is

    testcase test (string a)
    Home.SetActive ()
    Home.HtmlLink (a) . Click ()

    where a is the var name and could be supplied the parameter through the plan file or a script file. Its much easier and dynamic.



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

 

 

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:25 PM.

Copyright BetaSoft Inc.