SPONSORS:






User Tag List

Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Oct 2001
    Location
    Dublin
    Posts
    64
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Links with same name - Exists method failing ???

    Hi again

    Using SilkTest 5.0.3 I have the following code
    [-] if (MMSCInbox.HtmlTable1.HtmlColumn1.HtmlLink (sSubject).Exists () ) .........

    This seems to work fine (i.e. finds the link if present) if I have only one link with the name sSubject. However once I have more than one it gives an error - does anyone have a way around it (other than not having the same link name - I'm testing a messaging system and the 'sSubject' is a link to the message details, so it's possible to have more than 1 msg with the same header).

    Also I have 2 columns in my table (and SilkTest 'sees' 2 columns) - the 'sSubject' is a link in the 2nd column (on the screen) but Silktest seems to find it only in the 1st column (spent many hours before I figured that one out !).

    Jerrie

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

  2. #2
    Senior Member
    Join Date
    Jun 1999
    Location
    Fremont, CA, USA
    Posts
    355
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Links with same name - Exists method failing ???

    Try something like:

    [-] if (MMSCInbox.HtmlTable1.HtmlColumn1.HtmlLink ("{sSubject}[1]").Exists () ) .........



    ------------------
    David Genrich
    david@e2Open.com
    david_kim@usa.net

  3. #3
    Member
    Join Date
    Sep 2001
    Posts
    69
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Links with same name - Exists method failing ???

    You can try setting the agent option to not throw error messages when items are not unique.

    Agent.SetOption (OPT_VERIFY_UNIQUE, FALSE)

    However, this will always click on the first link in the list.

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

 

 

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 07:44 PM.

Copyright BetaSoft Inc.