SPONSORS:






User Tag List

Results 1 to 2 of 2
  1. #1
    Super Member
    Join Date
    Jul 1999
    Location
    Rancho Santa Margarita, CA
    Posts
    1,439
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Assigning tag dynamically at runtime

    Need your HELP again!
    To assign tag dynamically at runtime via a function call (as suggested in the Online help), can I create and use the tag from the name of an item in a ListBox (via selecting an item and doing a GetText())?
    If possible, how would the format be?

    Thanks.

  2. #2
    Member
    Join Date
    Aug 2000
    Location
    oakland,ca,u.s.a
    Posts
    38
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Assigning tag dynamically at runtime

    why would you want to do that? I don't see where you're headed or trying to do.

    I suppose it's possible to do many things with dynamic tagging. I have been able to bet the browser location url text and compare it to static string and then print it to the results file and return a string for the tag statement using 4test language in my object declaration for my frame file.

    here's an example of what I did:
    [-] window BrowserChild WelcomePage
    [ ] tag genTag()
    [-] STRING genTag()
    [ ] STRING sRetVal
    [-] sRetVal = "http://cancun/employee/intro.jsp"
    [ ] print( "INSIDE FRAME.INC(DECLARATION FOR Employee Welcome Page...")
    [ ] print( "ACTUAL URL for this page is: {BrowserPage.GetLocation()}")
    [-] if ( MatchStr(sRetVal,BrowserPage.GetLocation()))
    [ ] print( "INSIDE FRAME.INC(DECLARATION FOR Employee Welcome Page...")
    [ ] print( "URL for this page is: {BrowserPage.GetLocation()}")
    [ ] print( "The url matches!" )
    [ ] sRetVal = "CareAssured - Employee Introduction"
    [-] else
    [ ] print( "Frame.Inc(URL doesn't match for Employee Welcome Page")
    [ ] print( "Returning GARBAGE_TAG")
    [ ] sRetVal = GARBAGE_TAG
    [ ] return sRetVal


    You would just do similar things by calling the necessary methods for the htmllist to get it's contents and then manipulating the strings therein and returning the desired string to be used for the tag

    e.g.

    tag createTag()
    STRING createTag()
    LIST OF STRINGS lsItems
    lsItems = HtmlListBox("#1").GetContents()
    return lsItems[1] //returns the first item in the list -> this item will become the tag for this object declaration.

    ------------------
    Dave
    QA Engineer
    CareAssured.com
    Dave
    QA Engineer
    CareBid.com

 

 

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

Copyright BetaSoft Inc.