I think it is not a common button, but defined in the css.
You may try the xpath solution as below:
ie.element_by_xpath("//butt...@id='action_button']/").click

In fact, when you search in the Watir General, there are many discussion and
solution about XPATH deal with, of course, if you are interested in it.

Thanks.
Wesley Chen.


On Sat, May 30, 2009 at 3:32 PM, Venkat <[email protected]> wrote:

>
> I wrote a code to click on button
> ie.button(:id, "action_button").click
>
> But I am getting following errors:
> C:\Documents and Settings\XXXX\Desktop>ruby two-minute.rb
> C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:57:in
> `assert_e
> abled': object id and action_button is disabled
> (Watir::Exception::ObjectDisabl
> dException)
>        from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> element.rb:22
> :in `click!'
>        from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> element.rb:21
> :in `click'
>        from two-minute.rb:18
>
> HTML Source code of the button
>
> <div id="mid_row"></div>
>        <div id="bot_row">
>          <button type="button" class="button" id="action_button"></
> button>
>        </div>
>
> My guess is my syntax is right but still its not clicking on button. I
> am not sure why?
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to