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 -~----------~----~----~----~------~----~------~--~---
<!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 = 'xxxx'; </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> <title>On 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 id="page"> <div id="brand"> <img src="/images/brand.png" border="0" alt="alt" id="brand_img" /> <img src="/images_profiles/xxxxxxxxxxxxx" border="0" alt="alt" id="co-brand_img" /> </div> <div id="window" class="hidden"> <p id="top_row"> <span class="pos_left large" id="top_left_label"></span> <span class="pos_right large" id="top_right_label">xxxxxxxxxxxxxx</span> </p> <div id="mid_row"></div> <div id="bot_row"> <button type="button" class="button" id="action_button"></button> </div> </div> <div id="dialogue"> <div id="steps_bar"> <ol> <li id="tab_a" class="tsel"> <div id="check_a" class="check_box"><img src="/images/check.png"/></div> </li> <li class="empty"> </li> <li id="tab_b"> <div id="check_b" class="check_box"><img src="/images/check.png"/></div> </li> <li class="empty"> </li> <li id="tab_c"> <div id="check_c" class="check_box"><img src="/images/check.png"/></div> </li> </ol> </div> <noscript> <div id="noscript_message"> <h2 id="noscript_message_subject" class="error">XXXXXXXXXX requires scripting to be enabled.</h2> <div id="noscript_message_body"> <span>JavaScript must be enabled in order for you to use XXXXXXXXX tool. However, it seems JavaScript is either disabled or not supported by your browser.</span> <br /><br /> <span>To resolve this issue, first <a href="/support.php#s2_q3" title="How to enable JavaScript in your browser" target="_blank">enable JavaScript</a> in your browser then </span> <a href="/a/daimler" target="_self" title="Refresh">refresh</a> <span>this page to restart the On Demand Scan Agent.</span> </div> </div> </noscript> <div id="next" class="hidden"> <p>You have been requested to perform a security assessment of your computer. Please follow these steps in order to complete the assessment.</p> <div id="message"> <h2 id="message_subject">Install</h2> <div id="message_body"> <p>The XXXXXXXXXXXXXX tool is installed as a browser plug-in with a dissolvable memory footprint.</p> <p>To get started, make sure that ActiveX is enabled for your browser and then push the Install Agent button.</p> </div> </div> <div class="hidden" id="progress" style="font-weight: bold;"></div> <div id="agentdiv"></div> <div class="hidden" id="results"> <h1>Scan Results</h1> <div id="security_folder_section" class="section"> <h2><a href="#" class="folder" id="security_folder"><span>Open</span></a>Critical Issues<br /> <span id="issues_span"></span></h2> </div> <div id="antiv_folder_section" class="section"> <h2><a href="#" class="folder" id="antiv_folder"><span>Open</span></a>Anti-Virus<br /> <span id="issues_span"></span></h2> </div> <div id="sysinfo_folder_section" class="section"> <h2><a href="#" class="folder" id="sysinfo_folder"><span>Open</span></a>Moderate Issues<br /> <span id="issues_span"></span></h2> </div> </div> <div class="hidden" id="user_name_hidden">XXXXXXX</div> <div class="hidden" id="profile_name_hidden">dXXXXXXXXXX</div> </div> <script>document.getElementById('next').className = 'shown';</script> </div> <div id="footer"> <ul> <li> <a href="/support.php" title="Support">Support</a> </li> <li class="last"> <a href="http://xxxxxxxxxx/company/privacy/" target="_blank" title="Privacy Policy">Privacy Policy</a> </li> </ul> <div class="clear"></div> <p>© 1999 - 2008 XXXXXXX, Inc. All rights reserved. XXXXXXXX, the Xxxxxxxxx logo and XXXXXXXxx are registered trademarks of XXXXX, Inc. All other trademarks are the property of their respective owners.</p> </div> </div> </body> </html>