The best way to do this is to completely seperate your markup (html) from your behaviour (js). Your link should actually point to a real URL that works in case someone has JS turned off. This way you can select the link with ie.link(:url, 'linkurl').
If you give the url a unique id or even a class that all ajax urls will use, you can use JS (most likely a JS library) to select the links and add event handlers to them (and possibly parse the url to understand what the request params are), making the AJAX call and killing the event so the browser doesn't actually request the page. That's how I would do it. -Ryan Naga Harish Kanegolla wrote: > Hi all, > Till now I am using ie.link(:url,"http"//www.xyz/abc.html") for a link in > watir.Now I have a problem for the ajax link. i.e., the url obtained in the > html source is > <a href="#" onclick="new > Ajax.Request('/data_entry/ajax_add_term/131?contract_id=227', > {asynchronous:true, evalScripts:true}); return false;">add a term</a> > > So how could i use this url for the link in watir?? Please tell me the syntax > in watir for using such type of ajax links. Actually i am having the same > "add a term" more than 10 . so i can't use the text link.Please help me out > such types. > > Thanks in Advance > Harish > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6325&messageID=17798#17798 > _______________________________________________ > Wtr-general mailing list > Wtr-general@rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general -- Ryan Doherty Messenger WebDev Yahoo! ID: ryan.doherty _______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general