Another possiblity would be to take a slightly more functional approach Click the link, or fire the onclick method, and then test that the right thing happened as a result.
surely there's some way (either by the resulting page, data on the resulting page, or perhaps looking at a backend db) to validate the system responded properly to clicking the link. That way you test not only the parameters, but the script that uses them etc. In other words a fuller test of the system. (otherwise, it sounds a lot more like something that maybe should be tested by a developer at the unit test level (does the server side code insert the proper parameters), which can often be done at the Spec/Unit level using something like webrat or capybara, which simulates a browser) On Sep 8, 9:11 pm, KH <[email protected]> wrote: > Hi all > I've a link <a onclick="jsmethod('xx' , 'bb')> test it</a> > > How to i access onclick attribute and retrieve the jsmethod params ?? > > Thanks > KH -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: [email protected] To unsubscribe: [email protected]
