I just realized right after asking the question that you can get the html
of a button and get the attribute out by doing some splitting. So
btn.html.split('onclick="')[1].split('"')[0]
gives the right answer.
It's not pretty, but it works.
On Monday, August 6, 2012 3:25:12 PM UTC-5, Matt wrote:
>
> I have this button:
> <button type="submit" class="sui-bttn" onclick="do_stuff">Do Stuff</button>
> How do I get the string "do_stuff" out of this button? Thanks :D
>
>
--
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]