Given the HTML you have supplied, the code that Zeljko provided browser.link(:text => "Update").click browser.link(:text => "Cancel").click
should work, If it is not working, we'll a better description of what 'not working' means. If there is an error message please provide it, if not a description of what exactly you see happening.. nobody here can see your screen nobody hear can read your mind you must use written words to communicate with us, in detail, results of things we suggest as solutions. "this is not working" is not communicating anything worthwhile and provides no path forward On May 18, 1:11 am, sandy <[email protected]> wrote: > have tried this option also but this is not working...Please suggest > me something that work...this is like a table hierarchy and update & > cancel link is showing in a cell. As it is showing from the code for > update and cancel below > > <a href='javascript:WebForm_DoPostBackWithOptions(new > WebForm_PostBackOptions("ctl00$cphMaster$MyDataGrid$ctl02$ctl00", "", > true, "", "", false, true))'>Update</a> <a > href="javascript:__doPostBack('ctl00$cphMaster$MyDataGrid > $ctl02$ctl01','')">Cancel</a></td><td> > > some java script function has been called on update & cancel link... > > On May 16, 9:25 pm, orde <[email protected]> wrote: > > > > > > > > > > Thanks for replying but these option is also not working. > > > What exactly is happening? Is an error thrown? > > > It's possible that the javascript needs to be triggered via a > > fire_event method (http://rdoc.info/gems/watir/1.8.1/Watir/ > > Element:fire_event): > > > browser.link(:text => "Update").fire_event("onclick") > > browser.link(:text => "Cancel").fire_event("onclick") > > > Hope it helps. > > > orde > > > On May 16, 7:28 am, sandy <[email protected]> wrote: > > > > Thanks for replying but these option is also not working. > > > > Please let me know if there is an another solution of this problem. > > > > On May 13, 7:55 pm, Željko Filipin <[email protected]> > > > wrote: > > > > > On Fri, May 13, 2011 at 4:31 PM, sandy <[email protected]> wrote: > > > > > i am not able to click the update or cancel link > > > > > Try this: > > > > > browser.link(:text => "Update").click > > > > browser.link(:text => "Cancel").click > > > > > Željko > > > > -- > > > > watir.com - community manager > > > > watir.com/book - author > > > > watirpodcast.com - host > > > > viaqa.mobi conference on software testing - organizer -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected]
