Click on Dynamically Generated Link

200 views
Skip to first unread message

Clay Wilson

unread,
Jan 5, 2014, 3:36:39 PM1/5/14
to fak...@googlegroups.com
Hello Fakers -

After reading the last two years posts, I've seen variations of this question, but no clear (to me) answer:  How do I click on a link that is being generated through javascript?

The link looks like    <a href="javascript:wndw('/hypubout/183054_trj001.gif');">.gif</a>   where the digits in gif name change every time the information that generates the gif is posted.

I've tried various iterations of xpath query included in an "Click HTML Link" statement along the lines of:

/HTML[1]/BODY[1]/DIV[1]/TABLE[1]/TBODY[1]/TR[1]/TD[1]/DIV[4]/TABLE[1]/TBODY[1]/TR[1]/TD[1]/FONT[1]/TABLE[1]/TBODY[1]/TR[3]/TD[1]/FONT[1]/B[1]/A[1]/a[contains(@href, 'gif')]

and I've tried using the Dispatch Mouse Event with various combinations of mouseover and click, both with xpath references and without.

I am completely stymied and have to believe this is an everyday sort of problem.  I did some reference to a bug in WebKit's implementation of Xpath using TDs.

All help appreciated.
Reply all
Reply to author
Forward
0 new messages