SPONSORS:






User Tag List

Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Junior Member
    Join Date
    Oct 2002
    Location
    San Jose
    Posts
    12
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem with dynamically generated links

    Hi
    I have just joined the forum today. Its a great site, hoping that somebody can solve my problem also.
    I have a text of link, which is coming from a file. Link is generated dynamically and is not present during recording. So how can i click on the link with just the text known. I am using silk 5.5 with netscape 4.79.
    I tried the getcontents() methods to get a handle to individual objects, but it gives only string type, is there any way i can get a handle to any object present on the page programmatically. Then, i can check the Fullcaption of each object and verify the links.

    Thanks
    Aashish


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

  2. #2
    Member
    Join Date
    Sep 2002
    Location
    Garden Grove, CA, USA
    Posts
    49
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem with dynamically generated links

    Can you try this.

    LIST OF WINDOW lwChildren
    lwChildren = MyPage.GetChildren()
    for each wChild in lwChildren
    if (wChild.Class == HtmlLink)
    wChild.Click()




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

  3. #3
    Junior Member
    Join Date
    Oct 2002
    Location
    San Jose
    Posts
    12
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem with dynamically generated links

    Thanks a lot for the promt reply.
    I tried that,but when i am printing all the links, it prints some twice or thrice while not printing some at all. Also all my links are shown as HtmlText, don't know the reason. Can you please help me on this as it is ******.
    If u want i can upload my HTML page.

    Thanks
    Aashish

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

  4. #4
    KS
    KS is offline
    Senior Member
    Join Date
    May 2001
    Posts
    265
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem with dynamically generated links

    GetChildren can be deciving sometimes depending on your window decleration GetContent() is better.
    If you are using VO extension then all the links would show up as text not link (I think). So look for this link as text and do a click on it.

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

  5. #5
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem with dynamically generated links

    If you know beforehand what the text of the link will be, you can still call that specific link directly. Is the text consistent?

    If so, you could call it like:

    window.HtmlLink("Text of my link here.").Click()

    For that matter, if you know the text of the link, you can add it to your declarations with that at your tag.

    Now, you seem to have a second question about getting a handle to objects on your screen and then getting the caption to those objects. For you links you could do something like:

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


    [This message has been edited by DJGray (edited 10-18-2002).]

  6. #6
    KS
    KS is offline
    Senior Member
    Join Date
    May 2001
    Posts
    265
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem with dynamically generated links

    DJGray,
    He is using Netscape so I assume he has to use VO extension. Do you think he can see HtmlLinks using VO?

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

  7. #7
    Junior Member
    Join Date
    Oct 2002
    Location
    San Jose
    Posts
    12
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem with dynamically generated links

    Hi
    I tried the suggested situation but all my links are similar in name except for the a last no. For eg
    Writing and Grammar: Communication in Action Level 1
    Writing and Grammar: Communication in Action Level 2

    As the caption recognizes only the first 6 words, there is no way i can difeerentiate them at run time as their postion is also not fixed on the page. Can someone please suggest me how to click on this links at runtime, i have only the name available to me, which i am taking from a file.


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

  8. #8
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem with dynamically generated links

    Oops. My bad. Thanks KS. I should have seen that Aashish was using NS 4.79.

    I've not tried that with the VO extension, but given that the links are showing as HtmlText, the procedure used above should be valid if using HtmlText("LinkCaption") rather than HtmlLink("#{iLInk}").

    The key is that the text of the link is known beforehand.

    ------------------
    Oh, and on the other issue, Aashish, you can use a wildcard for the identical portions of the links.

    if HtmlLink("*UniquePortion").Exists()

    if HtmlLink("*DifferentUniquePortion").Exists()

    where the * is equal to the identical text in each of the links.


    [This message has been edited by DJGray (edited 10-21-2002).]

  9. #9
    Junior Member
    Join Date
    Oct 2002
    Location
    San Jose
    Posts
    12
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem with dynamically generated links

    Thanks DJ for all the help.
    I have one more question on this, there are certain links that silk is not able to recognize. When i print all the chilren of the page, in place of the links which it can't recognize, it prints the previous link twice or thrice. Can you please tell me what could be the reason , because until i can't figure out this , i cannot try ur suggested solution.

    Thanks
    Aashish


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

  10. #10
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem with dynamically generated links

    Gosh, I'm not sure what would cause that. I have seen Silk have difficulty with links in an HtmlTable, especially where the link is the first item on a new line after a text-wrap, or if the link actually is wrapped itself where the first part of the link is on one line and the remainder of it is on the next line.

    If you do "Record/Window Identifiers" and hover your mouse over the link, what does Silk see? Often, we must manually code declarations to force Silk to see what the recorder does not catch. If you can get Silk to recognize that there is an object there, you can manually add that to your include file.

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

 

 
Page 1 of 2 12 LastLast

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 10:49 AM.

Copyright BetaSoft Inc.