I am unable to click on a dynamically generated link in watij

13 views
Skip to first unread message

jagyanseni das

unread,
Sep 4, 2008, 2:12:34 AM9/4/08
to wa...@googlegroups.com
Hi All,
 
I am having problem when trying to click on a dynamic link.
i am wrtting----
 
 
ie.link(id,"...").click();
 
it is opening the correct document when this link is in  first position.but after that it is not able to open the documents that are in second or third position.
 
I have also tried   ie.link(index).click();
 
Can someone tell me,why it is doing so and how i will able to click on all the links.
 
Plz Plz replay soon..................
 
thanks,
jagy
 
 
 
 
 
 

Archer.Chen

unread,
Sep 4, 2008, 2:15:30 AM9/4/08
to wa...@googlegroups.com

 

ie.links(id,"...").get(index).click();

 

 

Thanks & Best Regards!

Archer.chen

Division:PC       Department:GSPC 

eBaoTech Corporation

email:arche...@eBaoTech.com

address:Building 3,KIC Plaza 270  Song Hu Road

Shanghai.200433.China

Tel:(+86)021-61407777 ext  3264


jagyanseni das

unread,
Sep 4, 2008, 4:07:01 AM9/4/08
to wa...@googlegroups.com
thanks Chen.I tried out the code that you have suggested.it is not working .In my source code there is no index number for a link.As i want to click on a link that is in  second position
,i take the index as "2".I dont think i am right.Plz replay.............

Archer.Chen

unread,
Sep 4, 2008, 4:40:50 AM9/4/08
to wa...@googlegroups.com

If the link you try to catch have the same attributes.

You must check the html objects’ attribute first.

I haven’t used the index unless the html object doesn’t have unique attribute.

Because the index is not dependable

ie.links(id,"...").get(index).click(); the code is correct.  May be your page has frame object. Means to the link in the frame. You can not catch the link through IE.    ie.frame(name ("...")).link().click();

jagyanseni das

unread,
Sep 4, 2008, 5:45:57 AM9/4/08
to wa...@googlegroups.com
There is no frame.In the source code there is only <tr id="...">,<td id="..">,<a id="...">,name,class,click_event and href.

jagyanseni das

unread,
Sep 4, 2008, 7:40:31 AM9/4/08
to wa...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages