[wtr-general] Re: asset_enabled error to click a button
Hi Venki, Any luck ? I am also facing the same issue. Please reply to me about this issue... Awaiting your reply.. On Sat, May 30, 2009 at 1:02 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\\Desktopruby 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? -- Regards, P.Raveendran --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: asset_enabled error to click a button
Hi Raveendran, I think there could be a hidden button existed on the page with same properties of the button you are trying to click. Try to use index property along with the current button value property. Ex: ie.button(:id=/action_button/,:index=2).click try to verify index value with 1,2,3. I hope this will help you! Regards Siva Phaneendra Krapa On Jul 18, 2:16 pm, Raveendran P raveend...@railsfactory.org wrote: Hi Venki, Any luck ? I am also facing the same issue. Please reply to me about this issue... Awaiting your reply.. On Sat, May 30, 2009 at 1:02 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\\Desktopruby 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? -- Regards, P.Raveendran- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: asset_enabled error to click a button
Try this ie.button(:id, action_button).click_no_wait On Sat, May 30, 2009 at 1:02 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\\Desktopruby 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 -~--~~~~--~~--~--~---
[wtr-general] Re: asset_enabled error to click a button
2009/5/30 Venkat venkateshla...@gmail.com object id and action_button is disabled (Watir::Exception::ObjectDisabldException) Well, you are clicking element that is disabled. Have you read the error message? :) Watir says it can not click a button because it is disabled. Take a look why is it disabled. Željko --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: asset_enabled error to click a button
Yeah Z is correct I think, you are trying to click it before it's enbled. it seems like perhaps this button is inhereting some functionality via CSS or some other means. In the HTML you give, there's no label for it, there's no functionlity attached to it, it's just like a template waiting to be filled in.. you could click it all day long in the HTML you sent, and nothing would ever happen.. There has to be other code to make things happen, that's enabling or disabling the button, defining what happens when it is clicked, etc. Frankly it would seem that there's something that perhaps makes it start out disabled? so you might need to investigate what controls that, and what has to happen to enable the button for use. Some other action might need to preceed clicking the button, or you may just need to wait a few seconds after the page is loaded for client side code to do it's thing if there is extensive client side scripting. On Jun 1, 2:34 am, Željko Filipin zeljko.fili...@wa-research.ch wrote: 2009/5/30 Venkat venkateshla...@gmail.com object id and action_button is disabled (Watir::Exception::ObjectDisabldException) Well, you are clicking element that is disabled. Have you read the error message? :) Watir says it can not click a button because it is disabled. Take a look why is it disabled. Željko --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: asset_enabled error to click a button
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\\Desktopruby 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 -~--~~~~--~~--~--~---
[wtr-general] Re: asset_enabled error to click a button
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\\Desktopruby 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 -~--~~~~--~~--~--~--- !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en head meta content= http-equiv=Content-Language name=en-us / meta content=copyright name=Copyright / script var appName = 'XXX'; var profile_name = 'xxx'; var landing_host = ''; /script META HTTP-EQUIV=Pragma CONTENT=no-cache META HTTP-EQUIV=Expires CONTENT=-1 link href=/css/layout.css rel=stylesheet type=text/css / link href=/css/start.css rel=stylesheet type=text/css / link href=/css/scan.css rel=stylesheet type=text/css / link href=/css/index.css rel=stylesheet type=text/css / script type=text/javascript src=/js/firebug/firebugx.js/script script type=text/javascript src=/js/mootools.js/script script type=text/javascript src=/js/jquery-1.2.6.js/script script type=text/javascript src=/js/jquery-impromptu.js/script script type=text/javascript src=/js/jquery.progressbar.min.js/script script type=text/javascript src=/js/json2.js/script script type=text/javascript src=/js/wrapper.js?ver=1.31.36.1/script script type=text/javascript src=/js/version.js?ver=1.31.36.1/script script type=text/javascript src=/js/common.js?ver=1.31.36.1/script script type=text/javascript src=/js/config.js?ver=1.31.36.1/script titleOn Demand Scan Agent - Scan/title script type=text/javascript src=/js/jquery.pngFix.js/script script type=text/javascript src=/js/common.js/script script type=text/javascript src=/js/agent.js?ver=1.31.36.1/script script type=text/javascript src=/js/review.js?ver=1.31.36.1/script meta content=text/html; charset=utf-8 http-equiv=Content-Type / link href=/favicon.ico rel=shortcut icon type=images/x-ico / /head body div
[wtr-general] Re: asset_enabled error to click a button
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\\Desktopruby 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 -~--~~~~--~~--~--~---