SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Aug 2000
    Location
    Arlington
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Data Driven Link question

    I am updating my cases from the playback/record method, to the data driven type. I have most of it working except:

    We have a window on our site that has 30 or so links. Each of the links is captured/named correctly in my .inc file. I am trying to hit each link, without coding in the name of the link. I want Silk to select the Link below but can't get it to work:

    Playback/Record method:

    Appliances.SetActive ()
    Appliances.RentalEquipmentLink.Click ()

    Here is what I have tried:
    declared sCurrentLink as a STRING
    set sCurrentLink = RentalEquipmentLink in my data record

    Appliances.SetActive ()
    Appliances.HtmlLink (Data.sCurrentLink).Click()

    When I run the case Silk doesn't find the link, it looks for "htmlLink"RentalEquipmentLink

    How do I get that HtmlLink out of there, without causing a syntax error.

    I'm not much of a programmer and this is new stuff to me, any kind of help would be appreciated!!




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

  2. #2
    Member
    Join Date
    Dec 1999
    Location
    Columbus, OH
    Posts
    78
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Data Driven Link question

    You can use the reference operator @. This will refer to the variable indirectly. You can do this with the following....

  3. #3
    Senior Member
    Join Date
    Aug 1999
    Location
    Cambridge, UK
    Posts
    470
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Data Driven Link question

    We have found that once you start down this path it will end up easier if you actually refer to the links (or other controls) in your window declaration by name:
    Appliances.RentalEquipmentLink.Click()
    Appliances.SomeOtherLink.Click()
    etc.

    If you do find some need to refer to the controls on an ad-hoc basis without going by their declared name, then you need to specify the tag you are looking for like this:
    Appliances.HtmlLink["Rental Equipment"].Click
    or set your string sCurrentLink to "Rental Equipment" or whatever the appropriate tag for the link should be, and use:
    Appliances.HtmlLink[sCurrentLink].Click

    The problem with referring to your controls/windows like this is that if the tag changes (as they do, unless you have the nicest development system in the world), then you have to change your scripts; if you refer to the controls/windows by their declared name, then you can just change the tag once in the window declaration and all the scripts will work with this change automatically.

    Then again, you appear to be doing something I haven't seen before, with your string sCurrentLink being defined separately from where it is used. If you are doing something like keeping a list of strings, which correspond to their htmllink's tags, and you have a script which cycles through this list, setting sCurrentLink to each different string in turn, then you are effectively doing something very similar in substance to the tag system, and you could use that just as well.

  4. #4
    Member
    Join Date
    Dec 1999
    Location
    Columbus, OH
    Posts
    78
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Data Driven Link question

    The example I gave above actually refers to the link as it appears in your window declaration. You can modify the tags in your window declaration and this will work the same way. The following sections do exactly the same thing.
    You could use a list of strings that refer to all the links on the page as they are appear in your window declarations and progress through them.

 

 

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 04:08 AM.

Copyright BetaSoft Inc.