[wtr-general] Re: example problem
gem install watir at the command line which should install watir, firewatir and commonwatir. Double check by typing gem list You should see all of these gems. Otherwise, are you able to use irb? irb then require 'watir' Charley Baker blog: http://blog.charleybaker.org/ Lead Developer, Watir, http://wtr.rubyforge.org QA Architect, Gap Inc Direct On Sat, May 30, 2009 at 11:55 PM, James j.s.west...@gmail.com wrote: ok completely new to the world of ruby as well as programming The final goal is too scrape an ajax site... if I understand currently I need both watir and firewatir? I am trying to go through some online examples and am trying to complete the google_search.rb example that seems to be floating around. I don't think the program is running properly when I require watir because I get the error google_search.rb:14:in `require': no such file to load -- watir (LoadError) any idea what this means? I am running windows xp thanks for the help in advance --~--~-~--~~~---~--~~ 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: Multiple Attributes for Text Fields
http://wiki.openqa.org/display/WTR/Multiple+Attributes Charley Baker blog: http://blog.charleybaker.org/ Lead Developer, Watir, http://wtr.rubyforge.org QA Architect, Gap Inc Direct On Sat, May 30, 2009 at 5:50 AM, karimnumerouno karim@gmail.com wrote: hi could any one share a link our some stuff of multi attribute selection, it there any doc there On May 30, 3:52 am, Al Snow jas...@hotmail.com wrote: Try this:http://wiki.openqa.org/display/WTR/Basic+Authentication Thanks, Al Snow Linkedin:http://www.linkedin.com/in/alsnow Google Talk: jasnow1 Twitter: jasnow Date: Thu, 28 May 2009 16:02:16 -0400 Subject: [wtr-general] Re: Multiple Attributes for Text Fields From: parvinder.gho...@gmail.com To: watir-general@googlegroups.com i updated to 1.6.2 and all of sudden i'm getting the following error: c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie.rb:113:in `initialize': failed to create WIN32OLE object from `AutoItX3.Control' (WIN32OLERuntimeError) HRESULT error code:0x8007007e The specified module could not be found. from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie.rb:113:in `new' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie.rb:113:in `autoit' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-class.rb:425:in `autoit' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-class.rb:413:in `bring_to_front' from test.rb:34 When i do this: -- 1. require 'watir' 2. browser = Watir::IE.new()#(:title, /elements f/i) 3. browser.goto(file:///C:/fit/unittests/html/elements_index.html) 4. browser.bring_to_front 5. browser.text_field(:id=txt_description, :index=3).flash 6. browser.select_list(:id=dd_status, :index=2).flash() -- Error is occurring at line 4 every single time. If i comment it out the script works fine. Any help is appreciated. Thanks, Parvinder On Thu, May 28, 2009 at 3:32 PM, Parvinder Ghotra parvinder.gho...@gmail.com wrote: Thanks Charlie. i'm running watir-1.5.6. so i should move to 1.6.2? Parvinder On Thu, May 28, 2009 at 2:07 PM, Charley Baker charley.ba...@gmail.com wrote: Multiple attribute support for input elements is supported in the latest version. Which version are you running? -c On Thu, May 28, 2009 at 12:05 PM, Parvinder Ghotra parvinder.gho...@gmail.com wrote: Did watir ever provide multiple attribute support for Text fields and Drop downs. I was very surprised to find that the following doesn't work: $ie.text_field(:id = aaa, :index = 2) Is there plan to provide multiple attribute support for things like Text fields, drop downs, radio buttons, checkboxes and etc. Thank you! Parvinder Ghotra -- Parvinder Ghotra -- Parvinder Ghotra _ Hotmail® has a new way to see what's up with your friends. http://windowslive.com/Tutorial/Hotmail/WhatsNew?ocid=TXT_TAGLM_WL_HM... --~--~-~--~~~---~--~~ 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