Your code attached doesn't make sense, when I click the button, we don't know what will happen.
Thanks. Wesley Chen. On Mon, Jun 1, 2009 at 4:04 AM, Venkatesh Lanke <venkateshla...@gmail.com>wrote: > Hi Karim, > > I have added HTML source of the page with button in question ?? Let me know > in case of any questions. Thanks > > Thanks > Venkatesh > > > On Sun, May 31, 2009 at 12:40 PM, Venkat <venkateshla...@gmail.com> wrote: > >> >> Hi Wesley, >> >> Thanks for reply. >> I did try ie.element_by_xpath("//butt...@id='action_button']/").click >> in my test case. Now I don't get any errors, but still It does not >> click the action_button. >> I did went through the xpath discussion on watir general group and >> tried other work arounds like >> ie.element_by_xpath("//button[contains(text(),'Start >> Scan']/").click .But still not success. >> >> Also I thought that execution of watir testcase and loading of page is >> not is sync. So I did add ie.wait just to figure out if that was a >> problem shown below >> ie.button(:name, "_form_action").click >> ie.wait >> ie.element_by_xpath("//butt...@id='action_button']/").click >> >> But still not success. >> >> I am new to watir, Is their any requirement in watir that button >> should have compulsorily have name ?? >> >> I did try other parts for website by entering id into testcase instead >> of name. It works fine. I dont know whats the problem with this >> button ?? >> >> Any other steps for troubleshooting are highly appreciated. >> >> Thanks >> Venkatesh >> >> >> On May 30, 6:28 pm, Wesley Chen <cjq....@gmail.com> wrote: >> > 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 <venkateshla...@gmail.com> >> 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 watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---