SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 6 of 6
  1. #1
    Super Member
    Join Date
    Jul 2002
    Posts
    1,769
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Best way to click on a changing link? ...

    Hey guys,

    In the app (web) I'm working on I need to search for a record using a code like '12345'. When the results are returned I need to click on the resulting link to get to the next page.

    But when I search for '67890' later on the link will of course be '67890'.

    What's the most elegant way to make the call to web_link_click() generic enough?

    Thanks in advance! ;-)

  2. #2
    Super Member
    Join Date
    Jul 2002
    Posts
    1,769
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Best way to click on a changing link? ...

    Wow, easier than I thought. Sometimes the path of least resistance is indeed best. This works but for some reason I didn't expect it to. ;-)

    myval = "12345";
    web_link_click( myval );

  3. #3
    SQA Knight
    Join Date
    Jun 2002
    Location
    Cupertino, CA, USA
    Posts
    2,164
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Best way to click on a changing link? ...

    "12345" must be an object in the gui map, or it would not work.

    What is the physical description?

    Are you using a regular expression ?:

    {
    class: object,
    MSW_class: html_text_link,
    html_name: "![0-9][0-9][0-9][0-9][0-9]"
    }

    Are you playing games with us Christopher ?

  4. #4
    Super Member
    Join Date
    Jul 2002
    Posts
    1,769
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Best way to click on a changing link? ...

    Thanks, I finally got it working w/ a custom function to search for text on the page and click on it.

  5. #5
    SQA Knight
    Join Date
    Jun 2002
    Location
    Cupertino, CA, USA
    Posts
    2,164
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Best way to click on a changing link? ...

    Glad I could help.
    Would you mind posting your function?

  6. #6
    Senior Member
    Join Date
    Aug 2005
    Location
    Colorado
    Posts
    216
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Best way to click on a changing link? ...

    [ QUOTE ]
    What's the most elegant way to make the call to web_link_click() generic enough?

    [/ QUOTE ]

    Find something in the description of the link that does not change and use that to describe the object. For example, I have applications that contain links to stories that can change hourly. The link text is the story title. I cannot describe these links using the ever-changing story titles, but I can describe the links using a regular expression on the link URL. There is part of the URL that stays the same based on story type.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin 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 10:07 AM.

Copyright BetaSoft Inc.