Thanks Jarmo. yes, I could do that but was wondering whether there was any other watir method to do it in one go.
Cheers, Kay On Aug 6, 9:14 am, Jarmo Pertman <[email protected]> wrote: > Extract it into a method: > def click_edit > browser.link(:id, 'some_id').fire_event('onmouseover') > browser.link(:id, 'some_id').click > end > > And then just call the method from your scripts: > click_edit > # do something else > > Jarmo > > On Aug 6, 2:23 am, Litha K <[email protected]> wrote: > > > > > > > > > Hi all, > > > In my new project (its a content management system) there is an edit > > button for all the modules on the page which is on mouseover. At the > > moment to click this 'edit' button I have to do the following each > > time. > > > browser.link(:id, 'some_id').fire_event('onmouseover') > > browser.link(:id, 'some_id').click > > > Please could someone tell me if there is a better way of doing this? > > Its a pain to duplicate this all over place for about 20 modules on > > the page, and my tests have to click the 'edit' button numerous times. > > > Many thanks, > > Kay -- 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]
