From wang.ning at neusoft.com Wed Mar 1 02:19:46 2006 From: wang.ning at neusoft.com (=?gb2312?B?zfXE/g==?=) Date: Wed, 01 Mar 2006 15:19:46 +0800 Subject: [Wtr-general] frame access denied Message-ID: <012101c63d00$85001fb0$8059a8c0@si.neusoft> I have written a ruby program using watir to read some data from IE. It works well on my computer. But on another computer in another city, following exception appears and the program is terminated. I have read some articles on the internet, they said this exception will not influence program running, but my program can not go on running on this point? What should i do? W, [01-Mar-2006 14:50:00#3392] WARN -- : frame error in waitdocument OLE error code:80070005 in ????? HRESULT error code:0x80020009 ????? E:/CQ_bugbase/ruby/lib/ruby/site_ruby/1.8/watir.rb:1405:in `method_missing' E:/CQ_bugbase/ruby/lib/ruby/site_ruby/1.8/watir.rb:1405:in `wait' E:/CQ_bugbase/ruby/lib/ruby/site_ruby/1.8/watir.rb:1404:in `upto' E:/CQ_bugbase/ruby/lib/ruby/site_ruby/1.8/watir.rb:1404:in `wait' E:/CQ_bugbase/ruby/lib/ruby/site_ruby/1.8/watir.rb:2014:in `click' BugbaseCQ.rb:46:in `ReadNowOfOneTest' BugbaseCQ.rb:101:in `ReadNow' BugbaseCQ.rb:101:in `each' BugbaseCQ.rb:101:in `ReadNow' BugbaseCQ.rb:238 E:/CQ_bugbase/ruby/lib/ruby/site_ruby/1.8/watir.rb:1728:in `initialize': Unable to locate a frame with name pagearea (Watir::Exception::UnknownFrameException) from E:/CQ_bugbase/ruby/lib/ruby/site_ruby/1.8/watir.rb:222:in `new' from E:/CQ_bugbase/ruby/lib/ruby/site_ruby/1.8/watir.rb:222:in `frame' from BugbaseCQ.rb:49:in `ReadNowOfOneTest' from BugbaseCQ.rb:101:in `ReadNow' from BugbaseCQ.rb:101:in `each' from BugbaseCQ.rb:101:in `ReadNow' from BugbaseCQ.rb:238 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060301/218ffed0/attachment.html From bret at pettichord.com Wed Mar 1 02:57:43 2006 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 1 Mar 2006 01:57:43 -0600 Subject: [Wtr-general] frame access denied In-Reply-To: <012101c63d00$85001fb0$8059a8c0@si.neusoft> References: <012101c63d00$85001fb0$8059a8c0@si.neusoft> Message-ID: It looks to me like you are running into a cross-site scripting limitation. The frame is being served by a separate server. On 3/1/06, ?? wrote: > > I have written a ruby program using watir to read some data from IE. It > works well on my computer. But on another computer in another city, > following exception appears and the program is terminated. I have read some > articles on the internet, they said this exception will not influence > program running, but my program can not go on running on this point? > > What should i do? > > W, [01-Mar-2006 14:50:00#3392] WARN -- : frame error in waitdocument > OLE error code:80070005 in > ????? > > HRESULT error code:0x80020009 > ????? > E:/CQ_bugbase/ruby/lib/ruby/site_ruby/1.8/watir.rb:1405:in > `method_missing' > E:/CQ_bugbase/ruby/lib/ruby/site_ruby/1.8/watir.rb:1405:in `wait' > E:/CQ_bugbase/ruby/lib/ruby/site_ruby/1.8/watir.rb:1404:in `upto' > E:/CQ_bugbase/ruby/lib/ruby/site_ruby/1.8/watir.rb:1404:in `wait' > E:/CQ_bugbase/ruby/lib/ruby/site_ruby/1.8/watir.rb:2014:in `click' > BugbaseCQ.rb:46:in `ReadNowOfOneTest' > BugbaseCQ.rb:101:in `ReadNow' > BugbaseCQ.rb:101:in `each' > BugbaseCQ.rb:101:in `ReadNow' > BugbaseCQ.rb:238 > E:/CQ_bugbase/ruby/lib/ruby/site_ruby/1.8/watir.rb:1728:in `initialize': > Unable > to locate a frame with name pagearea > (Watir::Exception::UnknownFrameException) > from E:/CQ_bugbase/ruby/lib/ruby/site_ruby/1.8/watir.rb:222:in > `new' > from E:/CQ_bugbase/ruby/lib/ruby/site_ruby/1.8/watir.rb:222:in > `frame' > from BugbaseCQ.rb:49:in `ReadNowOfOneTest' > from BugbaseCQ.rb:101:in `ReadNow' > from BugbaseCQ.rb:101:in `each' > from BugbaseCQ.rb:101:in `ReadNow' > from BugbaseCQ.rb:238 > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060301/576a65e2/attachment.html From zeljko.filipin at gmail.com Wed Mar 1 02:59:05 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 1 Mar 2006 08:59:05 +0100 Subject: [Wtr-general] any way to make IE.text_field.set optional? In-Reply-To: <49EE4085F2E38D47AC70EF04AA5582A7085FE4@ITOREX3.interac.local> References: <49EE4085F2E38D47AC70EF04AA5582A7085FE4@ITOREX3.interac.local> Message-ID: This will also work (if you are passing nil or false when you do notwant to set text field). Just a bit shorter. def enter_text(arg1, arg2, arg3) @ie.text_field(:name, 'field1').set(arg1) if arg1 @ie.text_field(:name, 'field2').set(arg2) if arg2 @ie.text_field(:name, 'field3').set(arg3) if arg3end From kiranb4u at yahoo.com Wed Mar 1 23:51:31 2006 From: kiranb4u at yahoo.com (Kiran Kumar..) Date: Wed, 1 Mar 2006 20:51:31 -0800 (PST) Subject: [Wtr-general] How to click a button present on the pop up window.. Message-ID: <20060302045131.27551.qmail@web33206.mail.mud.yahoo.com> Hi All, How to click a button present on the pop up window..please Can any one help me out. regards Kiran.. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From mr.muskrat at gmail.com Thu Mar 2 01:05:16 2006 From: mr.muskrat at gmail.com (Matthew Musgrove) Date: Thu, 02 Mar 2006 00:05:16 -0600 Subject: [Wtr-general] How to click a button present on the pop up window.. In-Reply-To: <20060302045131.27551.qmail@web33206.mail.mud.yahoo.com> References: <20060302045131.27551.qmail@web33206.mail.mud.yahoo.com> Message-ID: <44068B1C.7090307@gmail.com> Hi Kiran, This has been answered before so I'll just link to the one I know of. http://rubyforge.org/pipermail/wtr-general/2005-September/003573.html HTH, Matt Kiran Kumar.. wrote: >Hi All, > >How to click a button present on the pop up window..please Can any one >help me out. > >regards >Kiran.. > >__________________________________________________ >Do You Yahoo!? >Tired of spam? Yahoo! Mail has the best spam protection around >http://mail.yahoo.com >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > From angrez at gmail.com Thu Mar 2 08:07:34 2006 From: angrez at gmail.com (Angrez Singh) Date: Thu, 2 Mar 2006 18:37:34 +0530 Subject: [Wtr-general] xpath support doesn't work for me In-Reply-To: References: Message-ID: Hi Chris, require 'watir' > ie = Watir::IE.start("http://localhost/index.asp") > ie.element_by_xpath("//map[@id='top_menu_map']/area[contains(@href , ' > signup.htm')]/").click > The browser opens to the correct page but I get the following error > > web_pages>ruby trial.rb > C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1922:in `elements_by_xpath': > undefined method `elements' for nil:NilClass (NoMethodError) > from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1912:in > `element_by_xpath' > from trial.rb:5 > One thing I noticed is that when you install 'watir' using 'watir_installer.exe' located in 'installer' folder it install wrong version of 'watir.rb' file. Its installs 'Watir 1.4.1' which doesn't contain xpath support. I think you should use either 'install.rb' file for installation or copy the files manually. I tried the same code & its working on my machine. I was able click the image map. Make sure that the following things are in place: 1. You have latest version of 'watir.rb' file. 2. You have copied 'elements.rb' & 'functions.rb' to [ruby installation directory]/lib/ruby/1.8/rexml I don't think you need any thing else than this. Just let me know if problem still persists. Regards, Angrez -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060302/88cb1319/attachment.html From ChintakrindiMeghana at managementdynamics.com Thu Mar 2 13:04:03 2006 From: ChintakrindiMeghana at managementdynamics.com (Chintakrindi Meghanath ) Date: Thu, 2 Mar 2006 13:04:03 -0500 Subject: [Wtr-general] Volume Testing Message-ID: <6CF3AA425295C7479483AC0018EDF98B01DADFEC@MI8NYCMAIL03.Mi8.com> Hi We have an web application and we are planning for the volume testing.(Processing large volumes of the transactions). Can anyone give explain, how to do proceed with that type of testing using the watir. Thanks Meghanath -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060302/88dd7f0e/attachment.html From Mark_Cain at rl.gov Thu Mar 2 13:53:10 2006 From: Mark_Cain at rl.gov (Cain, Mark) Date: Thu, 2 Mar 2006 10:53:10 -0800 Subject: [Wtr-general] Older scripts running really slow... Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D591@EX5V.rl.gov> I have some Watir script I wrote about 6 months ago and needed to do some regression testing using these scripts. Well when I began running them they were really slow! Where it used to take 15 to 20 seconds to fill out the page form now is taking 3 to 4 minutes. I have recently upgraded my Watir installation will the latest from SVN and ruby with 1.8.4 Preview 3. Has anyone one else been experiencing slowness? If yes, what did you do to fix it? Thanks, ____________________ Mark L. Cain LMIT - E*STARS(r) ~ Lead Test Engineer 1981 Snyder, MSIN: G3-62, Richland, WA 99354 Mark_Cain at RL.gov 509.376.5458 "640 Kilobytes of computer memory ought to be enough for anybody." - Bill Gates, 1981 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060302/8cc214dd/attachment.html From bret at pettichord.com Thu Mar 2 15:56:52 2006 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 2 Mar 2006 14:56:52 -0600 Subject: [Wtr-general] Older scripts running really slow... In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D591@EX5V.rl.gov> References: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D591@EX5V.rl.gov> Message-ID: Could you please do an apples to apples comparison running your scripts with different versions of Watir against the same version of your application. It's possible an application change triggered the performance problem. Let us know the results. It would also be nice if you could share the Watir scripts that are slow. Bret On 3/2/06, Cain, Mark wrote: > > I have some Watir script I wrote about 6 months ago and needed to do some > regression testing using these scripts. Well when I began running them they > were really slow! Where it used to take 15 to 20 seconds to fill out the > page form now is taking 3 to 4 minutes. I have recently upgraded my Watir > installation will the latest from SVN and ruby with 1.8.4 Preview 3. Has > anyone one else been experiencing slowness? If yes, what did you do to fix > it? > > > > Thanks, > > ____________________ > *Mark L. Cain* > *LMIT - **E*****STARS*(r)* **~ **Lead Test Engineer* > *1981 Snyder, MSIN: G3-62, Richland, WA 99354** > Mark_Cain at RL.gov > 509.376.5458* > *"640 Kilobytes of computer memory ought to be enough for anybody."** - > Bill Gates, 1981 * > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060302/fafed502/attachment.html From tester.paul at gmail.com Thu Mar 2 15:59:44 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Thu, 2 Mar 2006 15:59:44 -0500 Subject: [Wtr-general] Need advice for splitting large scripts into smaller ones Message-ID: <37c405480603021259xfa04d7dy@mail.gmail.com> I have this one script that I'm working on that is just getting bigger as I go along. I would like to break out some of the smaller chunks/tests into separate script files, but I'm not sure of the logistics of this. I tried looking at the unittests but I couldn't answer my questions by looking at them. For example, my one (master) script is set up like the following: ---- #includes #global variables class TC_blahblahblah < Test::Unit::TestCase def cust_method_1 ... end def cust_method_2 ... end test_a_somename yadda yadda yadda end test_b_somename .... end ---- Now, if I break out "test_a_somename" into a separate script, what is the correct format for calling/running it from within the master script? In the new sub-script, do I have to repeat the "class TC_blahblahblah < Test::Unit::TestCase" structure, or just put the "test_a_somename" structure? Do I have to re-include all the require/include lines that were in the master script? (I don't think I should, but I'm not sure.) If I have methods that are defined in the master script, will they be properly called from one of the sub-scripts, or do I have to put them in the sub-scripts too? (I expect it to work if they're only defined in the master script.) Please forgive these basic questions. I searched the message archives but I couldn't find anything helpful other than "you should break up large scripts into smaller ones when they get too long (like ~ 1000 lines)". And I haven't had any success scanning the other Ruby/Watir documentation to give me practical advice on how to do this either. Paul. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060302/25152147/attachment.html From Mark_Cain at rl.gov Thu Mar 2 16:16:33 2006 From: Mark_Cain at rl.gov (Cain, Mark) Date: Thu, 2 Mar 2006 13:16:33 -0800 Subject: [Wtr-general] Older scripts running really slow... Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D595@EX5V.rl.gov> With Watir 1.4.1 (just downloaded and reinstalled) it took: Finished in 31.797 seconds. With Watir from current SVN (did a checkout on the http://svn.openqa.org/svn/watir/trunk/watir) Finished in 179.047 seconds. This is the part that ran: =============================================================== # feature tests for javascript PopUps # revision: $Revision: 1.11 $ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'c:\watir\unittests\setup' require 'watir\dialog' class TC_PER < Test::Unit::TestCase include Watir def gotoPopUpPage() $ie.goto("http://apwtst200.rl.gov/rapidweb/chg/per/per/main.cfm") $ie.set_fast_speed() end #def startClicker( button , waitTime = 3) # w = WinClicker.new # longName = $ie.dir.gsub("/" , "\\" ) # shortName = w.getShortFileName(longName) # c = "start rubyw #{shortName }\\watir\\clickJSDialog.rb #{button } #{ waitTime} " # puts "Starting #{c}" # w.winsystem(c) # w=nil #end def test0_originator $d = Time.now.strftime("%m/%d/%Y") gotoPopUpPage() $ie.text_field(:name, "d_date").set("#{ $d }") $ie.text_field(:name, "d_time").set("1111") $ie.selectBox( :name, "progproj").select(/Other/) $ie.selectBox( :name, "locationID").select(/AW Farm/) $ie.selectBox( :name, "ProblemDiscoveredID").select(/EH\-22/) $ie.text_field( :name, "probdescript").set("Probelm Description Test") $ie.selectBox( :name, "sinID").select(/Cooling Water/) $ie.text_field( :name, "ein").set("eid-001") $ie.checkBox( :name, "reqnsatcheck").set $ie.text_field( :name, "reqnsat").set("Req Not Satisfied") $ie.checkBox( :name, "sourcedoccheck").set $ie.text_field( :name, "SourceDocument").set("Source Doc") $ie.text_field( :name, "actionplan").set("This is a test of the Action Plan text area.") $ie.text_field( :name, "RecommendedCorrectiveActions").set("This is a test of Recommended Actions Taken text area.") $ie.radio( :name, "feedback", 1).set $ie.radio( :name, "feedbacktype", 'other').set $ie.text_field( :name, "feedbackother").set("Feedback Other") #startClicker("OK" , 3) $ie.button("Submit").click_no_wait dialog.button('OK').click $ie.link(:text, /PER-2006-/i).click assert($ie.text_field(:name, "d_date").verify_contains("#{$d}")) assert($ie.text_field(:name, "d_time").verify_contains("11:11")) assert_arrayEquals( ["Other" ] , $ie.select_list(:name, "progproj").getSelectedItems) assert_arrayEquals( ["AW Farm" ] , $ie.select_list(:name, "locationID").getSelectedItems) assert_arrayEquals( ["EH-22" ] , $ie.select_list(:name, "ProblemDiscoveredID").getSelectedItems) assert($ie.text_field(:name, "probdescript").verify_contains("Probelm Description Test")) assert_arrayEquals( ["Cooling Water" ] , $ie.select_list(:name, "sinID").getSelectedItems) assert($ie.text_field(:name, "ein").verify_contains("eid-001")) assert($ie.checkbox(:name, "reqnsatcheck").isSet?) assert($ie.text_field(:name, "reqnsat").verify_contains("Req Not Satisfied")) assert($ie.checkbox(:name, "sourcedoccheck").isSet?) assert($ie.text_field(:name, "SourceDocument").verify_contains("Source Doc")) assert($ie.text_field(:name, "actionplan").verify_contains("This is a test of the Action Plan text area.")) assert($ie.text_field(:name, "RecommendedCorrectiveActions").verify_contains("This is a test of Recommended Actions Taken text area.")) assert($ie.radio(:name, "feedback").isSet?) assert($ie.radio(:name, "feedbacktype", 'other').isSet?) assert($ie.text_field(:name, "feedbackother").verify_contains("Feedback Other")) end end --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Thursday, March 02, 2006 12:57 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Older scripts running really slow... Could you please do an apples to apples comparison running your scripts with different versions of Watir against the same version of your application. It's possible an application change triggered the performance problem. Let us know the results. It would also be nice if you could share the Watir scripts that are slow. Bret On 3/2/06, Cain, Mark < Mark_Cain at rl.gov > wrote: I have some Watir script I wrote about 6 months ago and needed to do some regression testing using these scripts. Well when I began running them they were really slow! Where it used to take 15 to 20 seconds to fill out the page form now is taking 3 to 4 minutes. I have recently upgraded my Watir installation will the latest from SVN and ruby with 1.8.4 Preview 3. Has anyone one else been experiencing slowness? If yes, what did you do to fix it? Thanks, ____________________ Mark L. Cain LMIT - E *STARS (r) ~ Lead Test Engineer 1981 Snyder, MSIN: G3-62, Richland, WA 99354 Mark_Cain at RL.gov 509.376.5458 "640 Kilobytes of computer memory ought to be enough for anybody." - Bill Gates, 1981 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060302/ea9b5f0b/attachment.html From christopher_brown at engin.com.au Thu Mar 2 16:10:26 2006 From: christopher_brown at engin.com.au (Brown, Christopher) Date: Fri, 3 Mar 2006 08:10:26 +1100 Subject: [Wtr-general] xpath support doesn't work for me Message-ID: Hi Angrez, Using firefox, I've gone to the URL below http://rubyforge.org/cgi-bin/viewcvs.cgi/*checkout*/watir/watir/rexml/elemen t.rb?root=wtr &rev=1.1 then selected Save Page As ... then browsed to C:\ruby\lib\ruby\1.8\rexml I got prompted to confirm I want to over-write; I selected Yes I did the same for functions.rb. For watir.rb I saved to C:\ruby\lib\ruby\site_ruby\1.8 (I've also tried C:\ruby\lib\ruby\1.8 just in case I got the wrong location). When I ran my test script I still got c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1922:in `elements_by_xpath': undefined method `elements' for nil:NilClass (NoMethodError) from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1912:in `element_by_xpath' from G:/workspace/web_pages/trial.rb:3 With nothing to lose, I've tried running install.rb. Here's the output C:\Temp\watir>install.rb C:\Temp\watir\watir.gif Going to install to C:\watir\ with startMenu=1 and desktop=1 Copying Files watir.rb -> c:\ruby\lib\ruby\site_ruby\1.8/watir.rb cp -r watir c:\ruby\lib\ruby\site_ruby\1.8 cp -r examples C:\watir\ cp -r unitTests C:\watir\ cp -r doc C:\watir\ cp -r rdoc C:\watir\ Rdoc not installed Creating start menu shortcuts Creating desktop shortcuts Installation Completed The revision of watir.rb is 1.282 I still get the same error message when I run my test script. What version of Ruby are you running? Regards Chris -----Original Message----- From: Angrez Singh [mailto:angrez at gmail.com] Sent: Friday, March 03, 2006 12:08 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] xpath support doesn't work for me Hi Chris, require 'watir' ie = Watir::IE.start(" http://localhost/index.asp ") ie.element_by_xpath("//map[@id='top_menu_map']/area[contains(@href , 'signup.htm')]/").click The browser opens to the correct page but I get the following error web_pages>ruby trial.rb C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1922:in `elements_by_xpath': undefined method `elements' for nil:NilClass (NoMethodError) from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1912:in `element_by_xpath' from trial.rb:5 One thing I noticed is that when you install 'watir' using 'watir_installer.exe' located in 'installer' folder it install wrong version of 'watir.rb' file. Its installs 'Watir 1.4.1' which doesn't contain xpath support. I think you should use either 'install.rb' file for installation or copy the files manually. I tried the same code & its working on my machine. I was able click the image map. Make sure that the following things are in place: 1. You have latest version of 'watir.rb' file. 2. You have copied 'elements.rb' & 'functions.rb' to [ruby installation directory]/lib/ruby/1.8/rexml I don't think you need any thing else than this. Just let me know if problem still persists. Regards, Angrez -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060303/abb497ce/attachment.html From mb at michaelbolton.net Thu Mar 2 16:45:16 2006 From: mb at michaelbolton.net (Michael Bolton) Date: Thu, 2 Mar 2006 16:45:16 -0500 Subject: [Wtr-general] Older scripts running really slow... In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D595@EX5V.rl.gov> Message-ID: <006e01c63e42$97dfad60$6901a8c0@Koko> Obvious possibilities are - response time on the Web pages - typing speed in the forms Are your pages visible? Do they look slower? When they're loading? When they're typing? If you've got one test that takes half a minute and another that takes three minutes (which you do), the places where slowdowns are happening are plausibly visible to the human eye. Apropos of not very much, but you noticed that "Problem" is spelled "Probelm" below, right? ---Michael B. _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: March 2, 2006 4:17 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Older scripts running really slow... With Watir 1.4.1 (just downloaded and reinstalled) it took: Finished in 31.797 seconds. With Watir from current SVN (did a checkout on the http://svn.openqa.org/svn/watir/trunk/watir) Finished in 179.047 seconds. This is the part that ran: =============================================================== # feature tests for javascript PopUps # revision: $Revision: 1.11 $ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'c:\watir\unittests\setup' require 'watir\dialog' class TC_PER < Test::Unit::TestCase include Watir def gotoPopUpPage() $ie.goto("http://apwtst200.rl.gov/rapidweb/chg/per/per/main.cfm") $ie.set_fast_speed() end #def startClicker( button , waitTime = 3) # w = WinClicker.new # longName = $ie.dir.gsub("/" , "\\" ) # shortName = w.getShortFileName(longName) # c = "start rubyw #{shortName }\\watir\\clickJSDialog.rb #{button } #{ waitTime} " # puts "Starting #{c}" # w.winsystem(c) # w=nil #end def test0_originator $d = Time.now.strftime("%m/%d/%Y") gotoPopUpPage() $ie.text_field(:name, "d_date").set("#{ $d }") $ie.text_field(:name, "d_time").set("1111") $ie.selectBox( :name, "progproj").select(/Other/) $ie.selectBox( :name, "locationID").select(/AW Farm/) $ie.selectBox( :name, "ProblemDiscoveredID").select(/EH\-22/) $ie.text_field( :name, "probdescript").set("Probelm Description Test") $ie.selectBox( :name, "sinID").select(/Cooling Water/) $ie.text_field( :name, "ein").set("eid-001") $ie.checkBox( :name, "reqnsatcheck").set $ie.text_field( :name, "reqnsat").set("Req Not Satisfied") $ie.checkBox( :name, "sourcedoccheck").set $ie.text_field( :name, "SourceDocument").set("Source Doc") $ie.text_field( :name, "actionplan").set("This is a test of the Action Plan text area.") $ie.text_field( :name, "RecommendedCorrectiveActions").set("This is a test of Recommended Actions Taken text area.") $ie.radio( :name, "feedback", 1).set $ie.radio( :name, "feedbacktype", 'other').set $ie.text_field( :name, "feedbackother").set("Feedback Other") #startClicker("OK" , 3) $ie.button("Submit").click_no_wait dialog.button('OK').click $ie.link(:text, /PER-2006-/i).click assert($ie.text_field(:name, "d_date").verify_contains("#{$d}")) assert($ie.text_field(:name, "d_time").verify_contains("11:11")) assert_arrayEquals( ["Other" ] , $ie.select_list(:name, "progproj").getSelectedItems) assert_arrayEquals( ["AW Farm" ] , $ie.select_list(:name, "locationID").getSelectedItems) assert_arrayEquals( ["EH-22" ] , $ie.select_list(:name, "ProblemDiscoveredID").getSelectedItems) assert($ie.text_field(:name, "probdescript").verify_contains("Probelm Description Test")) assert_arrayEquals( ["Cooling Water" ] , $ie.select_list(:name, "sinID").getSelectedItems) assert($ie.text_field(:name, "ein").verify_contains("eid-001")) assert($ie.checkbox(:name, "reqnsatcheck").isSet?) assert($ie.text_field(:name, "reqnsat").verify_contains("Req Not Satisfied")) assert($ie.checkbox(:name, "sourcedoccheck").isSet?) assert($ie.text_field(:name, "SourceDocument").verify_contains("Source Doc")) assert($ie.text_field(:name, "actionplan").verify_contains("This is a test of the Action Plan text area.")) assert($ie.text_field(:name, "RecommendedCorrectiveActions").verify_contains("This is a test of Recommended Actions Taken text area.")) assert($ie.radio(:name, "feedback").isSet?) assert($ie.radio(:name, "feedbacktype", 'other').isSet?) assert($ie.text_field(:name, "feedbackother").verify_contains("Feedback Other")) end end --Mark _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Thursday, March 02, 2006 12:57 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Older scripts running really slow... Could you please do an apples to apples comparison running your scripts with different versions of Watir against the same version of your application. It's possible an application change triggered the performance problem. Let us know the results. It would also be nice if you could share the Watir scripts that are slow. Bret On 3/2/06, Cain, Mark < Mark_Cain at rl.gov > wrote: I have some Watir script I wrote about 6 months ago and needed to do some regression testing using these scripts. Well when I began running them they were really slow! Where it used to take 15 to 20 seconds to fill out the page form now is taking 3 to 4 minutes. I have recently upgraded my Watir installation will the latest from SVN and ruby with 1.8.4 Preview 3. Has anyone one else been experiencing slowness? If yes, what did you do to fix it? Thanks, ____________________ Mark L. Cain LMIT - E *STARS R ~ Lead Test Engineer 1981 Snyder, MSIN: G3-62, Richland, WA 99354 Mark_Cain at RL.gov 509.376.5458 "640 Kilobytes of computer memory ought to be enough for anybody." - Bill Gates, 1981 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060302/c79a3325/attachment.html From Sean.Gallagher at ticketmaster.com Thu Mar 2 18:09:03 2006 From: Sean.Gallagher at ticketmaster.com (Sean Gallagher) Date: Thu, 2 Mar 2006 15:09:03 -0800 Subject: [Wtr-general] Need advice for splitting large scripts into sm aller ones Message-ID: <71D28C8451BFD5119B2B00508BE26E640C64900B@pasmail3.office.tmcs> Paul, Here is how I am doing it. I run my tests using test::unit, the same as you. I have organized my tests into logical groups of test methods, each contained in its own test file. The framework is flexible and supports running tests as 1) a single test method, 2) a test file (all test methods in a single file), or 3) a test suite (set of files). I try to keep my test framework as simple as possible. I find that xUnit assertions combined with some simple log output is sufficient for my needs right now. This approach is quite flexible. I can easily switch between test environments, users and test sites. Each test is discrete and does not depend on any other test. All test files are in a single directory by project (again, to keep it simple). I have the following "core" files: common.rb constants.rb testrunner.rb plus many test files. Here is how they work: 1) common.rb This is a module file and includes setup and teardown methods (called by every test method from all test files; read up on test::unit for details), as well as methods to start IE, clear cache files, log test execution, login to AUT, etc. Common stuff. common.rb is where I reference required libs. The file starts like so: require 'watir' require 'test/unit' require 'test/unit/ui/console/testrunner' require 'watir/testUnitAddons' require 'yaml' require 'constants' # My constants file module Common def setup ... end def teardown ... end ...etc. Check out "Programming Ruby: The Pragmatic Programmer's Guide" for more info on modules. 2) constants.rb As the name implies, just constants. ;-) The file is nothing more than a list of constants used by my tests, such as paths and some test data that rarely changes (and does not change during testing). 3) testrunner.rb My test suite file, modeled after after C:\watir_bonus\unitTests\core_tests.rb (see Watir unit tests) As for the test files, each file starts like so: require 'common' class TC_Example01 < Test::Unit::TestCase include Common def set_test_defaults ... end def test_001 ... end I use a template with the above code for starting new test files. Some notes- As the test methods are logically grouped within a file, I made the decision to put test data in my test files. I tried different ways, but ultimately found this easiest when developing new tests. The method "set_test_defaults" is called from each test method that needs access to the data. As well, each test method calls a "log_test" method (in common.rb) to spit out some useful information as the tests execute. Answers to your questions are inline, below. Hope this helps! Sean -- Sean Gallagher CRM Quality Assurance, Ticketmaster sean.gallagher at ticketmaster.com > Now, if I break out "test_a_somename" into a separate script, > what is the correct format for calling/running it from within > the master script? Use require > > In the new sub-script, do I have to repeat the "class > TC_blahblahblah < Test::Unit::TestCase" structure, or just > put the "test_a_somename" structure? Yes, you must extend Test::Unit::TestCase Do I have to re-include > all the require/include lines that were in the master script? > (I don't think I should, but I'm not sure.) For the approach that I use, yes. > > If I have methods that are defined in the master script, will > they be properly called from one of the sub-scripts, or do I > have to put them in the sub-scripts too? (I expect it to work > if they're only defined in the master script.) No, best to put common methods in a module. > > Please forgive these basic questions. I searched the message > archives but I couldn't find anything helpful other than "you > should break up large scripts into smaller ones when they get > too long (like ~ 1000 lines)". And I haven't had any success > scanning the other Ruby/Watir documentation to give me > practical advice on how to do this either. No problem. Happy to help. > > Paul. > > > From tester.paul at gmail.com Thu Mar 2 19:08:22 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Thu, 2 Mar 2006 19:08:22 -0500 Subject: [Wtr-general] Need advice for splitting large scripts into sm aller ones In-Reply-To: <71D28C8451BFD5119B2B00508BE26E640C64900B@pasmail3.office.tmcs> References: <71D28C8451BFD5119B2B00508BE26E640C64900B@pasmail3.office.tmcs> Message-ID: <37c405480603021608g2abab3b4v@mail.gmail.com> Wow. Thanks very much for the detailed reply. You've given me a lot to work with. When I'm finished writing the scripts I'll try breaking them up in a way similar to how you've described it. Cheers! Paul. On 02/03/06, Sean Gallagher wrote: > > Paul, > Here is how I am doing it. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060302/362de65e/attachment.html From BPaatsch at activevoice.com Thu Mar 2 19:39:32 2006 From: BPaatsch at activevoice.com (Paatsch, Bernd) Date: Thu, 2 Mar 2006 18:39:32 -0600 Subject: [Wtr-general] Unknown OLE server: `AutoItX3.Control' (WI2OLERuntimeError)! Why? Message-ID: Hello, Strange how Murphy's law always catches you by surprise during demonstrations. My code worked just fine on my machine. However creates an error message when I try to run it on my managers machine with following error message: :/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1311:in `initialize': Unknown OLE server: `AutoItX3.Control' (WI2OLERuntimeError) HRESULT error code:0x800401f3 Invalid class string from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1311:in `new' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1311:in `set_window_state' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1291:in `maximize' Does anybody know why? Thanks, Bernd -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060302/175456a0/attachment.html From billagee at gmail.com Thu Mar 2 21:36:25 2006 From: billagee at gmail.com (Bill Agee) Date: Thu, 2 Mar 2006 18:36:25 -0800 Subject: [Wtr-general] Unknown OLE server: `AutoItX3.Control' (WI2OLERuntimeError)! Why? In-Reply-To: References: Message-ID: <73e7817e0603021836q7034ada8od014e43573e5992f@mail.gmail.com> On 3/2/06, Paatsch, Bernd wrote: > > :/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1311:in > `initialize': Unknown OLE server: `AutoItX3.Control' (WI2OLERuntimeError) Maybe AutoItX.dll didn't get registered on his machine during the Watir install? I've never had to register it manually with the most recent Watir version, but I guess it's worth a try. You can try manually registering the dll on that machine, using the path to the file, like so: regsvr32 "C:\ruby\lib\ruby\site_ruby\1.8\watir\AutoItX3.dll" From Mark_Cain at rl.gov Thu Mar 2 17:32:47 2006 From: Mark_Cain at rl.gov (Cain, Mark) Date: Thu, 2 Mar 2006 14:32:47 -0800 Subject: [Wtr-general] Older scripts running really slow... Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D597@EX5V.rl.gov> I ran the same test on the same web form using two different versions of Watir. The results are listed below. The web pages load as fast as they did before the problem is when the script inputs the data. In 1.4.1 the data is typed and the navigation between input fields is very quickly, but in the current version 1.5.X the data is typed in noticeably slower and navigation between input fields is monumentally slower! My purpose for upgrading was to take advantage of the new popup and modal windows code as well as xpath and other stuff-xpath didn't work at all for me either. As a side not, here are a couple of humorous quotes about spelling: ;-P "It's a damn poor mind that can only think of one way to spell a word." -- Andrew Jackson "I don't give a damn for a man that can only spell a word one way." -- Mark Twain --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Michael Bolton Sent: Thursday, March 02, 2006 1:45 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Older scripts running really slow... Obvious possibilities are - response time on the Web pages - typing speed in the forms Are your pages visible? Do they look slower? When they're loading? When they're typing? If you've got one test that takes half a minute and another that takes three minutes (which you do), the places where slowdowns are happening are plausibly visible to the human eye. Apropos of not very much, but you noticed that "Problem" is spelled "Probelm" below, right? ---Michael B. ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: March 2, 2006 4:17 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Older scripts running really slow... With Watir 1.4.1 (just downloaded and reinstalled) it took: Finished in 31.797 seconds. With Watir from current SVN (did a checkout on the http://svn.openqa.org/svn/watir/trunk/watir) Finished in 179.047 seconds. This is the part that ran: =============================================================== # feature tests for javascript PopUps # revision: $Revision: 1.11 $ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'c:\watir\unittests\setup' require 'watir\dialog' class TC_PER < Test::Unit::TestCase include Watir def gotoPopUpPage() $ie.goto("http://apwtst200.rl.gov/rapidweb/chg/per/per/main.cfm") $ie.set_fast_speed() end #def startClicker( button , waitTime = 3) # w = WinClicker.new # longName = $ie.dir.gsub("/" , "\\" ) # shortName = w.getShortFileName(longName) # c = "start rubyw #{shortName }\\watir\\clickJSDialog.rb #{button } #{ waitTime} " # puts "Starting #{c}" # w.winsystem(c) # w=nil #end def test0_originator $d = Time.now.strftime("%m/%d/%Y") gotoPopUpPage() $ie.text_field(:name, "d_date").set("#{ $d }") $ie.text_field(:name, "d_time").set("1111") $ie.selectBox( :name, "progproj").select(/Other/) $ie.selectBox( :name, "locationID").select(/AW Farm/) $ie.selectBox( :name, "ProblemDiscoveredID").select(/EH\-22/) $ie.text_field( :name, "probdescript").set("Probelm Description Test") $ie.selectBox( :name, "sinID").select(/Cooling Water/) $ie.text_field( :name, "ein").set("eid-001") $ie.checkBox( :name, "reqnsatcheck").set $ie.text_field( :name, "reqnsat").set("Req Not Satisfied") $ie.checkBox( :name, "sourcedoccheck").set $ie.text_field( :name, "SourceDocument").set("Source Doc") $ie.text_field( :name, "actionplan").set("This is a test of the Action Plan text area.") $ie.text_field( :name, "RecommendedCorrectiveActions").set("This is a test of Recommended Actions Taken text area.") $ie.radio( :name, "feedback", 1).set $ie.radio( :name, "feedbacktype", 'other').set $ie.text_field( :name, "feedbackother").set("Feedback Other") #startClicker("OK" , 3) $ie.button("Submit").click_no_wait dialog.button('OK').click $ie.link(:text, /PER-2006-/i).click assert($ie.text_field(:name, "d_date").verify_contains("#{$d}")) assert($ie.text_field(:name, "d_time").verify_contains("11:11")) assert_arrayEquals( ["Other" ] , $ie.select_list(:name, "progproj").getSelectedItems) assert_arrayEquals( ["AW Farm" ] , $ie.select_list(:name, "locationID").getSelectedItems) assert_arrayEquals( ["EH-22" ] , $ie.select_list(:name, "ProblemDiscoveredID").getSelectedItems) assert($ie.text_field(:name, "probdescript").verify_contains("Probelm Description Test")) assert_arrayEquals( ["Cooling Water" ] , $ie.select_list(:name, "sinID").getSelectedItems) assert($ie.text_field(:name, "ein").verify_contains("eid-001")) assert($ie.checkbox(:name, "reqnsatcheck").isSet?) assert($ie.text_field(:name, "reqnsat").verify_contains("Req Not Satisfied")) assert($ie.checkbox(:name, "sourcedoccheck").isSet?) assert($ie.text_field(:name, "SourceDocument").verify_contains("Source Doc")) assert($ie.text_field(:name, "actionplan").verify_contains("This is a test of the Action Plan text area.")) assert($ie.text_field(:name, "RecommendedCorrectiveActions").verify_contains("This is a test of Recommended Actions Taken text area.")) assert($ie.radio(:name, "feedback").isSet?) assert($ie.radio(:name, "feedbacktype", 'other').isSet?) assert($ie.text_field(:name, "feedbackother").verify_contains("Feedback Other")) end end --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Thursday, March 02, 2006 12:57 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Older scripts running really slow... Could you please do an apples to apples comparison running your scripts with different versions of Watir against the same version of your application. It's possible an application change triggered the performance problem. Let us know the results. It would also be nice if you could share the Watir scripts that are slow. Bret On 3/2/06, Cain, Mark < Mark_Cain at rl.gov > wrote: I have some Watir script I wrote about 6 months ago and needed to do some regression testing using these scripts. Well when I began running them they were really slow! Where it used to take 15 to 20 seconds to fill out the page form now is taking 3 to 4 minutes. I have recently upgraded my Watir installation will the latest from SVN and ruby with 1.8.4 Preview 3. Has anyone one else been experiencing slowness? If yes, what did you do to fix it? Thanks, ____________________ Mark L. Cain LMIT - E *STARS (r) ~ Lead Test Engineer 1981 Snyder, MSIN: G3-62, Richland, WA 99354 Mark_Cain at RL.gov 509.376.5458 "640 Kilobytes of computer memory ought to be enough for anybody." - Bill Gates, 1981 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060302/29f4d68b/attachment.html From bret at pettichord.com Thu Mar 2 22:04:37 2006 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 2 Mar 2006 21:04:37 -0600 Subject: [Wtr-general] Older scripts running really slow... In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D597@EX5V.rl.gov> References: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D597@EX5V.rl.gov> Message-ID: Thanks for the detailed report. The watir code has several delay settings that apply separately between keys on text_field.set and between separate calls. These settings are tweaked by the fast_mode switches as well as other settings. You can probably tweak these settings yourself and get better performance, but it seems like their default settings have somehow changed between 1.4and 1.5. I will look into this further. Bret On 3/2/06, Cain, Mark wrote: > > I ran the same test on the same web form using two different versions of > Watir. The results are listed below. The web pages load as fast as they > did before the problem is when the script inputs the data. In 1.4.1 the > data is typed and the navigation between input fields is very quickly, but > in the current version 1.5.X the data is typed in noticeably slower and > navigation between input fields is monumentally slower! > > > > My purpose for upgrading was to take advantage of the new popup and modal > windows code as well as xpath and other stuff?xpath didn't work at all for > me either. > > > > As a side not, here are a couple of humorous quotes about spelling: ;-P > > "It's a damn poor mind that can only think of one way to spell a word." -- > Andrew Jackson > > "I don't give a damn for a man that can only spell a word one way." -- > Mark Twain > > > > *--Mark* > > > ------------------------------ > > *From:* wtr-general-bounces at rubyforge.org [mailto: > wtr-general-bounces at rubyforge.org] *On Behalf Of *Michael Bolton > *Sent:* Thursday, March 02, 2006 1:45 PM > > *To:* wtr-general at rubyforge.org > *Subject:* Re: [Wtr-general] Older scripts running really slow... > > > > Obvious possibilities are > > > > - response time on the Web pages > > - typing speed in the forms > > > > Are your pages visible? Do they look slower? When they're loading? When > they're typing? If you've got one test that takes half a minute and another > that takes three minutes (which you do), the places where slowdowns are > happening are plausibly visible to the human eye. > > > > Apropos of not very much, but you noticed that "Problem" is spelled > "Probelm" below, right? > > > > ---Michael B. > > > ------------------------------ > > *From:* wtr-general-bounces at rubyforge.org [mailto: > wtr-general-bounces at rubyforge.org] *On Behalf Of *Cain, Mark > *Sent:* March 2, 2006 4:17 PM > *To:* wtr-general at rubyforge.org > *Subject:* Re: [Wtr-general] Older scripts running really slow... > > With Watir 1.4.1 (just downloaded and reinstalled) it took: > > Finished in 31.797 seconds. > > > > With Watir from current SVN (did a checkout on the > http://svn.openqa.org/svn/watir/trunk/watir) > > Finished in 179.047 seconds. > > > > This is the part that ran: > > =============================================================== > > # feature tests for javascript PopUps > > # revision: $Revision: 1.11 $ > > > > $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == > __FILE__ > > require 'c:\watir\unittests\setup' > > require 'watir\dialog' > > > > class TC_PER < Test::Unit::TestCase > > include Watir > > > > def gotoPopUpPage() > > $ie.goto("http://apwtst200.rl.gov/rapidweb/chg/per/per/main.cfm") > > $ie.set_fast_speed() > > end > > > > #def startClicker( button , waitTime = 3) > > # w = WinClicker.new > > # longName = $ie.dir.gsub("/" , "\\" ) > > # shortName = w.getShortFileName(longName) > > # c = "start rubyw #{shortName }\\watir\\clickJSDialog.rb #{button } > #{ waitTime} " > > # puts "Starting #{c}" > > # w.winsystem(c) > > # w=nil > > #end > > > > def test0_originator > > $d = Time.now.strftime("%m/%d/%Y") > > gotoPopUpPage() > > > > $ie.text_field(:name, "d_date").set("#{ $d }") > > $ie.text_field(:name, "d_time").set("1111") > > > > $ie.selectBox( :name, "progproj").select(/Other/) > > $ie.selectBox( :name, "locationID").select(/AW Farm/) > > $ie.selectBox( :name, "ProblemDiscoveredID").select(/EH\-22/) > > $ie.text_field( :name, "probdescript").set("Probelm Description > Test") > > $ie.selectBox( :name, "sinID").select(/Cooling Water/) > > $ie.text_field( :name, "ein").set("eid-001") > > $ie.checkBox( :name, "reqnsatcheck").set > > $ie.text_field( :name, "reqnsat").set("Req Not Satisfied") > > $ie.checkBox( :name, "sourcedoccheck").set > > $ie.text_field( :name, "SourceDocument").set("Source Doc") > > > > $ie.text_field( :name, "actionplan").set("This is a test of the > Action Plan text area.") > > $ie.text_field( :name, "RecommendedCorrectiveActions").set("This is > a test of Recommended Actions Taken text area.") > > > > $ie.radio( :name, "feedback", 1).set > > $ie.radio( :name, "feedbacktype", 'other').set > > $ie.text_field( :name, "feedbackother").set("Feedback Other") > > > > #startClicker("OK" , 3) > > $ie.button("Submit").click_no_wait > > dialog.button('OK').click > > > > $ie.link(:text, /PER-2006-/i).click > > > > assert($ie.text_field(:name, "d_date").verify_contains("#{$d}")) > > assert($ie.text_field(:name, "d_time").verify_contains("11:11")) > > assert_arrayEquals( ["Other" ] , $ie.select_list(:name, > "progproj").getSelectedItems) > > assert_arrayEquals( ["AW Farm" ] , $ie.select_list(:name, > "locationID").getSelectedItems) > > assert_arrayEquals( ["EH-22" ] , $ie.select_list(:name, > "ProblemDiscoveredID").getSelectedItems) > > assert($ie.text_field(:name, > "probdescript").verify_contains("Probelm Description Test")) > > assert_arrayEquals( ["Cooling Water" ] , $ie.select_list(:name, > "sinID").getSelectedItems) > > assert($ie.text_field(:name, "ein").verify_contains("eid-001")) > > assert($ie.checkbox(:name, "reqnsatcheck").isSet?) > > assert($ie.text_field(:name, "reqnsat").verify_contains("Req Not > Satisfied")) > > assert($ie.checkbox(:name, "sourcedoccheck").isSet?) > > assert($ie.text_field(:name, > "SourceDocument").verify_contains("Source Doc")) > > > > assert($ie.text_field(:name, "actionplan").verify_contains("This > is a test of the Action Plan text area.")) > > assert($ie.text_field(:name, > "RecommendedCorrectiveActions").verify_contains("This is a test of > Recommended Actions Taken text area.")) > > > > assert($ie.radio(:name, "feedback").isSet?) > > assert($ie.radio(:name, "feedbacktype", 'other').isSet?) > > assert($ie.text_field(:name, > "feedbackother").verify_contains("Feedback Other")) > > end > > end > > > > *--Mark* > > > ------------------------------ > > *From:* wtr-general-bounces at rubyforge.org [mailto: > wtr-general-bounces at rubyforge.org] *On Behalf Of *Bret Pettichord > *Sent:* Thursday, March 02, 2006 12:57 PM > *To:* wtr-general at rubyforge.org > *Subject:* Re: [Wtr-general] Older scripts running really slow... > > > > Could you please do an apples to apples comparison running your scripts > with different versions of Watir against the same version of your > application. It's possible an application change triggered the performance > problem. Let us know the results. > > It would also be nice if you could share the Watir scripts that are slow. > > Bret > > On 3/2/06, *Cain, Mark* < Mark_Cain at rl.gov> wrote: > > I have some Watir script I wrote about 6 months ago and needed to do some > regression testing using these scripts. Well when I began running them they > were really slow! Where it used to take 15 to 20 seconds to fill out the > page form now is taking 3 to 4 minutes. I have recently upgraded my Watir > installation will the latest from SVN and ruby with 1.8.4 Preview 3. Has > anyone one else been experiencing slowness? If yes, what did you do to fix > it? > > > > Thanks, > > ____________________ > *Mark L. Cain* > *LMIT - **E** ***STARS* (r)* **~ **Lead Test Engineer* > *1981 Snyder, MSIN: G3-62, Richland, WA 99354** > Mark_Cain at RL.gov > 509.376.5458* > *"640 Kilobytes of computer memory ought to be enough for anybody."** - > Bill Gates, 1981 * > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060302/aef2e832/attachment.html From bret at pettichord.com Thu Mar 2 23:39:46 2006 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 2 Mar 2006 22:39:46 -0600 Subject: [Wtr-general] Need advice for splitting large scripts into smaller ones In-Reply-To: <37c405480603021259xfa04d7dy@mail.gmail.com> References: <37c405480603021259xfa04d7dy@mail.gmail.com> Message-ID: Very briefly, there are two things you can do to split your code into separate files. 1. Put your test methods in separate files. 2. Put your custom methods in separate files. And then after doing this, you have to be able to put it all together again. You can put test methods in different classes defined in different files. It is best if you put them in classes with different names (but they should all be subclasses of Test::Unit::TestCase). To stitch them back together again, all you have to do is create a master script that require's each of the test scripts. You can put your custom methods in a module that is defined in a separate file. module TestsApplicationFoo def custom_method_1 ... end end Then you can use the methods thus: require 'tests_application_foo' # name of the file with TestApplicationFoo module class MyTests < Test::Unit::TestCase include TestsApplicationFoo def test_1 ... custom_method_1 end end This is brief, but should set you in the right direction as you read the various Ruby references. Bret On 3/2/06, Paul Carvalho wrote: > > I have this one script that I'm working on that is just getting bigger as > I go along. I would like to break out some of the smaller chunks/tests into > separate script files, but I'm not sure of the logistics of this. I tried > looking at the unittests but I couldn't answer my questions by looking at > them. > > For example, my one (master) script is set up like the following: > ---- > #includes > #global variables > > class TC_blahblahblah < Test::Unit::TestCase > def cust_method_1 > ... > end > > def cust_method_2 > ... > end > > test_a_somename > yadda yadda yadda > end > > test_b_somename > .... > end > ---- > > Now, if I break out "test_a_somename" into a separate script, what is the > correct format for calling/running it from within the master script? > > In the new sub-script, do I have to repeat the "class TC_blahblahblah < > Test::Unit::TestCase" structure, or just put the "test_a_somename" > structure? Do I have to re-include all the require/include lines that were > in the master script? (I don't think I should, but I'm not sure.) > > If I have methods that are defined in the master script, will they be > properly called from one of the sub-scripts, or do I have to put them in the > sub-scripts too? (I expect it to work if they're only defined in the master > script.) > > Please forgive these basic questions. I searched the message archives but > I couldn't find anything helpful other than "you should break up large > scripts into smaller ones when they get too long (like ~ 1000 lines)". And > I haven't had any success scanning the other Ruby/Watir documentation to > give me practical advice on how to do this either. > > Paul. > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060302/a21ecd31/attachment.html From angrez at gmail.com Fri Mar 3 00:30:07 2006 From: angrez at gmail.com (Angrez Singh) Date: Fri, 3 Mar 2006 11:00:07 +0530 Subject: [Wtr-general] xpath support doesn't work for me In-Reply-To: References: Message-ID: Hi Chris, What version of Ruby are you running? > I am using Ruby 1.8.2 and latest watir tar ball. Also REXML version is " 3.1.2.1". You can check this by using following command: ruby -vrrexml/rexml -e 'p REXML::Version, PLATFORM' But still I have no clue of what is going wrong? Regards, Angrez -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060303/cfe8bd7b/attachment.html From bret at pettichord.com Fri Mar 3 01:09:58 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 3 Mar 2006 00:09:58 -0600 Subject: [Wtr-general] xpath support doesn't work for me In-Reply-To: References: Message-ID: On 3/2/06, Angrez Singh wrote: > > One thing I noticed is that when you install 'watir' using > 'watir_installer.exe' located in 'installer' folder it install wrong version > of 'watir.rb' file. Its installs 'Watir 1.4.1' which doesn't contain xpath > support. I think you should use either 'install.rb' file for installation > or copy the files manually. > Ouch! We should delete that from trunk. (I'm not on the machine with SVN configuration right now, or else i'd do right now.) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060303/c996dd3f/attachment.html From benjamin.hemken at hmmh.de Fri Mar 3 02:24:06 2006 From: benjamin.hemken at hmmh.de (Benjamin Hemken) Date: Fri, 3 Mar 2006 08:24:06 +0100 Subject: [Wtr-general] How to start more Tests Message-ID: Hello, at the moment we are working on a test framework, which helps us to write tests easily. We have a login and user administration. But we noticed that there are problems, when 2 user want to start a test. The first tests just stops. Both tests where started in a thread, so that we can navigate through the html site, after the test starts. Anybody here who knows how to solve this problem? Another problem is, that our whole application is very very slow. We use SCGI + Apache and to render a site, or a redirect takes about 5 seconds.I know this isn't a watir problem, but maybe someone can help :-) Finally i want to apologise for my bad english, but i tried my best. -Benjamin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060303/538ac114/attachment.html From bret at pettichord.com Fri Mar 3 02:50:39 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 3 Mar 2006 01:50:39 -0600 Subject: [Wtr-general] How to start more Tests In-Reply-To: References: Message-ID: On 3/3/06, Benjamin Hemken wrote: > > Hello, > at the moment we are working on a test framework, which helps us to write > tests easily. > We have a login and user administration. But we noticed that there are > problems, > when 2 user want to start a test. The first tests just stops. Both tests > where started in > a thread, so that we can navigate through the html site, after the test > starts. Anybody here > who knows how to solve this problem? > Show us your test. > Another problem is, that our whole application is very very slow. We use > SCGI + Apache > and to render a site, or a redirect takes about 5 seconds.I know this > isn't a watir problem, > but maybe someone can help :-) > What is your problem? Are you having a problem with your scripts because the application is slow? What problems are you seeing? Please be specific. Your English is fine, but we can't read your mind. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060303/5c94d894/attachment.html From benjamin.hemken at hmmh.de Fri Mar 3 03:58:10 2006 From: benjamin.hemken at hmmh.de (Benjamin Hemken) Date: Fri, 3 Mar 2006 09:58:10 +0100 Subject: [Wtr-general] How to start more Tests Message-ID: Thanks for the fast response. 1. Test def start_test_1 Thread.new { test1 } Thread.pass end def test1 $ie = Watir::IE.new $ie.goto "this is just a test url.com" $ie.text_field(:name, "test").set "Input" $ie.form(:name, "form").submit end 2. Test def start_test_2 Thread.new { test2 } Thread.pass end def test2 $ie = Watir::IE.new $ie.goto "another test url.com" $ie.button(:name, "button").click end The first test stops at a random position after starting the second one. When we start the test alone, of course it works. Because of the automating, the instance variable takes the same name, this is just an example to show, how a test looks like. Showing the whole code would be to complex. But normaly the application works like this: You enter the test code into a textarea. This is written into the database. A method is generated and given to a list. This list is used by the Testrunner to run the test. Speed problem: We have a web application. The time to render a rhtml file, a view, takes about 5 seconds. We are using the normal way of navigating through sites. For example: def show_list render :action => 'list' end or def show_about redirect_to :action => 'list_by_project', :id => params[:id] end The rhtml file consists of a few links and projects. Everything comes from the database. SCGI: http://www.zedshaw.com/projects/scgi_rails/ and the normal apache. -Benjamin -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Friday, March 03, 2006 8:51 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] How to start more Tests On 3/3/06, Benjamin Hemken wrote: Hello, at the moment we are working on a test framework, which helps us to write tests easily. We have a login and user administration. But we noticed that there are problems, when 2 user want to start a test. The first tests just stops. Both tests where started in a thread, so that we can navigate through the html site, after the test starts. Anybody here who knows how to solve this problem? Show us your test. Another problem is, that our whole application is very very slow. We use SCGI + Apache and to render a site, or a redirect takes about 5 seconds.I know this isn't a watir problem, but maybe someone can help :-) What is your problem? Are you having a problem with your scripts because the application is slow? What problems are you seeing? Please be specific. Your English is fine, but we can't read your mind. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060303/3d8089a1/attachment.html From Malcolm.Beaton at conchango.com Fri Mar 3 04:44:49 2006 From: Malcolm.Beaton at conchango.com (Beaton, Malcolm) Date: Fri, 3 Mar 2006 09:44:49 -0000 Subject: [Wtr-general] Extracting contents of a list box in a table References: Message-ID: OK Firstly apologies if this has a really obvious answer that I should have known but it has stumped me and I cant find any really good resources for tables handling (surprisingly) I have this on a page (see HTML at the bottom) and this table is table[2]. The top row has a box to enter text into (which I can do) and pressing add adds them to the list box at the bottom. I want to automate this and obviously I need to check the bottom box has the artists I added. But I cant seem to hit the table? I have tried ie.form( :name, "aspnetForm").select_list( :id, "ctl00_pageBody_FavouriteArtistsListBox").getAllContents ie.table(:index, 2).select_list(:id, "ctl00_pageBody_FavouriteArtistsListBox").getAllContents And a few other things but I cant get the content back out of it. All it tells me is this is an undefined method for #
Favourite artists:
Thanks in advance Malcolm _____________________________________________________________________ This e-mail has been scanned for viruses by MessageLabs. The information contained in this message is confidential and is intended for the addressee only. If you have received this message in error, please notify Conchango plc as soon as possible. The unauthorised use, disclosure, copying or alteration of this message is prohibited and may be unlawful. The internet cannot guarantee the integrity of this message and therefore Conchango plc will not be liable for the message if modified. Reg. Heritage House, Church Road, Egham, Surrey, TW20 9QD T 44 (0) 1784 222 222 F 44 (0) 1784 222 200 E talktous at conchango.com No. 2598884 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 7349 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20060303/e45fffc1/attachment.bin From marcus.tettmar at gmail.com Fri Mar 3 06:53:36 2006 From: marcus.tettmar at gmail.com (Marcus Tettmar) Date: Fri, 3 Mar 2006 11:53:36 +0000 Subject: [Wtr-general] Problem enumerating forms Message-ID: Hi, Why does this fail: $IE0.goto("http://www.google.com/") $IE0.form( :name, "f").text_field( :name, "q").set("ruby") $IE0.form( :name, "f").button( :name, "btnG").click This fails with: WIN32OLERuntimeError: Failed to get IEnum Interface HRESULT error code:0x80020003 Member not found. If you look at the source of the google search page form "f" *does* exist and the text field and button exist within it. This works: $IE0.goto("http://www.google.com/") $IE0.text_field( :name, "q").set("ruby") $IE0.button( :name, "btnG").click But for a more complicated app that has several forms, which perhaps share names of objects, the first method is necessary. Watir WebRecorder correctly records the form for this very reason, but the first block of code fails, even though the form does exist, with those objects in it. Is this a known problem, or am I missing something? Thanks! -- Marcus Tettmar http://www.mjtnet.com/ Macro Scheduler & WebRecorder for Windows & Web Automation and Testing. WebRecorder for Ruby/Watir now available. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060303/f2fddccc/attachment.html From tester.paul at gmail.com Fri Mar 3 09:50:15 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Fri, 3 Mar 2006 09:50:15 -0500 Subject: [Wtr-general] Extracting contents of a list box in a table In-Reply-To: References: Message-ID: <37c405480603030650i7ad027dfv@mail.gmail.com> Hi Malcom, I don't know if this will work for you or not, but I solved (what I think is) a similar problem yesterday. I had to find a way to click a link in a table that isn't particularly distinguishable from a number of other links on the page. What I did was use relative addressing to solve the problem. That is, I told the script to first figure out what cell in the table it wants and then click the first link it finds within it. The code looks something like: > ie.frame('MainWindow').table(:index, 3)[spec_row][link_column].link(:index, 1).flash > ie.frame('MainWindow').table(:index, 3)[spec_row][link_column].link(:index, 1).click In your case, does the following work for you (i.e. replacing 'spec_row' and 'spec_col' with appropriate values)? > ie.table(:index, 2)[spec_row][spec_col].select_list(:index, 1).getAllContents Paul. On 03/03/06, Beaton, Malcolm wrote: > > OK Firstly apologies if this has a really obvious answer that I should > have known but it has stumped me and I cant find any really good resources > for tables handling (surprisingly) > > I have this on a page (see HTML at the bottom) and this table is table[2]. > The top row has a box to enter text into (which I can do) and pressing add > adds them to the list box at the bottom. I want to automate this and > obviously I need to check the bottom box has the artists I added. But I cant > seem to hit the table? > > I have tried > > ie.form( :name, "aspnetForm").select_list( :id, > "ctl00_pageBody_FavouriteArtistsListBox").getAllContents > > ie.table(:index, > 2).select_list(:id, "ctl00_pageBody_FavouriteArtistsListBox").getAllContents > > [snip] -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060303/181f0bbd/attachment.html From Mark_Cain at rl.gov Fri Mar 3 10:42:46 2006 From: Mark_Cain at rl.gov (Cain, Mark) Date: Fri, 3 Mar 2006 07:42:46 -0800 Subject: [Wtr-general] Extracting contents of a list box in a table Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D598@EX5V.rl.gov> When adding dynamic content to a table what I have had to do is something like: #Load the contents of the table and its objects into the table variable table = $ie.table(:index, 2) table[3][2].click $ie.text_field(:name, ' ctl00$pageBody$FavouriteArtistsTextBox ').set("Some text you add") $ie.button("ctl00$pageBody$AddArtistButton ").click #This will reload the just entered dynamic content so you can search it. table = $ie.table(:index, 2) sList = table[3][2]. select_list(:id, "ctl00_pageBody_FavouriteArtistsListBox").getAllContents for myList in sList next if myList =~ /Some text you add/ puts "Item found in list" end Hope this helps, --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Beaton, Malcolm Sent: Friday, March 03, 2006 1:45 AM To: wtr-general at rubyforge.org Subject: Extracting contents of a list box in a table OK Firstly apologies if this has a really obvious answer that I should have known but it has stumped me and I cant find any really good resources for tables handling (surprisingly) I have this on a page (see HTML at the bottom) and this table is table[2]. The top row has a box to enter text into (which I can do) and pressing add adds them to the list box at the bottom. I want to automate this and obviously I need to check the bottom box has the artists I added. But I cant seem to hit the table? I have tried ie.form( :name, "aspnetForm").select_list( :id, "ctl00_pageBody_FavouriteArtistsListBox").getAllContents ie.table(:index, 2).select_list(:id, "ctl00_pageBody_FavouriteArtistsListBox").getAllContents And a few other things but I cant get the content back out of it. All it tells me is this is an undefined method for #
Favourite artists:
Thanks in advance Malcolm -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060303/e863c4b2/attachment.html From tester.paul at gmail.com Fri Mar 3 11:45:12 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Fri, 3 Mar 2006 11:45:12 -0500 Subject: [Wtr-general] How do you skip a disabled checkbox? Message-ID: <37c405480603030845l40bbfd3dk@mail.gmail.com> I want to run through a set of checkboxes on an input page and press the [Submit] button in the shortest amount of lines. Using the API reference, I came up with the following that works for me: > ie.frame('MainWindow').checkboxes.each { |x| x.set } The only problem is that sometimes a checkbox *may* be disabled when you enter this page. In that case, when the loop above gets to the disabled checkbox, it spits out an 'ObjectDisabledException' error (as expected). Is there a quick and easy way that I can get this loop to just skip any disabled checkboxes and continue? I can't think of any way to use an 'if' or 'unless' argument that will capture the exception and continue. Do I have to expand out the loop and insert 'rescue' lines? Paul. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060303/9117bafb/attachment.html From zeljko.filipin at gmail.com Fri Mar 3 11:52:50 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 3 Mar 2006 17:52:50 +0100 Subject: [Wtr-general] How do you skip a disabled checkbox? In-Reply-To: <37c405480603030845l40bbfd3dk@mail.gmail.com> References: <37c405480603030845l40bbfd3dk@mail.gmail.com> Message-ID: This will do it. ie.frame('MainWindow').checkboxes.each { |x| x.set unless x.disabed } --http://www.testingreflections.com/blog/3071http://iskusivac.blog.hr/ From hgs at dmu.ac.uk Fri Mar 3 12:06:25 2006 From: hgs at dmu.ac.uk (Hugh Sasse) Date: Fri, 3 Mar 2006 17:06:25 +0000 (WET) Subject: [Wtr-general] How do you skip a disabled checkbox? In-Reply-To: <37c405480603030845l40bbfd3dk@mail.gmail.com> References: <37c405480603030845l40bbfd3dk@mail.gmail.com> Message-ID: On Fri, 3 Mar 2006, Paul Carvalho wrote: [...] > ie.frame('MainWindow').checkboxes.each { |x| x.set } > The only problem is [...]a checkbox *may* be disabled [...]. In that > case, [...] it spits out an 'ObjectDisabledException' [...] > there a quick and easy way that I can get this loop to just skip any > disabled checkboxes and continue? ie.frame('MainWindow').checkboxes.each do |x| begin x.set rescue ObjectDisabledException end end > [...] Do I have to expand out the loop and > insert 'rescue' lines? ie.frame('MainWindow').checkboxes.each { |x| x.set rescue true } http://redhanded.hobix.com/bits/myFavoriteBadPractices.html > Paul. HTH Hugh From BPaatsch at activevoice.com Fri Mar 3 12:19:44 2006 From: BPaatsch at activevoice.com (Paatsch, Bernd) Date: Fri, 3 Mar 2006 11:19:44 -0600 Subject: [Wtr-general] Taking screen shots Message-ID: Hello, I am using watir for a month now and loving it. Is it possible to take screen shots? The idea is in case a test fails that then a screenshot is taken and stored in a folder for later review. Thanks, Bernd -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060303/9f739bfa/attachment.html From mb at michaelbolton.net Fri Mar 3 13:00:08 2006 From: mb at michaelbolton.net (Michael Bolton) Date: Fri, 3 Mar 2006 13:00:08 -0500 Subject: [Wtr-general] Problem enumerating forms In-Reply-To: Message-ID: <01f901c63eec$4eef7e00$6901a8c0@Koko> I'm working out of Head, rather than out of 1.4, but when I try $IE0.form.methods I get this: ArgumentError: wrong number of arguments (0 for 1) from (irb):10:in `form' from (irb):10 from ?:0 which gives me a clue. I try this: $IE0.form('f').methods ...and I get a list of methods back. So it seems as though "form" is either misdocumented as being something that takes two parameters (as SupportsSubElements does), or is buggy such that it should be taking two parameters and is only taking one, and that one is the name. I note in the source code comments that the intention appears to be to support :index , :name, :id, :method, :action, and :xpath. ---Michael B. _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- bounces at rubyforge.org] On Behalf Of Marcus Tettmar Sent: March 3, 2006 6:54 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Problem enumerating forms Hi, Why does this fail: $IE0.goto("http://www.google.com/") $IE0.form( :name, "f").text_field( :name, "q").set("ruby") $IE0.form( :name, "f").button( :name, "btnG").click This fails with: WIN32OLERuntimeError: Failed to get IEnum Interface HRESULT error code:0x80020003 Member not found. If you look at the source of the google search page form "f" *does* exist and the text field and button exist within it. This works: $IE0.goto("http://www.google.com/") $IE0.text_field( :name, "q").set("ruby") $IE0.button( :name, "btnG").click But for a more complicated app that has several forms, which perhaps share names of objects, the first method is necessary. Watir WebRecorder correctly records the form for this very reason, but the first block of code fails, even though the form does exist, with those objects in it. Is this a known problem, or am I missing something? Thanks! -- Marcus Tettmar http://www.mjtnet.com/ Macro Scheduler & WebRecorder for Windows & Web Automation and Testing. WebRecorder for Ruby/Watir now available. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060303/8234226b/attachment.html From marcus.tettmar at gmail.com Fri Mar 3 13:31:28 2006 From: marcus.tettmar at gmail.com (Marcus Tettmar) Date: Fri, 3 Mar 2006 18:31:28 +0000 Subject: [Wtr-general] Problem enumerating forms In-Reply-To: <01f901c63eec$4eef7e00$6901a8c0@Koko> References: <01f901c63eec$4eef7e00$6901a8c0@Koko> Message-ID: Yes, the (:name, "name") format certainly works in some cases. It is failing unexpectedly in other situations, such as the google example I provided - but according to the documentation, and the source of the google page, there is no reason why it shouldn't work. On 3/3/06, Michael Bolton wrote: > > I'm working out of Head, rather than out of 1.4, but when I try > > $IE0.form.methods > > I get this: > > ArgumentError: wrong number of arguments (0 for 1) > from (irb):10:in `form' > from (irb):10 > from ?:0 > > which gives me a clue. I try this: > > $IE0.form('f').methods > > ...and I get a list of methods back. > > So it seems as though "form" is either misdocumented as being something > that takes two parameters (as SupportsSubElements does), or is buggy such > that it should be taking two parameters and is only taking one, and that one > is the name. I note in the source code comments that the intention appears > to be to support :index , :name, :id, :method, :action, and :xpath. > > ---Michael B. > > > ------------------------------ > *From:* wtr-general-bounces at rubyforge.org [mailto: > wtr-general-bounces at rubyforge.org] *On Behalf Of *Marcus Tettmar > *Sent:* March 3, 2006 6:54 AM > *To:* wtr-general at rubyforge.org > *Subject:* [Wtr-general] Problem enumerating forms > > Hi, > > Why does this fail: > > $IE0.goto("http://www.google.com/") > $IE0.form( :name, "f").text_field( :name, "q").set("ruby") > $IE0.form( :name, "f").button( :name, "btnG").click > > This fails with: > > WIN32OLERuntimeError: Failed to get IEnum Interface > HRESULT error code:0x80020003 > Member not found. > > If you look at the source of the google search page form "f" *does* exist > and the text field and button exist within it. > > This works: > > $IE0.goto("http://www.google.com/") > $IE0.text_field( :name, "q").set("ruby") > $IE0.button( :name, "btnG").click > > But for a more complicated app that has several forms, which perhaps share > names of objects, the first method is necessary. > > Watir WebRecorder correctly records the form for this very reason, but the > first block of code fails, even though the form does exist, with those > objects in it. Is this a known problem, or am I missing something? > > Thanks! > > -- > Marcus Tettmar > http://www.mjtnet.com/ > Macro Scheduler & WebRecorder for Windows & Web Automation and Testing. > WebRecorder for Ruby/Watir now available. > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -- Marcus Tettmar http://www.mjtnet.com/ Macro Scheduler & WebRecorder for Windows & Web Automation and Testing. WebRecorder for Ruby/Watir now available. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060303/ab6dcc71/attachment.html From tester.paul at gmail.com Fri Mar 3 13:35:24 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Fri, 3 Mar 2006 13:35:24 -0500 Subject: [Wtr-general] How do you skip a disabled checkbox? In-Reply-To: References: <37c405480603030845l40bbfd3dk@mail.gmail.com> Message-ID: <37c405480603031035k3a4f8f66s@mail.gmail.com> This worked perfectly - once I spelled "disabled" correctly. ;-) Thanks! Paul. On 03/03/06, Zeljko Filipin wrote: > > This will do it. > ie.frame('MainWindow').checkboxes.each { |x| x.set unless x.disabed } > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060303/275ca103/attachment.html From mb at michaelbolton.net Fri Mar 3 13:00:08 2006 From: mb at michaelbolton.net (Michael Bolton) Date: Fri, 3 Mar 2006 13:00:08 -0500 Subject: [Wtr-general] Older scripts running really slow... In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D597@EX5V.rl.gov> Message-ID: <020001c63eec$5496a2c0$6901a8c0@Koko> People may or may not care about misspellings (I'm in the pedantic former group), but computers are notoriously fussy about it at times. :) ---Michael B. _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: March 2, 2006 5:33 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Older scripts running really slow... I ran the same test on the same web form using two different versions of Watir. The results are listed below. The web pages load as fast as they did before the problem is when the script inputs the data. In 1.4.1 the data is typed and the navigation between input fields is very quickly, but in the current version 1.5.X the data is typed in noticeably slower and navigation between input fields is monumentally slower! My purpose for upgrading was to take advantage of the new popup and modal windows code as well as xpath and other stuff-xpath didn't work at all for me either. As a side not, here are a couple of humorous quotes about spelling: ;-P "It's a damn poor mind that can only think of one way to spell a word." -- Andrew Jackson "I don't give a damn for a man that can only spell a word one way." -- Mark Twain --Mark _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Michael Bolton Sent: Thursday, March 02, 2006 1:45 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Older scripts running really slow... Obvious possibilities are - response time on the Web pages - typing speed in the forms Are your pages visible? Do they look slower? When they're loading? When they're typing? If you've got one test that takes half a minute and another that takes three minutes (which you do), the places where slowdowns are happening are plausibly visible to the human eye. Apropos of not very much, but you noticed that "Problem" is spelled "Probelm" below, right? ---Michael B. _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: March 2, 2006 4:17 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Older scripts running really slow... With Watir 1.4.1 (just downloaded and reinstalled) it took: Finished in 31.797 seconds. With Watir from current SVN (did a checkout on the http://svn.openqa.org/svn/watir/trunk/watir) Finished in 179.047 seconds. This is the part that ran: =============================================================== # feature tests for javascript PopUps # revision: $Revision: 1.11 $ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'c:\watir\unittests\setup' require 'watir\dialog' class TC_PER < Test::Unit::TestCase include Watir def gotoPopUpPage() $ie.goto("http://apwtst200.rl.gov/rapidweb/chg/per/per/main.cfm") $ie.set_fast_speed() end #def startClicker( button , waitTime = 3) # w = WinClicker.new # longName = $ie.dir.gsub("/" , "\\" ) # shortName = w.getShortFileName(longName) # c = "start rubyw #{shortName }\\watir\\clickJSDialog.rb #{button } #{ waitTime} " # puts "Starting #{c}" # w.winsystem(c) # w=nil #end def test0_originator $d = Time.now.strftime("%m/%d/%Y") gotoPopUpPage() $ie.text_field(:name, "d_date").set("#{ $d }") $ie.text_field(:name, "d_time").set("1111") $ie.selectBox( :name, "progproj").select(/Other/) $ie.selectBox( :name, "locationID").select(/AW Farm/) $ie.selectBox( :name, "ProblemDiscoveredID").select(/EH\-22/) $ie.text_field( :name, "probdescript").set("Probelm Description Test") $ie.selectBox( :name, "sinID").select(/Cooling Water/) $ie.text_field( :name, "ein").set("eid-001") $ie.checkBox( :name, "reqnsatcheck").set $ie.text_field( :name, "reqnsat").set("Req Not Satisfied") $ie.checkBox( :name, "sourcedoccheck").set $ie.text_field( :name, "SourceDocument").set("Source Doc") $ie.text_field( :name, "actionplan").set("This is a test of the Action Plan text area.") $ie.text_field( :name, "RecommendedCorrectiveActions").set("This is a test of Recommended Actions Taken text area.") $ie.radio( :name, "feedback", 1).set $ie.radio( :name, "feedbacktype", 'other').set $ie.text_field( :name, "feedbackother").set("Feedback Other") #startClicker("OK" , 3) $ie.button("Submit").click_no_wait dialog.button('OK').click $ie.link(:text, /PER-2006-/i).click assert($ie.text_field(:name, "d_date").verify_contains("#{$d}")) assert($ie.text_field(:name, "d_time").verify_contains("11:11")) assert_arrayEquals( ["Other" ] , $ie.select_list(:name, "progproj").getSelectedItems) assert_arrayEquals( ["AW Farm" ] , $ie.select_list(:name, "locationID").getSelectedItems) assert_arrayEquals( ["EH-22" ] , $ie.select_list(:name, "ProblemDiscoveredID").getSelectedItems) assert($ie.text_field(:name, "probdescript").verify_contains("Probelm Description Test")) assert_arrayEquals( ["Cooling Water" ] , $ie.select_list(:name, "sinID").getSelectedItems) assert($ie.text_field(:name, "ein").verify_contains("eid-001")) assert($ie.checkbox(:name, "reqnsatcheck").isSet?) assert($ie.text_field(:name, "reqnsat").verify_contains("Req Not Satisfied")) assert($ie.checkbox(:name, "sourcedoccheck").isSet?) assert($ie.text_field(:name, "SourceDocument").verify_contains("Source Doc")) assert($ie.text_field(:name, "actionplan").verify_contains("This is a test of the Action Plan text area.")) assert($ie.text_field(:name, "RecommendedCorrectiveActions").verify_contains("This is a test of Recommended Actions Taken text area.")) assert($ie.radio(:name, "feedback").isSet?) assert($ie.radio(:name, "feedbacktype", 'other').isSet?) assert($ie.text_field(:name, "feedbackother").verify_contains("Feedback Other")) end end --Mark _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Thursday, March 02, 2006 12:57 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Older scripts running really slow... Could you please do an apples to apples comparison running your scripts with different versions of Watir against the same version of your application. It's possible an application change triggered the performance problem. Let us know the results. It would also be nice if you could share the Watir scripts that are slow. Bret On 3/2/06, Cain, Mark < Mark_Cain at rl.gov > wrote: I have some Watir script I wrote about 6 months ago and needed to do some regression testing using these scripts. Well when I began running them they were really slow! Where it used to take 15 to 20 seconds to fill out the page form now is taking 3 to 4 minutes. I have recently upgraded my Watir installation will the latest from SVN and ruby with 1.8.4 Preview 3. Has anyone one else been experiencing slowness? If yes, what did you do to fix it? Thanks, ____________________ Mark L. Cain LMIT - E *STARS R ~ Lead Test Engineer 1981 Snyder, MSIN: G3-62, Richland, WA 99354 Mark_Cain at RL.gov 509.376.5458 "640 Kilobytes of computer memory ought to be enough for anybody." - Bill Gates, 1981 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060303/c5b32a37/attachment.html From BPaatsch at activevoice.com Fri Mar 3 16:36:51 2006 From: BPaatsch at activevoice.com (Paatsch, Bernd) Date: Fri, 3 Mar 2006 15:36:51 -0600 Subject: [Wtr-general] Debug information output Message-ID: Hello, My script works fine but prints debug information (see below) to the stdout (command line). Is there a problem in my script? Is there a way to suppress the messages? DEBUG: IE#getObject error Unknown property or method `name' HRESULT error code:0x80020006 Unknown name. Thx, Bernd -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060303/56a6dcbc/attachment.html From zeljko.filipin at gmail.com Sat Mar 4 05:15:38 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Sat, 4 Mar 2006 11:15:38 +0100 Subject: [Wtr-general] How do you skip a disabled checkbox? In-Reply-To: <37c405480603031035k3a4f8f66s@mail.gmail.com> References: <37c405480603030845l40bbfd3dk@mail.gmail.com> <37c405480603031035k3a4f8f66s@mail.gmail.com> Message-ID: Ups. :) On 3/3/06, Paul Carvalho wrote:> This worked perfectly - once I spelled "disabled" correctly. ;-)>> Thanks! Paul. From padhs2k at gmail.com Sat Mar 4 12:48:46 2006 From: padhs2k at gmail.com (Padhma N) Date: Sat, 4 Mar 2006 09:48:46 -0800 Subject: [Wtr-general] How to create a folder having the name of system date and time , at runtime? Message-ID: <38c139080603040948w4180c786n5a174b935ebdf14b@mail.gmail.com> Hi, I am new to Ruby and Watir and have the following doubts. Can someone please help? 1. When I run a particular .rb file, I would like a directory/folder to be created automatically and in that my output result text file should be stored. In other words, a folder should be automatically created at runtime which would hold a .txt file containing the results. That folder should have the Date and Time (when the rb file was run)as it folder name. Is there a way of doing it?? Please let me know. 2. I have grouped around 15 test cases in my test suite. When I run the test suite .rb file, everything runs properly and at the last, the execution time is being displayed like 'Finished in ..... seconds.'. But I would like to know the time taken for each of my test cases to finish. Is there a way of doing it ? Can someone please let me know? 3. I would like to increase the speed of execution. Please let me know how to do it. I would really appreciate it if someone can help me! Thanks a lot! Padhma -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060304/c01e69fd/attachment.html From mb at michaelbolton.net Sat Mar 4 13:20:34 2006 From: mb at michaelbolton.net (Michael Bolton) Date: Sat, 4 Mar 2006 13:20:34 -0500 Subject: [Wtr-general] Debug information output In-Reply-To: Message-ID: <000001c63fb8$59774980$6601a8c0@Koko> There's a terrible problem in your script. Wait--maybe there's no problem in your script. Actually it's kind of hard to tell without seeing the script. If you suspected that this were a problem with the program that you're testing, what would the developer ask you? What would your answer be? Ideally, what we'd like to see is the smallest complete script that makes this happen. ---Michael B. _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paatsch, Bernd Sent: March 3, 2006 4:37 PM To: 'wtr-general at rubyforge.org' Subject: [Wtr-general] Debug information output Hello, My script works fine but prints debug information (see below) to the stdout (command line). Is there a problem in my script? Is there a way to suppress the messages? DEBUG: IE#getObject error Unknown property or method `name' HRESULT error code:0x80020006 Unknown name. Thx, Bernd -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060304/200853bf/attachment.html From mb at michaelbolton.net Sat Mar 4 16:45:19 2006 From: mb at michaelbolton.net (Michael Bolton) Date: Sat, 4 Mar 2006 16:45:19 -0500 Subject: [Wtr-general] How to create a folder having the name of system dateand time , at runtime? In-Reply-To: <38c139080603040948w4180c786n5a174b935ebdf14b@mail.gmail.com> Message-ID: <008f01c63fd4$ef097970$6601a8c0@Koko> 1. When I run a particular .rb file, I would like a directory/folder to be created automatically and in that my output result text file should be stored. In other words, a folder should be automatically created at runtime which would hold a .txt file containing the results. That folder should have the Date and Time (when the rb file was run)as it folder name. Is there a way of doing it?? Please let me know. I was tempted not to answer this question, because I thought you would learn so much more from answering it yourself. But thinking about it turned out to be too much fun. These two methods (put them into a module) work together to make a directory based on the current minute. class Time # when called as a method on a Time object, returns a string in the form # YYYYMMDDhhmm def timestring self.year.to_s + self.month.to_s.rjust(2, "0") + self.day.to_s.rjust(2, "0") \ + self.hour.to_s.rjust(2, "0") + self.min.to_s.rjust(2, "0") end end class Dir def Dir.mkTimeStampDir dirname = Time.now.timestring begin mkdir(dirname) return dirname rescue puts "Unable to create a directory named #{dirname} return nil end end end Now you can put folder = Dir.mkTimeStampDir in your code (checking for folder.nil?) and put a file into the newly-created directory. This illustrates, by the way, how we can add methods to any of the existing Ruby classes, such that (if we add the code above to an IRB session via the require statement), we can do stuff like this: irb(main):014:0> foo = Time.now => Sat Mar 04 16:37:29 Eastern Standard Time 2006 irb(main):015:0> foo.timestring => "200603041637" Gather enough stuff like this together into a single module, and you can extend the language and IRB in whatever you like. I LOVE Ruby. 2. I have grouped around 15 test cases in my test suite. When I run the test suite .rb file, everything runs properly and at the last, the execution time is being displayed like 'Finished in ..... seconds.'. But I would like to know the time taken for each of my test cases to finish. Is there a way of doing it ? Can someone please let me know? At the beginning of whatever you wish to time, put a line starttime = Time.now At then end of whatever you wish to time, put a line endtime = Time.now When you want to determine the elapsed time, elapsed = endtime - starttime where elapsed will be a value in seconds. 3. I would like to increase the speed of execution. Please let me know how to do it. I presume that you mean typing speed. Try callling set_fast_speed at the beginning of the slow bits. ---Michael B. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060304/6a925191/attachment.html From Mark_Cain at rl.gov Mon Mar 6 09:57:47 2006 From: Mark_Cain at rl.gov (Cain, Mark) Date: Mon, 6 Mar 2006 06:57:47 -0800 Subject: [Wtr-general] Older scripts running really slow... Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D59A@EX5V.rl.gov> Not sure that this mail got delivered so I am sending it again... I ran the same test on the same web form using two different versions of Watir. The results are listed below. The web pages load as fast as they did before the problem is when the script inputs the data. In 1.4.1 the data is typed and the navigation between input fields is very quickly, but in the current version 1.5.X the data is typed in noticeably slower and navigation between input fields is monumentally slower! My purpose for upgrading was to take advantage of the new popup and modal windows code as well as xpath and other stuff-xpath didn't work at all for me either. As a side not, here are a couple of humorous quotes about spelling: ;-P "It's a damn poor mind that can only think of one way to spell a word." -- Andrew Jackson "I don't give a damn for a man that can only spell a word one way." -- Mark Twain --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Michael Bolton Sent: Thursday, March 02, 2006 1:45 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Older scripts running really slow... Obvious possibilities are - response time on the Web pages - typing speed in the forms Are your pages visible? Do they look slower? When they're loading? When they're typing? If you've got one test that takes half a minute and another that takes three minutes (which you do), the places where slowdowns are happening are plausibly visible to the human eye. Apropos of not very much, but you noticed that "Problem" is spelled "Probelm" below, right? ---Michael B. ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: March 2, 2006 4:17 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Older scripts running really slow... With Watir 1.4.1 (just downloaded and reinstalled) it took: Finished in 31.797 seconds. With Watir from current SVN (did a checkout on the http://svn.openqa.org/svn/watir/trunk/watir) Finished in 179.047 seconds. This is the part that ran: =============================================================== # feature tests for javascript PopUps # revision: $Revision: 1.11 $ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'c:\watir\unittests\setup' require 'watir\dialog' class TC_PER < Test::Unit::TestCase include Watir def gotoPopUpPage() $ie.goto("http:///rapidweb/chg/per/per/main.cfm") $ie.set_fast_speed() end #def startClicker( button , waitTime = 3) # w = WinClicker.new # longName = $ie.dir.gsub("/" , "\\" ) # shortName = w.getShortFileName(longName) # c = "start rubyw #{shortName }\\watir\\clickJSDialog.rb #{button } #{ waitTime} " # puts "Starting #{c}" # w.winsystem(c) # w=nil #end def test0_originator $d = Time.now.strftime("%m/%d/%Y") gotoPopUpPage() $ie.text_field(:name, "d_date").set("#{ $d }") $ie.text_field(:name, "d_time").set("1111") $ie.selectBox( :name, "progproj").select(/Other/) $ie.selectBox( :name, "locationID").select(/AW Farm/) $ie.selectBox( :name, "ProblemDiscoveredID").select(/EH\-22/) $ie.text_field( :name, "probdescript").set("Probelm Description Test") $ie.selectBox( :name, "sinID").select(/Cooling Water/) $ie.text_field( :name, "ein").set("eid-001") $ie.checkBox( :name, "reqnsatcheck").set $ie.text_field( :name, "reqnsat").set("Req Not Satisfied") $ie.checkBox( :name, "sourcedoccheck").set $ie.text_field( :name, "SourceDocument").set("Source Doc") $ie.text_field( :name, "actionplan").set("This is a test of the Action Plan text area.") $ie.text_field( :name, "RecommendedCorrectiveActions").set("This is a test of Recommended Actions Taken text area.") $ie.radio( :name, "feedback", 1).set $ie.radio( :name, "feedbacktype", 'other').set $ie.text_field( :name, "feedbackother").set("Feedback Other") #startClicker("OK" , 3) $ie.button("Submit").click_no_wait dialog.button('OK').click $ie.link(:text, /PER-2006-/i).click assert($ie.text_field(:name, "d_date").verify_contains("#{$d}")) assert($ie.text_field(:name, "d_time").verify_contains("11:11")) assert_arrayEquals( ["Other" ] , $ie.select_list(:name, "progproj").getSelectedItems) assert_arrayEquals( ["AW Farm" ] , $ie.select_list(:name, "locationID").getSelectedItems) assert_arrayEquals( ["EH-22" ] , $ie.select_list(:name, "ProblemDiscoveredID").getSelectedItems) assert($ie.text_field(:name, "probdescript").verify_contains("Probelm Description Test")) assert_arrayEquals( ["Cooling Water" ] , $ie.select_list(:name, "sinID").getSelectedItems) assert($ie.text_field(:name, "ein").verify_contains("eid-001")) assert($ie.checkbox(:name, "reqnsatcheck").isSet?) assert($ie.text_field(:name, "reqnsat").verify_contains("Req Not Satisfied")) assert($ie.checkbox(:name, "sourcedoccheck").isSet?) assert($ie.text_field(:name, "SourceDocument").verify_contains("Source Doc")) assert($ie.text_field(:name, "actionplan").verify_contains("This is a test of the Action Plan text area.")) assert($ie.text_field(:name, "RecommendedCorrectiveActions").verify_contains("This is a test of Recommended Actions Taken text area.")) assert($ie.radio(:name, "feedback").isSet?) assert($ie.radio(:name, "feedbacktype", 'other').isSet?) assert($ie.text_field(:name, "feedbackother").verify_contains("Feedback Other")) end end --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Thursday, March 02, 2006 12:57 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Older scripts running really slow... Could you please do an apples to apples comparison running your scripts with different versions of Watir against the same version of your application. It's possible an application change triggered the performance problem. Let us know the results. It would also be nice if you could share the Watir scripts that are slow. Bret On 3/2/06, Cain, Mark < Mark_Cain at rl.gov > wrote: I have some Watir script I wrote about 6 months ago and needed to do some regression testing using these scripts. Well when I began running them they were really slow! Where it used to take 15 to 20 seconds to fill out the page form now is taking 3 to 4 minutes. I have recently upgraded my Watir installation will the latest from SVN and ruby with 1.8.4 Preview 3. Has anyone one else been experiencing slowness? If yes, what did you do to fix it? Thanks, ____________________ Mark L. Cain LMIT - E *STARS (r) ~ Lead Test Engineer 1981 Snyder, MSIN: G3-62, Richland, WA 99354 Mark_Cain at RL.gov 509.376.5458 "640 Kilobytes of computer memory ought to be enough for anybody." - Bill Gates, 1981 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060306/f185d3a1/attachment.html From Mark_Cain at rl.gov Mon Mar 6 16:49:49 2006 From: Mark_Cain at rl.gov (Cain, Mark) Date: Mon, 6 Mar 2006 13:49:49 -0800 Subject: [Wtr-general] What happened to 'asseert_arrayEquals' Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5A0@EX5V.rl.gov> I was noticing in one of my older scripts that one of the asserts (assert_arrayEquals) is failing. Further investigation resulted in not being able to find it in testUnitAddons.rb, where it used to live. Did this assert no longer being used? Is it somewhere else? What else is being deprecated? Is there a running list of these deprecations somewhere? Thanks, ____________________ Mark L. Cain LMIT - E*STARS(r) ~ Lead Test Engineer 1981 Snyder, MSIN: G3-62, Richland, WA 99354 Mark_Cain at RL.gov 509.376.5458 "640 Kilobytes of computer memory ought to be enough for anybody." - Bill Gates, 1981 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060306/f9e5caf4/attachment.html From bret at pettichord.com Mon Mar 6 17:07:19 2006 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 6 Mar 2006 16:07:19 -0600 Subject: [Wtr-general] What happened to 'asseert_arrayEquals' In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5A0@EX5V.rl.gov> References: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5A0@EX5V.rl.gov> Message-ID: Most of the assert methods in testUnitAddons.rb reported errors incorrectly. They were also redundant with existing assertions, so it made more sense to remove than that to fix them. I believe that assert_arrayEquals can just be replaced with assert_equals. If you want you can go into the history and see exactly how the unit tests were updated when this was removed. This file was really a part of the Watir unit test suite rather than the Watir library, so this change was not considered a deprecation. There have been ongoing confusions regarding exactly what is and is not part of the supported Watir library. We are trying to make this clearer going forward. We apologize for the confusion. You are free to grab and use an old copy of the file if you want. Bret On 3/6/06, Cain, Mark wrote: > > I was noticing in one of my older scripts that one of the asserts > (assert_arrayEquals) is failing. Further investigation resulted in not > being able to find it in testUnitAddons.rb, where it used to live. Did > this assert no longer being used? Is it somewhere else? What else is being > deprecated? Is there a running list of these deprecations somewhere? > > > > Thanks, > > ____________________ > *Mark L. Cain* > *LMIT - **E*****STARS*(r)* **~ **Lead Test Engineer* > *1981 Snyder, MSIN: G3-62, Richland, WA 99354** > Mark_Cain at RL.gov > 509.376.5458* > *"640 Kilobytes of computer memory ought to be enough for anybody."** - > Bill Gates, 1981 * > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060306/5ae1efeb/attachment.html From pekka.maatta at proventia.fi Tue Mar 7 03:32:46 2006 From: pekka.maatta at proventia.fi (=?ISO-8859-1?Q?Pekka_M=E4=E4tt=E4?=) Date: Tue, 07 Mar 2006 10:32:46 +0200 Subject: [Wtr-general] Finding out the order of input elements? Message-ID: <440D452E.6000805@proventia.fi> Hi, I'm new to Watir (and Ruby), so this may be a stupid question.... tried searching around a bit, but with little success. So here goes: How do I find out if an input element precedes another or not? There does not seem to be a method for accessing all html inputs on page at once, nor does not seem to be an index attribute or such in input objects. So I can get ordered lists of text fields, selects and buttons, but have no way of knowing if, for example, if a certain text field element is defined before a certain button on a page. Or do I? TY in advance, -PM From bret at pettichord.com Tue Mar 7 13:22:15 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 7 Mar 2006 12:22:15 -0600 Subject: [Wtr-general] How to start more Tests In-Reply-To: References: Message-ID: You have two different threads concurrently accessing the same browser ($ie). That will lead to exactly the behavior you describe. You should ask your speed question on the rails mailing list. It doesn't sound like a Watir issue. On 3/3/06, Benjamin Hemken wrote: > > Thanks for the fast response. > > 1. Test > def start_test_1 > Thread.new { test1 } > Thread.pass > end > > def test1 > $ie = Watir::IE.new > $ie.goto "this is just a test url.com" > $ie.text_field(:name, "test").set "Input" > $ie.form(:name, "form").submit > end > > 2. Test > def start_test_2 > Thread.new { test2 } > Thread.pass > end > > def test2 > $ie = Watir::IE.new > $ie.goto "another test url.com" > $ie.button(:name, "button").click > end > > The first test stops at a random position after starting the second one. > When we start the test alone, of course it works. > Because of the automating, the instance variable takes the same name, this > is > just an example to show, how a test looks like. Showing the whole code > would > be to complex. But normaly the application works like this: > You enter the test code into a textarea. This is written into the > database. A method is generated > and given to a list. This list is used by the Testrunner to run the test. > > > Speed problem: > We have a web application. The time to render a rhtml file, a view, takes > about 5 seconds. > We are using the normal way of navigating through sites. > For example: > def show_list > render :action => 'list' > end > > or > def show_about > redirect_to :action => 'list_by_project', :id => params[:id] > end > The rhtml file consists of a few links and projects. Everything comes from > the database. > SCGI: http://www.zedshaw.com/projects/scgi_rails/ and the normal apache. > > -Benjamin > > -----Original Message----- > *From:* wtr-general-bounces at rubyforge.org [mailto: > wtr-general-bounces at rubyforge.org] *On Behalf Of *Bret Pettichord > *Sent:* Friday, March 03, 2006 8:51 AM > *To:* wtr-general at rubyforge.org > *Subject:* Re: [Wtr-general] How to start more Tests > > On 3/3/06, Benjamin Hemken wrote: > > > > Hello, > > at the moment we are working on a test framework, which helps us to > > write tests easily. > > We have a login and user administration. But we noticed that there are > > problems, > > when 2 user want to start a test. The first tests just stops. Both tests > > where started in > > a thread, so that we can navigate through the html site, after the test > > starts. Anybody here > > who knows how to solve this problem? > > > Show us your test. > > > Another problem is, that our whole application is very very slow. We > > use SCGI + Apache > > and to render a site, or a redirect takes about 5 seconds.I know this > > isn't a watir problem, > > but maybe someone can help :-) > > > > What is your problem? Are you having a problem with your scripts because > the application is slow? What problems are you seeing? Please be specific. > > Your English is fine, but we can't read your mind. > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060307/5cae4292/attachment.html From padhs2k at gmail.com Tue Mar 7 18:22:48 2006 From: padhs2k at gmail.com (Padhma N) Date: Tue, 7 Mar 2006 15:22:48 -0800 Subject: [Wtr-general] How to create a folder having the name of Message-ID: <38c139080603071522x2671099bra5d29b1840c015b0@mail.gmail.com> Thanks for the fast reply!!! IT was realllllly very helpful! Thanks again! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060307/50455f1e/attachment.html From saudaziz at gmail.com Tue Mar 7 20:43:53 2006 From: saudaziz at gmail.com (saud aziz) Date: Tue, 7 Mar 2006 17:43:53 -0800 Subject: [Wtr-general] Quick help Message-ID: <24d0cb380603071743k135e9083ie993583570082c3d@mail.gmail.com> In the recent emails it was described how ppl are splititng up their code in different files and since i am at the very start of writing down something for proof of concept, i thought it would be wise to begin with such structure and keep adding as i go along... My question is perhaps very simple one and that is, how can i call a variable say RegUserName as mentioned in below code from my test driver? RegUserName exists in Constants.rb file. Here is what i have for both as example: Constants.rb Module Constants RegUserNameLabel = 'first' RegUserName = 'second' RegPassLabel = 'third' RegPassword = 'fourth' end Register.rb #trying to run this as driver for now require 'watir' include Watir require 'test/unit' require 'test/unit/ui/console/testrunner' require 'watir/testUnitAddons' require 'test/unit/assertions' include Test::Unit::Assertions class TC_Tickets < Test::Unit::TestCase require 'Constants' include Constants def test_Registration ie = IE.new ie.goto('http://firstlink') ie.link(:url, 'http://secondlink/register').click #Check for blank submissions and assert that errors were raised #ie.image(:id, 'btn_register').click ie.button(:name, "#{$RegFormButtonName}").click ie.text_field(:id, "#{$RegUserNameLabel}").set("#{$RegUserName}") <-----dies here cause it returns nil. Obviously it's not getting values off Constants.rb ie.text_field(:id, "#{$RegPassLabel}").set("#{$RegPassword}") end end Any help is appreciated. Regards Ruby n00b -- Saud Aziz "Whenever you find yourself on the side of the majority, it is time to pause and reflect." - Mark Twain -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060307/a8415483/attachment.html From bret at pettichord.com Tue Mar 7 22:22:27 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 7 Mar 2006 21:22:27 -0600 Subject: [Wtr-general] Quick help In-Reply-To: <24d0cb380603071743k135e9083ie993583570082c3d@mail.gmail.com> References: <24d0cb380603071743k135e9083ie993583570082c3d@mail.gmail.com> Message-ID: You need to be consistent. Either use RegUserNameLabel in both files or $RegUserNameLabel in both files. You use the first in Constants.rb and the second in Register.rb. On 3/7/06, saud aziz wrote: > > In the recent emails it was described how ppl are splititng up their code > in different files and since i am at the very start of writing down > something for proof of concept, i thought it would be wise to begin with > such structure and keep adding as i go along... > > My question is perhaps very simple one and that is, how can i call a > variable say RegUserName as mentioned in below code from my test driver? > RegUserName exists in Constants.rb file. Here is what i have for both as > example: > > Constants.rb > > Module Constants > > RegUserNameLabel = 'first' > RegUserName = 'second' > RegPassLabel = 'third' > RegPassword = 'fourth' > > end > > > Register.rb > #trying to run this as driver for now > require 'watir' > include Watir > require 'test/unit' > require 'test/unit/ui/console/testrunner' > require 'watir/testUnitAddons' > require 'test/unit/assertions' > include Test::Unit::Assertions > > > class TC_Tickets < Test::Unit::TestCase > > require 'Constants' > include Constants > > def test_Registration > > ie = IE.new > > ie.goto('http://firstlink' ) > ie.link(:url, ' http://secondlink/register').click > > > #Check for blank submissions and assert that errors were raised > #ie.image(:id, 'btn_register').click > ie.button(:name, "#{$RegFormButtonName}").click > > > ie.text_field(:id, > "#{$RegUserNameLabel}").set("#{$RegUserName}") > <-----dies here cause it returns nil. Obviously it's not getting values off > Constants.rb > ie.text_field(:id, "#{$RegPassLabel}").set("#{$RegPassword}") > > end > end > > > Any help is appreciated. > > Regards > Ruby n00b > > -- > Saud Aziz > > "Whenever you find yourself on the side of the majority, it is time to > pause and reflect." - Mark Twain > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060307/bda96718/attachment.html From ralickolli at kCura.com Wed Mar 8 13:40:30 2006 From: ralickolli at kCura.com (Rexhina Alickolli) Date: Wed, 8 Mar 2006 12:40:30 -0600 Subject: [Wtr-general] how to distinguish among links with the same name Message-ID: I am new in Watir/Ruby and I am trying to figure out how do distinguish links of the same name. Now, if I want to click on that link I just do that by name, but that prevent me from accessing all of them. I can perform the Click action only in the first link. The code behind the link (?Add New Code?) is: ????????..id="_editTemplate__matter__status_hiddenButton" href="javascript:__doPostBack('_editTemplate$_matter$_status$hiddenButton','')" style="visibility:hidden;"> Add New Code
Any suggestion would be appreciated. Thanks-- regina -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 268.2.0/276 - Release Date: 3/7/2006 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060308/96534a72/attachment.html From tester.paul at gmail.com Wed Mar 8 14:07:27 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Wed, 8 Mar 2006 14:07:27 -0500 Subject: [Wtr-general] how to distinguish among links with the same name In-Reply-To: References: Message-ID: <37c405480603081107se31879cq@mail.gmail.com> Hello Regina, at first I wasn't sure I had enough information to help, but then I noticed the "table" tags in your HTML code snip. If I can make a guess, does the HTML page have a table with a bunch of similarly named links in the same column but in different rows? If so, there are different solutions that you might try. One way might be to try and access the link using the table's cell position. For example, using something like: > ie.table(:index, #)[row#][col#].link(:index, 1).click (Replace the '#' with appropriate numbers. This line will click the first link that it finds in that particular table cell.) I had a similar problem accessing the links on one page of my AUT. I wrote a routine that used arrays to look for a particular row that matched certain criteria and then it just clicks the link in whatever column number the link happens to be in. See if that puts you on the right track. If not, please provide some more background information - like the general layout of the html on the page or the code that you've tried that doesn't work. I'd be happy to post my code if you need it, but I'd like to have a better idea that the particular problem that I solved for our app is similar to your situation. Hope that helps. Cheers. Paul. On 08/03/06, Rexhina Alickolli wrote: > > I am new in Watir/Ruby and I am trying to figure out how do distinguish > links of the same name. > > Now, if I want to click on that link I just do that by name, but that > prevent me from accessing all of them. I can perform the Click action only > in the first link. The code behind the link ("Add New Code") is: > > > > ????????..id="_editTemplate__matter__status_hiddenButton" > href="javascript:__doPostBack('_editTemplate$_matter$_status$hiddenButton','')" > style="visibility:hidden;">  id="_editTemplate__matter__status__ctl2_anchor" *class="JavascriptLink" > onclick="AddNewCode_42()">Add New Code
* > > > > Any suggestion would be appreciated. > > *Thanks-- regina* > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060308/d9bf0b16/attachment.html From tester.paul at gmail.com Wed Mar 8 15:15:55 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Wed, 8 Mar 2006 15:15:55 -0500 Subject: [Wtr-general] Random Watir script failures Message-ID: <37c405480603081215n156e60e2r@mail.gmail.com> Hi there, I have noticed that a script of mine seems to be having random failures that I can't explain. I am running Watir 1.4.1 on Ruby 184-16 on Windows XP Pro SP2. The script I'm working with walks through our site map - it enters a page, gets the page size, download time, leaves and then moves onto the next page. The script is correct. However, at random intervals when I run it, a button or link will fail to get recognised and the script just stops. I've been trying to get around the failures by adding a "sleep 1" (or 2 or 3 seconds) whenever it fails. This latest run, it wasn't even a button that the script failed on -- it was a + operator! Okay, I know that I don't know any workaround for that one! Here was the error output: ---- 1) Error: test_d_Reports(TC_LD_site_map_walkthru): NoMethodError: undefined method `+' for nil:NilClass LD_site_map_walkthrough.rb:461:in `test_d_Reports' ---- and line 461 is: row_data[42] = row_data[42] + ',' + $ie.frame('MainWindow').html.length.to_s + ',' + $ie.down_load_time.to_s I know there's nothing wrong with this line because it looks relatively identical to a billion other lines in the script - just the array number changes. And it works when I run it the next time. Other errors I've seen include: ---- 1) Error: test_d_Reports(TC_LD_site_map_walkthru): NoMethodError: undefined method `outerHTML' for nil:NilClass ---- (for the same 'row_data' kind of line as above, just elsewhere in the script.) and errors like the following when I remove strategically inserted "sleep" lines: ---- 1) Error: test_d_Reports(TC_LD_site_map_walkthru): NoMethodError: undefined method `all' for nil:NilClass c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:754:in `getContainerContents' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:778:in `getObject' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3063:in `initialize' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:304:in `button' LD_site_map_walkthrough.rb:312:in `test_d_Reports' ---- for line 312: $ie.frame('MainWindow').button(:name, /CancelButton/).click Is this something that there is a workaround for? If I had to guess, it looks like the script is trying to continue before the page itself finishes loading in IE. Please help. Paul. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060308/0069d124/attachment.html From BPaatsch at activevoice.com Wed Mar 8 17:34:35 2006 From: BPaatsch at activevoice.com (Paatsch, Bernd) Date: Wed, 8 Mar 2006 16:34:35 -0600 Subject: [Wtr-general] DEBUG: wait: readystate=4 ? Message-ID: Hello, I get very often DEBUG: wait: readystate=4. What does it mean? How can I get ride of it? --Bernd -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060308/ef1a78a1/attachment.html From tester.paul at gmail.com Wed Mar 8 17:57:12 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Wed, 8 Mar 2006 17:57:12 -0500 Subject: [Wtr-general] how to distinguish among links with the same name In-Reply-To: References: Message-ID: <37c405480603081457l689dc793m@mail.gmail.com> Regina sent me an email to let me know that the following code allowed her to click one of the desired links: > ie.table(:index, 32)[1][2].link(:index, 2).click However, given the number of tables in the page, she was wondering if there was an alternate way to click one of the links based on the anchor id. It's a hidden JavaScript Link, so I don't know how to do this. Does anyone have any suggestions? Here is the HTML code snippet again for the link she wants to click: ---- Add New Code ---- (BTW, please reply to her, not me. Although I am interested in the answer too.) Cheers. Paul. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060308/a3358bfe/attachment.html From christopher_brown at engin.com.au Wed Mar 8 18:33:34 2006 From: christopher_brown at engin.com.au (Brown, Christopher) Date: Thu, 9 Mar 2006 10:33:34 +1100 Subject: [Wtr-general] xpath support doesn't work for me Message-ID: Hi Angrez, I haven't been able to spend time on this recently. As you can see from the details below my setup should be okay C:\>ruby -vrrexml/rexml -e 'p REXML::Version, PLATFORM' ruby 1.8.2 (2004-12-25) [i386-mswin32] "3.1.2.1" "i386-mswin32" Given the following error c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1922:in `elements_by_xpath': undefined method `elements' for nil:NilClass (NoMethodError) from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1912:in `element_by_xpath' from G:/workspace/web_pages/trial.rb:3 This is what's in watir.rb at line 1922 def elements_by_xpath(xpath) doc = rexml_document_object() modifiedXpath = "" selectedElements = Array.new => doc.elements.each(xpath) do |element| <= line 1922 modifiedXpath = element.xpath temp = element_by_absolute_xpath(modifiedXpath) selectedElements << temp if temp != nil end element.rb seems to be the missing link. I've tried this file in several locations C:\ruby\lib\ruby\1.8\rexml C:\ruby\lib\ruby\1.8\watir\rexml C:\ruby\lib\ruby\site_ruby\1.8\rexml C:\ruby\lib\ruby\site_ruby\1.8\watir\rexml I've read the code and see where rexml/document gets loaded. If create_rexml_document_object does its thing then how can the elements be missing? Any ideas? Regards Chris p.s. I've just tried v 1.8.4 of Ruby and get the following c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1755: [BUG] Segmentation fault ruby 1.8.4 (2005-12-24) [i386-mswin32] abnormal program termination -----Original Message----- From: Angrez Singh [mailto:angrez at gmail.com] Sent: Friday, March 03, 2006 4:30 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] xpath support doesn't work for me Hi Chris, What version of Ruby are you running? I am using Ruby 1.8.2 and latest watir tar ball. Also REXML version is " 3.1.2.1 ". You can check this by using following command: ruby -vrrexml/rexml -e 'p REXML::Version, PLATFORM' But still I have no clue of what is going wrong? Regards, Angrez -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060309/a6c59366/attachment.html From bret at pettichord.com Thu Mar 9 00:15:39 2006 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 8 Mar 2006 23:15:39 -0600 Subject: [Wtr-general] how to distinguish among links with the same name In-Reply-To: <37c405480603081457l689dc793m@mail.gmail.com> References: <37c405480603081457l689dc793m@mail.gmail.com> Message-ID: ie.link(:id, "_editTemplate__matter_status_hiddenButton").click On 3/8/06, Paul Carvalho wrote: > > Regina sent me an email to let me know that the following code allowed her > to click one of the desired links: > > > ie.table(:index, 32)[1][2].link(:index, 2).click > > However, given the number of tables in the page, she was wondering if > there was an alternate way to click one of the links based on the anchor > id. It's a hidden JavaScript Link, so I don't know how to do this. Does > anyone have any suggestions? > > Here is the HTML code snippet again for the link she wants to click: > ---- > href="javascript:__doPostBack('_editTemplate$_matter$_status$hiddenButton','')"> > > > onclick="AddNewCode_42()">Add New Code > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060308/50e43ac7/attachment.html From chaya_b_s at yahoo.co.in Thu Mar 9 00:16:01 2006 From: chaya_b_s at yahoo.co.in (chaya shetty) Date: Thu, 9 Mar 2006 05:16:01 +0000 (GMT) Subject: [Wtr-general] Access Denied Frames Message-ID: <20060309051601.36288.qmail@web8910.mail.in.yahoo.com> Hi, In our company we recently installed Firewall for security reasons and we had to bypass the proxy server. After this when we ran our watir test cases it throwed out the following exception: c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1740:in `method_missing': document (WIN32OLERuntimeError) OLE error code:80070005 in Access is denied. HRESULT error code:0x80020009 Exception occurred. from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1740:in `document' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1701:in `initialize' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:222:in `new' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:222:in `frame' When we removed the proxy server, the watir test cases ran well without giving any error. Why is this happening? Is there a way by which the watir test cases can be run without any errors even after bypassing the proxy server? --------------------------------- Jiyo cricket on Yahoo! India cricket Yahoo! Messenger Mobile Stay in touch with your buddies all the time. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060309/431de995/attachment.html From bret at pettichord.com Thu Mar 9 00:37:08 2006 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 8 Mar 2006 23:37:08 -0600 Subject: [Wtr-general] Random Watir script failures In-Reply-To: <37c405480603081215n156e60e2r@mail.gmail.com> References: <37c405480603081215n156e60e2r@mail.gmail.com> Message-ID: On 3/8/06, Paul Carvalho wrote: > > Hi there, I have noticed that a script of mine seems to be having random > failures that I can't explain. > > I am running Watir 1.4.1 on Ruby 184-16 on Windows XP Pro SP2. > > The script I'm working with walks through our site map - it enters a page, > gets the page size, download time, leaves and then moves onto the next > page. The script is correct. > > However, at random intervals when I run it, a button or link will fail to > get recognised and the script just stops. I've been trying to get around > the failures by adding a "sleep 1" (or 2 or 3 seconds) whenever it fails. > This latest run, it wasn't even a button that the script failed on -- it was > a + operator! Okay, I know that I don't know any workaround for that one! > > Here was the error output: > ---- > 1) Error: > test_d_Reports(TC_LD_site_map_walkthru): > NoMethodError: undefined method `+' for nil:NilClass > LD_site_map_walkthrough.rb:461:in `test_d_Reports' > ---- > > and line 461 is: > > row_data[42] = row_data[42] + ',' + > $ie.frame('MainWindow').html.length.to_s + ',' + $ie.down_load_time.to_s > > I know there's nothing wrong with this line because it looks relatively > identical to a billion other lines in the script - just the array number > changes. And it works when I run it the next time. I think the problem is that row_data[42] is nil. Are you sure it is initialized? The error message means that you are using "+" on something that is nil. It is not a Watir error. Other errors I've seen include: > ---- > 1) Error: > test_d_Reports(TC_LD_site_map_walkthru): > NoMethodError: undefined method `outerHTML' for nil:NilClass > ---- > (for the same 'row_data' kind of line as above, just elsewhere in the > script.) It helps if you can provide a stack so we know what line the problem is occuring. Different Watir objects use this call (outerHTML), but you haven't provided enough information to know which one is failing. > and errors like the following when I remove strategically inserted "sleep" > lines: > ---- > 1) Error: > test_d_Reports(TC_LD_site_map_walkthru): > NoMethodError: undefined method `all' for nil:NilClass > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:754:in `getContainerContents' > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:778:in `getObject' > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3063:in `initialize' > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:304:in `button' > LD_site_map_walkthrough.rb:312:in `test_d_Reports' > ---- > > for line 312: $ie.frame('MainWindow').button(:name, /CancelButton/).click > > Is this something that there is a workaround for? If I had to guess, it > looks like the script is trying to continue before the page itself finishes > loading in IE. This error means there is no MainWindow frame. Watir should probably be raising an UnknownFrameException here instead. You can probably work around this problem thus: if $ie.frame("MainWindow").exists? $ie.frame("MainWindow").button(:name, /CancelButton/).click else raise, "MainWindow frame not found" end But in the end this only changes how the error message looks. The problem is that the frame isn't there. Please let us know if any of these suggestions help. Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060308/9a4f6e46/attachment.html From ralickolli at kCura.com Thu Mar 9 09:53:01 2006 From: ralickolli at kCura.com (Rexhina Alickolli) Date: Thu, 9 Mar 2006 08:53:01 -0600 Subject: [Wtr-general] how to distinguish among links with the same name Message-ID: I do use this for the buttons, but it does not work for the links whose id is in the anchor form: Add New Code Thanks _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Wednesday, March 08, 2006 11:16 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] how to distinguish among links with the same name ie.link(:id, "_editTemplate__matter_status_hiddenButton").click On 3/8/06, Paul Carvalho wrote: Regina sent me an email to let me know that the following code allowed her to click one of the desired links: > ie.table(:index, 32)[1][2].link(:index, 2).click However, given the number of tables in the page, she was wondering if there was an alternate way to click one of the links based on the anchor id. It's a hidden JavaScript Link, so I don't know how to do this. Does anyone have any suggestions? Here is the HTML code snippet again for the link she wants to click: ---- Add New Code -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 268.2.0/276 - Release Date: 3/7/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 268.2.0/276 - Release Date: 3/7/2006 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060309/278f64da/attachment.html From tester.paul at gmail.com Thu Mar 9 10:58:41 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Thu, 9 Mar 2006 10:58:41 -0500 Subject: [Wtr-general] Random Watir script failures In-Reply-To: References: <37c405480603081215n156e60e2r@mail.gmail.com> Message-ID: <37c405480603090758r41d5c773h@mail.gmail.com> On 09/03/06, Bret Pettichord wrote: > > > I think the problem is that row_data[42] is nil. Are you sure it is > initialized? The error message means that you are using "+" on something > that is nil. It is not a Watir error. > Hee hee, oops. I removed two pages from the array and missed updating these lines. It was the last two pages in the script that kept failing. Makes sense. Now I know what that error means. Thanks. Other errors I've seen include: > > ---- > > 1) Error: > > test_d_Reports(TC_LD_site_map_walkthru): > > NoMethodError: undefined method `outerHTML' for nil:NilClass > > ---- > > (for the same 'row_data' kind of line as above, just elsewhere in the > > script.) > > > It helps if you can provide a stack so we know what line the problem is > occuring. Different Watir objects use this call (outerHTML), but you haven't > provided enough information to know which one is failing. > > > > and errors like the following when I remove strategically inserted > > "sleep" lines: > > ---- > > 1) Error: > > test_d_Reports(TC_LD_site_map_walkthru): > > NoMethodError: undefined method `all' for nil:NilClass > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:754:in > > `getContainerContents' > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:778:in `getObject' > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3063:in `initialize' > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:304:in `button' > > LD_site_map_walkthrough.rb:312:in `test_d_Reports' > > ---- > > > > for line 312: $ie.frame('MainWindow').button(:name, > > /CancelButton/).click > > > > Is this something that there is a workaround for? If I had to guess, it > > looks like the script is trying to continue before the page itself finishes > > loading in IE. > > > This error means there is no MainWindow frame. Watir should probably be > raising an UnknownFrameException here instead. > > You can probably work around this problem thus: > > if $ie.frame("MainWindow").exists? > $ie.frame("MainWindow").button(:name, /CancelButton/).click > else > raise, "MainWindow frame not found" > end > > But in the end this only changes how the error message looks. The problem > is that the frame isn't there. > > I think that both of these errors are manifestations of the same problem - the frame isn't there, yet. I asked our developers about this and it turns out that with Dot-Net, IE sometimes reports that it is done before it is finished drawing all the frames. (I had even reported some bugs in our app about this a while ago - the delay can be up to several, noticeable seconds sometimes.) So on some pages, it makes sense that I have to insert a sleep/wait command of some sort. I'll finish the script and then think about refactoring it to include checks like the one above to make it smarter about waiting for certain pages to appear before proceeding. That really helped. Thanks. Paul. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060309/32d418e1/attachment.html From angrez at gmail.com Thu Mar 9 11:48:24 2006 From: angrez at gmail.com (Angrez Singh) Date: Thu, 9 Mar 2006 22:18:24 +0530 Subject: [Wtr-general] xpath support doesn't work for me In-Reply-To: References: Message-ID: Hi Chris, I am still not able to locate the cause of error. Lets make sure that these things are in place: 1. You should have new 'elements.rb' & 'functions.rb' copied from tar ball to [ruby installation directory]/lib/ruby/1.8/rexml. This is the correct folder where you should have elements.rb & functions.rb. 2. You have latest version of watir installed using install.rb not by using watir_installer.exe Let me know if you still face any problem. Regards, Angrez On 3/9/06, Brown, Christopher < christopher_brown at engin.com.au> wrote: > > Hi Angrez, > > I haven't been able to spend time on this recently. As you can see from > the details below my setup should be okay > > C:\>ruby -vrrexml/rexml -e 'p REXML::Version, PLATFORM' > ruby 1.8.2 (2004-12-25) [i386-mswin32] > "3.1.2.1" > "i386-mswin32" > > Given the following error > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1922:in `elements_by_xpath': > undefined method `elements' for nil:NilClass (NoMethodError) > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1912:in > `element_by_xpath' > from G:/workspace/web_pages/trial.rb:3 > > This is what's in watir.rb at line 1922 > > def elements_by_xpath(xpath) > doc = rexml_document_object() > modifiedXpath = "" > selectedElements = Array.new > => doc.elements.each(xpath) do |element| <= line 1922 > modifiedXpath = element.xpath > temp = element_by_absolute_xpath(modifiedXpath) > selectedElements << temp if temp != nil > end > > element.rb seems to be the missing link. I've tried this file in several > locations > > C:\ruby\lib\ruby\1.8\rexml > C:\ruby\lib\ruby\1.8\watir\rexml C:\ruby\lib\ruby\site_ruby\1.8\rexml > C:\ruby\lib\ruby\site_ruby\1.8\watir\rexml > > I've read the code and see where rexml/document gets loaded. If > create_rexml_document_object does its thing then how can the elements be > missing? > > Any ideas? > > Regards > > Chris > > p.s. > > I've just tried v 1.8.4 of Ruby and get the following > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1755: [BUG] Segmentation fault > ruby 1.8.4 (2005-12-24) [i386-mswin32] > > > abnormal program termination > > > -----Original Message----- > *From: * Angrez Singh [mailto:angrez at gmail.com] > *Sent:* Friday, March 03, 2006 4:30 PM > *To:* wtr-general at rubyforge.org > *Subject:* Re: [Wtr-general] xpath support doesn't work for me > > Hi Chris, > > What version of Ruby are you running? > > > > I am using Ruby 1.8.2 and latest watir tar ball. Also REXML version is " > 3.1.2.1". You can check this by using following command: > > ruby -vrrexml/rexml -e 'p REXML::Version, PLATFORM' > > But still I have no clue of what is going wrong? > > Regards, > Angrez > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060309/112be847/attachment.html From tester.paul at gmail.com Thu Mar 9 11:57:47 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Thu, 9 Mar 2006 11:57:47 -0500 Subject: [Wtr-general] Negative Loop Regular Expression checks Message-ID: <37c405480603090857q72a9281fi@mail.gmail.com> Hello all, I'm having difficulty programming a negative loop. That is, while something isn't there, then do this. Here's an example: I've scripted Watir to randomly select a report, and then when the report comes up it checks the month of the report. If it's not the month I want, I have the script click the "Previous" link until it finds the report I want. Here's the code : ---- while $ie.frame('MainWindow').span(:id, /ReportingPeriodValueLabel/).text != 'Dec 2005' $ie.frame('MainWindow').link(:text, 'Previous').click end ---- This works - most of the time. The problem is that if the report happens to come up on particular page, the label value = 'Jan - Dec 2005' and the check above *always* fails. I tried to change the comparison value to a regex but that didn't work. That is, "while blahblah.text != /Dec 2005/" will be True even when the label = 'Dec 2005'! (That's no good. I expect it to be false and break out of the loop.) I think I'm missing something in the use of regular expressions that I just don't know yet. (I'm just starting to learn about them - they are *way* handy.) Paul. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060309/a9e59d23/attachment.html From PGarigue at EXTEND.COM Thu Mar 9 12:32:31 2006 From: PGarigue at EXTEND.COM (Pierre Garigue) Date: Thu, 9 Mar 2006 12:32:31 -0500 Subject: [Wtr-general] Negative Loop Regular Expression checks Message-ID: try using an 'until' with the use of =~ /regex/, it will make it clearer also you may want add more detail to the regex such as it case sensitive? /i makes the regex match case insensitive. -Pierre Garigue -----Original Message----- From: Paul Carvalho [mailto:tester.paul at gmail.com] Sent: Thursday, March 09, 2006 11:58 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Negative Loop Regular Expression checks Hello all, I'm having difficulty programming a negative loop. That is, while something isn't there, then do this. Here's an example: I've scripted Watir to randomly select a report, and then when the report comes up it checks the month of the report. If it's not the month I want, I have the script click the "Previous" link until it finds the report I want. Here's the code : ---- while $ie.frame('MainWindow').span(:id, /ReportingPeriodValueLabel/).text != 'Dec 2005' $ie.frame('MainWindow').link(:text, 'Previous').click end ---- This works - most of the time. The problem is that if the report happens to come up on particular page, the label value = 'Jan - Dec 2005' and the check above *always* fails. I tried to change the comparison value to a regex but that didn't work. That is, "while blahblah.text != /Dec 2005/" will be True even when the label = 'Dec 2005'! (That's no good. I expect it to be false and break out of the loop.) I think I'm missing something in the use of regular expressions that I just don't know yet. (I'm just starting to learn about them - they are *way* handy.) Paul. From tester.paul at gmail.com Thu Mar 9 13:05:05 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Thu, 9 Mar 2006 13:05:05 -0500 Subject: [Wtr-general] Negative Loop Regular Expression checks In-Reply-To: References: Message-ID: <37c405480603091005k3a0d6e23x@mail.gmail.com> On 09/03/06, Pierre Garigue wrote: > > try using an 'until' with the use of =~ /regex/, it will make it clearer > > also you may want add more detail to the regex such as it case sensitive? > /i makes the regex match case insensitive. > > Aha! "until"! That is new to my vocabulary. That works perfectly, thanks! I really love Ruby and Watir! I can't believe how readable and easy the scripts are. It's almost like pseudo-code, that's how easy it is. Cheers. Paul. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060309/32c60ae4/attachment.html From PGarigue at EXTEND.COM Thu Mar 9 13:24:28 2006 From: PGarigue at EXTEND.COM (Pierre Garigue) Date: Thu, 9 Mar 2006 13:24:28 -0500 Subject: [Wtr-general] Negative Loop Regular Expression checks Message-ID: a good little read (part one and two) http://code.box.sk/newsread.php?newsid=948 Ten Reasons Ruby Is Cool Cheers Pierre Garigue http://www.trug.ca/Main_Page -----Original Message----- From: Paul Carvalho [mailto:tester.paul at gmail.com] Sent: Thursday, March 09, 2006 1:05 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Negative Loop Regular Expression checks On 09/03/06, Pierre Garigue wrote: try using an 'until' with the use of =~ /regex/, it will make it clearer also you may want add more detail to the regex such as it case sensitive? /i makes the regex match case insensitive. Aha! "until"! That is new to my vocabulary. That works perfectly, thanks! I really love Ruby and Watir! I can't believe how readable and easy the scripts are. It's almost like pseudo-code, that's how easy it is. Cheers. Paul. From bret at pettichord.com Thu Mar 9 13:47:04 2006 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 9 Mar 2006 12:47:04 -0600 Subject: [Wtr-general] xpath support doesn't work for me In-Reply-To: References: Message-ID: On 3/9/06, Angrez Singh wrote: > > 2. You have latest version of watir installed using install.rb not by > using watir_installer.exe > Actually install.rb is broken in HEAD. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060309/0dc8ef59/attachment.html From bret at pettichord.com Thu Mar 9 13:52:32 2006 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 9 Mar 2006 12:52:32 -0600 Subject: [Wtr-general] Random Watir script failures In-Reply-To: <37c405480603090758r41d5c773h@mail.gmail.com> References: <37c405480603081215n156e60e2r@mail.gmail.com> <37c405480603090758r41d5c773h@mail.gmail.com> Message-ID: On 3/9/06, Paul Carvalho wrote: > > I asked our developers about this and it turns out that with Dot-Net, IE > sometimes reports that it is done before it is finished drawing all the > frames. (I had even reported some bugs in our app about this a while ago - > the delay can be up to several, noticeable seconds sometimes.) > > So on some pages, it makes sense that I have to insert a sleep/wait > command of some sort. I'll finish the script and then think about > refactoring it to include checks like the one above to make it smarter about > waiting for certain pages to appear before proceeding. > By design, Watir should dependably wait for frames to load even when IE incorrectly reports that it is done. Clearly that isn't working correctly for your application. If you can give more specific information about your app and how you're able to workaround the issue, that would be helpful. Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060309/254f6100/attachment.html From roy_sin at yahoo.com Thu Mar 9 14:54:14 2006 From: roy_sin at yahoo.com (Roy Sin) Date: Thu, 9 Mar 2006 11:54:14 -0800 (PST) Subject: [Wtr-general] how to handle latency Message-ID: <20060309195414.488.qmail@web52915.mail.yahoo.com> Hi Wtr, I have some automated test cases that do a time range selection and run a report, then do some validation. Click the Back browser button, do another time range selection and run the report, then do validation again... in between those set of test if my time range span (let's say) over a month it does take a bit longer to bring up the report. I added sleep but depending on the network traffic at that particular time, my script will fail on that validation. Any idea on how to make the script wait until the report is generated and validated before proceeding to the next def. thanks __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From christopher.mcmahon at gmail.com Thu Mar 9 15:04:33 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 9 Mar 2006 14:04:33 -0600 Subject: [Wtr-general] how to handle latency In-Reply-To: <20060309195414.488.qmail@web52915.mail.yahoo.com> References: <20060309195414.488.qmail@web52915.mail.yahoo.com> Message-ID: <72799cd70603091204n2bd66a10n4d4b14fb15dce80@mail.gmail.com> On 3/9/06, Roy Sin wrote: > Any idea on how to make the script wait until the report is > generated and validated before proceeding to the next def. def sleep_for_file Find.find("C:/ReportDir") do |f| if f =~ /txt/ #DO STUFF break else sleep 2 end #if end #do end #def From mb at michaelbolton.net Thu Mar 9 18:11:38 2006 From: mb at michaelbolton.net (Michael Bolton) Date: Thu, 9 Mar 2006 18:11:38 -0500 Subject: [Wtr-general] how to handle latency In-Reply-To: <72799cd70603091204n2bd66a10n4d4b14fb15dce80@mail.gmail.com> Message-ID: <01d201c643ce$d5bdd670$05000100@Koko> You might want to consider it a reasonable thing to wrap the snippet below into the File class, so: class File [the snippet] end and put it into a utility module such that you can require and use it generally. ---Michael B. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: March 9, 2006 3:05 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] how to handle latency On 3/9/06, Roy Sin wrote: > Any idea on how to make the script wait until the report is > generated and validated before proceeding to the next def. def sleep_for_file Find.find("C:/ReportDir") do |f| if f =~ /txt/ #DO STUFF break else sleep 2 end #if end #do end #def _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From mb at michaelbolton.net Thu Mar 9 18:21:17 2006 From: mb at michaelbolton.net (Michael Bolton) Date: Thu, 9 Mar 2006 18:21:17 -0500 Subject: [Wtr-general] Access Denied Frames In-Reply-To: <20060309051601.36288.qmail@web8910.mail.in.yahoo.com> Message-ID: <01e901c643d0$3c367be0$05000100@Koko> I don't understand the report. Does the script fail when you try to access the page via a proxy server, or when you try to access a page without the proxy server? What happens if you try to access the same page manually using the proxy server? What happens if you try to access the same page manually without using the proxy server? ---Michael B. _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of chaya shetty Sent: March 9, 2006 12:16 AM To: wtr Subject: [Wtr-general] Access Denied Frames Hi, In our company we recently installed Firewall for security reasons and we had to bypass the proxy server. After this when we ran our watir test cases it throwed out the following exception: c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1740:in `method_missing': document (WIN32OLERuntimeError) OLE error code:80070005 in Access is denied. HRESULT error code:0x80020009 Exception occurred. from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1740:in `document' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1701:in `initialize' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:222:in `new' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:222:in `frame' When we removed the proxy server, the watir test cases ran well without giving any error. Why is this happening? Is there a way by which the watir test cases can ! be run without any errors even after bypassing the proxy server? _____ Jiyo cricket on Yahoo! India cricket Yahoo! Messenger Mobile Stay in touch with your buddies all the time. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060309/462a7eb3/attachment.html From techpra at yahoo.co.in Thu Mar 9 23:53:09 2006 From: techpra at yahoo.co.in (Prashant Jha(PJ)) Date: Fri, 10 Mar 2006 04:53:09 +0000 (GMT) Subject: [Wtr-general] Wtr-general Digest, Vol 28, Issue 15 In-Reply-To: Message-ID: <20060310045309.18924.qmail@web8711.mail.in.yahoo.com> hi, I want to install Rails but it give an error. I have already installed ruby with rubygems. wtr-general-request at rubyforge.org wrote: Send Wtr-general mailing list submissions to wtr-general at rubyforge.org To subscribe or unsubscribe via the World Wide Web, visit http://rubyforge.org/mailman/listinfo/wtr-general or, via email, send a message with subject or body 'help' to wtr-general-request at rubyforge.org You can reach the person managing the list at wtr-general-owner at rubyforge.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Wtr-general digest..." Today's Topics: 1. Re: xpath support doesn't work for me (Angrez Singh) 2. Negative Loop Regular Expression checks (Paul Carvalho) 3. Re: Negative Loop Regular Expression checks (Pierre Garigue) 4. Re: Negative Loop Regular Expression checks (Paul Carvalho) 5. Re: Negative Loop Regular Expression checks (Pierre Garigue) 6. Re: xpath support doesn't work for me (Bret Pettichord) ---------------------------------------------------------------------- Message: 1 Date: Thu, 9 Mar 2006 22:18:24 +0530 From: "Angrez Singh" Subject: Re: [Wtr-general] xpath support doesn't work for me To: wtr-general at rubyforge.org Message-ID: Content-Type: text/plain; charset="iso-8859-1" Hi Chris, I am still not able to locate the cause of error. Lets make sure that these things are in place: 1. You should have new 'elements.rb' & 'functions.rb' copied from tar ball to [ruby installation directory]/lib/ruby/1.8/rexml. This is the correct folder where you should have elements.rb & functions.rb. 2. You have latest version of watir installed using install.rb not by using watir_installer.exe Let me know if you still face any problem. Regards, Angrez On 3/9/06, Brown, Christopher < christopher_brown at engin.com.au> wrote: > > Hi Angrez, > > I haven't been able to spend time on this recently. As you can see from > the details below my setup should be okay > > C:\>ruby -vrrexml/rexml -e 'p REXML::Version, PLATFORM' > ruby 1.8.2 (2004-12-25) [i386-mswin32] > "3.1.2.1" > "i386-mswin32" > > Given the following error > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1922:in `elements_by_xpath': > undefined method `elements' for nil:NilClass (NoMethodError) > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1912:in > `element_by_xpath' > from G:/workspace/web_pages/trial.rb:3 > > This is what's in watir.rb at line 1922 > > def elements_by_xpath(xpath) > doc = rexml_document_object() > modifiedXpath = "" > selectedElements = Array.new > => doc.elements.each(xpath) do |element| <= line 1922 > modifiedXpath = element.xpath > temp = element_by_absolute_xpath(modifiedXpath) > selectedElements << temp if temp != nil > end > > element.rb seems to be the missing link. I've tried this file in several > locations > > C:\ruby\lib\ruby\1.8\rexml > C:\ruby\lib\ruby\1.8\watir\rexml C:\ruby\lib\ruby\site_ruby\1.8\rexml > C:\ruby\lib\ruby\site_ruby\1.8\watir\rexml > > I've read the code and see where rexml/document gets loaded. If > create_rexml_document_object does its thing then how can the elements be > missing? > > Any ideas? > > Regards > > Chris > > p.s. > > I've just tried v 1.8.4 of Ruby and get the following > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1755: [BUG] Segmentation fault > ruby 1.8.4 (2005-12-24) [i386-mswin32] > > > abnormal program termination > > > -----Original Message----- > *From: * Angrez Singh [mailto:angrez at gmail.com] > *Sent:* Friday, March 03, 2006 4:30 PM > *To:* wtr-general at rubyforge.org > *Subject:* Re: [Wtr-general] xpath support doesn't work for me > > Hi Chris, > > What version of Ruby are you running? > > > > I am using Ruby 1.8.2 and latest watir tar ball. Also REXML version is " > 3.1.2.1". You can check this by using following command: > > ruby -vrrexml/rexml -e 'p REXML::Version, PLATFORM' > > But still I have no clue of what is going wrong? > > Regards, > Angrez > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060309/112be847/attachment-0001.htm ------------------------------ Message: 2 Date: Thu, 9 Mar 2006 11:57:47 -0500 From: "Paul Carvalho" Subject: [Wtr-general] Negative Loop Regular Expression checks To: wtr-general at rubyforge.org Message-ID: <37c405480603090857q72a9281fi at mail.gmail.com> Content-Type: text/plain; charset="utf-8" Hello all, I'm having difficulty programming a negative loop. That is, while something isn't there, then do this. Here's an example: I've scripted Watir to randomly select a report, and then when the report comes up it checks the month of the report. If it's not the month I want, I have the script click the "Previous" link until it finds the report I want. Here's the code : ---- while $ie.frame('MainWindow').span(:id, /ReportingPeriodValueLabel/).text != 'Dec 2005' $ie.frame('MainWindow').link(:text, 'Previous').click end ---- This works - most of the time. The problem is that if the report happens to come up on particular page, the label value = 'Jan - Dec 2005' and the check above *always* fails. I tried to change the comparison value to a regex but that didn't work. That is, "while blahblah.text != /Dec 2005/" will be True even when the label = 'Dec 2005'! (That's no good. I expect it to be false and break out of the loop.) I think I'm missing something in the use of regular expressions that I just don't know yet. (I'm just starting to learn about them - they are *way* handy.) Paul. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060309/a9e59d23/attachment-0001.htm ------------------------------ Message: 3 Date: Thu, 9 Mar 2006 12:32:31 -0500 From: "Pierre Garigue" Subject: Re: [Wtr-general] Negative Loop Regular Expression checks To: Message-ID: Content-Type: text/plain; charset="UTF-8" try using an 'until' with the use of =~ /regex/, it will make it clearer also you may want add more detail to the regex such as it case sensitive? /i makes the regex match case insensitive. -Pierre Garigue -----Original Message----- From: Paul Carvalho [mailto:tester.paul at gmail.com] Sent: Thursday, March 09, 2006 11:58 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Negative Loop Regular Expression checks Hello all, I'm having difficulty programming a negative loop. That is, while something isn't there, then do this. Here's an example: I've scripted Watir to randomly select a report, and then when the report comes up it checks the month of the report. If it's not the month I want, I have the script click the "Previous" link until it finds the report I want. Here's the code : ---- while $ie.frame('MainWindow').span(:id, /ReportingPeriodValueLabel/).text != 'Dec 2005' $ie.frame('MainWindow').link(:text, 'Previous').click end ---- This works - most of the time. The problem is that if the report happens to come up on particular page, the label value = 'Jan - Dec 2005' and the check above *always* fails. I tried to change the comparison value to a regex but that didn't work. That is, "while blahblah.text != /Dec 2005/" will be True even when the label = 'Dec 2005'! (That's no good. I expect it to be false and break out of the loop.) I think I'm missing something in the use of regular expressions that I just don't know yet. (I'm just starting to learn about them - they are *way* handy.) Paul. ------------------------------ Message: 4 Date: Thu, 9 Mar 2006 13:05:05 -0500 From: "Paul Carvalho" Subject: Re: [Wtr-general] Negative Loop Regular Expression checks To: wtr-general at rubyforge.org Message-ID: <37c405480603091005k3a0d6e23x at mail.gmail.com> Content-Type: text/plain; charset="utf-8" On 09/03/06, Pierre Garigue wrote: > > try using an 'until' with the use of =~ /regex/, it will make it clearer > > also you may want add more detail to the regex such as it case sensitive? > /i makes the regex match case insensitive. > > Aha! "until"! That is new to my vocabulary. That works perfectly, thanks! I really love Ruby and Watir! I can't believe how readable and easy the scripts are. It's almost like pseudo-code, that's how easy it is. Cheers. Paul. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060309/32c60ae4/attachment-0001.htm ------------------------------ Message: 5 Date: Thu, 9 Mar 2006 13:24:28 -0500 From: "Pierre Garigue" Subject: Re: [Wtr-general] Negative Loop Regular Expression checks To: Message-ID: Content-Type: text/plain; charset="UTF-8" a good little read (part one and two) http://code.box.sk/newsread.php?newsid=948 Ten Reasons Ruby Is Cool Cheers Pierre Garigue http://www.trug.ca/Main_Page -----Original Message----- From: Paul Carvalho [mailto:tester.paul at gmail.com] Sent: Thursday, March 09, 2006 1:05 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Negative Loop Regular Expression checks On 09/03/06, Pierre Garigue wrote: try using an 'until' with the use of =~ /regex/, it will make it clearer also you may want add more detail to the regex such as it case sensitive? /i makes the regex match case insensitive. Aha! "until"! That is new to my vocabulary. That works perfectly, thanks! I really love Ruby and Watir! I can't believe how readable and easy the scripts are. It's almost like pseudo-code, that's how easy it is. Cheers. Paul. ------------------------------ Message: 6 Date: Thu, 9 Mar 2006 12:47:04 -0600 From: "Bret Pettichord" Subject: Re: [Wtr-general] xpath support doesn't work for me To: wtr-general at rubyforge.org Message-ID: Content-Type: text/plain; charset="iso-8859-1" On 3/9/06, Angrez Singh wrote: > > 2. You have latest version of watir installed using install.rb not by > using watir_installer.exe > Actually install.rb is broken in HEAD. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060309/0dc8ef59/attachment.htm ------------------------------ _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general End of Wtr-general Digest, Vol 28, Issue 15 ******************************************* --------------------------------- Jiyo cricket on Yahoo! India cricket Yahoo! Messenger Mobile Stay in touch with your buddies all the time. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060310/63af9e30/attachment.html From tanushree.bhoi at gmail.com Fri Mar 10 01:26:28 2006 From: tanushree.bhoi at gmail.com (Tanushree Bhoi) Date: Fri, 10 Mar 2006 11:56:28 +0530 Subject: [Wtr-general] Submission Message-ID: <74eaa5760603092226m166d5728x7606203e0879c220@mail.gmail.com> Here i am sending my submission.I want to be a part of watir mailing list. -- Thanks & Regards Tanushree Bhoi Software Engineer applabs Technologies Mobile : 09440082708 e-mail : tanushree.bhoi at applabs.com :tanushree.bhoi at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060310/443cbd98/attachment.html From tanushree.bhoi at gmail.com Fri Mar 10 01:28:41 2006 From: tanushree.bhoi at gmail.com (Tanushree Bhoi) Date: Fri, 10 Mar 2006 11:58:41 +0530 Subject: [Wtr-general] Handling with forms in watir. Message-ID: <74eaa5760603092228x1b61304doccf3347f08828918@mail.gmail.com> Hi I am using Watir Web Recorder version 0.4 to record click events of our own site. For recording, web recorder is doing its job properly but watir is not properly playing it back. does It has limitation of identify forms.For playing it back i need to hand edit the code. Here are some codes-: Code i recorded in google site using webrecorder ## Generated by Watir WebRecorder 0.4 ## Recorded on Monday, March 6, 2006, at 11:13 AM #includes require 'watir' # the controller require 'watir/WindowHelper' include Watir #test::unit includes require 'test/unit' class TC_recorded < Test::Unit::TestCase def test_1 $IE0 = IE.new $IE0.goto("http://www.google.co.in/") $IE0.wait $IE0.form( :name, "f").text_field( :name, "q").set("ruby") $IE0.form( :name, "f").button( :name, "btnG").click $IE0.wait $IE0.link( :text, "Ruby Home Page").click $IE0.wait $IE0.wait $IE0.close end end Then it is the hand edit code-: ## Generated by Watir WebRecorder 0.4 ## Recorded on Friday, March 3, 2006, at 04:15 PM #includes require 'watir' # the controller require 'watir/WindowHelper' include Watir #test::unit includes require 'test/unit' class TC_recorded < Test::Unit::TestCase def test_1 $IE0 = IE.new $IE0.goto("http://www.google.co.in/") $IE0.wait $IE0.text_field( :name, "q").set("ruby") $IE0.button( :name, "btnG").click $IE0.wait $IE0.link( :text, "Ruby Home Page").click $IE0.wait $IE0.wait end end This code working perfectly and playing it back properly. Again when i am trying this to my site like-: Recorded from web recorder-: ## Generated by Watir WebRecorder 0.4 ## Recorded on Wednesday, March 8, 2006, at 11:00 AM #includes require 'watir' # the controller require 'watir/WindowHelper' include Watir #test::unit includes require 'test/unit' class TC_recorded < Test::Unit::TestCase def test_1 $IE0 = IE.new $IE0.goto("mysite") $IE0.wait $IE0.link( :text, "Nebo GA 1.0 ").click $IE0.wait $IE0.link( :text, "Nebo Login ").click $IE0.form( :name, "loginForm").text_field( :name, "login").set("nbdemo") $IE0.form( :name, "loginForm").text_field( :name, "passwd").set("nbdemo") $IE0.form( :name, "loginForm").button( :name, "log").click $IE0.wait end end Hand edit code-: ## Generated by Watir WebRecorder 0.4 ## Recorded on Wednesday, March 8, 2006, at 11:00 AM #includes require 'watir' # the controller require 'watir/WindowHelper' include Watir #test::unit includes require 'test/unit' class TC_recorded < Test::Unit::TestCase def test_1 $IE0 = IE.new $IE0.goto("mysite") $IE0.wait $IE0.link( :text, "Nebo GA 1.0 ").click $IE0.wait $IE0.link( :text, "Nebo Login ").click $IE0.text_field( :name, "login").set("nbdemo") $IE0.text_field( :name, "passwd").set("nbdemo") $IE0.button( :name, "log").click $IE0.wait end end When I run this code from command promt it is giving error like "Unable to locate object using text and Nebo GA 1.0". I am using Watir-1.4.1 and Ruby 1.8.4.Can you please help. I am new to work with watir.My application deals with lots of form .Watir is not identifying forms.Please help me why it is giving problems handling with forms or i am doing anything wrong.Please help. Regards Tanu -- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060310/d5e23973/attachment.html From zeljko.filipin at gmail.com Fri Mar 10 04:29:39 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 10 Mar 2006 10:29:39 +0100 Subject: [Wtr-general] Handling with forms in watir. In-Reply-To: <74eaa5760603092228x1b61304doccf3347f08828918@mail.gmail.com> References: <74eaa5760603092228x1b61304doccf3347f08828918@mail.gmail.com> Message-ID: It would help if you provided html snippet of your page, but Watirtells you that it can not find object with text "Nebo GA 1.0". This isstrange, because you are trying to click link with text "Nebo GA 1.0 "(notice extra space at the end). Change $IE0.link( :text, "Nebo GA 1.0 ").click to $IE0.link( :text, "Nebo GA 1.0").click (remove extra space at the end) and it should work (but I can not beshure until I can see your html). You could have the same problem with this line. $IE0.link( :text, "Nebo Login ").click I hope this helps, and I could help you more if you send html snippetof your page. From zeljko.filipin at gmail.com Fri Mar 10 04:36:08 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 10 Mar 2006 10:36:08 +0100 Subject: [Wtr-general] Wtr-general Digest, Vol 28, Issue 15 In-Reply-To: <20060310045309.18924.qmail@web8711.mail.in.yahoo.com> References: <20060310045309.18924.qmail@web8711.mail.in.yahoo.com> Message-ID: Rails? Visit http://www.rubyonrails.org/. They have mailing list, butthis is the wrong one. Also, if you copy/paste your error somebodycould actually help you, I think they can not read minds (or is itjust me). :) If you want to install Watir, your error would really help. Do not thake this personally, but "Re: [Wtr-general] Wtr-generalDigest, Vol 28, Issue 15" is not a really good subject. Try somethinglike "I want to install Rails but it give an error". On 3/10/06, Prashant Jha(PJ) wrote:>> hi,>> I want to install Rails but it give an error. I have already installed ruby> with rubygems. From tanushree.bhoi at gmail.com Fri Mar 10 07:25:13 2006 From: tanushree.bhoi at gmail.com (Tanushree Bhoi) Date: Fri, 10 Mar 2006 17:55:13 +0530 Subject: [Wtr-general] Handling with form in watir Message-ID: <74eaa5760603100425h7c4e3c8kbc096c618ea8bb8c@mail.gmail.com> Hi Zeljko, Yeah thats true.Because of that extra space watir was not able to recognize the text.I was recording the events using watir webrecorder0.4.It was recording one extra space for text.Here i am sending code of javascript file. Can i automate it using formname. Here is the script recorded by webrecorder. ## Generated by Watir WebRecorder 0.4 ## Recorded on Wednesday, March 8, 2006, at 11:00 AM #includes require 'watir' # the controller require 'watir/WindowHelper' include Watir #test::unit includes require 'test/unit' class TC_recorded < Test::Unit::TestCase def test_1 $IE0 = IE.new $IE0.goto("http://nebo.applabs.net/") $IE0.wait $IE0.link( :text, "Nebo GA 1.0 ").click $IE0.wait $IE0.link( :text, "Nebo Login ").click $IE0.form( :name, "loginForm").text_field( :name, "login").set("nbdemo") $IE0.form( :name, "loginForm").text_field( :name, "passwd").set("nbdemo") $IE0.form( :name, "loginForm").button( :name, "log").click $IE0.wait end end Here is the javascript file code: var str_loginForm = "" + "" + "
" + "Please enter the login-id and password to access the system" + "

" + "" + "" + "" + /*""+*/ "" + "
" + "Login Id" + "" + "" + "(min 6 chars)" + "
" + "Password" + "" + "" + "(min 6 chars)" + "
"+ ""+ "Remember Me"+ "
" + " " + "" + "" + "
" + "
" + "
" ; Thanks in advance. Tanu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060310/0e964278/attachment.html From angrez at gmail.com Fri Mar 10 13:10:13 2006 From: angrez at gmail.com (Angrez Singh) Date: Fri, 10 Mar 2006 23:40:13 +0530 Subject: [Wtr-general] FireWatir release alpha v1.0 Message-ID: Hi Bret, I have committed the code for 'FireWatir' in branch named 'firefox'. Now we can run WATiR scripts against 'Firefox' browser. Anyone who wants to have a quick preview can download the code from this branch. For using the version follow the instructions provided in the 'installation doc' provided. The current version is very slow as compared to IE. But if you use xpath for selecting the elements it will be much faster but will still be slow with respect to IE. This version contains following things: 1. Support for following elements: Buttons, checkbox, filefield, hidden elements, images, links, radiobuttons, selectbox, textbox. 2. Support for Window pop-ups. 3. Support for JavaScript pop-ups. This is using AutoIt3 but needs to be more better that what it is right now. There may be problems with this. Future plans: 1. Provide support for other elements. 2. Provide good support for handling JavaScript pop-ups. 3. Make it more faster. In case you face any problems please feel free to contact me. Regards, Angrez -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060310/e242659f/attachment.html From dave.liebreich at gmail.com Fri Mar 10 13:34:32 2006 From: dave.liebreich at gmail.com (Dave Liebreich) Date: Fri, 10 Mar 2006 10:34:32 -0800 Subject: [Wtr-general] FireWatir release alpha v1.0 In-Reply-To: References: Message-ID: > I have committed the code for 'FireWatir' in branch named 'firefox'. > Now we can run WATiR scripts against 'Firefox' browser. Yay! Congrats Angrez on getting this to work. Angrez used JSSH as a remote-control mechanism for Firefox. For those interested in porting Watir to other platforms, I've built jssh install packages (.xpi files) for Mac (ppc) and Linux and they are available here: http://people.mozilla.com/~davel/jssh/ -Dave (aka Dave Liebreich, Test Architect, Mozilla Corporation, davel at mozilla.com) From bret at pettichord.com Fri Mar 10 14:15:58 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 10 Mar 2006 13:15:58 -0600 Subject: [Wtr-general] Problem enumerating forms In-Reply-To: <01f901c63eec$4eef7e00$6901a8c0@Koko> References: <01f901c63eec$4eef7e00$6901a8c0@Koko> Message-ID: On 3/3/06, Michael Bolton wrote: > > I'm working out of Head, rather than out of 1.4, but when I try > > $IE0.form.methods > > I get this: > > ArgumentError: wrong number of arguments (0 for 1) > from (irb):10:in `form' > from (irb):10 > from ?:0 > > which gives me a clue. I try this: > > $IE0.form('f').methods > > ...and I get a list of methods back. > > So it seems as though "form" is either misdocumented as being something > that takes two parameters (as SupportsSubElements does), or is buggy such > that it should be taking two parameters and is only taking one, and that one > is the name. I note in the source code comments that the intention appears > to be to support :index , :name, :id, :method, :action, and :xpath. > Like several other methods, IE#form can take one or two parameters. If only one is given, then it is presumed to be a :name. I don't encourage this usage, but it is supported. Regardless, this is unrelated to Marcus' problem. Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060310/fdc821a0/attachment.html From thealy at midicorp.com Fri Mar 10 14:24:07 2006 From: thealy at midicorp.com (Thomas Healy) Date: Fri, 10 Mar 2006 14:24:07 -0500 Subject: [Wtr-general] FireWatir release alpha v1.0 Message-ID: <8EA615B25AB5F849BF0193B80E6D4C49800E73@MIDISERVER> I'm wondering what versions of Firefox this is designed to work with? Thanks Thom ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Angrez Singh Sent: Friday, March 10, 2006 1:10 PM To: Bret Pettichord; wtr-general at rubyforge.org Subject: [Wtr-general] FireWatir release alpha v1.0 Hi Bret, I have committed the code for 'FireWatir' in branch named 'firefox'. Now we can run WATiR scripts against 'Firefox' browser. Anyone who wants to have a quick preview can download the code from this branch. For using the version follow the instructions provided in the 'installation doc' provided. The current version is very slow as compared to IE. But if you use xpath for selecting the elements it will be much faster but will still be slow with respect to IE. This version contains following things: 1. Support for following elements: Buttons, checkbox, filefield, hidden elements, images, links, radiobuttons, selectbox, textbox. 2. Support for Window pop-ups. 3. Support for JavaScript pop-ups. This is using AutoIt3 but needs to be more better that what it is right now. There may be problems with this. Future plans: 1. Provide support for other elements. 2. Provide good support for handling JavaScript pop-ups. 3. Make it more faster. In case you face any problems please feel free to contact me. Regards, Angrez -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060310/73faf00a/attachment.html From bret at pettichord.com Fri Mar 10 14:30:37 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 10 Mar 2006 13:30:37 -0600 Subject: [Wtr-general] Problem enumerating forms In-Reply-To: References: Message-ID: On 3/3/06, Marcus Tettmar wrote: > > Hi, > > Why does this fail: > > $IE0.goto("http://www.google.com/") > $IE0.form( :name, "f").text_field( :name, "q").set("ruby") > $IE0.form( :name, "f").button( :name, "btnG").click > > This fails with: > > WIN32OLERuntimeError: Failed to get IEnum Interface > HRESULT error code:0x80020003 > Member not found. > I ran your script with both Watir 1.4.1 and Watir 1.5.0.928 (aka HEAD). It worked for me in both cases. You didn't indicate which version of Watir you are using. If you give the full error message, i would be able to speculate as to the possible cause. Specifically i'd need to know the line number of the error and preferably the full stack. Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060310/81499c97/attachment.html From kalen.howell at gmail.com Fri Mar 10 15:14:47 2006 From: kalen.howell at gmail.com (Kalen Howell) Date: Fri, 10 Mar 2006 15:14:47 -0500 Subject: [Wtr-general] Ruby-Watir test case organization (dir hierarchy) Message-ID: <4b616f150603101214x55abfe15hdb6bcb4c018d798b@mail.gmail.com> Greetings All: First off; I am fairly new to *Ruby* and Watir (3 - 4 months), and I really excited about its potential. I am also very new to the user group. I have done some research, but I am unable to find the answers to my problem, so I apologize if this is a redundent topic. Now, lets get to the point.... I am using *Ruby* and Watir to build set of tests for a product. As my tests are increasing in number I need to begin building a directory hierarchy that will help organize and easily extend my tests. Below is an example of the hierarchy I am experimenting with (with no success). -- Product -- common -- includes include.rb -> contains: references to lib files ie: require '../product page A/lib/prod_pageA.rb' --> {See below} require '../product page B/lib/prod_pageB.rb' -- product page A -- lib prod_pageA.rb -- *test* tc_prod_pageA.rb {require '../../includes/include'} -- product page B -- lib prod_pageB.rb -- *test* tc_prod_pageB.rb {require '../../includes/include.rb} or {require '../lib/prod_pageB'} -- release_night_tests -- lib -- *test* test_relnight_A.rb {require '../../includes/include'} -- composit_tests -- lib -- *test* The intent is to reference all of the product page libraries (product_page_name/lib) from the include.rb. That way I can create composit tests as well as release night tests, smoke tests and others (those end-to-end tests that utilize multiple pages to verify certain features of the product), by simply including the include.rb file alone. This layout is not working for me, so I thought I would query the group to see where I am going wrong or a better approach to organize my tests. Thanks, -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060310/57c5022f/attachment.html From kalen.howell at gmail.com Fri Mar 10 15:15:54 2006 From: kalen.howell at gmail.com (Kalen Howell) Date: Fri, 10 Mar 2006 15:15:54 -0500 Subject: [Wtr-general] Implementing concurrent Unit Test Cases in Ruby and Watir Message-ID: <4b616f150603101215m6a80a85cg27095a5a6cf0608c@mail.gmail.com> Can anyone point me to an example of executing a test case in multiple threads concurrently? There are 10 instances of the application under tests running on 4 different boxes. I am attempting to build a release night test that will use the url and verify what instance of the web app we have accessed (by checking a developer inserted tag in the source). If the instance of the app has not been encountered a series of tests will be executed, other wise the script will log off, close the browser, launch a new browser and try again. I would like this process to run from multiple threads concurrently in hopes of hitting all app servers quicker. This test has been simulated manually, but I am not sure how to implement in Ruby and Watir. Any suggestions would be greatly appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060310/b6f0cac1/attachment.html From bret at pettichord.com Fri Mar 10 15:51:16 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 10 Mar 2006 14:51:16 -0600 Subject: [Wtr-general] Handling with forms in watir. In-Reply-To: <74eaa5760603092228x1b61304doccf3347f08828918@mail.gmail.com> References: <74eaa5760603092228x1b61304doccf3347f08828918@mail.gmail.com> Message-ID: On 3/10/06, Tanushree Bhoi wrote: > > Hi > I am using Watir Web Recorder version 0.4 to record click events of our > own site. > For recording, web recorder is doing its job properly but watir is not > properly playing it back. > does It has limitation of identify forms.For playing it back i need to > hand edit the code. > Here are some codes-: > Code i recorded in google site using webrecorder > > ## Generated by Watir WebRecorder 0.4 > ## Recorded on Monday, March 6, 2006, at 11:13 AM > #includes > require 'watir' # the controller > require 'watir/WindowHelper' > include Watir > > #test::unit includes > require 'test/unit' > > class TC_recorded < Test::Unit::TestCase > > def test_1 > $IE0 = IE.new > > $IE0.goto("http://www.google.co.in/") > $IE0.wait > > $IE0.form( :name, "f").text_field( :name, "q").set("ruby") > > $IE0.form( :name, "f").button( :name, "btnG").click > > $IE0.wait > > $IE0.link( :text, "Ruby Home Page").click > > $IE0.wait > > $IE0.wait > > $IE0.close > > end > end > I was able to reproduce this error using both Watir 1.4.1 and Watir 1.5.0.928. I committed a fix (and a unit test) for this problem. The fix is contained in revision 935. Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060310/d06f83f2/attachment.html From gregory.mcshea at oracle.com Fri Mar 10 17:57:12 2006 From: gregory.mcshea at oracle.com (Greg McShea) Date: Fri, 10 Mar 2006 14:57:12 -0800 Subject: [Wtr-general] Help with Watir/XPath Message-ID: <20060310145712490.00000007232@gmcshea-pc2> Hi, I've reviewed all the XPath related posts here and am still unable to get a simple statement with xpath expression working. Here is what I have done to setup my installation: 1. Installed ruby 1.8.2 2. Installed watir 1.4.1 using windows installer 3. Installed REXML 3.1.3 3. Downloaded the latest tarball 4. Copied TARBALL_HOME\watir\watir.rb to C:\ruby\lib\ruby\site_ruby\1.8 5. Copied TARBALL_HOME\watir\watir folder to C:\ruby\lib\ruby\site_ruby\1.8 6. Copied TARBALL_HOME\watir\doc, examples, and unittests folders to c:\watir 7. Copied TARBALL_HOME\watir\watir\rexml\elements.rb and functions.rb to C:\ruby\lib\ruby\site_ruby\1.8\rexml and C:\ruby\lib\ruby\1.8\rexml Here is a snippet of the source I am testing:
Using "ie.button(:value, 'Delete').click" works fine. The watir Xpath statements I have tried are: ie.button(:xpath, "//button[text()='Delete']").click ie.button(:xpath, "//button[@value='Delete']").click These both fail with the error: The undefined method `root_node' for ... :REXML::Document c:/ruby/lib/ruby/site_ruby/1.8/rexml/xpath_parser.rb:154:in `expr' I tried running the xpath_tests unit test but I ran into the problem described here:http://www.mail-archive.com/wtr-general%40rubyforge.org/msg02864.html My application has many instances where there is no unique way to identify elements so using Xpath is a must for me. Any help in getting this working is much appreciated. Thanks, Greg -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060310/9e18c1cf/attachment.html From gregory.mcshea at oracle.com Fri Mar 10 18:30:19 2006 From: gregory.mcshea at oracle.com (Greg McShea) Date: Fri, 10 Mar 2006 15:30:19 -0800 Subject: [Wtr-general] Help with Watir/XPath In-Reply-To: <20060310145712490.00000007232@gmcshea-pc2> Message-ID: <20060310153019928.00000007232@gmcshea-pc2> Review older messages again I see that the elements.rb and functions.rb are only supposed to be copied to C:\ruby\lib\ruby\1.8\rexml. I have done this and restored the original versions of the files to C:\ruby\lib\ruby\site_ruby\1.8\rexml. Now when I run my script I get a different error: Unable to locate object, using xpath and //button[@value='Delete'] c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2102:in `assert_exists' -----Original Message----- From: Greg McShea [mailto:gregory.mcshea at oracle.com] Sent: Friday, March 10, 2006 2:57 PM To: wtr-general at rubyforge.org Cc: gregory.mcshea at oracle.com Subject: Help with Watir/XPath Hi, I've reviewed all the XPath related posts here and am still unable to get a simple statement with xpath expression working. Here is what I have done to setup my installation: 1. Installed ruby 1.8.2 2. Installed watir 1.4.1 using windows installer 3. Installed REXML 3.1.3 3. Downloaded the latest tarball 4. Copied TARBALL_HOME\watir\watir.rb to C:\ruby\lib\ruby\site_ruby\1.8 5. Copied TARBALL_HOME\watir\watir folder to C:\ruby\lib\ruby\site_ruby\1.8 6. Copied TARBALL_HOME\watir\doc, examples, and unittests folders to c:\watir 7. Copied TARBALL_HOME\watir\watir\rexml\elements.rb and functions.rb to C:\ruby\lib\ruby\site_ruby\1.8\rexml and C:\ruby\lib\ruby\1.8\rexml Here is a snippet of the source I am testing:
Using "ie.button(:value, 'Delete').click" works fine. The watir Xpath statements I have tried are: ie.button(:xpath, "//button[text()='Delete']").click ie.button(:xpath, "//button[@value='Delete']").click These both fail with the error: The undefined method `root_node' for ... :REXML::Document c:/ruby/lib/ruby/site_ruby/1.8/rexml/xpath_parser.rb:154:in `expr' I tried running the xpath_tests unit test but I ran into the problem described here:http://www.mail-archive.com/wtr-general%40rubyforge.org/msg02864.html My application has many instances where there is no unique way to identify elements so using Xpath is a must for me. Any help in getting this working is much appreciated. Thanks, Greg -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060310/fad3c641/attachment.html From bret at pettichord.com Fri Mar 10 18:46:21 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 10 Mar 2006 17:46:21 -0600 Subject: [Wtr-general] Moving to OpenQA.org Message-ID: We are in the process of moving many of the services that have been provided on RubyForge.org over to OpenQA.org. You'll be seeing more and more signs of this, so i thought i would send out a quick status report. If you have questions or want to help, please speak up. Repository The source repository has been moved to Subversion (SVN) on OpenQA. You can see it here: http://www.openqa.org/watir/cvs.action All of the existing committers who have requested commit access to the new repo have been given it. Previously CVS automatically sent email to an email list whenever a change was made. We don't have that option with SVN right now, but instead there is an RSS feed which does about the same thing: http://svn.openqa.org/fisheye/rsscfg/watir/ This is a good time for me to talk about a couple of things we get with Subversion. 1. Every commit gets a global commit number, which effectively amounts to a tag. What this means is that we can now reliably identify any development version that you pull out of SVN (in case we have trouble reproducing a bug or whatever). This in fact will be reported in Watir::IE::VERSION, e.g.: 1.5.0.926. The last number is the SVN revision number, uniquely identifying a snapshot of the entire code base (not just the watir.rb file). 2. File history is retained when files are renamed or moved. This didn't happen with CVS and so we were reluctant to rename files or reorganize the code. Now there is little reason not to do that. BTW, there has been some confusion about what it means to "check out" code from CVS or SVN. Unlike other source control systems, neither CVS nor SVN allow or support locking files. So anyone can check out files. But these systems have checks in place that check to see if anyone has modified any of the files you are checking in since you checked them out. If so, you will have to merge your changes with theirs. Wiki We are migrating the wiki to the Confluence wiki on OpenQA. I've started the process, but there is still plenty of work to be done. http://wiki.openqa.org/display/WTR The main advantages of Confluence over what we've used before is that it allows attachments so it will be easy to set up contributions pages and allow people with small libraries or example code or whatever to easily share it with others. We will probably be moving some of the unsupported contributions that we've previously packaged with Watir to the wiki. (So that only supported code will be contained in our library). Any Watir users can have access to this wiki. Unlike past wiki's, you do need an account first. (This should keep the wiki spammers away.) Tracking I've just started to set up the new bug tracking system. This is Jira, which is really good. The main problem with the old tracker at RubyForge was that you couldn't reclassify bugs as features etc. Jira lets you mix them all together in a single system. You can check this out here. http://jira.openqa.org/browse/WTR?report=com.atlassian.jira.plugin.system.project:roadmap-panel Another good thing about Jira is that it allows people to vote on the features and fixes that they want most. If there is a bug that you want fixed, feel free to put it in Jira. Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060310/8eb4a923/attachment.html From sergio.pinon at us.g4s.com Fri Mar 10 18:53:25 2006 From: sergio.pinon at us.g4s.com (Sergio Pinon) Date: Fri, 10 Mar 2006 15:53:25 -0800 Subject: [Wtr-general] Moving to OpenQA.org Message-ID: <6554B86C58B86F43B66363ED5CF6ED0501112270@bugatti.ems.securicor.com> I would be able to help. ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Friday, March 10, 2006 3:46 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Moving to OpenQA.org We are in the process of moving many of the services that have been provided on RubyForge.org over to OpenQA.org. You'll be seeing more and more signs of this, so i thought i would send out a quick status report. If you have questions or want to help, please speak up. Repository The source repository has been moved to Subversion (SVN) on OpenQA. You can see it here: http://www.openqa.org/watir/cvs.action All of the existing committers who have requested commit access to the new repo have been given it. Previously CVS automatically sent email to an email list whenever a change was made. We don't have that option with SVN right now, but instead there is an RSS feed which does about the same thing: http://svn.openqa.org/fisheye/rsscfg/watir/ This is a good time for me to talk about a couple of things we get with Subversion. 1. Every commit gets a global commit number, which effectively amounts to a tag. What this means is that we can now reliably identify any development version that you pull out of SVN (in case we have trouble reproducing a bug or whatever). This in fact will be reported in Watir::IE::VERSION, e.g.: 1.5.0.926. The last number is the SVN revision number, uniquely identifying a snapshot of the entire code base (not just the watir.rb file). 2. File history is retained when files are renamed or moved. This didn't happen with CVS and so we were reluctant to rename files or reorganize the code. Now there is little reason not to do that. BTW, there has been some confusion about what it means to "check out" code from CVS or SVN. Unlike other source control systems, neither CVS nor SVN allow or support locking files. So anyone can check out files. But these systems have checks in place that check to see if anyone has modified any of the files you are checking in since you checked them out. If so, you will have to merge your changes with theirs. Wiki We are migrating the wiki to the Confluence wiki on OpenQA. I've started the process, but there is still plenty of work to be done. http://wiki.openqa.org/display/WTR The main advantages of Confluence over what we've used before is that it allows attachments so it will be easy to set up contributions pages and allow people with small libraries or example code or whatever to easily share it with others. We will probably be moving some of the unsupported contributions that we've previously packaged with Watir to the wiki. (So that only supported code will be contained in our library). Any Watir users can have access to this wiki. Unlike past wiki's, you do need an account first. (This should keep the wiki spammers away.) Tracking I've just started to set up the new bug tracking system. This is Jira, which is really good. The main problem with the old tracker at RubyForge was that you couldn't reclassify bugs as features etc. Jira lets you mix them all together in a single system. You can check this out here. http://jira.openqa.org/browse/WTR?report=com.atlassian.jira.plugin.syste m.project:roadmap-panel Another good thing about Jira is that it allows people to vote on the features and fixes that they want most. If there is a bug that you want fixed, feel free to put it in Jira. Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060310/755cea8d/attachment.html From bret at pettichord.com Fri Mar 10 23:56:40 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 10 Mar 2006 22:56:40 -0600 Subject: [Wtr-general] Moving to OpenQA.org In-Reply-To: <6554B86C58B86F43B66363ED5CF6ED0501112270@bugatti.ems.securicor.com> References: <6554B86C58B86F43B66363ED5CF6ED0501112270@bugatti.ems.securicor.com> Message-ID: On 3/10/06, Sergio Pinon wrote: > > I would be able to help. > Glad to hear it. Let us know what you want to help with. What can you do? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060310/6595705b/attachment.html From bret at pettichord.com Sat Mar 11 01:38:41 2006 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 11 Mar 2006 00:38:41 -0600 Subject: [Wtr-general] FAQ migrated Message-ID: The WATIR FAQ is now located here: http://wiki.openqa.org/display/WTR/FAQ Note that one of the new features of the new wiki (Confluence) is that you can directly link to anchors in a page. E.g. If someone asks about how to dismiss a security alert, we can direct them to http://wiki.openqa.org/display/WTR/FAQ#FAQ-securityalert and this will take them to the exact question. Cool huh? Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060311/40a7cb19/attachment.html From angrez at gmail.com Sat Mar 11 01:46:56 2006 From: angrez at gmail.com (Angrez Singh) Date: Sat, 11 Mar 2006 12:16:56 +0530 Subject: [Wtr-general] FireWatir release alpha v1.0 In-Reply-To: <8EA615B25AB5F849BF0193B80E6D4C49800E73@MIDISERVER> References: <8EA615B25AB5F849BF0193B80E6D4C49800E73@MIDISERVER> Message-ID: Hi, I'm wondering what versions of Firefox this is designed to work with?\ > > Sorry I forgot to mention the versions. I have tried it on Firefox 1.5 & 1.5.0.1. I am not sure if it works versions less than this. Regards, Angrez -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060311/83188c6b/attachment.html From angrez at gmail.com Sat Mar 11 01:52:41 2006 From: angrez at gmail.com (Angrez Singh) Date: Sat, 11 Mar 2006 12:22:41 +0530 Subject: [Wtr-general] Help with Watir/XPath In-Reply-To: <20060310153019928.00000007232@gmcshea-pc2> References: <20060310145712490.00000007232@gmcshea-pc2> <20060310153019928.00000007232@gmcshea-pc2> Message-ID: Hi, Try the following XPath: ie.button(:xpath, "//button[contains(.,'Delete')]") What I think wrong with you xpath is that you are trying to access button which has attribute called 'value' whose value is 'Delete'. But there is no button with attribute 'value'. Try the above XPath & let me know if it's not working. Regards, Angrez -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060311/89a82be0/attachment.html From bret at pettichord.com Sat Mar 11 02:06:10 2006 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 11 Mar 2006 01:06:10 -0600 Subject: [Wtr-general] FireWatir release alpha v1.0 In-Reply-To: References: <8EA615B25AB5F849BF0193B80E6D4C49800E73@MIDISERVER> Message-ID: Could you please add a page to our new wiki about the Firefox release with answers to questions like this? Bret On 3/11/06, Angrez Singh wrote: > > Hi, > > I'm wondering what versions of Firefox this is designed to work with?\ > > > > > Sorry I forgot to mention the versions. I have tried it on Firefox 1.5 & > 1.5.0.1. I am not sure if it works versions less than this. > > Regards, > Angrez > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060311/321ba4fe/attachment.html From angrez at gmail.com Sat Mar 11 02:24:57 2006 From: angrez at gmail.com (Angrez Singh) Date: Sat, 11 Mar 2006 12:54:57 +0530 Subject: [Wtr-general] FireWatir release alpha v1.0 In-Reply-To: References: <8EA615B25AB5F849BF0193B80E6D4C49800E73@MIDISERVER> Message-ID: Hi Bret, Could you please add a page to our new wiki about the Firefox release with > answers to questions like this? > ok.. Regards, Angrez -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060311/f01ee2f7/attachment.html From bret at pettichord.com Sat Mar 11 03:07:16 2006 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 11 Mar 2006 02:07:16 -0600 Subject: [Wtr-general] Tools Supporting Watir Message-ID: I just collected this information for the wiki. Feel free to update. http://wiki.openqa.org/display/WTR/Tools+Supporting+Watir AutAt AutAt is an Eclipse plugin, supporting test-driven development of web applications. It converts a visual representation of web tests into executable tests. Supports several test drivers. Watir support was added in February 2006. Open source. http://boss.bekk.no/boss/autat/ Watir WebRecorder WebRecorder is an action recorder for web applications. A version that creates Watir scripts was released in February 2006. A handy tool to help learn Watir. A horrible idea if you think this is going to allow you to create scripts without understanding the code. Free, but not open source. http://www.mjtnet.com/watir_webrecorder.htm WatirMaker WatirMaker is a prototype of an action recorder for Watir, written in C#. Public domain. http://www.hanselman.com/blog/WatirMakerVersion001Source.aspx WatirNUt WatirNUt is a utility that creates a portable, testable NUnit binary wrapper around watir test scripts and supporting files. This binary can easily be executed in NAnt's task, with aggregated results displayed in your web dashboard. WatirNUt gathers information about your test suites, including the files needed to support them, and uses this information to generate NUnit test fixtures to run your test scripts. Any number of scripts can be included, and any number of supporting files can be associated with each script. WatirNUt compiles the NUnit test fixtures under a single namespace provided by you, and embeds all the scripts and supporting files as resources. When you use any NUnit runner on the generated assembly, the Watir tests run and their results are fed and formatted back into NUnit for use in CruiseControl build reports or whatever you like. Source is not apparently available, although predecessor code is public. http://dustin.homestead.com/files/blogs/2006/03/new-version-of-watirnut-available.html -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060311/9d8caf94/attachment.html From sergio.pinon at us.g4s.com Sun Mar 12 01:07:51 2006 From: sergio.pinon at us.g4s.com (Sergio Pinon) Date: Sat, 11 Mar 2006 22:07:51 -0800 Subject: [Wtr-general] Moving to OpenQA.org Message-ID: <6554B86C58B86F43B66363ED5CF6ED052E6695@bugatti.ems.securicor.com> I don't know. What do you need help with? ________________________________ From: wtr-general-bounces at rubyforge.org on behalf of Bret Pettichord Sent: Fri 3/10/2006 8:56 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Moving to OpenQA.org On 3/10/06, Sergio Pinon wrote: I would be able to help. Glad to hear it. Let us know what you want to help with. What can you do? -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 3743 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20060311/05fbf6fd/attachment.bin From Mark_Cain at rl.gov Mon Mar 13 11:18:15 2006 From: Mark_Cain at rl.gov (Cain, Mark) Date: Mon, 13 Mar 2006 08:18:15 -0800 Subject: [Wtr-general] What is the trick to getting xpath to work. Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5A8@EX5V.rl.gov> I have been trying to get xpath to work in my scripts but have not been able to do so. I have the latest from trunk (Version "$Revision: 934 is what it says in the watir.rb file) and ruby 1.8.4-16 and whatever REXML comes with that. Here is the error I am getting: 1) Error: test0_originator(TC_PER): NoMethodError: undefined method `root_node' for ... :REXML::Document c:/ruby/lib/ruby/1.8/rexml/xpath_parser.rb:148:in `expr' c:/ruby/lib/ruby/1.8/rexml/xpath_parser.rb:125:in `match' c:/ruby/lib/ruby/1.8/rexml/xpath_parser.rb:56:in `parse' c:/ruby/lib/ruby/1.8/rexml/xpath.rb:53:in `each' c:/ruby/lib/ruby/1.8/rexml/element.rb:916:in `each' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1927:in `elements_by_xpath' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1917:in `element_by_xpath' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3255:in `locate' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2105:in `assert_exists' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3546:in `set' C:/watir_bonus/working/PER/tc_PER_Significant.rb:19:in `test0_originator' exit c:/ruby/lib/ruby/1.8/test/unit.rb:285:in `exit' c:/ruby/lib/ruby/1.8/test/unit.rb:285 C:/watir_bonus/working/PER/tc_PER_Significant.rb:15 Here is my test script: $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'C:\watir_bonus\unitTests\setup' class TC_xpath_test < Test::Unit::TestCase include Watir def gotoPopUpPage() $ie.goto("C:\\watir_bonus\\working\\test.html") $ie.set_fast_speed() end def test0_textfield $d = Time.now.strftime("%m/%d/%Y") gotoPopUpPage() $ie.text_field(:xpath , "//input[@name='beforetest']/").set("#{ $d }") end end Here is the test html: Test page for Text Fields These text fields are used to test :beforeText and :afterText
This Text After
This Text Before

Is there something I am missing? The xpath stuff runs in the unittests. ____________________ Mark L. Cain LMIT - E*STARS(r) ~ Lead Test Engineer 1981 Snyder, MSIN: G3-62, Richland, WA 99354 Mark_Cain at RL.gov 509.376.5458 "640 Kilobytes of computer memory ought to be enough for anybody." - Bill Gates, 1981 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060313/1718c034/attachment.html From philipreedtech at gmail.com Mon Mar 13 15:01:31 2006 From: philipreedtech at gmail.com (philip reed) Date: Mon, 13 Mar 2006 15:01:31 -0500 Subject: [Wtr-general] WindowLogonExample.rb - should it work for me? Message-ID: I'm having trouble getting WaTiR to interact with authentication dialogs or Javascript dialogs (i.e. "Are you sure?"-style messages). I've found that unittests/WindowLogonExample.rb also doesn't run for me, generating the following error on Windows XP sp 2 Home: C:\ruby\lib\ruby\gems\1.8\gems\watir-1.4.1\unittests>ruby WindowLogonExample.rb Loaded suite WindowLogonExample Started ./../watir/WindowHelper.rb:5:in `initialize': unknown OLE server: `AutoItX3.Cont rol' (WIN32OLERuntimeError) HRESULT error code:0x800401f3 Invalid class string from ./../watir/WindowHelper.rb:5:in `initialize ' from WindowLogonExtra.rb:6 . Finished in 333.296 seconds. 1 tests, 0 assertions, 0 failures, 0 errors (333.296 seconds was where I shut down MSIE manually; AFAICT the test would have hung indefinitely had I not done so.) My due diligence search of the archive found a bunch of references to this thread from August '05 that doesn't sound too certain that this test should be working now: http://rubyforge.org/pipermail/wtr-general/2005-August/002861.html I also found this thread from June that sounds like it was working then: http://rubyforge.org/pipermail/wtr-general/2005-June/002241.html My next step will be to take the latest CVS and see whether that works in my environment. Meanwhile, can someone please confirm that this *SHOULD* work on a normal Windows XP installation, i.e. that I'm not spending time to troubleshoot a test that's known to fail for whatever reason? Thanks, Philip -- Philip Reed, Developer Positronic Design http://www.positronicdesign.com From bret at pettichord.com Mon Mar 13 15:17:22 2006 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 13 Mar 2006 14:17:22 -0600 Subject: [Wtr-general] What is the trick to getting xpath to work. In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5A8@EX5V.rl.gov> References: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5A8@EX5V.rl.gov> Message-ID: Angrez and i are working on a simpler install process for enabling xpath support... stay tuned. Bret On 3/13/06, Cain, Mark wrote: > > I have been trying to get xpath to work in my scripts but have not been > able to do so. > > > > I have the latest from trunk (Version "$Revision: 934 is what it says in > the watir.rb file) and ruby 1.8.4-16 and whatever REXML comes with that. > > > > Here is the error I am getting: > > 1) Error: > > test0_originator(TC_PER): > > NoMethodError: undefined method `root_node' for ... > :REXML::Document > > c:/ruby/lib/ruby/1.8/rexml/xpath_parser.rb:148:in `expr' > > c:/ruby/lib/ruby/1.8/rexml/xpath_parser.rb:125:in `match' > > c:/ruby/lib/ruby/1.8/rexml/xpath_parser.rb:56:in `parse' > > c:/ruby/lib/ruby/1.8/rexml/xpath.rb:53:in `each' > > c:/ruby/lib/ruby/1.8/rexml/element.rb:916:in `each' > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1927:in `elements_by_xpath' > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1917:in `element_by_xpath' > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3255:in `locate' > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2105:in `assert_exists' > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3546:in `set' > > C:/watir_bonus/working/PER/tc_PER_Significant.rb:19:in > `test0_originator' > > exit > > c:/ruby/lib/ruby/1.8/test/unit.rb:285:in `exit' > > c:/ruby/lib/ruby/1.8/test/unit.rb:285 > > C:/watir_bonus/working/PER/tc_PER_Significant.rb:15 > > > > Here is my test script: > > $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == > __FILE__ > > require 'C:\watir_bonus\unitTests\setup' > > > > class TC_xpath_test < Test::Unit::TestCase > > include Watir > > > > def gotoPopUpPage() > > $ie.goto("C:\\watir_bonus\\working\\test.html") > > $ie.set_fast_speed() > > end > > > > def test0_textfield > > $d = Time.now.strftime("%m/%d/%Y") > > gotoPopUpPage() > > > > $ie.text_field(:xpath , "//input[@name='beforetest']/").set("#{ $d > }") > > end > > end > > > > Here is the test html: > > > > > > > > Test page for Text Fields > > > > > > > > These text fields are used to test :beforeText and :afterText > >
> > This Text > After > >
> > This Text Before > > > >
> >
> > > > > > > > > > > > Is there something I am missing? The xpath stuff runs in the unittests. > > ____________________ > *Mark L. Cain* > *LMIT - **E*****STARS*(r)* **~ **Lead Test Engineer* > *1981 Snyder, MSIN: G3-62, Richland, WA 99354** > Mark_Cain at RL.gov > 509.376.5458* > *"640 Kilobytes of computer memory ought to be enough for anybody."** - > Bill Gates, 1981 * > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060313/7eceef37/attachment.html From billagee at gmail.com Mon Mar 13 18:11:04 2006 From: billagee at gmail.com (Bill Agee) Date: Mon, 13 Mar 2006 15:11:04 -0800 Subject: [Wtr-general] WindowLogonExample.rb - should it work for me? In-Reply-To: References: Message-ID: <73e7817e0603131511l55526501n7eba8e06d8a42c58@mail.gmail.com> That particular unit test works fine for me on XP Pro SP2, however I installed Watir using the win32 .exe installer. From the look of things you installed with the .gem, I wager? It could be the autoit DLL is not registered on your system. Perhaps installing with the .gem doesn't handle that automagically in some (all?) cases? I've never used the Watir .gem so I can't say for sure. Try manually registering the autoit DLL using regsvr32, and then try the unit test again: regsvr32 \ruby\lib\ruby\site_ruby\1.8\watir\AutoItX3.dll Thanks Bill On 3/13/06, philip reed wrote: > I'm having trouble getting WaTiR to interact with authentication > dialogs or Javascript dialogs (i.e. "Are you sure?"-style messages). > I've found that unittests/WindowLogonExample.rb also doesn't run for > me, generating the following error on Windows XP sp 2 Home: > > C:\ruby\lib\ruby\gems\1.8\gems\watir-1.4.1\unittests>ruby WindowLogonExample.rb > Loaded suite WindowLogonExample > Started > ./../watir/WindowHelper.rb:5:in `initialize': unknown OLE server: `AutoItX3.Cont > rol' (WIN32OLERuntimeError) > HRESULT error code:0x800401f3 > Invalid class string from ./../watir/WindowHelper.rb:5:in `initialize > ' > from WindowLogonExtra.rb:6 > . > Finished in 333.296 seconds. > > 1 tests, 0 assertions, 0 failures, 0 errors > > > (333.296 seconds was where I shut down MSIE manually; AFAICT the test > would have hung indefinitely had I not done so.) > > My due diligence search of the archive found a bunch of references to > this thread from August '05 that doesn't sound too certain that this > test should be working now: > > http://rubyforge.org/pipermail/wtr-general/2005-August/002861.html > > I also found this thread from June that sounds like it was working then: > > http://rubyforge.org/pipermail/wtr-general/2005-June/002241.html > > > My next step will be to take the latest CVS and see whether that works > in my environment. Meanwhile, can someone please confirm that this > *SHOULD* work on a normal Windows XP installation, i.e. that I'm not > spending time to troubleshoot a test that's known to fail for whatever > reason? > > Thanks, > > Philip > > -- > Philip Reed, Developer > Positronic Design > http://www.positronicdesign.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From gregory.mcshea at oracle.com Mon Mar 13 20:24:37 2006 From: gregory.mcshea at oracle.com (Greg McShea) Date: Mon, 13 Mar 2006 17:24:37 -0800 Subject: [Wtr-general] Help with Watir/XPath Message-ID: <20060313172437865.00000010500@gmcshea-pc2> Thanks very much Angrez, that solved the problem. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060313/2643c29a/attachment.html From gregory.mcshea at oracle.com Mon Mar 13 20:36:01 2006 From: gregory.mcshea at oracle.com (Greg McShea) Date: Mon, 13 Mar 2006 17:36:01 -0800 Subject: [Wtr-general] Watir installation broken? Message-ID: <20060313173601381.00000010500@gmcshea-pc2> Hi, I seem to have "broken" Watir somehow. I have been happily building/testing evaluation scripts using Watir and have been able to run the examples and unit tests OK. When running a script today my app failed to load in the browser. I tried a few more times with the same result. Now I cannot get any scripts (which were all previously working) to load a page in the browser when launched with Watir. Everytime I launch a Watir script IE starts but the location does not load in the browser. This is even happening with the sample google test suite. After a couple minutes I get the "The page cannot be displayed" error in IE. If I then manually enter a URL in the same browser session I get the same result. However if I launch a new browser manually (not initiated by Watir) the same URL loads just fine. For some reason IE sessions launched by Watir cannot load an URLs. Any idea whats going on or how to fix this without complete reinstallation. BTW, ruby seems to be OK as I can still run the FreeRIDE. Thanks, Greg -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060313/534ad25e/attachment.html From bret at pettichord.com Mon Mar 13 21:30:37 2006 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 13 Mar 2006 20:30:37 -0600 Subject: [Wtr-general] Watir installation broken? In-Reply-To: <20060313173601381.00000010500@gmcshea-pc2> References: <20060313173601381.00000010500@gmcshea-pc2> Message-ID: What version are you running? Does rebooting your machine fix the problem? Can you run the scripts with the same version of the app that previously worked? Or does the problem only occur with the new version of the application? Bret On 3/13/06, Greg McShea wrote: > > Hi, > > I seem to have "broken" Watir somehow. I have been happily > building/testing evaluation scripts using Watir and have been able to run > the examples and unit tests OK. > > When running a script today my app failed to load in the browser. I tried > a few more times with the same result. Now I cannot get any scripts (which > were all previously working) to load a page in the browser when launched > with Watir. > > Everytime I launch a Watir script IE starts but the location does not load > in the browser. This is even happening with the sample google test > suite. After a couple minutes I get the "The page cannot be displayed" error > in IE. If I then manually enter a URL in the same browser session I get the > same result. However if I launch a new browser manually (not initiated by > Watir) the same URL loads just fine. For some reason IE sessions launched by > Watir cannot load an URLs. > > Any idea whats going on or how to fix this without complete > reinstallation. BTW, ruby seems to be OK as I can still run the FreeRIDE. > > Thanks, > Greg > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060313/27196e2c/attachment.html From gregory.mcshea at oracle.com Mon Mar 13 23:37:24 2006 From: gregory.mcshea at oracle.com (Greg McShea) Date: Mon, 13 Mar 2006 20:37:24 -0800 Subject: [Wtr-general] Watir installation broken? In-Reply-To: <20060313173601381.00000010500@gmcshea-pc2> Message-ID: <20060313203724972.00000003696@gmcshea-pc2> Brett, Rebooting the machine solved the problem. Thanks for the suggestion. I was reluctant to reboot at the time since I was several hours into a build. Thanks, Greg -----Original Message----- From: Greg McShea [mailto:gregory.mcshea at oracle.com] Sent: Monday, March 13, 2006 5:36 PM To: Wtr-general at rubyforge.org Cc: gregory.mcshea at oracle.com Subject: Watir installation broken? Hi, I seem to have "broken" Watir somehow. I have been happily building/testing evaluation scripts using Watir and have been able to run the examples and unit tests OK. When running a script today my app failed to load in the browser. I tried a few more times with the same result. Now I cannot get any scripts (which were all previously working) to load a page in the browser when launched with Watir. Everytime I launch a Watir script IE starts but the location does not load in the browser. This is even happening with the sample google test suite. After a couple minutes I get the "The page cannot be displayed" error in IE. If I then manually enter a URL in the same browser session I get the same result. However if I launch a new browser manually (not initiated by Watir) the same URL loads just fine. For some reason IE sessions launched by Watir cannot load an URLs. Any idea whats going on or how to fix this without complete reinstallation. BTW, ruby seems to be OK as I can still run the FreeRIDE. Thanks, Greg -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060313/89da74c3/attachment.html From tanushree.bhoi at gmail.com Tue Mar 14 04:14:53 2006 From: tanushree.bhoi at gmail.com (Tanushree Bhoi) Date: Tue, 14 Mar 2006 14:44:53 +0530 Subject: [Wtr-general] Wtr-general mailing list Message-ID: <74eaa5760603140114t79fdf93frd7b98d5e93eca5f7@mail.gmail.com> Hi, Here I am sending my submission to Wtr-general mailing list. Thanks Tanushree -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060314/761ab2a4/attachment.html From tanushree.bhoi at gmail.com Tue Mar 14 04:21:26 2006 From: tanushree.bhoi at gmail.com (Tanushree Bhoi) Date: Tue, 14 Mar 2006 14:51:26 +0530 Subject: [Wtr-general] Watir-Examples Message-ID: <74eaa5760603140121s2b35309fwbab41e5234af2b54@mail.gmail.com> Hi, I am newly joined to this group.I am exploring about watir and ruby. I tried running the examples given with the Watir example folder but some scripts(google_maps.rb,mouse_over.rb,yahoocheck_test.rb) are giving errors.Please help. Thanks in Advance. Regards Tanushree -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060314/86e8d320/attachment.html From marcus.tettmar at gmail.com Tue Mar 14 08:08:29 2006 From: marcus.tettmar at gmail.com (Marcus Tettmar) Date: Tue, 14 Mar 2006 13:08:29 +0000 Subject: [Wtr-general] Problem enumerating forms In-Reply-To: References: Message-ID: Hi Bret, I'm running Watir 1.4.1. This is the full error message: d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:805:in `each': Failed to get IEnum Interface (WIN32OLERuntimeError) HRESULT error code:0x80020003 Member not found. from d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:805:in `getObject' from d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3225:in `initialize' from d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in `new' from d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in `text_field' from google.rb:6 Full script: require 'watir' include Watir $IE0 = IE.new $IE0.goto("http://www.google.com/") $IE0.form( :name, "f").text_field( :name, "q").set("ruby") $IE0.form( :name, "f").button( :name, "btnG").click Cheers, Marcus On 3/10/06, Bret Pettichord wrote: > > On 3/3/06, Marcus Tettmar wrote: > > > Hi, > > > > Why does this fail: > > > > $IE0.goto("http://www.google.com/") > > $IE0.form( :name, "f").text_field( :name, "q").set("ruby") > > $IE0.form( :name, "f").button( :name, "btnG").click > > > > This fails with: > > > > WIN32OLERuntimeError: Failed to get IEnum Interface > > HRESULT error code:0x80020003 > > Member not found. > > > > I ran your script with both Watir 1.4.1 and Watir 1.5.0.928 (aka HEAD). It > worked for me in both cases. You didn't indicate which version of Watir you > are using. > > If you give the full error message, i would be able to speculate as to the > possible cause. Specifically i'd need to know the line number of the error > and preferably the full stack. > > Bret > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -- Marcus Tettmar http://www.mjtnet.com/ Macro Scheduler & WebRecorder for Windows & Web Automation and Testing. WebRecorder for Ruby/Watir now available. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060314/6d4e6bd7/attachment.html From tester.paul at gmail.com Tue Mar 14 09:44:39 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Tue, 14 Mar 2006 09:44:39 -0500 Subject: [Wtr-general] Problem enumerating forms In-Reply-To: References: Message-ID: <37c405480603140644le061492n@mail.gmail.com> I opened up a command prompt and typed in "irb". I then typed in your lines below one at a time. Your "goto" line has an extra space at the beginning of the line. That is, please remove the space after the quote in: " http://www.google.com/" The rest of the lines worked as expected for me when I removed this extra space. Hope that helps. Paul. On 14/03/06, Marcus Tettmar wrote: [snip] Full script: > > require 'watir' > include Watir > > $IE0 = IE.new > $IE0.goto(" http://www.google.com/") > $IE0.form( :name, "f").text_field( :name, "q").set("ruby") > $IE0.form( :name, "f").button( :name, "btnG").click > > Cheers, > Marcus > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060314/0319d1ec/attachment.html From tester.paul at gmail.com Tue Mar 14 10:02:10 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Tue, 14 Mar 2006 10:02:10 -0500 Subject: [Wtr-general] Watir-Examples In-Reply-To: <74eaa5760603140121s2b35309fwbab41e5234af2b54@mail.gmail.com> References: <74eaa5760603140121s2b35309fwbab41e5234af2b54@mail.gmail.com> Message-ID: <37c405480603140702x2c043de7s@mail.gmail.com> On 14/03/06, Tanushree Bhoi wrote: > > Hi, > I am newly joined to this group.I am exploring about watir and ruby. > I tried running the examples given with the Watir example folder but some > scripts(google_maps.rb,mouse_over.rb,yahoocheck_test.rb) are > giving errors.Please help. > Hello Tanushree, I found problems with those examples too. I think they are fixed for the next release. In the meanwhile, I would recommend that you use these script errors as an opportunity to practice debugging your first Watir scripts. Here's some help to get you started. (1) Download SpySmith at http://www.qualityforge.com/spysmith/index.html - This page has all the instructions you need to use the tool. - Follow the "Download" link at the top of the page to download and install it. (2) google_maps.rb: - I found that the text input field has been renamed on the Google page since the script was first created. - Use SpySmith to find out the identifiers for the text input field. Change the text input box reference in the script to match. (There are a few ways you can do this.) (3) mouse_over.rb: - The link names have changed on some of the pages. (The year is different.) - Use SpySmith to identify the links that you think the script is trying to click. Update the link references in the script to match. (4) yahoocheck_test.rb: - This Yahoo! page is just completely gone. I can't think of any easy way to update this example. - I just left this example alone but I used it for reference when I actually had to check some checkboxes in one of my own scripts. Hope this helps. Good luck! Paul. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060314/8d440b1a/attachment.html From christopher.mcmahon at gmail.com Tue Mar 14 10:28:22 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 14 Mar 2006 09:28:22 -0600 Subject: [Wtr-general] Watir-Examples In-Reply-To: <37c405480603140702x2c043de7s@mail.gmail.com> References: <74eaa5760603140121s2b35309fwbab41e5234af2b54@mail.gmail.com> <37c405480603140702x2c043de7s@mail.gmail.com> Message-ID: <72799cd70603140728x3c9c178fu6ffb194b18b9219d@mail.gmail.com> > (2) google_maps.rb: > - I found that the text input field has been renamed on the Google page > since the script was first created. I've known this was broken for awhile, but haven't checked in a fix. Mea culpa, y'all. -Chris From tester.paul at gmail.com Tue Mar 14 10:48:51 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Tue, 14 Mar 2006 10:48:51 -0500 Subject: [Wtr-general] Watir-Examples In-Reply-To: <72799cd70603140728x3c9c178fu6ffb194b18b9219d@mail.gmail.com> References: <74eaa5760603140121s2b35309fwbab41e5234af2b54@mail.gmail.com> <37c405480603140702x2c043de7s@mail.gmail.com> <72799cd70603140728x3c9c178fu6ffb194b18b9219d@mail.gmail.com> Message-ID: <37c405480603140748r53cc42e2m@mail.gmail.com> On 14/03/06, Chris McMahon wrote: > > > (2) google_maps.rb: > > - I found that the text input field has been renamed on the Google page > > since the script was first created. > > I've known this was broken for awhile, but haven't checked in a fix. > Mea culpa, y'all. > Don't beat yourself up over it. Bret and I checked this script against the current development build a few weeks ago and it failed for a different reason. The script failed to get the HTML for the frame to compare the results. I *need* that feature working for one of my script suites to work correctly, so I'm still using 1.4.1 right now. I can't wait to get my hands on some of the feature improvements in the latest build, but I just can't work around the frame().html errors. No worries. I'm still on the learning curve and 1.4.1 is working great for me. Cheers! Paul. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060314/d89491c3/attachment.html From zeljko.filipin at gmail.com Tue Mar 14 11:27:01 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 14 Mar 2006 17:27:01 +0100 Subject: [Wtr-general] "Download tarball" at svn.openqa.org Message-ID: Is there something like "Download tarball" link at svn.openqa.org. Athttp://rubyforge.org/cgi-bin/viewcvs.cgi/?root=wtr I used it todownload all files from HEAD. I want to download firefox folder fromhttp://svn.openqa.org/fisheye/viewrep/watir/branches/firefox. Do Ihave to download file by file? Thanks, Zeljko From christopher.mcmahon at gmail.com Tue Mar 14 12:19:41 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 14 Mar 2006 11:19:41 -0600 Subject: [Wtr-general] Watir-Examples In-Reply-To: <37c405480603140748r53cc42e2m@mail.gmail.com> References: <74eaa5760603140121s2b35309fwbab41e5234af2b54@mail.gmail.com> <37c405480603140702x2c043de7s@mail.gmail.com> <72799cd70603140728x3c9c178fu6ffb194b18b9219d@mail.gmail.com> <37c405480603140748r53cc42e2m@mail.gmail.com> Message-ID: <72799cd70603140919u7ef18bc3jc7ecd0afbb1248a7@mail.gmail.com> On 3/14/06, Paul Carvalho wrote: > On 14/03/06, Chris McMahon wrote: > > > (2) google_maps.rb: > > > - I found that the text input field has been renamed on the Google page > > > since the script was first created. > > > > I've known this was broken for awhile, but haven't checked in a fix. > > Mea culpa, y'all. > > > > Don't beat yourself up over it. Bret and I checked this script against the > current development build a few weeks ago and it failed for a different > reason. The script failed to get the HTML for the frame to compare the > results. > > I *need* that feature working for one of my script suites to work correctly, > so I'm still using 1.4.1 right now. Yeah, I remember asking for that feature. :) -Chris From saudaziz at gmail.com Tue Mar 14 12:22:13 2006 From: saudaziz at gmail.com (saud aziz) Date: Tue, 14 Mar 2006 09:22:13 -0800 Subject: [Wtr-general] FireWatir release alpha v1.0 In-Reply-To: References: <8EA615B25AB5F849BF0193B80E6D4C49800E73@MIDISERVER> Message-ID: <24d0cb380603140922i1a23dfd3y5951fdbeb3245fb9@mail.gmail.com> Unlike firefox extensions, this xpi package doesn't open up as file dialog for me. On trying to install as xpi(.zip) file, it just opens up the file contents and starts displaying the binary data... I don't think the problem is at my end as i am perfectly able to install and use other .xpi extensions. Could you look into it please? Btw, i was trying on WinXP Firefox 1.5. Thanks. On 3/10/06, Angrez Singh wrote: > > Hi Bret, > > Could you please add a page to our new wiki about the Firefox release with > > answers to questions like this? > > > > ok.. > > Regards, > Angrez > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -- Saud Aziz "Whenever you find yourself on the side of the majority, it is time to pause and reflect." - Mark Twain -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060314/267c11f9/attachment.html From zeljko.filipin at gmail.com Tue Mar 14 12:38:20 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 14 Mar 2006 18:38:20 +0100 Subject: [Wtr-general] FireWatir release alpha v1.0 In-Reply-To: References: Message-ID: I have windows xp sp2, ruby 1.8.4, watir 1.4.1 (gem install), Firefox/1.5.0.1. >From Installation guide for FireWatir (Installation Guide.doc): 3. Take backup of following files inside "[ruby installationdirectory]/lib/ruby/site_ruby/1.8" folder, just to make sure you don'tmess up with earlier installation of watir:a. watir.rbb. watir/WindowHelper.rbc. watir/winClicker.rbd. watir/setFileDialog.rbe. watir/camel_case.rb These files are not there, but I made copy ofC:\ruby\lib\ruby\gems\1.8\gems\watir-1.4.1 4. Copy the code inside "code folder" to "[ruby installationdirectory]/lib/ruby/site_ruby/1.8".5. Copy "mozilla_unittests" folder to "[watir installation directory]" I copied all to C:\ruby\lib\ruby\gems\1.8\gems\watir-1.4.1 6. Run "mozilla_all_tests.rb" to run the unit test cases. Make sureyou have started Firefox manually as stated in step 2e. When I run mozilla_all_tests.rb I get this error message: C:\ruby\lib\ruby\gems\1.8\gems\watir-1.4.1\mozilla_unittests>mozilla_all_tests.rbC:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/mozilla_unittests/../watir.rb:483:in`initialize': LoadLibrary:C:\ruby\lib\ruby\gems\1.8\gems\watir-1.4.1\watir\IEDialog\Release\IEDialog.dll (RuntimeError) from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/mozilla_unittests/../watir.rb:483 from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in`require' from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/mozilla_unittests/../mozilla_unittests/setup.rb:4 from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in`require' from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/mozilla_unittests/mozilla_all_tests.rb:6 Am I doing something wrong? Zeljko From Mark_Cain at rl.gov Tue Mar 14 13:38:24 2006 From: Mark_Cain at rl.gov (Cain, Mark) Date: Tue, 14 Mar 2006 10:38:24 -0800 Subject: [Wtr-general] Watir is resetting one of my selectBox selections. Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5AD@EX5V.rl.gov> I am running into issue where during a test. I select a value from select box (1) and based on that value a span tag is shown with another select box (2) and I make a selection from that select box (2). A little further down in my script I do a search for a checklist and when the page refreshed the selection made from the select box (2), within the span tag, is being reset. Does anyone know why this is happening? This does not happen when I run the application manually. Ruby version 1.8.4_16 Watir revision 934 Here is my script: $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'C:\watir_bonus\unitTests\setup' class TC_ARM_Start < Test::Unit::TestCase include Watir def gotoPopUpPage() $ie.goto("c:\\arm\\main.html") end def test_main $d = Time.now.strftime("%m/%d/%Y") gotoPopUpPage() $ie.selectBox( :name, "Program").select("LMIT") $ie.span(:id, "TR2").selectBox( :name, "myProjectID2").select("MARK-TEST") #this one is being reset $ie.selectBox( :name, "DocumentMethod").select("by Checklist Number") $ie.textField( :name, "SearchString").set("TST") $ie.button("Search").click #when this happens the second selectbox is reset $ie.radio( :id, '72', 1).set $ie.button(/Start/i).click end end The web page is attached Thanks in advance, ____________________ Mark L. Cain LMIT - E*STARS(r) ~ Lead Test Engineer 1981 Snyder, MSIN: G3-62, Richland, WA 99354 Mark_Cain at RL.gov 509.376.5458 "640 Kilobytes of computer memory ought to be enough for anybody." - Bill Gates, 1981 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060314/3889e698/attachment.html -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060314/3889e698/attachment-0001.html From jkohl at telusplanet.net Tue Mar 14 14:01:16 2006 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Tue, 14 Mar 2006 11:01:16 -0800 Subject: [Wtr-general] Watir is resetting one of my selectBox selections. In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5AD@EX5V.rl.gov> References: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5AD@EX5V.rl.gov> Message-ID: <1142362876.441712fcce690@webmail.telus.net> Is there any JavaScript on that page? Thanks; -Jonathan Quoting "Cain, Mark" : > I am running into issue where during a test. I select a value from > select box (1) and based on that value a span tag is shown with another > select box (2) and I make a selection from that select box (2). A > little further down in my script I do a search for a checklist and when > the page refreshed the selection made from the select box (2), within > the span tag, is being reset. Does anyone know why this is happening? > This does not happen when I run the application manually. > > > > Ruby version 1.8.4_16 > > Watir revision 934 > > > > Here is my script: > > > > $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == > __FILE__ > > require 'C:\watir_bonus\unitTests\setup' > > > > class TC_ARM_Start < Test::Unit::TestCase > > include Watir > > > > def gotoPopUpPage() > > $ie.goto("c:\\arm\\main.html") > > end > > > > def test_main > > $d = Time.now.strftime("%m/%d/%Y") > > gotoPopUpPage() > > $ie.selectBox( :name, "Program").select("LMIT") > > $ie.span(:id, "TR2").selectBox( :name, > "myProjectID2").select("MARK-TEST") #this one is being reset > > $ie.selectBox( :name, "DocumentMethod").select("by Checklist > Number") > > $ie.textField( :name, "SearchString").set("TST") > > $ie.button("Search").click #when this happens the second > selectbox is reset > > > > $ie.radio( :id, '72', 1).set > > > > $ie.button(/Start/i).click > > end > > > > end > > > > The web page is attached > > > > Thanks in advance, > > ____________________ > Mark L. Cain > LMIT - E*STARS(r) ~ Lead Test Engineer > 1981 Snyder, MSIN: G3-62, Richland, WA 99354 > Mark_Cain at RL.gov > 509.376.5458 > "640 Kilobytes of computer memory ought to be enough for anybody." - > Bill Gates, 1981 > > > > From Mark_Cain at rl.gov Tue Mar 14 14:08:54 2006 From: Mark_Cain at rl.gov (Cain, Mark) Date: Tue, 14 Mar 2006 11:08:54 -0800 Subject: [Wtr-general] Watir is resetting one of my selectBox selections. Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5AE@EX5V.rl.gov> yes --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of jkohl at telusplanet.net Sent: Tuesday, March 14, 2006 11:01 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Watir is resetting one of my selectBox selections. Is there any JavaScript on that page? Thanks; -Jonathan Quoting "Cain, Mark" : > I am running into issue where during a test. I select a value from > select box (1) and based on that value a span tag is shown with another > select box (2) and I make a selection from that select box (2). A > little further down in my script I do a search for a checklist and when > the page refreshed the selection made from the select box (2), within > the span tag, is being reset. Does anyone know why this is happening? > This does not happen when I run the application manually. > > > > Ruby version 1.8.4_16 > > Watir revision 934 > > > > Here is my script: > > > > $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == > __FILE__ > > require 'C:\watir_bonus\unitTests\setup' > > > > class TC_ARM_Start < Test::Unit::TestCase > > include Watir > > > > def gotoPopUpPage() > > $ie.goto("c:\\arm\\main.html") > > end > > > > def test_main > > $d = Time.now.strftime("%m/%d/%Y") > > gotoPopUpPage() > > $ie.selectBox( :name, "Program").select("LMIT") > > $ie.span(:id, "TR2").selectBox( :name, > "myProjectID2").select("MARK-TEST") #this one is being reset > > $ie.selectBox( :name, "DocumentMethod").select("by Checklist > Number") > > $ie.textField( :name, "SearchString").set("TST") > > $ie.button("Search").click #when this happens the second > selectbox is reset > > > > $ie.radio( :id, '72', 1).set > > > > $ie.button(/Start/i).click > > end > > > > end > > > > The web page is attached > > > > Thanks in advance, > > ____________________ > Mark L. Cain > LMIT - E*STARS(r) ~ Lead Test Engineer > 1981 Snyder, MSIN: G3-62, Richland, WA 99354 > Mark_Cain at RL.gov > 509.376.5458 > "640 Kilobytes of computer memory ought to be enough for anybody." - > Bill Gates, 1981 > > > > _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From tester.paul at gmail.com Tue Mar 14 14:25:11 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Tue, 14 Mar 2006 14:25:11 -0500 Subject: [Wtr-general] Watir is resetting one of my selectBox selections. In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5AD@EX5V.rl.gov> References: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5AD@EX5V.rl.gov> Message-ID: <37c405480603141125m5b1a4dfan@mail.gmail.com> Hi Mark, I don't know what "Watir revision 934" is. I'm using 1.4.1 and I don't _seem_ to have a problem with the script. I did modify some of the lines, but perhaps the problem has something to do with the actual Search feature? Here are the lines I modified: $ie.selectBox( :name, "myProjectID2").select("MARK-TEST") # I took out the Span tag - it seems unnecessary $ie.radio( :id, '72').set # I don't know why you had an extra ", 1" in there. Instead of 'clicking' the buttons, I just flashed them. The first time I ran the script, it opened up a million windows all trying to connect to some server. If the page refresh after clicking the [Search] button is resetting a drop-down value, I can't imagine how Watir is doing that. I don't know if this helps, but it did _seem_ to work for me. Would it help if you tried inserting a 'sleep' delay after performing the Search? Paul. On 14/03/06, Cain, Mark wrote: > > I am running into issue where during a test. I select a value from > select box (1) and based on that value a span tag is shown with another > select box (2) and I make a selection from that select box (2). A little > further down in my script I do a search for a checklist and when the page > refreshed the selection made from the select box (2), within the span tag, > is being reset. Does anyone know why this is happening? This does not > happen when I run the application manually. > > Ruby version 1.8.4_16 > > Watir revision 934 > > Here is my script: > [snip] -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060314/b6b8b84a/attachment.html From kalen.howell at gmail.com Tue Mar 14 14:38:19 2006 From: kalen.howell at gmail.com (Kalen Howell) Date: Tue, 14 Mar 2006 14:38:19 -0500 Subject: [Wtr-general] Accessing HTML Source Message-ID: <4b616f150603141138h1f623b22vb8a790cacdfaca98@mail.gmail.com> Greetings All: I am wondering is there any way at all to programmatically (using Watir and Ruby) access the HTML Source (manually done by selecting View Source in IE)? A developer has embeded some information in the page source as an HTML comment for me to retrieve and use at runtime during the execution of my Ruby::Watir tests, but I cannot seem to find out how to retrieve this information. Thanks so much, Kalen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060314/f1d17031/attachment.html From zeljko.filipin at gmail.com Tue Mar 14 14:45:38 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 14 Mar 2006 20:45:38 +0100 Subject: [Wtr-general] Accessing HTML Source In-Reply-To: <4b616f150603141138h1f623b22vb8a790cacdfaca98@mail.gmail.com> References: <4b616f150603141138h1f623b22vb8a790cacdfaca98@mail.gmail.com> Message-ID: ie.html will give you source of page. On 3/14/06, Kalen Howell wrote:>> Greetings All:>> I am wondering is there any way at all to programmatically (using Watir and> Ruby) access the HTML Source (manually done by selecting View Source in IE)?>> A developer has embeded some information in the page source as an HTML> comment for me to retrieve and use at runtime during the execution of my> Ruby::Watir tests, but I cannot seem to find out how to retrieve this> information.>> Thanks so much,>>> Kalen> _______________________________________________> Wtr-general mailing list> Wtr-general at rubyforge.org> http://rubyforge.org/mailman/listinfo/wtr-general>> --http://www.testingreflections.com/blog/3071http://iskusivac.blog.hr/ From Mark_Cain at rl.gov Tue Mar 14 14:49:56 2006 From: Mark_Cain at rl.gov (Cain, Mark) Date: Tue, 14 Mar 2006 11:49:56 -0800 Subject: [Wtr-general] Watir is resetting one of my selectBox selections. Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5AF@EX5V.rl.gov> >>"Watir revision 934" Is the latest Watir from trunk . >>"$ie.selectBox( :name, "myProjectID2").select("MARK-TEST") # I took out the Span tag - it seems unnecessary" Sometimes it can't find the object without the span tag, and sometime it does. >>"$ie.radio( :id, '72').set # I don't know why you had an extra ", 1" in there." I think that was some legacy radio button code, you use to have to put a 1 to indicate you wanted it selected. The value in the select box >>"$ie.selectBox( :name, "myProjectID2").select("MARK-TEST") << still gets reset. I have never had this happen before. I have written many, many test cases for applications that have similar behavior and have never had a selected value get reset, but this one is. When I run the test case manually the value persists, but when I run it via my Watir script it gets reset. Don't know what the problem is I was hoping someone else had seen this before give me a fix/workaround. FYI I get the same behavior in 1.4.1 too. --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Carvalho Sent: Tuesday, March 14, 2006 11:25 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Watir is resetting one of my selectBox selections. Hi Mark, I don't know what "Watir revision 934" is. I'm using 1.4.1 and I don't _seem_ to have a problem with the script. I did modify some of the lines, but perhaps the problem has something to do with the actual Search feature? Here are the lines I modified: $ie.selectBox( :name, "myProjectID2").select("MARK-TEST") # I took out the Span tag - it seems unnecessary $ie.radio( :id, '72').set # I don't know why you had an extra ", 1" in there. Instead of 'clicking' the buttons, I just flashed them. The first time I ran the script, it opened up a million windows all trying to connect to some server. If the page refresh after clicking the [Search] button is resetting a drop-down value, I can't imagine how Watir is doing that. I don't know if this helps, but it did _seem_ to work for me. Would it help if you tried inserting a 'sleep' delay after performing the Search? Paul. On 14/03/06, Cain, Mark wrote: I am running into issue where during a test. I select a value from select box (1) and based on that value a span tag is shown with another select box (2) and I make a selection from that select box (2). A little further down in my script I do a search for a checklist and when the page refreshed the selection made from the select box (2), within the span tag, is being reset. Does anyone know why this is happening? This does not happen when I run the application manually. Ruby version 1.8.4_16 Watir revision 934 Here is my script: [snip] -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060314/256bdd2d/attachment.html From kalen.howell at gmail.com Tue Mar 14 14:55:45 2006 From: kalen.howell at gmail.com (Kalen Howell) Date: Tue, 14 Mar 2006 14:55:45 -0500 Subject: [Wtr-general] Fwd: Accessing HTML Source In-Reply-To: References: <4b616f150603141138h1f623b22vb8a790cacdfaca98@mail.gmail.com> Message-ID: <4b616f150603141155u4126ff3sc6dcae2550ee9beb@mail.gmail.com> ie.html doesn't seem to pull any comments or markup with it. The information I need is posted in a comment e.g. ---------- Forwarded message ---------- From: Zeljko Filipin Date: Mar 14, 2006 2:45 PM Subject: Re: [Wtr-general] Accessing HTML Source To: wtr-general at rubyforge.org ie.html will give you source of page. On 3/14/06, Kalen Howell wrote:>> Greetings All:>> I am wondering is there any way at all to programmatically (using Watir and> Ruby) access the HTML Source (manually done by selecting View Source in IE)?>> A developer has embeded some information in the page source as an HTML> comment for me to retrieve and use at runtime during the execution of my> Ruby::Watir tests, but I cannot seem to find out how to retrieve this> information.>> Thanks so much,>>> Kalen> _______________________________________________> Wtr-general mailing list> Wtr-general at rubyforge.org> http://rubyforge.org/mailman/listinfo/wtr-general >> --http://www.testingreflections.com/blog/3071http://iskusivac.blog.hr/ _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060314/d42d8fd7/attachment.html From zeljko.filipin at gmail.com Tue Mar 14 15:04:01 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 14 Mar 2006 21:04:01 +0100 Subject: [Wtr-general] Fwd: Accessing HTML Source In-Reply-To: <4b616f150603141155u4126ff3sc6dcae2550ee9beb@mail.gmail.com> References: <4b616f150603141138h1f623b22vb8a790cacdfaca98@mail.gmail.com> <4b616f150603141155u4126ff3sc6dcae2550ee9beb@mail.gmail.com> Message-ID: It works for me. irb(main):004:0> ie.html=> "\r\n" On 3/14/06, Kalen Howell wrote:> ie.html doesn't seem to pull any comments or markup with it. The information> I need is posted in a comment e.g. From christopher.mcmahon at gmail.com Tue Mar 14 15:23:09 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 14 Mar 2006 14:23:09 -0600 Subject: [Wtr-general] Fwd: Accessing HTML Source In-Reply-To: References: <4b616f150603141138h1f623b22vb8a790cacdfaca98@mail.gmail.com> <4b616f150603141155u4126ff3sc6dcae2550ee9beb@mail.gmail.com> Message-ID: <72799cd70603141223l4a77ad3erb8f9087262fa985d@mail.gmail.com> works for me too, vs a Twiki page. Maybe your comments are in a frame? Just guessing... -Chris On 3/14/06, Zeljko Filipin wrote: > It works for me. > > irb(main):004:0> ie.html=> "\r\n" > On 3/14/06, Kalen Howell wrote:> ie.html doesn't seem to pull any comments or markup with it. The information> I need is posted in a comment e.g. > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From jkohl at telusplanet.net Tue Mar 14 15:34:24 2006 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Tue, 14 Mar 2006 12:34:24 -0800 Subject: [Wtr-general] Watir is resetting one of my selectBox selections. In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5AE@EX5V.rl.gov> References: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5AE@EX5V.rl.gov> Message-ID: <1142368464.441728d02ec42@webmail.telus.net> Is there a javascript function that resets the select box by any chance? Quoting "Cain, Mark" : > yes > > --Mark > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of > jkohl at telusplanet.net > Sent: Tuesday, March 14, 2006 11:01 AM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] Watir is resetting one of my selectBox > selections. > > Is there any JavaScript on that page? > > Thanks; > > -Jonathan > > Quoting "Cain, Mark" : > > > I am running into issue where during a test. I select a value from > > select box (1) and based on that value a span tag is shown with > another > > select box (2) and I make a selection from that select box (2). A > > little further down in my script I do a search for a checklist and > when > > the page refreshed the selection made from the select box (2), within > > the span tag, is being reset. Does anyone know why this is happening? > > This does not happen when I run the application manually. > > > > > > > > Ruby version 1.8.4_16 > > > > Watir revision 934 > > > > > > > > Here is my script: > > > > > > > > $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == > > __FILE__ > > > > require 'C:\watir_bonus\unitTests\setup' > > > > > > > > class TC_ARM_Start < Test::Unit::TestCase > > > > include Watir > > > > > > > > def gotoPopUpPage() > > > > $ie.goto("c:\\arm\\main.html") > > > > end > > > > > > > > def test_main > > > > $d = Time.now.strftime("%m/%d/%Y") > > > > gotoPopUpPage() > > > > $ie.selectBox( :name, "Program").select("LMIT") > > > > $ie.span(:id, "TR2").selectBox( :name, > > "myProjectID2").select("MARK-TEST") #this one is being reset > > > > $ie.selectBox( :name, "DocumentMethod").select("by Checklist > > Number") > > > > $ie.textField( :name, "SearchString").set("TST") > > > > $ie.button("Search").click #when this happens the second > > selectbox is reset > > > > > > > > $ie.radio( :id, '72', 1).set > > > > > > > > $ie.button(/Start/i).click > > > > end > > > > > > > > end > > > > > > > > The web page is attached > > > > > > > > Thanks in advance, > > > > ____________________ > > Mark L. Cain > > LMIT - E*STARS(r) ~ Lead Test Engineer > > 1981 Snyder, MSIN: G3-62, Richland, WA 99354 > > Mark_Cain at RL.gov > > 509.376.5458 > > "640 Kilobytes of computer memory ought to be enough for anybody." - > > Bill Gates, 1981 > > > > > > > > > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From kalen.howell at gmail.com Tue Mar 14 15:58:54 2006 From: kalen.howell at gmail.com (Kalen Howell) Date: Tue, 14 Mar 2006 15:58:54 -0500 Subject: [Wtr-general] Fwd: Accessing HTML Source In-Reply-To: <72799cd70603141223l4a77ad3erb8f9087262fa985d@mail.gmail.com> References: <4b616f150603141138h1f623b22vb8a790cacdfaca98@mail.gmail.com> <4b616f150603141155u4126ff3sc6dcae2550ee9beb@mail.gmail.com> <72799cd70603141223l4a77ad3erb8f9087262fa985d@mail.gmail.com> Message-ID: <4b616f150603141258h546901a5j8d82c0250a9fae6a@mail.gmail.com> It does appear to be in a heading.... here is the source from the top (see comment ; is where the data is): *Could it be that the text is in the header that is causing my problem?* Product Page Title Source continues..... On 3/14/06, Chris McMahon wrote: > works for me too, vs a Twiki page. > Maybe your comments are in a frame? Just guessing... > -Chris > > On 3/14/06, Zeljko Filipin wrote: > > It works for me. > > > > irb(main):004:0> ie.html=> "\r\n" > > On 3/14/06, Kalen Howell wrote:> ie.htmldoesn't seem to pull any comments or markup with it. The information> I need > is posted in a comment e.g. > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060314/f54e27e5/attachment.html From zeljko.filipin at gmail.com Tue Mar 14 16:08:20 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 14 Mar 2006 22:08:20 +0100 Subject: [Wtr-general] Fwd: Accessing HTML Source In-Reply-To: <4b616f150603141258h546901a5j8d82c0250a9fae6a@mail.gmail.com> References: <4b616f150603141138h1f623b22vb8a790cacdfaca98@mail.gmail.com> <4b616f150603141155u4126ff3sc6dcae2550ee9beb@mail.gmail.com> <72799cd70603141223l4a77ad3erb8f9087262fa985d@mail.gmail.com> <4b616f150603141258h546901a5j8d82c0250a9fae6a@mail.gmail.com> Message-ID: Yes, I thing that is causing your problem. It is a Watir bug, I thinkit is already reported/fixed, but I am not shure. You can search bugdatabase or this mailing list to be shure. Workaround for now is to ask your developer to put in body. On 3/14/06, Kalen Howell wrote:> Could it be that the text is in the header that is causing my problem? From charley.baker at gmail.com Tue Mar 14 16:12:01 2006 From: charley.baker at gmail.com (Charley Baker) Date: Tue, 14 Mar 2006 13:12:01 -0800 Subject: [Wtr-general] "Download tarball" at svn.openqa.org In-Reply-To: References: Message-ID: Use a subversion client: http://subversion.tigris.org/project_packages.html. There are installers and docs including a Windows based explorer client, easy to use and do a checkout on the head revision of Watir. -Charley On 3/14/06, Zeljko Filipin wrote: > > Is there something like "Download tarball" link at svn.openqa.org. > Athttp://rubyforge.org/cgi-bin/viewcvs.cgi/?root=wtr I used it todownload > all files from HEAD. > I want to download firefox folder > fromhttp://svn.openqa.org/fisheye/viewrep/watir/branches/firefox. Do Ihave > to download file by file? > Thanks, > Zeljko > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060314/7b025e74/attachment.html From Mark_Cain at rl.gov Tue Mar 14 16:30:00 2006 From: Mark_Cain at rl.gov (Cain, Mark) Date: Tue, 14 Mar 2006 13:30:00 -0800 Subject: [Wtr-general] Watir is resetting one of my selectBox selections. Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5B0@EX5V.rl.gov> Ok I have figured out what the trouble is... The developer put an 'OnBlur' event behind the selecting from the troublesome dropdown, which would populate a form variable with the value of the selection. That event was not happening in my script (not sure how Watir does it but you actually have to give the select list focus in order for the OnBlur event to fire, or call the event explicitly). When I added this line to my script >>$ie.selectBox( :name, "myProjectID2").fireEvent("OnBlur")<< then it set the variable and would not reset the value. Everything for the minute is golden-mostly. def test_main $d = Time.now.strftime("%m/%d/%Y") gotoPopUpPage() $ie.selectBox( :name, "Program").select("LMIT") $ie. selectBox( :name, "myProjectID2").select("MARK-TEST") >>$ie. selectBox( :name, "myProjectID2").fireEvent("OnBlur") $ie.selectBox( :name, "DocumentMethod").select("by Checklist Number") $ie.textField( :name, "SearchString").set("TST") $ie.button("Search").click $ie.radio( :id, '72').set $ie.button(/Start/i).click End Just a thought, but it might be worth putting something in the FAQ or some other doc about event gotchas like this to help other not waste there time. Thanks to all who resonded! --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of jkohl at telusplanet.net Sent: Tuesday, March 14, 2006 12:34 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Watir is resetting one of my selectBox selections. Is there a javascript function that resets the select box by any chance? Quoting "Cain, Mark" : > yes > > --Mark > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of > jkohl at telusplanet.net > Sent: Tuesday, March 14, 2006 11:01 AM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] Watir is resetting one of my selectBox > selections. > > Is there any JavaScript on that page? > > Thanks; > > -Jonathan > > Quoting "Cain, Mark" : > > > I am running into issue where during a test. I select a value from > > select box (1) and based on that value a span tag is shown with > another > > select box (2) and I make a selection from that select box (2). A > > little further down in my script I do a search for a checklist and > when > > the page refreshed the selection made from the select box (2), within > > the span tag, is being reset. Does anyone know why this is happening? > > This does not happen when I run the application manually. > > > > > > > > Ruby version 1.8.4_16 > > > > Watir revision 934 > > > > > > > > Here is my script: > > > > > > > > $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == > > __FILE__ > > > > require 'C:\watir_bonus\unitTests\setup' > > > > > > > > class TC_ARM_Start < Test::Unit::TestCase > > > > include Watir > > > > > > > > def gotoPopUpPage() > > > > $ie.goto("c:\\arm\\main.html") > > > > end > > > > > > > > def test_main > > > > $d = Time.now.strftime("%m/%d/%Y") > > > > gotoPopUpPage() > > > > $ie.selectBox( :name, "Program").select("LMIT") > > > > $ie.span(:id, "TR2").selectBox( :name, > > "myProjectID2").select("MARK-TEST") #this one is being reset > > > > $ie.selectBox( :name, "DocumentMethod").select("by Checklist > > Number") > > > > $ie.textField( :name, "SearchString").set("TST") > > > > $ie.button("Search").click #when this happens the second > > selectbox is reset > > > > > > > > $ie.radio( :id, '72', 1).set > > > > > > > > $ie.button(/Start/i).click > > > > end > > > > > > > > end > > > > > > > > The web page is attached > > > > > > > > Thanks in advance, > > > > ____________________ > > Mark L. Cain > > LMIT - E*STARS(r) ~ Lead Test Engineer > > 1981 Snyder, MSIN: G3-62, Richland, WA 99354 > > Mark_Cain at RL.gov > > 509.376.5458 > > "640 Kilobytes of computer memory ought to be enough for anybody." - > > Bill Gates, 1981 > > > > > > > > > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060314/e874fe06/attachment.html From christopher.mcmahon at gmail.com Tue Mar 14 17:26:43 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 14 Mar 2006 16:26:43 -0600 Subject: [Wtr-general] Watir is resetting one of my selectBox selections. In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5B0@EX5V.rl.gov> References: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5B0@EX5V.rl.gov> Message-ID: <72799cd70603141426r63813773ue6b8c756ea60953@mail.gmail.com> > The developer put an 'OnBlur' event behind the selecting from the > troublesome dropdown, which would populate a form variable with the value of > the selection. That event was not happening in my script (not sure how > Watir does it but you actually have to give the select list focus in order > for the OnBlur event to fire, or call the event explicitly). When I added > this line to my script >>$ie.selectBox( :name, > "myProjectID2").fireEvent("OnBlur")<< then it set the > variable and would not reset the value. Everything for the minute is > golden?mostly. > > Just a thought, but it might be worth putting something in the FAQ or some > other doc about event gotchas like this to help other not waste there time. This is actually one of the things I really like about exploring with Watir. It seems to me that there's a real design question here. Not that this isn't a gotcha, but I don't think it's a FAQ, either. (I've never seen anything like this, for instance, and I don't think this situation has ever turned up on the list.) -Chris From bret at pettichord.com Tue Mar 14 18:41:43 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 14 Mar 2006 17:41:43 -0600 Subject: [Wtr-general] Problem enumerating forms In-Reply-To: References: Message-ID: I was able to reproduce another instance of this problem and recently committed the fix to SVN. I think the problem only occurs when you don't need to use the form syntax because there is only one form on the page. Bret On 3/14/06, Marcus Tettmar wrote: > > Hi Bret, > > I'm running Watir 1.4.1. This is the full error message: > > d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:805:in `each': Failed to get IEnum > Interface (WIN32OLERuntimeError) > HRESULT error code:0x80020003 > Member not found. from > d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:805:in `getObject' > from d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3225:in `initialize' > from d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in `new' > from d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in `text_field' > from google.rb:6 > > Full script: > > require 'watir' > include Watir > > $IE0 = IE.new > $IE0.goto(" http://www.google.com/") > $IE0.form( :name, "f").text_field( :name, "q").set("ruby") > $IE0.form( :name, "f").button( :name, "btnG").click > > Cheers, > Marcus > > On 3/10/06, Bret Pettichord wrote: > > > On 3/3/06, Marcus Tettmar wrote: > > > > > Hi, > > > > > > Why does this fail: > > > > > > $IE0.goto("http://www.google.com/") > > > $IE0.form( :name, "f").text_field( :name, "q").set("ruby") > > > $IE0.form( :name, "f").button( :name, "btnG").click > > > > > > This fails with: > > > > > > WIN32OLERuntimeError: Failed to get IEnum Interface > > > HRESULT error code:0x80020003 > > > Member not found. > > > > > > > I ran your script with both Watir 1.4.1 and Watir 1.5.0.928 (aka HEAD). > > It worked for me in both cases. You didn't indicate which version of Watir > > you are using. > > > > If you give the full error message, i would be able to speculate as to > > the possible cause. Specifically i'd need to know the line number of the > > error and preferably the full stack. > > > > Bret > > > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > -- > Marcus Tettmar > http://www.mjtnet.com/ > Macro Scheduler & WebRecorder for Windows & Web Automation and Testing. > WebRecorder for Ruby/Watir now available. > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060314/15fc3274/attachment.html From bret at pettichord.com Tue Mar 14 18:44:30 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 14 Mar 2006 17:44:30 -0600 Subject: [Wtr-general] "Download tarball" at svn.openqa.org In-Reply-To: References: Message-ID: I would like us to start posting development releases. This "download the tarball" idea is getting more and more troublesome. I updated the rakefile over the weekend to make it easier for us to create gems and the one-click installer. Bret On 3/14/06, Charley Baker wrote: > > Use a subversion client: > http://subversion.tigris.org/project_packages.html. There are installers > and docs including a Windows based explorer client, easy to use and do a > checkout on the head revision of Watir. > > -Charley > > On 3/14/06, Zeljko Filipin wrote: > > > > Is there something like "Download tarball" link at svn.openqa.org. > > Athttp://rubyforge.org/cgi-bin/viewcvs.cgi/?root=wtr I used it todownload > > all files from HEAD. > > I want to download firefox folder > > fromhttp://svn.openqa.org/fisheye/viewrep/watir/branches/firefox. Do Ihave > > to download file by file? > > Thanks, > > Zeljko > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060314/c06e51a1/attachment.html From bret at pettichord.com Tue Mar 14 18:47:47 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 14 Mar 2006 17:47:47 -0600 Subject: [Wtr-general] Watir installation broken? In-Reply-To: <20060313203724972.00000003696@gmcshea-pc2> References: <20060313173601381.00000010500@gmcshea-pc2> <20060313203724972.00000003696@gmcshea-pc2> Message-ID: I've run into the same problem myself. There is some kind of memory leak in Watir. A better workaround is simply to kill the IEXPLORE.EXE process that is running. I've had a heck of a time tracking this bug down. Can you tell me if you use any attach methods or winclickers or anything like that? That's my suspicion as to the source of the leak, but like i said, i haven't been very good at tracking it down. Bret On 3/13/06, Greg McShea wrote: > > Brett, > > Rebooting the machine solved the problem. Thanks for the suggestion. I was > reluctant to reboot at the time since I was several hours into a build. > > Thanks, > Greg > > -----Original Message----- > *From:* Greg McShea [mailto:gregory.mcshea at oracle.com] > *Sent:* Monday, March 13, 2006 5:36 PM > *To:* Wtr-general at rubyforge.org > *Cc:* gregory.mcshea at oracle.com > *Subject:* Watir installation broken? > > Hi, > > I seem to have "broken" Watir somehow. I have been happily > building/testing evaluation scripts using Watir and have been able to run > the examples and unit tests OK. > > When running a script today my app failed to load in the browser. I tried > a few more times with the same result. Now I cannot get any scripts (which > were all previously working) to load a page in the browser when launched > with Watir. > > Everytime I launch a Watir script IE starts but the location does not load > in the browser. This is even happening with the sample google test > suite. After a couple minutes I get the "The page cannot be displayed" error > in IE. If I then manually enter a URL in the same browser session I get the > same result. However if I launch a new browser manually (not initiated by > Watir) the same URL loads just fine. For some reason IE sessions launched by > Watir cannot load an URLs. > > Any idea whats going on or how to fix this without complete > reinstallation. BTW, ruby seems to be OK as I can still run the FreeRIDE. > > Thanks, > Greg > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060314/b090d069/attachment.html From bret at pettichord.com Tue Mar 14 18:49:21 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 14 Mar 2006 17:49:21 -0600 Subject: [Wtr-general] WindowLogonExample.rb - should it work for me? In-Reply-To: <73e7817e0603131511l55526501n7eba8e06d8a42c58@mail.gmail.com> References: <73e7817e0603131511l55526501n7eba8e06d8a42c58@mail.gmail.com> Message-ID: Bill's analysis and recommendation is correct. This is problem is fixed in HEAD. Bret On 3/13/06, Bill Agee wrote: > > That particular unit test works fine for me on XP Pro SP2, however I > installed Watir using the win32 .exe installer. From the look of > things you installed with the .gem, I wager? > > It could be the autoit DLL is not registered on your system. Perhaps > installing with the .gem doesn't handle that automagically in some > (all?) cases? I've never used the Watir .gem so I can't say for sure. > > Try manually registering the autoit DLL using regsvr32, and then try > the unit test again: > > regsvr32 \ruby\lib\ruby\site_ruby\1.8\watir\AutoItX3.dll > > Thanks > Bill > > > On 3/13/06, philip reed wrote: > > I'm having trouble getting WaTiR to interact with authentication > > dialogs or Javascript dialogs (i.e. "Are you sure?"-style messages). > > I've found that unittests/WindowLogonExample.rb also doesn't run for > > me, generating the following error on Windows XP sp 2 Home: > > > > C:\ruby\lib\ruby\gems\1.8\gems\watir-1.4.1\unittests>ruby > WindowLogonExample.rb > > Loaded suite WindowLogonExample > > Started > > ./../watir/WindowHelper.rb:5:in `initialize': unknown OLE server: > `AutoItX3.Cont > > rol' (WIN32OLERuntimeError) > > HRESULT error code:0x800401f3 > > Invalid class string from ./../watir/WindowHelper.rb:5:in > `initialize > > ' > > from WindowLogonExtra.rb:6 > > . > > Finished in 333.296 seconds. > > > > 1 tests, 0 assertions, 0 failures, 0 errors > > > > > > (333.296 seconds was where I shut down MSIE manually; AFAICT the test > > would have hung indefinitely had I not done so.) > > > > My due diligence search of the archive found a bunch of references to > > this thread from August '05 that doesn't sound too certain that this > > test should be working now: > > > > http://rubyforge.org/pipermail/wtr-general/2005-August/002861.html > > > > I also found this thread from June that sounds like it was working then: > > > > http://rubyforge.org/pipermail/wtr-general/2005-June/002241.html > > > > > > My next step will be to take the latest CVS and see whether that works > > in my environment. Meanwhile, can someone please confirm that this > > *SHOULD* work on a normal Windows XP installation, i.e. that I'm not > > spending time to troubleshoot a test that's known to fail for whatever > > reason? > > > > Thanks, > > > > Philip > > > > -- > > Philip Reed, Developer > > Positronic Design > > http://www.positronicdesign.com > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060314/43ed3d26/attachment.html From bret at pettichord.com Tue Mar 14 18:52:06 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 14 Mar 2006 17:52:06 -0600 Subject: [Wtr-general] Fwd: Accessing HTML Source In-Reply-To: References: <4b616f150603141138h1f623b22vb8a790cacdfaca98@mail.gmail.com> <4b616f150603141155u4126ff3sc6dcae2550ee9beb@mail.gmail.com> <72799cd70603141223l4a77ad3erb8f9087262fa985d@mail.gmail.com> <4b616f150603141258h546901a5j8d82c0250a9fae6a@mail.gmail.com> Message-ID: This is indeed a bug that has been fixed since 1.4.1. On 3/14/06, Zeljko Filipin wrote: > > Yes, I thing that is causing your problem. It is a Watir bug, I thinkit is > already reported/fixed, but I am not shure. You can search bugdatabase or > this mailing list to be shure. > Workaround for now is to ask your developer to put in > body. > On 3/14/06, Kalen Howell wrote:> Could it be that > the text is in the header that is causing my problem? > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060314/44ffa31f/attachment.html From kalen.howell at gmail.com Tue Mar 14 18:52:21 2006 From: kalen.howell at gmail.com (Kalen Howell) Date: Tue, 14 Mar 2006 15:52:21 -0800 Subject: [Wtr-general] Accessing HTML Source In-Reply-To: References: <4b616f150603141138h1f623b22vb8a790cacdfaca98@mail.gmail.com> <4b616f150603141155u4126ff3sc6dcae2550ee9beb@mail.gmail.com> <72799cd70603141223l4a77ad3erb8f9087262fa985d@mail.gmail.com> <4b616f150603141258h546901a5j8d82c0250a9fae6a@mail.gmail.com> Message-ID: <4b616f150603141552k4eb347f6xe4b2bd148ea604fc@mail.gmail.com> Very good! I now have renewed hope! Thanks for your help, I will let you know what happens. Kalen On 3/14/06, Zeljko Filipin wrote: > Yes, I thing that is causing your problem. It is a Watir bug, I thinkit is > already reported/fixed, but I am not shure. You can search bugdatabase or > this mailing list to be shure. > Workaround for now is to ask your developer to put in > body. > On 3/14/06, Kalen Howell wrote:> Could it be that > the text is in the header that is causing my problem? > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From bret at pettichord.com Tue Mar 14 18:56:51 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 14 Mar 2006 17:56:51 -0600 Subject: [Wtr-general] Moving to OpenQA.org In-Reply-To: <6554B86C58B86F43B66363ED5CF6ED052E6695@bugatti.ems.securicor.com> References: <6554B86C58B86F43B66363ED5CF6ED052E6695@bugatti.ems.securicor.com> Message-ID: On 3/12/06, Sergio Pinon wrote: > > I don't know. What do you need help with? There are lots of known bugs mentioned in this email list, some of which have fixes. A lot of the traffic here is discussing them. ("Is this a known bug?") It would be a big help if you could search through the email list and collect these items in our new bug tracking system, Jira: http://jira.openqa.org/browse/WTR -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060314/859bea57/attachment.html From bret at pettichord.com Tue Mar 14 18:59:06 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 14 Mar 2006 17:59:06 -0600 Subject: [Wtr-general] Watir-Examples In-Reply-To: <37c405480603140702x2c043de7s@mail.gmail.com> References: <74eaa5760603140121s2b35309fwbab41e5234af2b54@mail.gmail.com> <37c405480603140702x2c043de7s@mail.gmail.com> Message-ID: On 3/14/06, Paul Carvalho wrote: > > (2) google_maps.rb: > - I found that the text input field has been renamed on the Google page > since the script was first created. > - Use SpySmith to find out the identifiers for the text input field. > Change the text input box reference in the script to match. (There are a few > ways you can do this.) There is a Jira issue open on this one. Paul sent me a fix, but i couldn't get it to work. If someone wants to investigate further and figure out what is going on that would be great. http://jira.openqa.org/browse/WTR-13 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060314/bc08e6ce/attachment.html From bret at pettichord.com Tue Mar 14 19:01:31 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 14 Mar 2006 18:01:31 -0600 Subject: [Wtr-general] Watir-Examples In-Reply-To: <37c405480603140748r53cc42e2m@mail.gmail.com> References: <74eaa5760603140121s2b35309fwbab41e5234af2b54@mail.gmail.com> <37c405480603140702x2c043de7s@mail.gmail.com> <72799cd70603140728x3c9c178fu6ffb194b18b9219d@mail.gmail.com> <37c405480603140748r53cc42e2m@mail.gmail.com> Message-ID: On 3/14/06, Paul Carvalho wrote: > > I *need* that feature working for one of my script suites to work > correctly, so I'm still using 1.4.1 right now. I can't wait to get my > hands on some of the feature improvements in the latest build, but I just > can't work around the frame().html errors. The unit tests for frame().html work, so there is something specific to that example that is broken. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060314/edbbf245/attachment.html From bret at pettichord.com Tue Mar 14 19:06:57 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 14 Mar 2006 18:06:57 -0600 Subject: [Wtr-general] Watir is resetting one of my selectBox selections. In-Reply-To: <72799cd70603141426r63813773ue6b8c756ea60953@mail.gmail.com> References: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5B0@EX5V.rl.gov> <72799cd70603141426r63813773ue6b8c756ea60953@mail.gmail.com> Message-ID: This is indeed a bug. Watir should automatically be triggering an onblur event when doing a select. It does similar things for other controls. Please add this to Jira, so we can be sure to fix it. Bret On 3/14/06, Chris McMahon wrote: > > > The developer put an 'OnBlur' event behind the selecting from the > > troublesome dropdown, which would populate a form variable with the > value of > > the selection. That event was not happening in my script (not sure how > > Watir does it but you actually have to give the select list focus in > order > > for the OnBlur event to fire, or call the event explicitly). When I > added > > this line to my script >>$ie.selectBox( :name, > > "myProjectID2").fireEvent("OnBlur")<< then it set the > > variable and would not reset the value. Everything for the minute is > > golden?mostly. > > > > Just a thought, but it might be worth putting something in the FAQ or > some > > other doc about event gotchas like this to help other not waste there > time. > > This is actually one of the things I really like about exploring with > Watir. It seems to me that there's a real design question here. Not > that this isn't a gotcha, but I don't think it's a FAQ, either. (I've > never seen anything like this, for instance, and I don't think this > situation has ever turned up on the list.) > -Chris > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060314/ec30a9fe/attachment.html From sergio.pinon at us.g4s.com Tue Mar 14 20:41:52 2006 From: sergio.pinon at us.g4s.com (Sergio Pinon) Date: Tue, 14 Mar 2006 17:41:52 -0800 Subject: [Wtr-general] Moving to OpenQA.org Message-ID: <6554B86C58B86F43B66363ED5CF6ED050111238F@bugatti.ems.securicor.com> Yeah I will look into them and see what I come up with. ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Tuesday, March 14, 2006 3:57 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Moving to OpenQA.org On 3/12/06, Sergio Pinon wrote: I don't know. What do you need help with? There are lots of known bugs mentioned in this email list, some of which have fixes. A lot of the traffic here is discussing them. ("Is this a known bug?") It would be a big help if you could search through the email list and collect these items in our new bug tracking system, Jira: http://jira.openqa.org/browse/WTR -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060314/c2c5e2f1/attachment.html From angrez at gmail.com Wed Mar 15 02:08:35 2006 From: angrez at gmail.com (Angrez Singh) Date: Wed, 15 Mar 2006 12:38:35 +0530 Subject: [Wtr-general] FireWatir release alpha v1.0 In-Reply-To: <24d0cb380603140922i1a23dfd3y5951fdbeb3245fb9@mail.gmail.com> References: <8EA615B25AB5F849BF0193B80E6D4C49800E73@MIDISERVER> <24d0cb380603140922i1a23dfd3y5951fdbeb3245fb9@mail.gmail.com> Message-ID: Hi, > Unlike firefox extensions, this xpi package doesn't open up as file dialog > for me. On trying to install as xpi(.zip) file, it just opens up the file > contents and starts displaying the binary data... I don't think the problem > is at my end as i am perfectly able to install and use other .xpi > extensions. Could you look into it please? Will look into it & let you know. Regards, Angrez -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060315/d8f726b5/attachment.html From angrez at gmail.com Wed Mar 15 02:13:41 2006 From: angrez at gmail.com (Angrez Singh) Date: Wed, 15 Mar 2006 12:43:41 +0530 Subject: [Wtr-general] FireWatir release alpha v1.0 In-Reply-To: References: Message-ID: Hi Zeljko, You are not doing anything wrong here. The current version for Firefox is in sync with what is available on the tar ball. So the 'watir.rb' in Firefox extension is refactored version of 'watir.rb' file that is available on the HEAD. So I think that is the source of error. So, what you should do is download the latest tar ball, install watir from that tar ball & then apply the Firefox extension. Let me know if this works. I will also update the installation document. Regards, Angrez On 3/14/06, Zeljko Filipin wrote: > > I have windows xp sp2, ruby 1.8.4, watir 1.4.1 (gem install), > Firefox/1.5.0.1. > >From Installation guide for FireWatir (Installation Guide.doc): > 3. Take backup of following files inside "[ruby > installationdirectory]/lib/ruby/site_ruby/1.8" folder, just to make sure you > don'tmess up with earlier installation of watir:a. watir.rbb. watir/WindowHelper.rbc. > watir/winClicker.rbd. watir/setFileDialog.rbe. watir/camel_case.rb > These files are not there, but I made copy > ofC:\ruby\lib\ruby\gems\1.8\gems\watir-1.4.1 > 4. Copy the code inside "code folder" to "[ruby > installationdirectory]/lib/ruby/site_ruby/1.8".5. Copy "mozilla_unittests" > folder to "[watir installation directory]" > I copied all to C:\ruby\lib\ruby\gems\1.8\gems\watir-1.4.1 > 6. Run "mozilla_all_tests.rb" to run the unit test cases. Make > sureyou have started Firefox manually as stated in step 2e. > When I run mozilla_all_tests.rb I get this error message: > C:\ruby\lib\ruby\gems\1.8\gems\watir-1.4.1\mozilla_unittests > >mozilla_all_tests.rbC:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/mozilla_unittests/../watir.rb:483:in`initialize': > LoadLibrary:C:\ruby\lib\ruby\gems\1.8\gems\watir- > 1.4.1\watir\IEDialog\Release\IEDialog.dll (RuntimeError) from > C:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/mozilla_unittests/../watir.rb:483 from > C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in`require' from > C:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/mozilla_unittests/../mozilla_unittests/setup.rb:4 from > C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in`require' from > C:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 > /mozilla_unittests/mozilla_all_tests.rb:6 > Am I doing something wrong? > Zeljko > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060315/beddfe7b/attachment.html From pekka.maatta at proventia.fi Wed Mar 15 02:18:02 2006 From: pekka.maatta at proventia.fi (=?ISO-8859-1?Q?Pekka_M=E4=E4tt=E4?=) Date: Wed, 15 Mar 2006 09:18:02 +0200 Subject: [Wtr-general] Finding out the order of input elements? In-Reply-To: References: Message-ID: <4417BFAA.9060204@proventia.fi> Anyone? I got the idea of sending tab key presses to ie and checking where the focus is, but it's kinda hacky.. -PM >Message: 3 >Date: Tue, 07 Mar 2006 10:32:46 +0200 >From: Pekka M??tt? >Subject: [Wtr-general] Finding out the order of input elements? >To: wtr-general at rubyforge.org >Message-ID: <440D452E.6000805 at proventia.fi> >Content-Type: text/plain; charset=ISO-8859-1; format=flowed > >Hi, > >I'm new to Watir (and Ruby), so this may be a stupid question.... tried >searching around a bit, but with little success. So here goes: > >How do I find out if an input element precedes another or not? > >There does not seem to be a method for accessing all html inputs on page >at once, nor does not seem to be an index attribute or such in input >objects. So I can get ordered lists of text fields, selects and buttons, >but have no way of knowing if, for example, if a certain text field >element is defined before a certain button on a page. Or do I? > >TY in advance, > >-PM > > From zeljko.filipin at gmail.com Wed Mar 15 06:03:16 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 15 Mar 2006 12:03:16 +0100 Subject: [Wtr-general] "Download tarball" at svn.openqa.org In-Reply-To: References: Message-ID: Please do start posting development releases. I REALLY like gem install watir. On 3/15/06, Bret Pettichord wrote:> I would like us to start posting development releases. This "download the> tarball" idea is getting more and more troublesome. I updated the rakefile> over the weekend to make it easier for us to create gems and the one-click> installer. From zeljko.filipin at gmail.com Wed Mar 15 06:28:29 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 15 Mar 2006 12:28:29 +0100 Subject: [Wtr-general] "Download tarball" at svn.openqa.org In-Reply-To: References: Message-ID: I already use TortoiseSVN (for version control of my watir scripts)but I did not know that I could checkout watir like that. :) I tried to checkout watir, but it did not work. This is how one can checkout my scripts. 1. make folder at your hard disc2. right click it3. context menu opens4. select "SVN Checkout..."5. at "URL of repository" text box enter "http://{server}/{path}"(example: my path is "svn/tools/Tests/trunk", "http" can also be"https" but this is another story)6. at "Checkuot directory" text box enter "{drive}:\{path}" (example:"C:\watir", but this is already there)7. click button OK8. wait for a while9. after you see message "Completed At revision: {revision nuber}"click button OK once more I tried to do if for watir, but I do not know what to enter at step 5.At repository browser I tried http://svn.openqa.org/watirhttp://svn.openqa.org/trunk and many more, and got messages that look like this Error: PROPFIND request failed on '/watir'Error: PROPFIND of '/watir': 405 Method Not Allowed (http://svn.openqa.org) Am I missing something? On 3/14/06, Charley Baker wrote:> Use a subversion client:> http://subversion.tigris.org/project_packages.html. There> are installers and docs including a Windows based explorer client, easy to> use and do a checkout on the head revision of Watir. From zeljko.filipin at gmail.com Wed Mar 15 06:56:04 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 15 Mar 2006 12:56:04 +0100 Subject: [Wtr-general] FireWatir release alpha v1.0 In-Reply-To: References: Message-ID: I installed watir from tarball, but now I have another problem.When I start firefox from cmd C:\Program Files\Mozilla Firefox>firefox.exe -jssh "JSSH: A Java Secure Shell client library" page opens(http://www.pitman.co.za/projects/jssh/index.html). Then I check if JSSh is listening on port 9997 but I get error message. C:\Program Files\Mozilla Firefox>telnet localhost 9997Connecting To localhost...Could not open connection to the host, onport 9997: Connect failed I remember this also happened several times yesterday. Is this becausewww.croczilla.com/jssh is unavailable? On 3/15/06, Angrez Singh wrote:> Hi Zeljko,>> You are not doing anything wrong here. The current version for Firefox is in> sync with what is available on the tar ball. So the 'watir.rb' in Firefox> extension is refactored version of 'watir.rb' file that is available on the> HEAD. So I think that is the source of error.>> So, what you should do is download the latest tar ball, install watir from> that tar ball & then apply the Firefox extension. Let me know if this works. From zeljko.filipin at gmail.com Wed Mar 15 06:57:19 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 15 Mar 2006 12:57:19 +0100 Subject: [Wtr-general] FireWatir release alpha v1.0 In-Reply-To: References: Message-ID: Of course, when I start unit tests, I get this error message. C:\watir\mozilla_unittests>mozilla_all_tests.rbC:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1263:in `initialize': Bad filedescriptor - connect(2) (Errno::EBADF) from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1263:in `initialize' from C:/watir/mozilla_unittests/../mozilla_unittests/setup.rb:35:in`start_ie_with_logger' from C:/watir/mozilla_unittests/../mozilla_unittests/setup.rb:49 from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in`require' from C:/watir/mozilla_unittests/mozilla_all_tests.rb:6 From oblomov.consulting at googlemail.com Wed Mar 15 06:57:21 2006 From: oblomov.consulting at googlemail.com (George Hawthorne) Date: Wed, 15 Mar 2006 11:57:21 +0000 Subject: [Wtr-general] AjaxMethod pop-up Message-ID: <880925dd0603150357u1f09571p@mail.gmail.com> I'm testing a page that has a list of items in table. You can click on an icon to delete one of the items. This uses an onclick event - onclick="javascript:return ConfirmX('t',977);" - which calls the function below. The function produces a popup with OK and Cancel buttons. function ConfirmX(list,id) { if (confirm("Are you sure you want to delete this item?")) AjaxMethod.OnDelete(list,id,RepaintDataCallback); return false; } I've tried all the usual methods, as per FAQ and Unit Tests, to click OK on the popup but nothing works. I don't get an error message - the popup just sits there until I manually close it. Can anyone suggest a solution? Thanks, George From marcus.tettmar at gmail.com Wed Mar 15 07:55:48 2006 From: marcus.tettmar at gmail.com (Marcus Tettmar) Date: Wed, 15 Mar 2006 12:55:48 +0000 Subject: [Wtr-general] Problem enumerating forms In-Reply-To: <37c405480603140644le061492n@mail.gmail.com> References: <37c405480603140644le061492n@mail.gmail.com> Message-ID: Hi, On 3/14/06, Paul Carvalho wrote: > > > Your "goto" line has an extra space at the beginning of the line. > That is, please remove the space after the quote in: " > http://www.google.com/" > My script doesn't have the space in - must have happened somehow when pasting it into gmail. -- Marcus Tettmar http://www.mjtnet.com/ Macro Scheduler & WebRecorder for Windows & Web Automation and Testing. WebRecorder for Ruby/Watir now available. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060315/a8993318/attachment.html From marcus.tettmar at gmail.com Wed Mar 15 07:57:24 2006 From: marcus.tettmar at gmail.com (Marcus Tettmar) Date: Wed, 15 Mar 2006 12:57:24 +0000 Subject: [Wtr-general] Problem enumerating forms In-Reply-To: References: Message-ID: Hi Bret, On 3/14/06, Bret Pettichord wrote: > > I was able to reproduce another instance of this problem and recently > committed the fix to SVN. > Excellent, thanks. I think the problem only occurs when you don't need to use the form syntax > because there is only one form on the page. > That would explain why it failed on Google but worked elsewhere. Though it's strange most other people were unable to duplicate with my Google example. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060315/b822bfe7/attachment.html From kalen.howell at gmail.com Wed Mar 15 08:23:12 2006 From: kalen.howell at gmail.com (Kalen Howell) Date: Wed, 15 Mar 2006 08:23:12 -0500 Subject: [Wtr-general] Fwd: Accessing HTML Source In-Reply-To: References: <4b616f150603141138h1f623b22vb8a790cacdfaca98@mail.gmail.com> <4b616f150603141155u4126ff3sc6dcae2550ee9beb@mail.gmail.com> <72799cd70603141223l4a77ad3erb8f9087262fa985d@mail.gmail.com> <4b616f150603141258h546901a5j8d82c0250a9fae6a@mail.gmail.com> Message-ID: <4b616f150603150523x453678cfq5d673a9025672cd6@mail.gmail.com> First I did ask the developer to move the info down into the body, and that will happen by end of day today. In the mean time.... I downloaded watir-1.4.1.exe windows executable last night, and still was not able to access the information. Can you tell me the command I can enter into irb to confirm the version of Watir? While I am in the there, can you tell me the command to get the Ruby version number? Also, this is how I am trying to verify text in the source: ie.html.include? "info here" It seems to work pretty fast even with a large amount of data. Let me know what you think, Thanks, Kalen On 3/14/06, Bret Pettichord wrote: > > This is indeed a bug that has been fixed since 1.4.1. > > On 3/14/06, Zeljko Filipin wrote: > > > Yes, I thing that is causing your problem. It is a Watir bug, I thinkit > > is already reported/fixed, but I am not shure. You can search bugdatabase or > > this mailing list to be shure. > > Workaround for now is to ask your developer to put > > in body. > > On 3/14/06, Kalen Howell wrote:> Could it be > > that the text is in the header that is causing my problem? > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060315/ac07fd18/attachment.html From zeljko.filipin at gmail.com Wed Mar 15 08:51:39 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 15 Mar 2006 14:51:39 +0100 Subject: [Wtr-general] Fwd: Accessing HTML Source In-Reply-To: <4b616f150603150523x453678cfq5d673a9025672cd6@mail.gmail.com> References: <4b616f150603141138h1f623b22vb8a790cacdfaca98@mail.gmail.com> <4b616f150603141155u4126ff3sc6dcae2550ee9beb@mail.gmail.com> <72799cd70603141223l4a77ad3erb8f9087262fa985d@mail.gmail.com> <4b616f150603141258h546901a5j8d82c0250a9fae6a@mail.gmail.com> <4b616f150603150523x453678cfq5d673a9025672cd6@mail.gmail.com> Message-ID: > I downloaded watir-1.4.1.exe windows executable last night, and still was not able to access the information. As I understood it, Bret wrote that this but had been resolved AFTER1.4.1. was released ("This is indeed a bug that has been fixed since1.4.1.") Until they release a new version, you can download latest commit fromhere (there may be something even fresher at http://svn.openqa.org/,but ignore that for now) http://rubyforge.org/cgi-bin/viewcvs.cgi/root.tar.gz?root=wtr&view=tar Unzip it, run install.rb and you will have the newest watir. > Can you tell me the command I can enter into irb to confirm the version of Watir? You can do it from command prompt ruby -e 'require "watir"; puts Watir::IE::VERSION' and from irb irb(main):002:0> require "watir"=> trueirb(main):003:0> Watir::IE::VERSION=> "1.4" > While I am in the there, can you tell me the command to get the Ruby version number? >From command prompt ruby -v From Mark_Cain at rl.gov Wed Mar 15 10:04:28 2006 From: Mark_Cain at rl.gov (Cain, Mark) Date: Wed, 15 Mar 2006 07:04:28 -0800 Subject: [Wtr-general] Watir is resetting one of my selectBox selections. Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5B2@EX5V.rl.gov> Done. http://jira.openqa.org/browse/WTR-15 --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Tuesday, March 14, 2006 4:07 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Watir is resetting one of my selectBox selections. This is indeed a bug. Watir should automatically be triggering an onblur event when doing a select. It does similar things for other controls. Please add this to Jira, so we can be sure to fix it. Bret On 3/14/06, Chris McMahon wrote: > The developer put an 'OnBlur' event behind the selecting from the > troublesome dropdown, which would populate a form variable with the value of > the selection. That event was not happening in my script (not sure how > Watir does it but you actually have to give the select list focus in order > for the OnBlur event to fire, or call the event explicitly). When I added > this line to my script >>$ie.selectBox( :name, > "myProjectID2").fireEvent("OnBlur")<< then it set the > variable and would not reset the value. Everything for the minute is > golden-mostly. > > Just a thought, but it might be worth putting something in the FAQ or some > other doc about event gotchas like this to help other not waste there time. This is actually one of the things I really like about exploring with Watir. It seems to me that there's a real design question here. Not that this isn't a gotcha, but I don't think it's a FAQ, either. (I've never seen anything like this, for instance, and I don't think this situation has ever turned up on the list.) -Chris _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060315/0bdcd404/attachment.html From bret at pettichord.com Wed Mar 15 10:44:51 2006 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 15 Mar 2006 09:44:51 -0600 Subject: [Wtr-general] Problem enumerating forms In-Reply-To: References: Message-ID: I was able to duplicate the problem with the Google India page. I've customized my own Google (USA) page, so that may have been why i couldn't reproduce it there. What country are you in? Bret On 3/15/06, Marcus Tettmar wrote: > > Hi Bret, > > On 3/14/06, Bret Pettichord wrote: > > > > I was able to reproduce another instance of this problem and recently > > committed the fix to SVN. > > > > Excellent, thanks. > > I think the problem only occurs when you don't need to use the form syntax > > because there is only one form on the page. > > > > That would explain why it failed on Google but worked elsewhere. Though > it's strange most other people were unable to duplicate with my Google > example. > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060315/11fc85a4/attachment.html From bret at pettichord.com Wed Mar 15 10:47:28 2006 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 15 Mar 2006 09:47:28 -0600 Subject: [Wtr-general] "Download tarball" at svn.openqa.org In-Reply-To: References: Message-ID: See this page for details. http://openqa.org/watir/cvs.action On 3/15/06, Zeljko Filipin wrote: > > I already use TortoiseSVN (for version control of my watir scripts)but I > did not know that I could checkout watir like that. :) > I tried to checkout watir, but it did not work. > This is how one can checkout my scripts. > 1. make folder at your hard disc2. right click it3. context menu opens4. > select "SVN Checkout..."5. at "URL of repository" text box enter > "http://{server}/{path}"(example: my path is "svn/tools/Tests/trunk", "http" > can also be"https" but this is another story)6. at "Checkuot directory" text > box enter "{drive}:\{path}" (example:"C:\watir", but this is already > there)7. click button OK8. wait for a while9. after you see message > "Completed At revision: {revision nuber}"click button OK once more > I tried to do if for watir, but I do not know what to enter at step 5.Atrepository browser I tried > http://svn.openqa.org/watirhttp://svn.openqa.org/trunk > and many more, and got messages that look like this > Error: PROPFIND request failed on '/watir'Error: PROPFIND of '/watir': 405 > Method Not Allowed (http://svn.openqa.org) > Am I missing something? > On 3/14/06, Charley Baker wrote:> Use a > subversion client:> http://subversion.tigris.org/project_packages.html. > There> are installers and docs including a Windows based explorer client, > easy to> use and do a checkout on the head revision of Watir. > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060315/842e66f1/attachment.html From bret at pettichord.com Wed Mar 15 10:49:42 2006 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 15 Mar 2006 09:49:42 -0600 Subject: [Wtr-general] Finding out the order of input elements? In-Reply-To: <4417BFAA.9060204@proventia.fi> References: <4417BFAA.9060204@proventia.fi> Message-ID: You could parse the html. On 3/15/06, Pekka M??tt? wrote: > > Anyone? I got the idea of sending tab key presses to ie and checking > where the focus is, but it's kinda hacky.. > > -PM > > > >Message: 3 > >Date: Tue, 07 Mar 2006 10:32:46 +0200 > >From: Pekka M??tt? > >Subject: [Wtr-general] Finding out the order of input elements? > >To: wtr-general at rubyforge.org > >Message-ID: <440D452E.6000805 at proventia.fi> > >Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > > >Hi, > > > >I'm new to Watir (and Ruby), so this may be a stupid question.... tried > >searching around a bit, but with little success. So here goes: > > > >How do I find out if an input element precedes another or not? > > > >There does not seem to be a method for accessing all html inputs on page > >at once, nor does not seem to be an index attribute or such in input > >objects. So I can get ordered lists of text fields, selects and buttons, > >but have no way of knowing if, for example, if a certain text field > >element is defined before a certain button on a page. Or do I? > > > >TY in advance, > > > >-PM > > > > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060315/ba25242b/attachment.html From zeljko.filipin at gmail.com Wed Mar 15 11:12:22 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 15 Mar 2006 17:12:22 +0100 Subject: [Wtr-general] "Download tarball" at svn.openqa.org In-Reply-To: References: Message-ID: Thanks, that is what I needed. On 3/15/06, Bret Pettichord wrote:> See this page for details.> http://openqa.org/watir/cvs.action From tester.paul at gmail.com Wed Mar 15 11:31:21 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Wed, 15 Mar 2006 11:31:21 -0500 Subject: [Wtr-general] Image FileSize is a string? Message-ID: <37c405480603150831k265db8b3r@mail.gmail.com> Hello there, I've been playing with the "image" functions lately and I noticed something that seems odd to me that I'd like to check. I am using Watir 1.4.1. In one of my scripts that checks the web page size and load times, I didn't factor in the size of the graphics because in most cases they were negligble. However on some reports, the whole page is mostly made up of a large chart image. In that case I wanted to include the image file size as part of the "page size". Here's the line of code I use: page_size = $ie.frame('MainWindow').html.length + $ie.frame('MainWindow').image(:index, 2).fileSize.to_i The question I have is why "length" returns a number but "fileSize" returns a string (of a number)? It took me a minute to figure out that fileSize was returning a string and that's why the sum was failing. Once I appended the ".to_i" it worked fine. Is this by design? It just seems a bit inconsistent to me. Since I don't know the history of this function I thought I'd ask. I haven't explored any other functions that return numbers to see if they are also strings. Paul. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060315/f35ece26/attachment.html From marcus.tettmar at gmail.com Wed Mar 15 12:18:35 2006 From: marcus.tettmar at gmail.com (Marcus Tettmar) Date: Wed, 15 Mar 2006 17:18:35 +0000 Subject: [Wtr-general] Problem enumerating forms In-Reply-To: References: Message-ID: I had the same problem on the main Google page and also the Google India page. I tried both because the person that brought this to my attention was using the India page. I'm in the UK. I have the same problem whichever Google page I use. On 3/15/06, Bret Pettichord wrote: > > I was able to duplicate the problem with the Google India page. I've > customized my own Google (USA) page, so that may have been why i couldn't > reproduce it there. > > What country are you in? > > Bret > > On 3/15/06, Marcus Tettmar wrote: > > > Hi Bret, > > On 3/14/06, Bret Pettichord < bret at pettichord.com> wrote: > > > > I was able to reproduce another instance of this problem and recently > > committed the fix to SVN. > > > > Excellent, thanks. > > I think the problem only occurs when you don't need to use the form syntax > > because there is only one form on the page. > > > > That would explain why it failed on Google but worked elsewhere. Though > it's strange most other people were unable to duplicate with my Google > example. > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -- Marcus Tettmar http://www.mjtnet.com/ Macro Scheduler & WebRecorder for Windows & Web Automation and Testing. WebRecorder for Ruby/Watir now available. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060315/deaf925a/attachment.html From bret at pettichord.com Wed Mar 15 12:48:37 2006 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 15 Mar 2006 11:48:37 -0600 Subject: [Wtr-general] Image FileSize is a string? In-Reply-To: <37c405480603150831k265db8b3r@mail.gmail.com> References: <37c405480603150831k265db8b3r@mail.gmail.com> Message-ID: I don't know who added this. It was either Paul Rogers or someone else. It wasn't me. So i can't tell you what the intent was. Someone could search through the commit history to find out when it was added and by whom. Bret On 3/15/06, Paul Carvalho wrote: > > Hello there, I've been playing with the "image" functions lately and I > noticed something that seems odd to me that I'd like to check. I am using > Watir 1.4.1. > > In one of my scripts that checks the web page size and load times, I > didn't factor in the size of the graphics because in most cases they were > negligble. However on some reports, the whole page is mostly made up of a > large chart image. In that case I wanted to include the image file size as > part of the "page size". Here's the line of code I use: > > page_size = $ie.frame('MainWindow').html.length + > $ie.frame('MainWindow').image(:index, 2).fileSize.to_i > > The question I have is why "length" returns a number but "fileSize" > returns a string (of a number)? It took me a minute to figure out that > fileSize was returning a string and that's why the sum was failing. Once I > appended the ".to_i" it worked fine. > > Is this by design? It just seems a bit inconsistent to me. Since I don't > know the history of this function I thought I'd ask. I haven't explored any > other functions that return numbers to see if they are also strings. > > Paul. > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060315/6b29f2c9/attachment.html From kalen.howell at gmail.com Wed Mar 15 13:53:45 2006 From: kalen.howell at gmail.com (Kalen Howell) Date: Wed, 15 Mar 2006 13:53:45 -0500 Subject: [Wtr-general] Fwd: Accessing HTML Source In-Reply-To: References: <4b616f150603141138h1f623b22vb8a790cacdfaca98@mail.gmail.com> <4b616f150603141155u4126ff3sc6dcae2550ee9beb@mail.gmail.com> <72799cd70603141223l4a77ad3erb8f9087262fa985d@mail.gmail.com> <4b616f150603141258h546901a5j8d82c0250a9fae6a@mail.gmail.com> <4b616f150603150523x453678cfq5d673a9025672cd6@mail.gmail.com> Message-ID: <4b616f150603151053i7ae71a10udfd1d8a9c978d1b2@mail.gmail.com> This is great info! Thank you for your help on this! Just to share; I am piloting a move away from a proprietary application (Silk Test), and working more with Ruby::Watir and also working in HttpUnit, within an Agile development project. Hopefully in the not too far off future I will be able to contribute my knowledge and experiences with those seeking help through this mailing list. Once again I really appreciate the help!!!! Kalen On 3/15/06, Zeljko Filipin wrote: > > > I downloaded watir-1.4.1.exe windows executable last night, and still > was not able to access the information. > As I understood it, Bret wrote that this but had been resolved AFTER1.4.1. > was released ("This is indeed a bug that has been fixed since1.4.1.") > Until they release a new version, you can download latest commit fromhere > (there may be something even fresher at http://svn.openqa.org/,but ignore > that for now) > http://rubyforge.org/cgi-bin/viewcvs.cgi/root.tar.gz?root=wtr&view=tar > Unzip it, run install.rb and you will have the newest watir. > > Can you tell me the command I can enter into irb to confirm the version > of Watir? > You can do it from command prompt > ruby -e 'require "watir"; puts Watir::IE::VERSION' > and from irb > irb(main):002:0> require "watir"=> trueirb(main):003:0> > Watir::IE::VERSION=> "1.4" > > While I am in the there, can you tell me the command to get the Ruby > version number? > >From command prompt > ruby -v > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060315/1263b125/attachment.html From mb at michaelbolton.net Wed Mar 15 14:26:07 2006 From: mb at michaelbolton.net (mb at michaelbolton.net) Date: Wed, 15 Mar 2006 14:26:07 -0500 Subject: [Wtr-general] Wtr-general] Finding out the order of input elements? Message-ID: show_all_objects returns nil and a bunch of text to stdout. Is there anything that returns the output in array format? (If not, it's off to Jira with me.) ---Michael B. -------------------------------------------------------------------------------- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: March 15, 2006 10:50 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Finding out the order of input elements? You could parse the html. On 3/15/06, Pekka M??tt? wrote: Anyone? I got the idea of sending tab key presses to ie and checking where the focus is, but it's kinda hacky.. -PM >Message: 3 >Date: Tue, 07 Mar 2006 10:32:46 +0200 >From: Pekka M??tt? < pekka.maatta at proventia.fi> >Subject: [Wtr-general] Finding out the order of input elements? >To: wtr-general at rubyforge.org >Message-ID: <440D452E.6000805 at proventia.fi> >Content-Type: text/plain; charset=ISO-8859-1; format=flowed > >Hi, > >I'm new to Watir (and Ruby), so this may be a stupid question.... tried >searching around a bit, but with little success. So here goes: > >How do I find out if an input element precedes another or not? > >There does not seem to be a method for accessing all html inputs on page >at once, nor does not seem to be an index attribute or such in input >objects. So I can get ordered lists of text fields, selects and buttons, >but have no way of knowing if, for example, if a certain text field >element is defined before a certain button on a page. Or do I? > >TY in advance, > >-PM > > _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general DevelopSense: Software Testing in Plain English http://www.developsense.com From Mark_Cain at rl.gov Wed Mar 15 16:38:45 2006 From: Mark_Cain at rl.gov (Cain, Mark) Date: Wed, 15 Mar 2006 13:38:45 -0800 Subject: [Wtr-general] Error when window closes using IE.attach Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5B5@EX5V.rl.gov> I am getting the following error when the window I have attached to closes and returns to the main window-actually the main window closes too and the error is displayed. I can't send the web page due to proprietary and confidential information, but what it does is there is a name picker that pops up in a new window (the one I am attaching to) and once a name is selected clicking the button closes the window and transfers the selected name to the main window and is displayed in a select box. Ruby version 1.8.4_16 Watir revision 934 (current from trunk) 1) Error: test_main(TC_ARM_Start): WIN32OLERuntimeError: busy OLE error code:80004005 in HRESULT error code:0x80020009 Exception occurred. c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1465:in `method_missing' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1465:in `wait' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2253:in `click' C:/watir_bonus/working/ARM/tc_ARM_Start.rb:34:in `test_main' exit c:/ruby/lib/ruby/1.8/test/unit.rb:285:in `exit' c:/ruby/lib/ruby/1.8/test/unit.rb:285 C:/watir_bonus/working/ARM/tc_ARM_Start.rb:13 My watir script: def gotoPopUpPage() $ie.goto("http://apwtst200.rl.gov/ARM/main.cfm?screen=0") end def test_main $d = Time.now.strftime("%m/%d/%Y") gotoPopUpPage() $ie.selectBox( :name, "Program").select("LMIT") $ie.selectBox( :name, "myProjectID2").select(/MARK-TEST/i) $ie.selectBox( :name, "myProjectID2").fireEvent("OnBlur") $ie.selectBox( :name, "DocumentMethod").select("by Checklist Number") $ie.textField( :name, "SearchString").set("TST") $ie.button("Search").click #$ie.selectBox( :name, "myProjectID2").select(/MARK-TEST/i) $ie.radio( :id, '72').set $ie.button(/Start/i).click $ie.selectBox( :name, "ProjectVersion").select(/4.4/i) #$ie.selectBox( :name, "namedisplay").select(/4.4/i) $ie.button("...").click sleep 2 nw = IE.attach(:title, "ARM") nw.text_field( :name, "Filter").set("Cain, Mark") nw.button(:id, "PersonnelSearch").click nw.button(:id, "SelectButton").click $ie.status() $ie.text_field(:name, "d_date").set("#{d}") $ie.selectBox( :name, "d_time").select(/15 minutes/i) $ie.textArea(:name, "").set("Me\nMyself\nI") End End Anyone seen this before? I have used attach before without issue. Thanks, ____________________ Mark L. Cain LMIT - E*STARS(r) ~ Lead Test Engineer 1981 Snyder, MSIN: G3-62, Richland, WA 99354 Mark_Cain at RL.gov 509.376.5458 "640 Kilobytes of computer memory ought to be enough for anybody." - Bill Gates, 1981 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060315/d5d9dca0/attachment.html From bret at pettichord.com Wed Mar 15 19:37:49 2006 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 15 Mar 2006 18:37:49 -0600 Subject: [Wtr-general] Error when window closes using IE.attach In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5B5@EX5V.rl.gov> References: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5B5@EX5V.rl.gov> Message-ID: Replace this code: $ie.button("...").click With this: $ie.button("...").ole_object.click The problem is that the normal click method has in implicit "wait" and this is failing because it is polling the browser to see if it is still loading a page when the browser disappears (which in your case is correct). This workaround does a click without a wait. Watir 1.5 has a new click_no_wait method which also should be able to handle this situation. This in any case a bug. Feel free to post it to Jira if you'd like to see a fix. Bret On 3/15/06, Cain, Mark wrote: > > I am getting the following error when the window I have attached to > closes and returns to the main window?actually the main window closes too > and the error is displayed. > > > > I can't send the web page due to proprietary and confidential information, > but what it does is there is a name picker that pops up in a new window (the > one I am attaching to) and once a name is selected clicking the button > closes the window and transfers the selected name to the main window and is > displayed in a select box. > > > > Ruby version 1.8.4_16 > > Watir revision 934 (current from trunk) > > > > 1) Error: > > test_main(TC_ARM_Start): > > WIN32OLERuntimeError: busy > > OLE error code:80004005 in > > > > HRESULT error code:0x80020009 > > Exception occurred. > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1465:in `method_missing' > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1465:in `wait' > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2253:in `click' > > C:/watir_bonus/working/ARM/tc_ARM_Start.rb:34:in `test_main' > > exit > > c:/ruby/lib/ruby/1.8/test/unit.rb:285:in `exit' > > c:/ruby/lib/ruby/1.8/test/unit.rb:285 > > C:/watir_bonus/working/ARM/tc_ARM_Start.rb:13 > > > > > > My watir script: > > def gotoPopUpPage() > > $ie.goto("http://apwtst200.rl.gov/ARM/main.cfm?screen=0") > > end > > > > def test_main > > $d = Time.now.strftime("%m/%d/%Y") > > gotoPopUpPage() > > $ie.selectBox( :name, "Program").select("LMIT") > > $ie.selectBox( :name, "myProjectID2").select(/MARK-TEST/i) > > $ie.selectBox( :name, "myProjectID2").fireEvent("OnBlur") > > $ie.selectBox( :name, "DocumentMethod").select("by Checklist > Number") > > $ie.textField( :name, "SearchString").set("TST") > > $ie.button("Search").click > > > > #$ie.selectBox( :name, "myProjectID2").select(/MARK-TEST/i) > > $ie.radio( :id, '72').set > > $ie.button(/Start/i).click > > > > $ie.selectBox( :name, "ProjectVersion").select(/4.4/i) > > #$ie.selectBox( :name, "namedisplay").select(/4.4/i) > > $ie.button("...").click > > > > sleep 2 > > nw = IE.attach(:title, "ARM") > > nw.text_field( :name, "Filter").set("Cain, Mark") > > nw.button(:id, "PersonnelSearch").click > > nw.button(:id, "SelectButton").click > > > > $ie.status() > > $ie.text_field(:name, "d_date").set("#{d}") > > $ie.selectBox( :name, "d_time").select(/15 minutes/i) > > $ie.textArea(:name, "").set("Me\nMyself\nI") > > > > End > > > > End > > > > Anyone seen this before? > > > > I have used attach before without issue. > > > > Thanks, > > ____________________ > *Mark L. Cain* > *LMIT - **E*****STARS*(r)* **~ **Lead Test Engineer* > *1981 Snyder, MSIN: G3-62, Richland, WA 99354** > Mark_Cain at RL.gov > 509.376.5458* > *"640 Kilobytes of computer memory ought to be enough for anybody."** - > Bill Gates, 1981 * > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060315/f827ca40/attachment.html From bret at pettichord.com Wed Mar 15 19:43:45 2006 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 15 Mar 2006 18:43:45 -0600 Subject: [Wtr-general] Wtr-general] Finding out the order of input elements? In-Reply-To: References: Message-ID: On 3/15/06, mb at michaelbolton.net wrote: > > show_all_objects returns nil and a bunch of text to stdout. Is there > anything > that returns the output in array format? (If not, it's off to Jira with > me.) > > ---Michael B. We have plans to replace IE#show_all_objects with IE#elements.show, using a new IE#elements iterator. This is already in the the old tracker on Rubyforge (i think). Using this, you could easily get an array with: elements_array = ie.elements.collect You can try this out with any of the existing collection objects (e.g. ie.text_fields.collect). Feel free to put this in Jira and reference the Rubyforge tracker item if you can find it. Thanks. Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060315/9c9f2b74/attachment.html From bret at pettichord.com Wed Mar 15 19:45:05 2006 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 15 Mar 2006 18:45:05 -0600 Subject: [Wtr-general] Fwd: Accessing HTML Source In-Reply-To: <4b616f150603151053i7ae71a10udfd1d8a9c978d1b2@mail.gmail.com> References: <4b616f150603141138h1f623b22vb8a790cacdfaca98@mail.gmail.com> <4b616f150603141155u4126ff3sc6dcae2550ee9beb@mail.gmail.com> <72799cd70603141223l4a77ad3erb8f9087262fa985d@mail.gmail.com> <4b616f150603141258h546901a5j8d82c0250a9fae6a@mail.gmail.com> <4b616f150603150523x453678cfq5d673a9025672cd6@mail.gmail.com> <4b616f150603151053i7ae71a10udfd1d8a9c978d1b2@mail.gmail.com> Message-ID: Could someone please post this to the FAQ? On 3/15/06, Kalen Howell wrote: > > This is great info! > > Thank you for your help on this! > > Just to share; I am piloting a move away from a proprietary application > (Silk Test), and working more with Ruby::Watir and also working in HttpUnit, > within an Agile development project. > > Hopefully in the not too far off future I will be able to contribute my > knowledge and experiences with those seeking help through this mailing list. > > Once again I really appreciate the help!!!! > > Kalen > > > On 3/15/06, Zeljko Filipin wrote: > > > > > I downloaded watir-1.4.1.exe windows executable last night, and still > > was not able to access the information. > > As I understood it, Bret wrote that this but had been resolved > > AFTER1.4.1. was released ("This is indeed a bug that has been fixed > > since1.4.1.") > > Until they release a new version, you can download latest commit > > fromhere (there may be something even fresher at > > http://svn.openqa.org/,but ignore that for now) > > http://rubyforge.org/cgi-bin/viewcvs.cgi/root.tar.gz?root=wtr&view=tar > > Unzip it, run install.rb and you will have the newest watir. > > > Can you tell me the command I can enter into irb to confirm the > > version of Watir? > > You can do it from command prompt > > ruby -e 'require "watir"; puts Watir::IE::VERSION' > > and from irb > > irb(main):002:0> require "watir"=> trueirb(main):003:0> > > Watir::IE::VERSION=> " 1.4" > > > While I am in the there, can you tell me the command to get the Ruby > > version number? > > >From command prompt > > ruby -v > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060315/4e38f579/attachment.html From phanideepam at yahoo.com Wed Mar 15 21:28:13 2006 From: phanideepam at yahoo.com (Deepa Mallapareddy) Date: Wed, 15 Mar 2006 18:28:13 -0800 (PST) Subject: [Wtr-general] Regarding the Select Box Message-ID: <20060316022813.31587.qmail@web50901.mail.yahoo.com> Hi All, I have an issue with the select box. I need to retreive the value selected in a select box. (i.e)once I select a value from the select box how will I be able to store that value in a different variable $IE3.form( :name, "").select_list( :name, "anSortValues[MDN]").select('2') now wat if I want to know the value selected ( in the ablove case its 2) I tried to retreive it using $IE3.form( :name, "").select_list( :name, "anSortValues[MDN]").getSelectedItems but it wont work at all ..... Kindly suggest Thanking you Deepa Whatever you can do or dream you can, begin it. Boldness has genius, power, and magic in it. --Johann Wolfgang von Goethe ------------------------------------------------------------------------ Deepa Mallapareddy, 4981,Catoctin Drive, Apt#15,San Diego CA - 92115 --------------------------------- Yahoo! Mail Bring photos to life! New PhotoMail makes sharing a breeze. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060315/66aa3533/attachment.html From phanideepam at yahoo.com Wed Mar 15 21:52:54 2006 From: phanideepam at yahoo.com (Deepa Mallapareddy) Date: Wed, 15 Mar 2006 18:52:54 -0800 (PST) Subject: [Wtr-general] Regarding the Select Box In-Reply-To: <20060316022813.31587.qmail@web50901.mail.yahoo.com> Message-ID: <20060316025254.78723.qmail@web50910.mail.yahoo.com> Hi All, This getSelectedItems works now. Thank you Deepa Deepa Mallapareddy wrote: Hi All, I have an issue with the select box. I need to retreive the value selected in a select box. (i.e)once I select a value from the select box how will I be able to store that value in a different variable $IE3.form( :name, "").select_list( :name, "anSortValues[MDN]").select('2') now wat if I want to know the value selected ( in the ablove case its 2) I tried to retreive it using $IE3.form( :name, "").select_list( :name, "anSortValues[MDN]").getSelectedItems but it wont work at all ..... Kindly suggest Thanking you Deepa ! Whatever you can do or dream you can, begin it. Boldness has genius, power, and magic in it. --Johann Wolfgang von Goethe ------------------------------------------------------------------------ Deepa Mallapareddy, 4981,Catoctin Drive, Apt#15,San Diego CA - 92115 --------------------------------- Yahoo! Mail Bring photos to life! New PhotoMail makes sharing a breeze. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general Whatever you can do or dream you can, begin it. Boldness has genius, power, and magic in it. --Johann Wolfgang von Goethe ------------------------------------------------------------------------ Deepa Mallapareddy, 4981,Catoctin Drive, Apt#15,San Diego CA - 92115 --------------------------------- Yahoo! Mail Use Photomail to share photos without annoying attachments. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060315/42d868bb/attachment.html From tanushree.bhoi at gmail.com Thu Mar 16 03:17:06 2006 From: tanushree.bhoi at gmail.com (Tanushree Bhoi) Date: Thu, 16 Mar 2006 13:47:06 +0530 Subject: [Wtr-general] Watir-Examples Message-ID: <74eaa5760603160017v63a4c75bt68f42f707cb4ea92@mail.gmail.com> Hi Paul, Thank you very much.I did what you have said.Spysmith is a great tool.Nowgoogle_maps.rb is working fine.But still mouse_over.rb is not working,its giving error in attach_browser_window.Unable to locate a window with title of "Faculty Web Sites @ Fort Lewis College,Durango Colorado".I checked it with spysmith it is same.can you please help if i am doing any silly mistake. Thanks in advance. Regards Tanu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060316/a8211884/attachment.html From angrez at gmail.com Thu Mar 16 03:18:40 2006 From: angrez at gmail.com (Angrez Singh) Date: Thu, 16 Mar 2006 13:48:40 +0530 Subject: [Wtr-general] FireWatir release alpha v1.0 In-Reply-To: References: Message-ID: Hi, Did you install the XPI that is included in the package? Regards, Angrez On 3/15/06, Zeljko Filipin wrote: > > Of course, when I start unit tests, I get this error message. > C:\watir\mozilla_unittests>mozilla_all_tests.rbC:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1263:in > `initialize': Bad filedescriptor - connect(2) (Errno::EBADF) from > C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1263:in `initialize' from > C:/watir/mozilla_unittests/../mozilla_unittests/setup.rb:35:in`start_ie_with_logger' from > C:/watir/mozilla_unittests/../mozilla_unittests/setup.rb:49 from > C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in`require' from > C:/watir/mozilla_unittests/mozilla_all_tests.rb:6 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060316/7e1a1416/attachment.html From zeljko.filipin at gmail.com Thu Mar 16 04:06:33 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Thu, 16 Mar 2006 10:06:33 +0100 Subject: [Wtr-general] Fwd: Accessing HTML Source In-Reply-To: References: <4b616f150603141138h1f623b22vb8a790cacdfaca98@mail.gmail.com> <72799cd70603141223l4a77ad3erb8f9087262fa985d@mail.gmail.com> <4b616f150603141258h546901a5j8d82c0250a9fae6a@mail.gmail.com> <4b616f150603150523x453678cfq5d673a9025672cd6@mail.gmail.com> <4b616f150603151053i7ae71a10udfd1d8a9c978d1b2@mail.gmail.com> Message-ID: http://wiki.openqa.org/display/WTR/FAQ#FAQ-RubyandWatirversion On 3/16/06, Bret Pettichord wrote: > > Could someone please post this to the FAQ? > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060316/ad5272e2/attachment.html From zeljko.filipin at gmail.com Thu Mar 16 04:17:43 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Thu, 16 Mar 2006 10:17:43 +0100 Subject: [Wtr-general] FireWatir release alpha v1.0 In-Reply-To: References: Message-ID: Yes, I can see DOM Inspector 1.8.0.1 at extensions. "telnet localhost 9997" worked for me two days ago, but then Firewatir did not work because I had watir 1.4.1. On 3/16/06, Angrez Singh wrote: > > Hi, > > Did you install the XPI that is included in the package? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060316/2ae74f57/attachment.html From tester.paul at gmail.com Thu Mar 16 09:43:20 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Thu, 16 Mar 2006 09:43:20 -0500 Subject: [Wtr-general] Watir-Examples In-Reply-To: <74eaa5760603160017v63a4c75bt68f42f707cb4ea92@mail.gmail.com> References: <74eaa5760603160017v63a4c75bt68f42f707cb4ea92@mail.gmail.com> Message-ID: <37c405480603160643r76112f5fn@mail.gmail.com> I'm not sure but is the new browser window opening when the link is clicked? Do you have the Popup Blocker enabled in IE? This also happened to me the first time I ran the mouse_over.rb script. I had to "allow popups" for this Fort Lewis site in Internet Explorer. If it's not that, I'm not sure what else to suggest. Paul. On 16/03/06, Tanushree Bhoi wrote: > > Hi Paul, > > Thank you very much.I did what you have said.Spysmith is a great tool.Nowgoogle_maps.rb is working > fine.But still mouse_over.rb is not working,its giving error in > attach_browser_window.Unable to locate a window with title of "Faculty Web > Sites @ Fort Lewis College,Durango > Colorado".I checked it with spysmith it is same.can you please help if i > am doing any silly mistake. > > Thanks in advance. > Regards > Tanu > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060316/08bf230c/attachment.html From angrez at gmail.com Thu Mar 16 12:12:54 2006 From: angrez at gmail.com (Angrez Singh) Date: Thu, 16 Mar 2006 22:42:54 +0530 Subject: [Wtr-general] FireWatir release alpha v1.0 In-Reply-To: References: Message-ID: Hi, > Yes, I can see DOM Inspector 1.8.0.1 at extensions. > > "telnet localhost 9997" worked for me two days ago, but then Firewatir did > not work because I had watir 1.4.1. > DOM Inspector has nothing to do with JSSh extension. I don't know why its not working if it has been working before. Try installing it again & let me know if it works. Regards, Angrez -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060316/2c71f976/attachment.html From gregory.mcshea at oracle.com Thu Mar 16 15:22:25 2006 From: gregory.mcshea at oracle.com (Greg McShea) Date: Thu, 16 Mar 2006 12:22:25 -0800 Subject: [Wtr-general] Watir installation broken? In-Reply-To: <20060313203724972.00000003696@gmcshea-pc2> Message-ID: <20060316122225097.00000004060@gmcshea-pc2> Hi Bret, I haven't used any winclickers but right before the problem started to occur I did execute an attach command from an irb command window. Thanks, Greg -----Original Message----- From: Greg McShea [mailto:gregory.mcshea at oracle.com] Sent: Monday, March 13, 2006 8:37 PM To: Greg McShea; Wtr-general at rubyforge.org Subject: RE: Watir installation broken? Brett, Rebooting the machine solved the problem. Thanks for the suggestion. I was reluctant to reboot at the time since I was several hours into a build. Thanks, Greg -----Original Message----- From: Greg McShea [mailto:gregory.mcshea at oracle.com] Sent: Monday, March 13, 2006 5:36 PM To: Wtr-general at rubyforge.org Cc: gregory.mcshea at oracle.com Subject: Watir installation broken? Hi, I seem to have "broken" Watir somehow. I have been happily building/testing evaluation scripts using Watir and have been able to run the examples and unit tests OK. When running a script today my app failed to load in the browser. I tried a few more times with the same result. Now I cannot get any scripts (which were all previously working) to load a page in the browser when launched with Watir. Everytime I launch a Watir script IE starts but the location does not load in the browser. This is even happening with the sample google test suite. After a couple minutes I get the "The page cannot be displayed" error in IE. If I then manually enter a URL in the same browser session I get the same result. However if I launch a new browser manually (not initiated by Watir) the same URL loads just fine. For some reason IE sessions launched by Watir cannot load an URLs. Any idea whats going on or how to fix this without complete reinstallation. BTW, ruby seems to be OK as I can still run the FreeRIDE. Thanks, Greg -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060316/7ae668ba/attachment.html From phanideepam at yahoo.com Thu Mar 16 16:11:04 2006 From: phanideepam at yahoo.com (Deepa Mallapareddy) Date: Thu, 16 Mar 2006 13:11:04 -0800 (PST) Subject: [Wtr-general] Regarding Hidden Select Boxes In-Reply-To: <20060316122225097.00000004060@gmcshea-pc2> Message-ID: <20060316211104.24503.qmail@web50908.mail.yahoo.com> Hi all, Im not able to retrieve the value of a select box which is being disabled. for example: assert_false(index1a == $IE3.form( :name, "").select_list( :name, "anSortValues[field1]").getSelectedItems) puts"same value " and the HTML code of this is Field Please let me know if there is any other way to access the hidden type select boxes Thanking you deepa Whatever you can do or dream you can, begin it. Boldness has genius, power, and magic in it. --Johann Wolfgang von Goethe ------------------------------------------------------------------------ Deepa Mallapareddy, 4981,Catoctin Drive, Apt#15,San Diego CA - 92115 --------------------------------- Relax. Yahoo! Mail virus scanning helps detect nasty viruses! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060316/5621418f/attachment.html From Mark_Cain at rl.gov Thu Mar 16 17:25:54 2006 From: Mark_Cain at rl.gov (Cain, Mark) Date: Thu, 16 Mar 2006 14:25:54 -0800 Subject: [Wtr-general] Error when window closes using IE.attach Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5BC@EX5V.rl.gov> It may be related but I have been seeing this all day once I put your suggestions into my script. -e:1: C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1470:in `method_missing': busy (WIN32OLERuntimeError) OLE error code:80004005 in HRESULT error code:0x80020009 Exception occurred. from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1470:in `wait' from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2258:in `click' from (eval):1 The script continues and completes without further error. By the way, $ie.button("...").click_no_wait worked, but $ie.button("...").ole_object.click did not I get this error: 1) Error: test_main(TC_ARM_Start): NoMethodError: undefined method `click' for nil:NilClass C:/watir_bonus/working/ARM/tc_ARM_Start.rb:40:in `test_main' --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Wednesday, March 15, 2006 4:38 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Error when window closes using IE.attach Replace this code: $ie.button("...").click With this: $ie.button("...").ole_object.click The problem is that the normal click method has in implicit "wait" and this is failing because it is polling the browser to see if it is still loading a page when the browser disappears (which in your case is correct). This workaround does a click without a wait. Watir 1.5 has a new click_no_wait method which also should be able to handle this situation. This in any case a bug. Feel free to post it to Jira if you'd like to see a fix. Bret On 3/15/06, Cain, Mark wrote: I am getting the following error when the window I have attached to closes and returns to the main window-actually the main window closes too and the error is displayed. I can't send the web page due to proprietary and confidential information, but what it does is there is a name picker that pops up in a new window (the one I am attaching to) and once a name is selected clicking the button closes the window and transfers the selected name to the main window and is displayed in a select box. Ruby version 1.8.4_16 Watir revision 934 (current from trunk) 1) Error: test_main(TC_ARM_Start): WIN32OLERuntimeError: busy OLE error code:80004005 in HRESULT error code:0x80020009 Exception occurred. c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1465:in `method_missing' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1465:in `wait' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2253:in `click' C:/watir_bonus/working/ARM/tc_ARM_Start.rb:34:in `test_main' exit c:/ruby/lib/ruby/1.8/test/unit.rb:285:in `exit' c:/ruby/lib/ruby/1.8/test/unit.rb:285 C:/watir_bonus/working/ARM/tc_ARM_Start.rb:13 My watir script: def gotoPopUpPage() $ie.goto("http://apwtst200.rl.gov/ARM/main.cfm?screen=0") end def test_main $d = Time.now.strftime("%m/%d/%Y") gotoPopUpPage() $ie.selectBox( :name, "Program").select("LMIT") $ie.selectBox( :name, "myProjectID2").select(/MARK-TEST/i) $ie.selectBox( :name, "myProjectID2").fireEvent("OnBlur") $ie.selectBox( :name, "DocumentMethod").select("by Checklist Number") $ie.textField( :name, "SearchString").set("TST") $ie.button("Search").click #$ie.selectBox( :name, "myProjectID2").select(/MARK-TEST/i) $ie.radio( :id, '72').set $ie.button(/Start/i).click $ie.selectBox( :name, "ProjectVersion").select(/4.4/i) #$ie.selectBox( :name, "namedisplay").select(/4.4/i) $ie.button("...").click sleep 2 nw = IE.attach(:title, "ARM") nw.text_field( :name, "Filter").set("Cain, Mark") nw.button(:id, "PersonnelSearch").click nw.button(:id, "SelectButton").click $ie.status() $ie.text_field(:name, "d_date").set("#{d}") $ie.selectBox( :name, "d_time").select(/15 minutes/i) $ie.textArea(:name, "").set("Me\nMyself\nI") End End Anyone seen this before? I have used attach before without issue. Thanks, ____________________ Mark L. Cain LMIT - E *STARS (r) ~ Lead Test Engineer 1981 Snyder, MSIN: G3-62, Richland, WA 99354 Mark_Cain at RL.gov 509.376.5458 "640 Kilobytes of computer memory ought to be enough for anybody." - Bill Gates, 1981 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060316/5ccc6647/attachment.html From Mark_Cain at rl.gov Thu Mar 16 18:32:31 2006 From: Mark_Cain at rl.gov (Cain, Mark) Date: Thu, 16 Mar 2006 15:32:31 -0800 Subject: [Wtr-general] Older scripts running really slow... Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5BE@EX5V.rl.gov> FYI concerning this slowness issue. I do some of my script development in Komodo 3.5 (it has a pretty good debugger), but today I was using Eclipse and the difference in execution speed was dramatic! In eclipse they ran almost as fast as 1.4.1-just about 10 - 15 seconds slower but that could have been my machine. Just thought you might be interested. --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Michael Bolton Sent: Thursday, March 02, 2006 1:45 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Older scripts running really slow... Obvious possibilities are - response time on the Web pages - typing speed in the forms Are your pages visible? Do they look slower? When they're loading? When they're typing? If you've got one test that takes half a minute and another that takes three minutes (which you do), the places where slowdowns are happening are plausibly visible to the human eye. Apropos of not very much, but you noticed that "Problem" is spelled "Probelm" below, right? ---Michael B. ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: March 2, 2006 4:17 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Older scripts running really slow... With Watir 1.4.1 (just downloaded and reinstalled) it took: Finished in 31.797 seconds. With Watir from current SVN (did a checkout on the http://svn.openqa.org/svn/watir/trunk/watir) Finished in 179.047 seconds. This is the part that ran: =============================================================== # feature tests for javascript PopUps # revision: $Revision: 1.11 $ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'c:\watir\unittests\setup' require 'watir\dialog' class TC_PER < Test::Unit::TestCase include Watir def gotoPopUpPage() $ie.goto("http://apwtst200.rl.gov/rapidweb/chg/per/per/main.cfm") $ie.set_fast_speed() end #def startClicker( button , waitTime = 3) # w = WinClicker.new # longName = $ie.dir.gsub("/" , "\\" ) # shortName = w.getShortFileName(longName) # c = "start rubyw #{shortName }\\watir\\clickJSDialog.rb #{button } #{ waitTime} " # puts "Starting #{c}" # w.winsystem(c) # w=nil #end def test0_originator $d = Time.now.strftime("%m/%d/%Y") gotoPopUpPage() $ie.text_field(:name, "d_date").set("#{ $d }") $ie.text_field(:name, "d_time").set("1111") $ie.selectBox( :name, "progproj").select(/Other/) $ie.selectBox( :name, "locationID").select(/AW Farm/) $ie.selectBox( :name, "ProblemDiscoveredID").select(/EH\-22/) $ie.text_field( :name, "probdescript").set("Probelm Description Test") $ie.selectBox( :name, "sinID").select(/Cooling Water/) $ie.text_field( :name, "ein").set("eid-001") $ie.checkBox( :name, "reqnsatcheck").set $ie.text_field( :name, "reqnsat").set("Req Not Satisfied") $ie.checkBox( :name, "sourcedoccheck").set $ie.text_field( :name, "SourceDocument").set("Source Doc") $ie.text_field( :name, "actionplan").set("This is a test of the Action Plan text area.") $ie.text_field( :name, "RecommendedCorrectiveActions").set("This is a test of Recommended Actions Taken text area.") $ie.radio( :name, "feedback", 1).set $ie.radio( :name, "feedbacktype", 'other').set $ie.text_field( :name, "feedbackother").set("Feedback Other") #startClicker("OK" , 3) $ie.button("Submit").click_no_wait dialog.button('OK').click $ie.link(:text, /PER-2006-/i).click assert($ie.text_field(:name, "d_date").verify_contains("#{$d}")) assert($ie.text_field(:name, "d_time").verify_contains("11:11")) assert_arrayEquals( ["Other" ] , $ie.select_list(:name, "progproj").getSelectedItems) assert_arrayEquals( ["AW Farm" ] , $ie.select_list(:name, "locationID").getSelectedItems) assert_arrayEquals( ["EH-22" ] , $ie.select_list(:name, "ProblemDiscoveredID").getSelectedItems) assert($ie.text_field(:name, "probdescript").verify_contains("Probelm Description Test")) assert_arrayEquals( ["Cooling Water" ] , $ie.select_list(:name, "sinID").getSelectedItems) assert($ie.text_field(:name, "ein").verify_contains("eid-001")) assert($ie.checkbox(:name, "reqnsatcheck").isSet?) assert($ie.text_field(:name, "reqnsat").verify_contains("Req Not Satisfied")) assert($ie.checkbox(:name, "sourcedoccheck").isSet?) assert($ie.text_field(:name, "SourceDocument").verify_contains("Source Doc")) assert($ie.text_field(:name, "actionplan").verify_contains("This is a test of the Action Plan text area.")) assert($ie.text_field(:name, "RecommendedCorrectiveActions").verify_contains("This is a test of Recommended Actions Taken text area.")) assert($ie.radio(:name, "feedback").isSet?) assert($ie.radio(:name, "feedbacktype", 'other').isSet?) assert($ie.text_field(:name, "feedbackother").verify_contains("Feedback Other")) end end --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Thursday, March 02, 2006 12:57 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Older scripts running really slow... Could you please do an apples to apples comparison running your scripts with different versions of Watir against the same version of your application. It's possible an application change triggered the performance problem. Let us know the results. It would also be nice if you could share the Watir scripts that are slow. Bret On 3/2/06, Cain, Mark < Mark_Cain at rl.gov > wrote: I have some Watir script I wrote about 6 months ago and needed to do some regression testing using these scripts. Well when I began running them they were really slow! Where it used to take 15 to 20 seconds to fill out the page form now is taking 3 to 4 minutes. I have recently upgraded my Watir installation will the latest from SVN and ruby with 1.8.4 Preview 3. Has anyone one else been experiencing slowness? If yes, what did you do to fix it? Thanks, ____________________ Mark L. Cain LMIT - E *STARS (r) ~ Lead Test Engineer 1981 Snyder, MSIN: G3-62, Richland, WA 99354 Mark_Cain at RL.gov 509.376.5458 "640 Kilobytes of computer memory ought to be enough for anybody." - Bill Gates, 1981 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060316/d8bdd1e7/attachment.html From kalen.howell at gmail.com Thu Mar 16 19:04:06 2006 From: kalen.howell at gmail.com (Kalen Howell) Date: Thu, 16 Mar 2006 19:04:06 -0500 Subject: [Wtr-general] Fwd: Accessing HTML Source In-Reply-To: References: <4b616f150603141138h1f623b22vb8a790cacdfaca98@mail.gmail.com> <72799cd70603141223l4a77ad3erb8f9087262fa985d@mail.gmail.com> <4b616f150603141258h546901a5j8d82c0250a9fae6a@mail.gmail.com> <4b616f150603150523x453678cfq5d673a9025672cd6@mail.gmail.com> <4b616f150603151053i7ae71a10udfd1d8a9c978d1b2@mail.gmail.com> Message-ID: <4b616f150603161604v7b2e8d3cv8298af05422d70c1@mail.gmail.com> Thank you very much! By the way, I downloaded and installed the version of watir that you recommended and everything is working great! Thanks, Kalen On 3/16/06, Zeljko Filipin wrote: > > http://wiki.openqa.org/display/WTR/FAQ#FAQ-RubyandWatirversion > > On 3/16/06, Bret Pettichord wrote: > > > > Could someone please post this to the FAQ? > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060316/a5264872/attachment.html From christopher_brown at engin.com.au Fri Mar 17 00:01:25 2006 From: christopher_brown at engin.com.au (Brown, Christopher) Date: Fri, 17 Mar 2006 16:01:25 +1100 Subject: [Wtr-general] xpath support doesn't work for me Message-ID: Hi Angrez, To the best of my knowledge I have everything installed. I'm going to get my head round the Ruby debugger and see what I can glean. Cheers Chris -----Original Message----- From: Bret Pettichord [mailto:bret at pettichord.com] Sent: Friday, March 10, 2006 5:47 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] xpath support doesn't work for me On 3/9/06, Angrez Singh < angrez at gmail.com > wrote: 2. You have latest version of watir installed using install.rb not by using watir_installer.exe Actually install.rb is broken in HEAD. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060317/35757ae2/attachment.html From bret at pettichord.com Fri Mar 17 01:05:32 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 17 Mar 2006 00:05:32 -0600 Subject: [Wtr-general] Older scripts running really slow... In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5BE@EX5V.rl.gov> References: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5BE@EX5V.rl.gov> Message-ID: This information makes all of your earlier reports suspect. You never said anything about running the scripts under a debugger. The correct baseline is to run your scripts from a command line, not from an editor/debugger. If you want to update your original report with information from that baseline, then it can be considered. It is certainly possible that different editor and debugger environments introduce performance problems. But that isn't how you originally reported this bug. Bret On 3/16/06, Cain, Mark wrote: > > FYI concerning this slowness issue. I do some of my script development > in Komodo 3.5 (it has a pretty good debugger), but today I was using > Eclipse and the difference in execution speed was dramatic! In eclipse they > ran almost as fast as 1.4.1?just about 10 ? 15 seconds slower but that > could have been my machine. > > > > Just thought you might be interested. > > > > *--Mark* > > > ------------------------------ > > *From:* wtr-general-bounces at rubyforge.org [mailto: > wtr-general-bounces at rubyforge.org] *On Behalf Of *Michael Bolton > *Sent:* Thursday, March 02, 2006 1:45 PM > *To:* wtr-general at rubyforge.org > *Subject:* Re: [Wtr-general] Older scripts running really slow... > > > > Obvious possibilities are > > > > - response time on the Web pages > > - typing speed in the forms > > > > Are your pages visible? Do they look slower? When they're loading? When > they're typing? If you've got one test that takes half a minute and another > that takes three minutes (which you do), the places where slowdowns are > happening are plausibly visible to the human eye. > > > > Apropos of not very much, but you noticed that "Problem" is spelled > "Probelm" below, right? > > > > ---Michael B. > > > ------------------------------ > > *From:* wtr-general-bounces at rubyforge.org [mailto: > wtr-general-bounces at rubyforge.org] *On Behalf Of *Cain, Mark > *Sent:* March 2, 2006 4:17 PM > *To:* wtr-general at rubyforge.org > *Subject:* Re: [Wtr-general] Older scripts running really slow... > > With Watir 1.4.1 (just downloaded and reinstalled) it took: > > Finished in 31.797 seconds. > > > > With Watir from current SVN (did a checkout on the > http://svn.openqa.org/svn/watir/trunk/watir) > > Finished in 179.047 seconds. > > > > This is the part that ran: > > =============================================================== > > # feature tests for javascript PopUps > > # revision: $Revision: 1.11 $ > > > > $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == > __FILE__ > > require 'c:\watir\unittests\setup' > > require 'watir\dialog' > > > > class TC_PER < Test::Unit::TestCase > > include Watir > > > > def gotoPopUpPage() > > $ie.goto("http://apwtst200.rl.gov/rapidweb/chg/per/per/main.cfm") > > $ie.set_fast_speed() > > end > > > > #def startClicker( button , waitTime = 3) > > # w = WinClicker.new > > # longName = $ie.dir.gsub("/" , "\\" ) > > # shortName = w.getShortFileName(longName) > > # c = "start rubyw #{shortName }\\watir\\clickJSDialog.rb #{button } > #{ waitTime} " > > # puts "Starting #{c}" > > # w.winsystem(c) > > # w=nil > > #end > > > > def test0_originator > > $d = Time.now.strftime("%m/%d/%Y") > > gotoPopUpPage() > > > > $ie.text_field(:name, "d_date").set("#{ $d }") > > $ie.text_field(:name, "d_time").set("1111") > > > > $ie.selectBox( :name, "progproj").select(/Other/) > > $ie.selectBox( :name, "locationID").select(/AW Farm/) > > $ie.selectBox( :name, "ProblemDiscoveredID").select(/EH\-22/) > > $ie.text_field( :name, "probdescript").set("Probelm Description > Test") > > $ie.selectBox( :name, "sinID").select(/Cooling Water/) > > $ie.text_field( :name, "ein").set("eid-001") > > $ie.checkBox( :name, "reqnsatcheck").set > > $ie.text_field( :name, "reqnsat").set("Req Not Satisfied") > > $ie.checkBox( :name, "sourcedoccheck").set > > $ie.text_field( :name, "SourceDocument").set("Source Doc") > > > > $ie.text_field( :name, "actionplan").set("This is a test of the > Action Plan text area.") > > $ie.text_field( :name, "RecommendedCorrectiveActions").set("This is > a test of Recommended Actions Taken text area.") > > > > $ie.radio( :name, "feedback", 1).set > > $ie.radio( :name, "feedbacktype", 'other').set > > $ie.text_field( :name, "feedbackother").set("Feedback Other") > > > > #startClicker("OK" , 3) > > $ie.button("Submit").click_no_wait > > dialog.button('OK').click > > > > $ie.link(:text, /PER-2006-/i).click > > > > assert($ie.text_field(:name, "d_date").verify_contains("#{$d}")) > > assert($ie.text_field(:name, "d_time").verify_contains("11:11")) > > assert_arrayEquals( ["Other" ] , $ie.select_list(:name, > "progproj").getSelectedItems) > > assert_arrayEquals( ["AW Farm" ] , $ie.select_list(:name, > "locationID").getSelectedItems) > > assert_arrayEquals( ["EH-22" ] , $ie.select_list(:name, > "ProblemDiscoveredID").getSelectedItems) > > assert($ie.text_field(:name, > "probdescript").verify_contains("Probelm Description Test")) > > assert_arrayEquals( ["Cooling Water" ] , $ie.select_list(:name, > "sinID").getSelectedItems) > > assert($ie.text_field(:name, "ein").verify_contains("eid-001")) > > assert($ie.checkbox(:name, "reqnsatcheck").isSet?) > > assert($ie.text_field(:name, "reqnsat").verify_contains("Req Not > Satisfied")) > > assert($ie.checkbox(:name, "sourcedoccheck").isSet?) > > assert($ie.text_field(:name, > "SourceDocument").verify_contains("Source Doc")) > > > > assert($ie.text_field(:name, "actionplan").verify_contains("This > is a test of the Action Plan text area.")) > > assert($ie.text_field(:name, > "RecommendedCorrectiveActions").verify_contains("This is a test of > Recommended Actions Taken text area.")) > > > > assert($ie.radio(:name, "feedback").isSet?) > > assert($ie.radio(:name, "feedbacktype", 'other').isSet?) > > assert($ie.text_field(:name, > "feedbackother").verify_contains("Feedback Other")) > > end > > end > > > > *--Mark* > > > ------------------------------ > > *From:* wtr-general-bounces at rubyforge.org [mailto: > wtr-general-bounces at rubyforge.org] *On Behalf Of *Bret Pettichord > *Sent:* Thursday, March 02, 2006 12:57 PM > *To:* wtr-general at rubyforge.org > *Subject:* Re: [Wtr-general] Older scripts running really slow... > > > > Could you please do an apples to apples comparison running your scripts > with different versions of Watir against the same version of your > application. It's possible an application change triggered the performance > problem. Let us know the results. > > It would also be nice if you could share the Watir scripts that are slow. > > Bret > > On 3/2/06, *Cain, Mark* < Mark_Cain at rl.gov> wrote: > > I have some Watir script I wrote about 6 months ago and needed to do some > regression testing using these scripts. Well when I began running them they > were really slow! Where it used to take 15 to 20 seconds to fill out the > page form now is taking 3 to 4 minutes. I have recently upgraded my Watir > installation will the latest from SVN and ruby with 1.8.4 Preview 3. Has > anyone one else been experiencing slowness? If yes, what did you do to fix > it? > > > > Thanks, > > ____________________ > *Mark L. Cain* > *LMIT - **E** ***STARS* (r)* **~ **Lead Test Engineer* > *1981 Snyder, MSIN: G3-62, Richland, WA 99354** > Mark_Cain at RL.gov > 509.376.5458* > *"640 Kilobytes of computer memory ought to be enough for anybody."** - > Bill Gates, 1981 * > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060317/164a02e2/attachment.html From bret at pettichord.com Fri Mar 17 01:13:00 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 17 Mar 2006 00:13:00 -0600 Subject: [Wtr-general] Bad Bug Reports Message-ID: Frankly i have been surprised at how poor many of the bug reports on this list have been. They routinely omit key information. For a while, i thought that testers knew how to write good bug reports, but i actually see better bug reports on the mailing lists for open-source developer tools. Are developers better than testers are reporting problems? I'm considering refusing to try and speculate and suggest possible solutions when reports fail to provide the full error information and actual scripts. And i'm considering asking the other active answer providers on this list (like Zeljko and Michael and Chris) to follow the same policy. Now that the web recorder has lowered the bar for many people to start using Watir, i'm thinking we need to raise the bar for what information needs to be provided to get out attention. Comments please. It's been a very busy week at work and i'm tired and am unsure of my judgement here. Does this sound reasonable? Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060317/1f2b463b/attachment.html From bret at pettichord.com Fri Mar 17 01:14:25 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 17 Mar 2006 00:14:25 -0600 Subject: [Wtr-general] Fwd: Accessing HTML Source In-Reply-To: References: <4b616f150603141138h1f623b22vb8a790cacdfaca98@mail.gmail.com> <72799cd70603141223l4a77ad3erb8f9087262fa985d@mail.gmail.com> <4b616f150603141258h546901a5j8d82c0250a9fae6a@mail.gmail.com> <4b616f150603150523x453678cfq5d673a9025672cd6@mail.gmail.com> <4b616f150603151053i7ae71a10udfd1d8a9c978d1b2@mail.gmail.com> Message-ID: Excellent! On 3/16/06, Zeljko Filipin wrote: > > http://wiki.openqa.org/display/WTR/FAQ#FAQ-RubyandWatirversion > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060317/55d94245/attachment.html From bret at pettichord.com Fri Mar 17 01:15:36 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 17 Mar 2006 00:15:36 -0600 Subject: [Wtr-general] Watir installation broken? In-Reply-To: <20060316122225097.00000004060@gmcshea-pc2> References: <20060313203724972.00000003696@gmcshea-pc2> <20060316122225097.00000004060@gmcshea-pc2> Message-ID: Very helpful. Thanks. On 3/16/06, Greg McShea wrote: > > Hi Bret, > > I haven't used any winclickers but right before the problem started to > occur I did execute an attach command from an irb command window. > > Thanks, > Greg > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060317/b5a41b33/attachment.html From tanushree.bhoi at gmail.com Fri Mar 17 01:19:25 2006 From: tanushree.bhoi at gmail.com (Tanushree Bhoi) Date: Fri, 17 Mar 2006 11:49:25 +0530 Subject: [Wtr-general] Watir-Example Message-ID: <74eaa5760603162219mebb9be9j6587e81f06579122@mail.gmail.com> Thanks Paul. I just allowed popups and able to run the scripts perfectly by changing the url. Can you plz suggest me how can i write more powerfull scripts.I am just a beginner in software field.I want to automate one site completly means i want to write powerfull scripts for testing it with watir.Can you plz suggest me some resourse or the way i can start. Thank you very much.I like this mailing list in watir very much. Regards Tanu From pekka.maatta at proventia.fi Fri Mar 17 02:31:50 2006 From: pekka.maatta at proventia.fi (=?ISO-8859-1?Q?Pekka_M=E4=E4tt=E4?=) Date: Fri, 17 Mar 2006 09:31:50 +0200 Subject: [Wtr-general] Finding out the order of input elements? In-Reply-To: References: Message-ID: <441A65E6.5040902@proventia.fi> Thanks for the answers. I guess I'll have to test the (luckily) few troublesome pages manually for now, or even write page-specific (*gasp*) scripts for them. I'll post a workaround if I'll ever find the time to make one. -PM >Date: Wed, 15 Mar 2006 18:43:45 -0600 >From: "Bret Pettichord" >Subject: Re: [Wtr-general] Wtr-general] Finding out the order of input > elements? >To: wtr-general at rubyforge.org >Message-ID: > >Content-Type: text/plain; charset="iso-8859-1" > >On 3/15/06, mb at michaelbolton.net wrote: > > >>show_all_objects returns nil and a bunch of text to stdout. Is there >>anything >>that returns the output in array format? (If not, it's off to Jira with >>me.) >> >>---Michael B. >> >> > > >We have plans to replace IE#show_all_objects with IE#elements.show, using a >new IE#elements iterator. This is already in the the old tracker on >Rubyforge (i think). > >Using this, you could easily get an array with: > elements_array = ie.elements.collect > >You can try this out with any of the existing collection objects (e.g. >ie.text_fields.collect). > >Feel free to put this in Jira and reference the Rubyforge tracker item if >you can find it. Thanks. > >Bret > > From bret at pettichord.com Fri Mar 17 02:40:45 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 17 Mar 2006 01:40:45 -0600 Subject: [Wtr-general] Development Build Message-ID: For those of you interested in looking at the latest version of Watir currently in development, but not really interested in using Subversion or trying to figure out how to install Watir manually... We now provide development versions of both the gem (which has been tested) and the one-click installer (which has not). http://wiki.openqa.org/display/WTR/Development+Builds -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060317/72e9ffdc/attachment.html From zeljko.filipin at gmail.com Fri Mar 17 04:46:48 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 17 Mar 2006 10:46:48 +0100 Subject: [Wtr-general] Regarding Hidden Select Boxes In-Reply-To: <20060316211104.24503.qmail@web50908.mail.yahoo.com> References: <20060316122225097.00000004060@gmcshea-pc2> <20060316211104.24503.qmail@web50908.mail.yahoo.com> Message-ID: Well, I think it is because your code is all wrong. :) Your html does not show hidden type select box (I think it even does not exits). But, you could have just typed hidden by mistake (instead of disabled). But, just in case... Your html shows a hidden input field and a disabled select box Please do check this site http://www.w3schools.com/ (for html visit http://www.w3schools.com/html/default.asp) for more info. If you have this html and you would like to know what is selected, this will do it irb(main):014:0> ie.select_list( :name, "bPlaceholder").getSelectedItems => ["2"] It does not matter that it is disabled. If you would like to get all options, try this irb(main):015:0> ie.select_list( :name, "bPlaceholder").getAllContents => ["1", "2", "3", "4", "5", "6", "7", "8"] I hope I answered your question. -- http://www.testingreflections.com/blog/3071 http://iskusivac.blog.hr/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060317/4f68cc61/attachment.html From zeljko.filipin at gmail.com Fri Mar 17 05:13:24 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 17 Mar 2006 11:13:24 +0100 Subject: [Wtr-general] Bad Bug Reports In-Reply-To: References: Message-ID: I think we should put something like this at some visited place: We would like to help you, but we are very busy. We answer e-mails inour free time, so please help us help you. We will first answere-mails that follow this simple rules. >From The Basics of Bug Tracking (FogBugz Documentation): Every good bug report needs exactly three things.1. Steps to reproduce,2. What you expected to see, and3. What you saw instead. We should also add: 4. Please provide your script and html. Please make it as short aspossible. Remove all code and html that is not necessary to reproducethe problem.5. Please search mail archive and faq. Your problem may be alreadysolved. Wa are very sad when we see a question that is alreadyanswered (and we can not answer your question with eyes full oftears). If you find an answer in mail archive and not in faq, pleaseadd it to faq. We should also link to http://www.catb.org/~esr/faqs/smart-questions.html I am not a native speaker. I tried to use style that is friendly, butI am not shure if I did a good job. On 3/17/06, Bret Pettichord wrote:>> Frankly i have been surprised at how poor many of the bug reports on this list have been. They routinely omit key information.>> For a while, i thought that testers knew how to write good bug reports, but i actually see better bug reports on the mailing lists for open-source developer tools. Are developers better than testers are reporting problems?>> I'm considering refusing to try and speculate and suggest possible solutions when reports fail to provide the full error information and actual scripts. And i'm considering asking the other active answer providers on this list (like Zeljko and Michael and Chris) to follow the same policy.>> Now that the web recorder has lowered the bar for many people to start using Watir, i'm thinking we need to raise the bar for what information needs to be provided to get out attention.>> Comments please. It's been a very busy week at work and i'm tired and am unsure of my judgement here. Does this sound reasonable?>>> Bret>> _______________________________________________> Wtr-general mailing list> Wtr-general at rubyforge.org> http://rubyforge.org/mailman/listinfo/wtr-general>> --http://www.testingreflections.com/blog/3071http://iskusivac.blog.hr/ From zeljko.filipin at gmail.com Fri Mar 17 05:27:46 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 17 Mar 2006 11:27:46 +0100 Subject: [Wtr-general] FireWatir release alpha v1.0 In-Reply-To: References: Message-ID: My mistake. DOM Inspector got selected in extensions after I installedJSSh extension so I thought that it has different name there. I justuninstalled all extensions that I have, restarted firefox andinstalled JSSh, but there is nothing at extensions (not even anotherfirefox restart). Sould it be visible at extensions? On 3/16/06, Angrez Singh wrote:> DOM Inspector has nothing to do with JSSh extension. I don't know why its not working if it has been working before. Try installing it again & let me know if it works. From hgs at dmu.ac.uk Fri Mar 17 06:12:07 2006 From: hgs at dmu.ac.uk (Hugh Sasse) Date: Fri, 17 Mar 2006 11:12:07 +0000 (WET) Subject: [Wtr-general] Bad Bug Reports In-Reply-To: References: Message-ID: On Fri, 17 Mar 2006, Zeljko Filipin wrote: > I think we should put something like this at some visited place: People who don't bother to provide full information are probably "too busy" to read such a document. However: > We would like to help you, but we are very busy. We answer e-mails > inour free time, so please help us help you. We will first > answere-mails that follow this simple rules. > From The Basics of Bug Tracking (FogBugz Documentation): (presumably that isn't on line? It would be useful to know...) > Every good bug report needs exactly three things.1. Steps to > reproduce,2. What you expected to see, and3. What you saw instead. > We should also add: > 4. Please provide your script and html. Please make it as short Could Watir have a --bug-report option that collected this information? It should have access to the script and the HTML, should be able to record it's own version number, and extract RUBY_PLATFORM so we know what this is running on (OK, only Windows works for now, but there's native and cygwin). > aspossible. Remove all code and html that is not necessary to > reproducethe problem.5. Please search mail archive and faq. Your The --bug-report option could possibly fail for cases bigger than 5kB. Or something. > problem may be alreadysolved. Wa are very sad when we see a question > that is alreadyanswered (and we can not answer your question with > eyes full oftears). If you find an answer in mail archive and not in > faq, pleaseadd it to faq. It would not hurt to remind people of where the FAQ is when the prototype report is generated. Adding an automatic search is probably overkill. For those searching the archives, at present the FAQ is here: http://wiki.openqa.org/display/WTR/FAQ > We should also link to http://www.catb.org/~esr/faqs/smart-questions.html > I am not a native speaker. I tried to use style that is friendly, butI am not shure if I did a good job. The tone of ESR's document is felt to be harsh by some people. I don't know if my document http://www.eng.cse.dmu.ac.uk/~hgs/support.html is more useful in that respect, but the context is narrower -- it is designed for where I work. Feel free to adapt it. As to why this is happening: many people have testing thrust upon them, and are inexperienced in what makes a good report and what doesn't. People assume that developers will be so familiar with the code base that even a sketchy report will suffice. And familiarity with an area means it can be hard to understand why other people don't see things the same way: "I thought that was obvious". HTH Hugh From zeljko.filipin at gmail.com Fri Mar 17 06:43:58 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 17 Mar 2006 12:43:58 +0100 Subject: [Wtr-general] Bad Bug Reports In-Reply-To: References: Message-ID: http://www.fogcreek.com/FogBugz/docs/40/Articles/TheBasicsofBugTracking.html > > From The Basics of Bug Tracking (FogBugz Documentation): > > (presumably that isn't on line? It would be useful to know...) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060317/d85de770/attachment.html From hgs at dmu.ac.uk Fri Mar 17 07:53:10 2006 From: hgs at dmu.ac.uk (Hugh Sasse) Date: Fri, 17 Mar 2006 12:53:10 +0000 (WET) Subject: [Wtr-general] Bad Bug Reports In-Reply-To: References: Message-ID: On Fri, 17 Mar 2006, Zeljko Filipin wrote: > http://www.fogcreek.com/FogBugz/docs/40/Articles/TheBasicsofBugTracking.html Thanks. That is a good article. I've just created an account for the FAQ. Lots of the entries have {anchor:...} markup (in the edit view). How does one reference these? I think the FAQ would be easier to use if we had a table of contents. This would also make it clearer where a "Submitting Bug Reports" section might go. Also, does Watir have a Bugzilla or equivalent? I don't recall seeing refs to it, and google doesn't have anything obvious in the first 10 results. Something like it might help to control the flow of bad bug reports. > > From The Basics of Bug Tracking (FogBugz Documentation): > > (presumably that isn't on line? It would be useful to know...) Thank you, Hugh From zeljko.filipin at gmail.com Fri Mar 17 08:17:43 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 17 Mar 2006 14:17:43 +0100 Subject: [Wtr-general] Bad Bug Reports In-Reply-To: References: Message-ID: the new one http://jira.openqa.org/browse/WTR the old one http://rubyforge.org/tracker/?group_id=104 On 3/17/06, Hugh Sasse wrote: > > > Also, does Watir have a Bugzilla or equivalent? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060317/2cb518c6/attachment.html From hgs at dmu.ac.uk Fri Mar 17 08:52:15 2006 From: hgs at dmu.ac.uk (Hugh Sasse) Date: Fri, 17 Mar 2006 13:52:15 +0000 (WET) Subject: [Wtr-general] Bad Bug Reports In-Reply-To: References: Message-ID: On Fri, 17 Mar 2006, Zeljko Filipin wrote: > the new one > http://jira.openqa.org/browse/WTR > the old one > http://rubyforge.org/tracker/?group_id=104 I've added these to my new Watir page, in the hope that this will nudge google et al to look in the right place. Patches, corrections etc welcome. http://www.eng.cse.dmu.ac.uk/~hgs/ruby/watir/ Hugh From dave.liebreich at gmail.com Fri Mar 17 10:17:14 2006 From: dave.liebreich at gmail.com (Dave Liebreich) Date: Fri, 17 Mar 2006 07:17:14 -0800 Subject: [Wtr-general] FireWatir release alpha v1.0 In-Reply-To: References: Message-ID: No. The current version of jssh, when installed, is not listed in the extension manager. I suggest you try re-installing jssh, and remember to restart Firefox after the install. Has anyone else tried using this and run into problems? On 3/17/06, Zeljko Filipin wrote: > Sould it be visible at extensions? From zeljko.filipin at gmail.com Fri Mar 17 10:33:40 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 17 Mar 2006 16:33:40 +0100 Subject: [Wtr-general] FireWatir release alpha v1.0 In-Reply-To: References: Message-ID: I tried re-installing jssh (and I remembered to restart Firefox after the install) and even reinstalling Firefox. No luck. Am I the only one with this problem (or even the only one that tried to do it?)? After I perform firefox.exe ?jssh, http://www.croczilla.com/jssh opens with error page The connection has timed out The server at www.croczilla.com is taking too long to respond. Is this causing the problem? On 3/17/06, Dave Liebreich wrote: > > No. The current version of jssh, when installed, is not listed in the > extension manager. I suggest you try re-installing jssh, and remember > to restart Firefox after the install. > > Has anyone else tried using this and run into problems? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060317/24d9feb8/attachment.html From tester.paul at gmail.com Fri Mar 17 11:10:49 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Fri, 17 Mar 2006 11:10:49 -0500 Subject: [Wtr-general] Watir-Example In-Reply-To: <74eaa5760603162219mebb9be9j6587e81f06579122@mail.gmail.com> References: <74eaa5760603162219mebb9be9j6587e81f06579122@mail.gmail.com> Message-ID: <37c405480603170810m789ee6daq@mail.gmail.com> Hello Tanu, I took a course called "Problem Solving and Programming Concepts" at my local college about four years ago. We focussed on understanding the way object-oriented programs are put together and used 'pseudo code' to write pretend code that would perform certain functions to solve certain problems. Using Watir is remarkably simple and easy to read and very similar to the pseudo code that I learned in that course! I'm afraid that I don't know any other references or resources to help someone get started in scripting. I'm still learning how to do it myself. I'm finding that as I learn to use Watir and Ruby, each week my scripts become more powerful and flexible than the week before. The scripts I'm writing this week are way more advanced than when I started about a month ago. (In fact, I will have to re-write or refactor all that code at some point in the near future.) Essentially, you become a better programmer and are able to write more powerful scripts with time and practice. I don't believe that this mailing list is the appropriate forum for teaching someone to program. If you encounter a specific problem with one of your Watir scripts, check the online documentation, search the message archives, and ask any programmers or developers that you work with at your office for help. If you still cannot find the answer to your problem, then feel free to follow the posting guidelines (see the message thread titled "Bad Bug Reports") to ask for help here. I learned a ton of stuff from one of the programmers at my office in just five minutes by asking him to take a look at Ruby and Watir. He called up the SciTE editor, hit [F8] and [F5] and ran the script to see what the output was. That was amazing! I didn't know it could do that! That one tidbit alone saved me a ton of work switching back and forth between command prompt windows. I hope some of this helps. Best wishes. Paul Carvalho On 17/03/06, Tanushree Bhoi wrote: > > Thanks Paul. > I just allowed popups and able to run the scripts perfectly by changing > the url. > Can you plz suggest me how can i write more powerfull scripts.I am > just a beginner > in software field.I want to automate one site completly means i want > to write powerfull > scripts for testing it with watir.Can you plz suggest me some > resourse or the way i can start. > Thank you very much.I like this mailing list in watir very much. > > Regards > Tanu > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060317/f9db1ec8/attachment.html From christopher.mcmahon at gmail.com Fri Mar 17 12:18:51 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 17 Mar 2006 11:18:51 -0600 Subject: [Wtr-general] Bad Bug Reports In-Reply-To: References: Message-ID: <72799cd70603170918n2acfc5d0sf4e93fcf47d5f681@mail.gmail.com> > For a while, i thought that testers knew how to write good bug reports, but > i actually see better bug reports on the mailing lists for open-source > developer tools. Are developers better than testers are reporting problems? Yes, developers on open-source projects are *much* better at reporting problems. The bad questions and noise on this list and every other list should get handled in an evolutionary way. There are a couple of canonical things that tend to happen, in my experience: 1) ignore the clueless and they will go away. If they turn into trolls, don't bait them, they'll go away. Don't spend time answering silly questions. 2) Flame the clueless and they will leave. This is not the best solution, but it tends to happen frequently. 3) Make a special place for rank beginners to go. The Perl community did this a number of years ago. Newbies on comp.lang.perl were being viciously flamed, and a lot of the leaders of the Perl community were starting to fear that there might not be a next generation of Perl programmers if such an attitude continued. So they started a mail list for beginners. Today, basic and/or ignorant questions are gently routed to the beginners list. Many important figures in the Perl community (Randal Schwartz and Tim Bunce, for instance) spend significant amounts of time helping the newbies, but the newbies also find that they can help each other. As a beginner, finding that you can answer someone else's question is immensely empowering. Personally, I learned quite a lot on the Perl beginner's mail list, enough to hold my own in the perlmonks community for a year or so, enough to pick up Ruby when Watir came out. What do you think about a watir-beginners list? (I'm not sure a ruby-beginners list is warranted at this point, but I think a watir-beginners list would be useful.) I would spend at least some time helping beginners on a beginners list, where I am not inclined to help them on the main list. What do you think? -Chris From tester.paul at gmail.com Fri Mar 17 14:10:15 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Fri, 17 Mar 2006 14:10:15 -0500 Subject: [Wtr-general] Need Help with assert_equal Message-ID: <37c405480603171110s6c550467t@mail.gmail.com> Hi there, I am having difficulty with an assertion in one of my scripts. I couldn't find anything in the Watir API Reference for "assert_equal" and when I searched the message archives, I think I'm using it correctly. Here's the sitch: - running Watir 1.4.1, Ruby 184-16 on Win XP Pro SP2 - I want to check that a certain label on the page = "TEST" before I proceed with the next line (which is to delete the current showing record) Line of code in my script: assert_equal("TEST" , $ie.span(:id, /NodeIdentifierLabel/).text ) When I run the script, it fails on that line with the output: ---- 1) Failure: test_g_R_n_D(TC_OD_site_map_walkthru) [OD_site_map_walkthrough.rb:522]: <"TEST"> expected but was <".">. 4 tests, 1 assertions, 1 failures, 0 errors ---- I used IRB to attach to the IE window and I ran the command: ---- irb(main):049:0> puts ie.span(:id, /NodeIdentifierLabel/).text TEST => nil ---- Is there something I'm doing wrong? Where can I find out more information about these assertion commands? The Watir API reference lists a different set of commands than are used in the unittests. Please let me know. Thanks. Paul. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060317/13eaf870/attachment.html From christopher.mcmahon at gmail.com Fri Mar 17 15:24:34 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 17 Mar 2006 14:24:34 -0600 Subject: [Wtr-general] Need Help with assert_equal In-Reply-To: <37c405480603171110s6c550467t@mail.gmail.com> References: <37c405480603171110s6c550467t@mail.gmail.com> Message-ID: <72799cd70603171224t62f8e89ahe2807530bc00737a@mail.gmail.com> On 3/17/06, Paul Carvalho wrote: > Hi there, I am having difficulty with an assertion in one of my scripts. I > couldn't find anything in the Watir API Reference for "assert_equal" and > when I searched the message archives, I think I'm using it correctly. It's pure Ruby, no Watir involved. > Line of code in my script: > assert_equal("TEST" , $ie.span(:id, /NodeIdentifierLabel/).text ) > > When I run the script, it fails on that line with the output: > ---- > 1) Failure: > test_g_R_n_D(TC_OD_site_map_walkthru) > [OD_site_map_walkthrough.rb:522]: > <"TEST"> expected but was > <".">. assert_equal is telling you that your code is yielding a single period and you told it to expect to find "TEST". That's how all of the asserts work. (Except plain old "assert", which always yields the error message "FALSE is not TRUE" which isn't very helpful.) > Is there something I'm doing wrong? Where can I find out more information > about these assertion commands? The Watir API reference lists a different > set of commands than are used in the unittests. Pickaxe v.2 has a nice section on unit testing with test/unit along with all of the forms of 'assert' available. -Chris From dave.liebreich at gmail.com Fri Mar 17 16:00:26 2006 From: dave.liebreich at gmail.com (Dave Liebreich) Date: Fri, 17 Mar 2006 13:00:26 -0800 Subject: [Wtr-general] FireWatir release alpha v1.0 In-Reply-To: References: Message-ID: > After I perform firefox.exe ?jssh, http://www.croczilla.com/jssh opens with > error page That's very odd. Specifying "-jssh" on the command-line should not affect the start page. Perhaps you are not typing the same thing we are suggesting? What is displayed on the javascript console? -Dave From phanideepam at yahoo.com Fri Mar 17 16:02:28 2006 From: phanideepam at yahoo.com (Deepa Mallapareddy) Date: Fri, 17 Mar 2006 13:02:28 -0800 (PST) Subject: [Wtr-general] Regarding Hidden Select Boxes In-Reply-To: Message-ID: <20060317210228.16676.qmail@web50901.mail.yahoo.com> Hi Zelijko, Thank you very much for the reply. but this wont work if I have multiple slect boxes which are hidden becuase all of the slect boxes have bPlaceholder as name ...altough are different please suggest Thanking you Deepa Zeljko Filipin wrote: Well, I think it is because your code is all wrong. :) Your html does not show hidden type select box (I think it even does not exits). But, you could have just typed hidden by mistake (instead of disabled). But, just in case... Your html shows a hidden input field and a disabled select box Please do check this site http://www.w3schools.com/ (for html visit http://www.w3schools.com/html/default.asp) for more info. If you have this html and you would like to know what is selected, this will do it irb(main):014:0> ie.select_list( :name, "bPlaceholder").getSelectedItems => ["2"] It does not matter that it is disabled. If you would like to get all options, try this irb(main):015:0> ie.select_list( :name, "bPlaceholder").getAllContents => ["1", "2", "3", "4", "5", "6", "7", "8"] I hope I answered your question. -- http://www.testingreflections.com/blog/3071 http://iskusivac.blog.hr/ _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general Whatever you can do or dream you can, begin it. Boldness has genius, power, and magic in it. --Johann Wolfgang von Goethe ------------------------------------------------------------------------ Deepa Mallapareddy, 4981,Catoctin Drive, Apt#15,San Diego CA - 92115 --------------------------------- Yahoo! Mail Bring photos to life! New PhotoMail makes sharing a breeze. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060317/23659395/attachment.html From Mark_Cain at rl.gov Fri Mar 17 10:45:04 2006 From: Mark_Cain at rl.gov (Cain, Mark) Date: Fri, 17 Mar 2006 07:45:04 -0800 Subject: [Wtr-general] Older scripts running really slow... Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5BF@EX5V.rl.gov> FYI - I get the same results whether I run the script from inside of Eclipse, Scite, notepad++, etc-there is no difference- the only exception is the script run slower in Komodo and I don't run it in the debugger. The other issues I have reported, namely the exception with the button click, happen regardless of whether I run them via one of the IDEs mentioned above or a command prompt. Please give me little credit that as a tester I know what I am doing, and that I don't report something unless I have done some investigation first. And for the record, I think WATiR is a great tool (I use it in some way everyday) and I want to see it get better, so I report what I see. And whether it turns out to be some anomaly with my environment (and windows has many of those) or a bug I would think that this information would be invaluable to the developers as well as the project lead. If you need additional information for clarification or want addition tests run to help isolate the potential problem, please don't hesitate to ask. Thanks to you (and all those involved) for all the hard work you do! --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Thursday, March 16, 2006 10:06 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Older scripts running really slow... This information makes all of your earlier reports suspect. You never said anything about running the scripts under a debugger. The correct baseline is to run your scripts from a command line, not from an editor/debugger. If you want to update your original report with information from that baseline, then it can be considered. It is certainly possible that different editor and debugger environments introduce performance problems. But that isn't how you originally reported this bug. Bret On 3/16/06, Cain, Mark wrote: FYI concerning this slowness issue. I do some of my script development in Komodo 3.5 (it has a pretty good debugger), but today I was using Eclipse and the difference in execution speed was dramatic! In eclipse they ran almost as fast as 1.4.1-just about 10 - 15 seconds slower but that could have been my machine. Just thought you might be interested. --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Michael Bolton Sent: Thursday, March 02, 2006 1:45 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Older scripts running really slow... Obvious possibilities are - response time on the Web pages - typing speed in the forms Are your pages visible? Do they look slower? When they're loading? When they're typing? If you've got one test that takes half a minute and another that takes three minutes (which you do), the places where slowdowns are happening are plausibly visible to the human eye. Apropos of not very much, but you noticed that "Problem" is spelled "Probelm" below, right? ---Michael B. ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: March 2, 2006 4:17 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Older scripts running really slow... With Watir 1.4.1 (just downloaded and reinstalled) it took: Finished in 31.797 seconds. With Watir from current SVN (did a checkout on the http://svn.openqa.org/svn/watir/trunk/watir) Finished in 179.047 seconds. This is the part that ran: =============================================================== # feature tests for javascript PopUps # revision: $Revision: 1.11 $ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'c:\watir\unittests\setup' require 'watir\dialog' class TC_PER < Test::Unit::TestCase include Watir def gotoPopUpPage() $ie.goto("http://apwtst200.rl.gov/rapidweb/chg/per/per/main.cfm") $ie.set_fast_speed() end #def startClicker( button , waitTime = 3) # w = WinClicker.new # longName = $ie.dir.gsub("/" , "\\" ) # shortName = w.getShortFileName(longName) # c = "start rubyw #{shortName }\\watir\\clickJSDialog.rb #{button } #{ waitTime} " # puts "Starting #{c}" # w.winsystem(c) # w=nil #end def test0_originator $d = Time.now.strftime("%m/%d/%Y") gotoPopUpPage() $ie.text_field(:name, "d_date").set("#{ $d }") $ie.text_field(:name, "d_time").set("1111") $ie.selectBox( :name, "progproj").select(/Other/) $ie.selectBox( :name, "locationID").select(/AW Farm/) $ie.selectBox( :name, "ProblemDiscoveredID").select(/EH\-22/) $ie.text_field( :name, "probdescript").set("Probelm Description Test") $ie.selectBox( :name, "sinID").select(/Cooling Water/) $ie.text_field( :name, "ein").set("eid-001") $ie.checkBox( :name, "reqnsatcheck").set $ie.text_field( :name, "reqnsat").set("Req Not Satisfied") $ie.checkBox( :name, "sourcedoccheck").set $ie.text_field( :name, "SourceDocument").set("Source Doc") $ie.text_field( :name, "actionplan").set("This is a test of the Action Plan text area.") $ie.text_field( :name, "RecommendedCorrectiveActions").set("This is a test of Recommended Actions Taken text area.") $ie.radio( :name, "feedback", 1).set $ie.radio( :name, "feedbacktype", 'other').set $ie.text_field( :name, "feedbackother").set("Feedback Other") #startClicker("OK" , 3) $ie.button("Submit").click_no_wait dialog.button('OK').click $ie.link(:text, /PER-2006-/i).click assert($ie.text_field(:name, "d_date").verify_contains("#{$d}")) assert($ie.text_field(:name, "d_time").verify_contains("11:11")) assert_arrayEquals( ["Other" ] , $ie.select_list(:name, "progproj").getSelectedItems) assert_arrayEquals( ["AW Farm" ] , $ie.select_list(:name, "locationID").getSelectedItems) assert_arrayEquals( ["EH-22" ] , $ie.select_list(:name, "ProblemDiscoveredID").getSelectedItems) assert($ie.text_field(:name, "probdescript").verify_contains("Probelm Description Test")) assert_arrayEquals( ["Cooling Water" ] , $ie.select_list(:name, "sinID").getSelectedItems) assert($ie.text_field(:name, "ein").verify_contains("eid-001")) assert($ie.checkbox(:name, "reqnsatcheck").isSet?) assert($ie.text_field(:name, "reqnsat").verify_contains("Req Not Satisfied")) assert($ie.checkbox(:name, "sourcedoccheck").isSet?) assert($ie.text_field(:name, "SourceDocument").verify_contains("Source Doc")) assert($ie.text_field(:name, "actionplan").verify_contains("This is a test of the Action Plan text area.")) assert($ie.text_field(:name, "RecommendedCorrectiveActions").verify_contains("This is a test of Recommended Actions Taken text area.")) assert($ie.radio(:name, "feedback").isSet?) assert($ie.radio(:name, "feedbacktype", 'other').isSet?) assert($ie.text_field(:name, "feedbackother").verify_contains("Feedback Other")) end end --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Thursday, March 02, 2006 12:57 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Older scripts running really slow... Could you please do an apples to apples comparison running your scripts with different versions of Watir against the same version of your application. It's possible an application change triggered the performance problem. Let us know the results. It would also be nice if you could share the Watir scripts that are slow. Bret On 3/2/06, Cain, Mark < Mark_Cain at rl.gov > wrote: I have some Watir script I wrote about 6 months ago and needed to do some regression testing using these scripts. Well when I began running them they were really slow! Where it used to take 15 to 20 seconds to fill out the page form now is taking 3 to 4 minutes. I have recently upgraded my Watir installation will the latest from SVN and ruby with 1.8.4 Preview 3. Has anyone one else been experiencing slowness? If yes, what did you do to fix it? Thanks, ____________________ Mark L. Cain LMIT - E *STARS (r) ~ Lead Test Engineer 1981 Snyder, MSIN: G3-62, Richland, WA 99354 Mark_Cain at RL.gov 509.376.5458 "640 Kilobytes of computer memory ought to be enough for anybody." - Bill Gates, 1981 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060317/a9d6b0e3/attachment.html From jkohl at telusplanet.net Fri Mar 17 16:17:07 2006 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Fri, 17 Mar 2006 13:17:07 -0800 Subject: [Wtr-general] FireWatir release alpha v1.0 In-Reply-To: References: Message-ID: <1142630227.441b275355e81@webmail.telus.net> In Windows 2K, I opened a DOS console, and cd'd to the FireFox directory in Program Files. I then entered this on the command line: C:\Program Files\Mozilla Firefox>firefox.exe -jssh My FireFox browser opens, and it times out trying to hit croczilla.com (I get the a JS-style popup with a time out message). I don't believe I have jssh installed. I have never knowingly installed it, so maybe this is default behavior if you don't have it installed -- FF tries to redirect you to that site. Just a stab in the dark. Hope that helps. -Jonathan Quoting Dave Liebreich : > > After I perform firefox.exe ?jssh, http://www.croczilla.com/jssh opens > with > > error page > > That's very odd. Specifying "-jssh" on the command-line should not > affect the start page. > > Perhaps you are not typing the same thing we are suggesting? > > What is displayed on the javascript console? > > -Dave > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From tester.paul at gmail.com Fri Mar 17 16:29:33 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Fri, 17 Mar 2006 16:29:33 -0500 Subject: [Wtr-general] Need Help with assert_equal In-Reply-To: <72799cd70603171224t62f8e89ahe2807530bc00737a@mail.gmail.com> References: <37c405480603171110s6c550467t@mail.gmail.com> <72799cd70603171224t62f8e89ahe2807530bc00737a@mail.gmail.com> Message-ID: <37c405480603171329n652f6c8ah@mail.gmail.com> Thanks for the reply, Chris. On 17/03/06, Chris McMahon wrote: > > assert_equal is telling you that your code is yielding a single period > and you told it to expect to find "TEST". That's how all of the > asserts work. (Except plain old "assert", which always yields the Okay, that's what I thought it meant, but I couldn't figure out why that was. Here's the gory details of how I solved this problem. The HTML page I'm looking at is very simple. Other than a menu at the top, there's a split screen layout that is really a table with two columns (no border). In the Left column is a tree-view of a "node" list, and on the right side is just two description labels that give you some information about the selected/highlighted node on the left. When you first enter this page, the root level item is selected in the tree and the text labels just show a '.' beside them. My script *before* looked like this: --- $ie.span(:index, 108).click assert_equal("TEST" , $ie.span(:id, /NodeIdentifierLabel/).text ) $ie.button(:name, /Delete/).click --- If you use the web app, what is *supposed* to happen is that when you click on an item on the left, the right side is supposed to update and show you the correct information. You even see the IE browser's 'flag' waving in the upper right hand corner of the screen until the information is displayed. What seems be happening is that right after the click event, Watir is going right to the next line (the assertion) and not waiting for IE to finish retrieving and displaying the information. (unexpected) I tested this theory by inserting a 'flash' line between the first two: $ie.span(:id, /NodeIdentifierLabel/).flash This *showed* me that right after the click event, the script immediately checked the text label on the right hand side without waiting for the browser to update the page. Okay, so I need to tell my script to wait a few seconds (however long it takes actually) until the page is refreshed, so I inserted the following sleep command: --- $ie.span(:index, 108).click sleep 1 until $ie.span(:id, /NodeIdentifierLabel/).text != '.' $ie.span(:id, /NodeIdentifierLabel/).flash assert_equal("TEST" , $ie.span(:id, /NodeIdentifierLabel/).text ) $ie.button(:name, /Delete/).click --- NOW, the 'flash' line shows me that the label correctly shows "TEST" and everything proceeds as expected. So I *was* using the assert_equal command correctly, I just wasn't expecting the script to continue without waiting for the page to finish updating. I've got these "sleep" lines scattered throughout my scripts because of pages like this. I haven't been able to figure out the pattern yet, but the scripts seem to be randomly going faster than the web application is returning control to the UI. > > Pickaxe v.2 has a nice section on unit testing with test/unit along > with all of the forms of 'assert' available. Good to know. I'll try to pick this book up soon. The online version of v.1 is handy, but I really need some of these updates now. Cheers. Paul. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060317/805af31a/attachment.html From bret at pettichord.com Fri Mar 17 16:43:34 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 17 Mar 2006 15:43:34 -0600 Subject: [Wtr-general] FireWatir release alpha v1.0 In-Reply-To: References: Message-ID: Are you putting one hyphen or two before "jssh"? On 3/17/06, Dave Liebreich wrote: > > > After I perform firefox.exe ?jssh, http://www.croczilla.com/jssh opens > with > > error page > > That's very odd. Specifying "-jssh" on the command-line should not > affect the start page. > > Perhaps you are not typing the same thing we are suggesting? > > What is displayed on the javascript console? > > -Dave > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060317/390c401d/attachment.html From christopher.mcmahon at gmail.com Fri Mar 17 16:48:07 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 17 Mar 2006 15:48:07 -0600 Subject: [Wtr-general] Need Help with assert_equal In-Reply-To: <37c405480603171329n652f6c8ah@mail.gmail.com> References: <37c405480603171110s6c550467t@mail.gmail.com> <72799cd70603171224t62f8e89ahe2807530bc00737a@mail.gmail.com> <37c405480603171329n652f6c8ah@mail.gmail.com> Message-ID: <72799cd70603171348i61004d85vd99ebbd5213da44@mail.gmail.com> > Okay, so I need to tell my script to wait a few seconds (however long it > takes actually) until the page is refreshed, so I inserted the following > sleep command: > --- > $ie.span(:index, 108).click > > sleep 1 until $ie.span(:id, /NodeIdentifierLabel/).text != '.' Nice use of "until". This not waiting is a little disturbing, though. You say it happens fairly often for you, too. I wonder if there's some sort of common cause for this? -Chris From dave.liebreich at gmail.com Fri Mar 17 17:19:09 2006 From: dave.liebreich at gmail.com (Dave Liebreich) Date: Fri, 17 Mar 2006 14:19:09 -0800 Subject: [Wtr-general] FireWatir release alpha v1.0 In-Reply-To: References: Message-ID: Hmm. Maybe Angrez's version of the jssh xpi is broken. Can you try again with the versions in http://people.mozilla.com/~davel/jssh/ From bret at pettichord.com Fri Mar 17 18:05:05 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 17 Mar 2006 17:05:05 -0600 Subject: [Wtr-general] Need Help with assert_equal In-Reply-To: <72799cd70603171348i61004d85vd99ebbd5213da44@mail.gmail.com> References: <37c405480603171110s6c550467t@mail.gmail.com> <72799cd70603171224t62f8e89ahe2807530bc00737a@mail.gmail.com> <37c405480603171329n652f6c8ah@mail.gmail.com> <72799cd70603171348i61004d85vd99ebbd5213da44@mail.gmail.com> Message-ID: On 3/17/06, Chris McMahon wrote: > > > Okay, so I need to tell my script to wait a few seconds (however long it > > takes actually) until the page is refreshed, so I inserted the following > > sleep command: > > --- > > $ie.span(:index, 108).click > > > > sleep 1 until $ie.span(:id, /NodeIdentifierLabel/).text != '.' > > Nice use of "until". > This not waiting is a little disturbing, though. You say it happens > fairly often for you, too. I wonder if there's some sort of common > cause for this? > -Chris Ajax? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060317/8555d2e5/attachment.html From tester.paul at gmail.com Fri Mar 17 18:33:00 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Fri, 17 Mar 2006 18:33:00 -0500 Subject: [Wtr-general] Need Help with assert_equal In-Reply-To: <72799cd70603171348i61004d85vd99ebbd5213da44@mail.gmail.com> References: <37c405480603171110s6c550467t@mail.gmail.com> <72799cd70603171224t62f8e89ahe2807530bc00737a@mail.gmail.com> <37c405480603171329n652f6c8ah@mail.gmail.com> <72799cd70603171348i61004d85vd99ebbd5213da44@mail.gmail.com> Message-ID: <37c405480603171533g6396eb36i@mail.gmail.com> > > > Okay, so I need to tell my script to wait a few seconds (however long it > > takes actually) until the page is refreshed, so I inserted the following > > > sleep command: > > --- > > $ie.span(:index, 108).click > > > > sleep 1 until $ie.span(:id, /NodeIdentifierLabel/).text != '.' > > Nice use of "until". Thanks. Pierre Garigue added it to my 'vocabulary' in a reply last week and I've been finding great uses for it ever since. =) This not waiting is a little disturbing, though. You say it happens > fairly often for you, too. I wonder if there's some sort of common > cause for this? > I don't know for sure, but I have an idea of a possible related effect. We have several Dot-Net web apps and this 'impatient' script behaviour seems to happen more often with one app that makes more use of frames than the others. Some Background: I had logged a bug with our app last year when I happened to be testing with a particularly slow and underpowered test server one day. The bug was titled: "INQUIRY - Why does the IE Web Browser look like it stops working?" Basically, the general idea was that when I clicked a tab or link or something on a certain page (not all of them), you notice the IE Browser's 'flag' icon start waving in the corner as it tries to complete the request, as expected. However, if you then move the mouse, you see that the flag *stops* waving and browser control has returned to the user. But the page hasn't completed the request or finished loading - so what gives? The reply I got from Dev was : "Nothing we can do about this. The flag is an indicator for loading the outer frame (ie the url in the address field of the browser). On the really slow server you see this effect because the inner frame page takes a long time to load. We see it all the time on our local machines as well." I trusted that they didn't just feed me that line to make me go away. ;) We never see this effect on our regular test servers or even with our Production servers because they are faster and more powerful, so I never gave it a second thought until I encountered these scripting quirks recently. My Hypothesis: - I think I read somewhere that Watir/Ruby is getting its "Ready to proceed" signal from the IE Browser and I suspect that the script is a bit premature at times because not all of the frames have finished loading when it must get the green light from the browser. - With the script that I was working on today, there weren't any frames and I can't even visually see the delay between the click event and displaying the information on the page. As far as my eye is concerned, it looked instantaneous. However, when I put the "flash" line in there, I realised that Watir went *immediately* from the "span.click" command to the next line (zero wait). So it found the "." that was already displayed there but didn't wait for the page to finish refreshing to the corresponding value. (unexpected) So, if I had to guess, I think it may have something to do with the "click" routine in Watir. Perhaps it needs to have additional wait checks in there? (i.e. to ensure that not only the Browser has given the 'go ahead' signal, but also that all the frames have finished loading *and* the buttons are enabled..? I really don't know how this works, so forgive me if these suggestions are already implemented.) I also didn't know if this is was even common to other web apps until you used the word "too". Dunno. If my scripts trip anywhere it's always right after a click event. That's where I insert these little sleep lines. I haven't logged this as a Watir bug yet, because I can't always reproduce it. There are some pages where it seems to happen frequently, but not always. Let's just say that I think the 'probability' is high that it has something to do with the script not waiting around long enough after all click events. Unfortunately, I'm still trying to complete my task to meet the business need for my scripts so I haven't been able to investigate this further. I only offer this information now in case it is helpful for someone else to continue the investigation. It might be a wild goose, it might be helpful. Never can tell with intermittent bugs. Cheers. Paul. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060317/7e340dc3/attachment.html From zeljko.filipin at gmail.com Sat Mar 18 08:22:02 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Sat, 18 Mar 2006 14:22:02 +0100 Subject: [Wtr-general] FireWatir release alpha v1.0 In-Reply-To: References: Message-ID: Tried. No luck. The same behaviour. On 3/17/06, Dave Liebreich wrote: > > Hmm. Maybe Angrez's version of the jssh xpi is broken. Can you try > again with the versions in http://people.mozilla.com/~davel/jssh/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060318/95467dab/attachment.html From zeljko.filipin at gmail.com Sat Mar 18 08:50:56 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Sat, 18 Mar 2006 14:50:56 +0100 Subject: [Wtr-general] FireWatir release alpha v1.0 In-Reply-To: References: Message-ID: One. I copy/pasted it from Installation guide for FireWatir firefox.exe ?jssh And the solution is here! I copy/pasted it from the Installation guide for FireWatir! And it seems that Word transforms -jssh to ?jssh. Replaces hypen (-) with dash (?). Something like Word (2003 sp2) > Tools > AutoCorrect Options... > AutoFormat > Replace > Hypens (--) with dash (?). But two hypens should be replaced with one dash. When I replaced firefox.exe ?jssh with firefox.exe -jssh everything worked fine. It does not work with two hypens (firefox.exe --jssh). Thank you all for helping me. What have I learned? Never write documentation in Word. Do it in Notepad. On 3/17/06, Bret Pettichord < bret at pettichord.com> wrote: > > Are you putting one hyphen or two before "jssh"? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060318/4f8563e2/attachment.html From christopher.mcmahon at gmail.com Sat Mar 18 13:21:46 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Sat, 18 Mar 2006 12:21:46 -0600 Subject: [Wtr-general] is this issue worth reporting? 'text' vs 'text_field' Message-ID: <72799cd70603181021t7fc637edta69d0823bca0b828@mail.gmail.com> Hi... I'm reviewing the Scripting for Testers material with an eye to teaching newbies, and found a small irritation. If you do ie.show_all_objects for the timeclock, you get text name=name id=login but to flash the dang thing, you need to type ie.text_field(:name, 'name').flash Intuitively I want 'show_all_objects' to report the thingie I want to manipulate. So I guess what I really want is for show_all_objects to report "text_field" not "text". Or am I just being grumpy? -Chris From bret at pettichord.com Sat Mar 18 17:34:01 2006 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 18 Mar 2006 16:34:01 -0600 Subject: [Wtr-general] is this issue worth reporting? 'text' vs 'text_field' In-Reply-To: <72799cd70603181021t7fc637edta69d0823bca0b828@mail.gmail.com> References: <72799cd70603181021t7fc637edta69d0823bca0b828@mail.gmail.com> Message-ID: This sounds fine to me. If you want to make this change, i'd be happy to commit it. I've had a mind to replace IE#show_all_objects with IE#elements.show... Bret On 3/18/06, Chris McMahon wrote: > > Hi... > I'm reviewing the Scripting for Testers material with an eye to > teaching newbies, and found a small irritation. > If you do ie.show_all_objects for the timeclock, you get > > text name=name id=login > > but to flash the dang thing, you need to type > > ie.text_field(:name, 'name').flash > > Intuitively I want 'show_all_objects' to report the thingie I want to > manipulate. So I guess what I really want is for show_all_objects to > report "text_field" not "text". > > Or am I just being grumpy? > -Chris > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060318/f3054eb9/attachment.html From bret at pettichord.com Sat Mar 18 17:42:41 2006 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 18 Mar 2006 16:42:41 -0600 Subject: [Wtr-general] Older scripts running really slow... In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5BF@EX5V.rl.gov> References: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5BF@EX5V.rl.gov> Message-ID: Thanks for the additional information. My apologies for being so snappish. In truth, your reports have consistently been a model of what a Good Bug Report looks like. On 3/17/06, Cain, Mark wrote: > > FYI ? I get the same results whether I run the script from inside of > Eclipse, Scite, notepad++, etc?there is no difference? the only exception is > the script run slower in Komodo and I don't run it in the debugger. The > other issues I have reported, namely the exception with the button click, > happen regardless of whether I run them via one of the IDEs mentioned above > or a command prompt. Please give me little credit that as a tester I know > what I am doing, and that I don't report something unless I have done some > investigation first. > > > > And for the record, I think WATiR is a great tool (I use it in some way > everyday) and I want to see it get better, so I report what I see. And > whether it turns out to be some anomaly with my environment (and windows has > many of those) or a bug I would think that this information would be > invaluable to the developers as well as the project lead. If you need > additional information for clarification or want addition tests run to help > isolate the potential problem, please don't hesitate to ask. > > > > Thanks to you (and all those involved) for all the hard work you do! > > > > *--Mark* > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060318/981bb58d/attachment.html From zeljko.filipin at gmail.com Mon Mar 20 09:11:07 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Mon, 20 Mar 2006 15:11:07 +0100 Subject: [Wtr-general] FireWatir release alpha v1.0 In-Reply-To: References: Message-ID: I have just run mozilla_all_tests.rb and got only two failures (just to let you know). It took just a few seconds over three hours. :) Finished in 10892.833 seconds. 1) Failure: test_file_field_Exists(TC_FileField_XPath) [C:/watir/mozilla_unittests/../mozilla_unittests/filefield_xpath_test.rb:27]: is not true. 2) Failure: test_simply_attach_to_new_window(TC_NewWindow) [C:/watir/mozilla_unittests/../mozilla_unittests/attach_to_new_window_test.rb:17]: is not true. 100 tests, 520 assertions, 2 failures, 0 errors -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060320/ccac3da6/attachment.html From angrez at gmail.com Mon Mar 20 10:26:30 2006 From: angrez at gmail.com (Angrez Singh) Date: Mon, 20 Mar 2006 20:56:30 +0530 Subject: [Wtr-general] FireWatir release alpha v1.0 In-Reply-To: References: Message-ID: Hi, > I have just run mozilla_all_tests.rb and got only two failures (just to > let you know). It took just a few seconds over three hours. :) > :) > 1) Failure: > test_file_field_Exists(TC_FileField_XPath) > [C:/watir/mozilla_unittests/../mozilla_unittests/filefield_xpath_test.rb:27]: > > is not true. > > 2) Failure: > test_simply_attach_to_new_window(TC_NewWindow) > [C:/watir/mozilla_unittests/../mozilla_unittests/attach_to_new_window_test.rb:17]: > is not true. > > 100 tests, 520 assertions, 2 failures, 0 errors > Will check this out & let you know. Regards, Angrez _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060320/a373adcb/attachment.html From christopher.mcmahon at gmail.com Mon Mar 20 15:44:21 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 20 Mar 2006 14:44:21 -0600 Subject: [Wtr-general] OT: big 'ol variables? Message-ID: <72799cd70603201244j3059b942o4fa686b7304067d5@mail.gmail.com> Hi... Pardon the interruption, but I'm scratching my head over this one. the "<<" syntax works fine for assigning a ton of XML to a variable "str" i.e. str = < #{lstnm} < /lastname> #{fstnm} END_OF_XML but if I try to assign a large SQL statement to a variable using the same technique, Ruby is trying to parse the parens and things as if the SQL were code: foo_test.rb:47: syntax error foo_test.rb:49: warning: don't put space before argument parentheses foo_test.rb:50: warning: parenthesize argument(s) for future version foo_test.rb:51: syntax error from FOOLIB.TABLE1 first_value ^ foo_test.rb:51: warning: parenthesize argument(s) for future version foo_test.rb:52: warning: parenthesize argument(s) for future version foo_test.rb:52: warning: parenthesize argument(s) for future version foo_test.rb:55: syntax error and FOOLIB.TABLE2.CRAZY_DATE > '9999-12-30-00.00.00.000000' ^ foo_test.rb:56: syntax error anyone have any suggestions for getting Ruby to Do The Right Thing when str << END_OF_SQL (buncha sql) END_OF_SQL ? Thanks and apologies... -Chris From Mark_Cain at rl.gov Mon Mar 20 16:13:15 2006 From: Mark_Cain at rl.gov (Cain, Mark) Date: Mon, 20 Mar 2006 13:13:15 -0800 Subject: [Wtr-general] OT: big 'ol variables? Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5C5@EX5V.rl.gov> Did you intend to put a space between << and END_OF_SQL? str << END_OF_SQL (buncha sql) END_OF_SQL it looks like there is not supposed to be one in the documentation. str < #{lstnm} < /lastname> #{fstnm} END_OF_XML but if I try to assign a large SQL statement to a variable using the same technique, Ruby is trying to parse the parens and things as if the SQL were code: foo_test.rb:47: syntax error foo_test.rb:49: warning: don't put space before argument parentheses foo_test.rb:50: warning: parenthesize argument(s) for future version foo_test.rb:51: syntax error from FOOLIB.TABLE1 first_value ^ foo_test.rb:51: warning: parenthesize argument(s) for future version foo_test.rb:52: warning: parenthesize argument(s) for future version foo_test.rb:52: warning: parenthesize argument(s) for future version foo_test.rb:55: syntax error and FOOLIB.TABLE2.CRAZY_DATE > '9999-12-30-00.00.00.000000' ^ foo_test.rb:56: syntax error anyone have any suggestions for getting Ruby to Do The Right Thing when str << END_OF_SQL (buncha sql) END_OF_SQL ? Thanks and apologies... -Chris _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Mark_Cain at rl.gov Mon Mar 20 16:20:43 2006 From: Mark_Cain at rl.gov (Cain, Mark) Date: Mon, 20 Mar 2006 13:20:43 -0800 Subject: [Wtr-general] OT: big 'ol variables? Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5C6@EX5V.rl.gov> You also might need an '=' str = < #{lstnm} < /lastname> #{fstnm} END_OF_XML but if I try to assign a large SQL statement to a variable using the same technique, Ruby is trying to parse the parens and things as if the SQL were code: foo_test.rb:47: syntax error foo_test.rb:49: warning: don't put space before argument parentheses foo_test.rb:50: warning: parenthesize argument(s) for future version foo_test.rb:51: syntax error from FOOLIB.TABLE1 first_value ^ foo_test.rb:51: warning: parenthesize argument(s) for future version foo_test.rb:52: warning: parenthesize argument(s) for future version foo_test.rb:52: warning: parenthesize argument(s) for future version foo_test.rb:55: syntax error and FOOLIB.TABLE2.CRAZY_DATE > '9999-12-30-00.00.00.000000' ^ foo_test.rb:56: syntax error anyone have any suggestions for getting Ruby to Do The Right Thing when str << END_OF_SQL (buncha sql) END_OF_SQL ? Thanks and apologies... -Chris _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From christopher.mcmahon at gmail.com Mon Mar 20 16:23:24 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 20 Mar 2006 15:23:24 -0600 Subject: [Wtr-general] OT: big 'ol variables? In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5C5@EX5V.rl.gov> References: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5C5@EX5V.rl.gov> Message-ID: <72799cd70603201323m4733ee3fs1d66fd1045c3769@mail.gmail.com> Thank you very much. I'm blushing, even though you can't tell in email. -Chris On 3/20/06, Cain, Mark wrote: > Did you intend to put a space between << and END_OF_SQL? > str << END_OF_SQL > (buncha sql) > END_OF_SQL > > it looks like there is not supposed to be one in the documentation. > str < (buncha sql) > END_OF_SQL > > > --Mark > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon > Sent: Monday, March 20, 2006 12:44 PM > To: wtr-general at rubyforge.org > Subject: [Wtr-general] OT: big 'ol variables? > > Hi... > > Pardon the interruption, but I'm scratching my head over this one. > > the "<<" syntax works fine for assigning a ton of XML to a variable > "str" i.e. > > str = < > #{lstnm} < /lastname> > #{fstnm} > > END_OF_XML > > > but if I try to assign a large SQL statement to a variable using the > same technique, Ruby is trying to parse the parens and things as if > the SQL were code: > > foo_test.rb:47: syntax error > foo_test.rb:49: warning: don't put space before argument parentheses > foo_test.rb:50: warning: parenthesize argument(s) for future version > foo_test.rb:51: syntax error > from FOOLIB.TABLE1 first_value > ^ > foo_test.rb:51: warning: parenthesize argument(s) for future version > foo_test.rb:52: warning: parenthesize argument(s) for future version > foo_test.rb:52: warning: parenthesize argument(s) for future version > foo_test.rb:55: syntax error > and FOOLIB.TABLE2.CRAZY_DATE > > '9999-12-30-00.00.00.000000' > ^ > foo_test.rb:56: syntax error > > anyone have any suggestions for getting Ruby to Do The Right Thing when > > str << END_OF_SQL > (buncha sql) > END_OF_SQL > > ? > > Thanks and apologies... > -Chris > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From tester.paul at gmail.com Mon Mar 20 16:32:36 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Mon, 20 Mar 2006 16:32:36 -0500 Subject: [Wtr-general] How can my script wait until a new window has finished loading before using IE.attach? Message-ID: <37c405480603201332g39afe2c3o@mail.gmail.com> Hello again, I am having a bit of difficulty getting my script to wait for a window to finish loading before attaching to it. Here's the original code: ---- $ie.link(:text, 'View Report').click ie2 = IE.attach(:title, /View Report/) # stuff happens ie2.close ---- If I run it as above, I get the following error: "Watir::Exception::NoMatchingWindowFoundException: Unable to locate a window with title of (?-mix:View Report)" The problem seems to be that the Title bar initially has a URL displayed in it and then, after a while (random number of seconds), it updates to the correct . So the command will *eventually* work, but it will fail if it checks the window too soon. I tried inserting a 'sleep' command between the first two lines above, but I can't account for how long it will take the window to finish loading. I searched the message archives but I couldn't find anything that helps me tell the script to wait as long as it needs before trying to attach to the new window. I tried making up combinations of functions to try and help me, but so far nothing has helped. For example, I tried working with commands like: > IE.attach(:title, /View Report/).exists? # but this doesn't work as I'd like and the ie.status() method only applies when you can actually connect to the window first, so it doesn't help me either. I thought about creating a series of nested begin-rescue-end blocks to catch and work with the exceptions, but I still couldn't quite figure out how to get it to wait the random amount of time required before trying to attach to the window. Has anyone else encountered a similar problem before? Do you have any suggestions that might help? Please let me know. Thanks. Paul. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060320/d72caa2d/attachment.html From Mark_Cain at rl.gov Mon Mar 20 16:54:04 2006 From: Mark_Cain at rl.gov (Cain, Mark) Date: Mon, 20 Mar 2006 13:54:04 -0800 Subject: [Wtr-general] How can my script wait until a new window hasfinished loading before using IE.attach? Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5C7@EX5V.rl.gov> I had the same problem with one of the application I test and what I had to do is something like: $ie.link(:text, 'View Report').click ? - the url (or part of) initially displayed in the title bar ie2 = IE.attach( :url, /index.html/i ) puts ie2.status() ie2 = IE.attach( :title, /View Report/ ) puts ie2.status() # stuff happens ie2.close The first status will halt the application until the ?done? status is reached and then it moves on to the next line. --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Carvalho Sent: Monday, March 20, 2006 1:33 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] How can my script wait until a new window hasfinished loading before using IE.attach? Hello again, I am having a bit of difficulty getting my script to wait for a window to finish loading before attaching to it. Here's the original code: ---- $ie.link(:text, 'View Report').click ie2 = IE.attach(:title, /View Report/) # stuff happens ie2.close ---- If I run it as above, I get the following error: "Watir::Exception::NoMatchingWindowFoundException: Unable to locate a window with title of (?-mix:View Report)" The problem seems to be that the Title bar initially has a URL displayed in it and then, after a while (random number of seconds), it updates to the correct <TITLE>. So the command will *eventually* work, but it will fail if it checks the window too soon. I tried inserting a 'sleep' command between the first two lines above, but I can't account for how long it will take the window to finish loading. I searched the message archives but I couldn't find anything that helps me tell the script to wait as long as it needs before trying to attach to the new window. I tried making up combinations of functions to try and help me, but so far nothing has helped. For example, I tried working with commands like: > IE.attach(:title, /View Report/).exists? # but this doesn't work as I'd like and the ie.status() method only applies when you can actually connect to the window first, so it doesn't help me either. I thought about creating a series of nested begin-rescue-end blocks to catch and work with the exceptions, but I still couldn't quite figure out how to get it to wait the random amount of time required before trying to attach to the window. Has anyone else encountered a similar problem before? Do you have any suggestions that might help? Please let me know. Thanks. Paul. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060320/63038d1a/attachment.html From dsolis at yahoo.com Mon Mar 20 22:09:40 2006 From: dsolis at yahoo.com (David Solis) Date: Mon, 20 Mar 2006 19:09:40 -0800 (PST) Subject: [Wtr-general] Undefined Method Error Message-ID: <20060321030941.3347.qmail@web80507.mail.yahoo.com> Hello, I?m running into a problem I think is a probably a programming error in my part. Here is what I?m trying to accomplish: I have script with 2800 lines of code. My test cases in the script have many repeatable steps. For each test case, I?m basically coding the same steps over an over again and thus I get hundreds of lines of code. My first inclination was to break out the test and make them into separate files so that the script is not so big and less error prone. But I would be doing the same thing as I was doing earlier except now I would have to maintain many files rather one. So what I want to do is create a method that contains the repeatable steps that are used in every test case and call the method when I need to execute the steps. The method would live in separate file. Sounds easy, right? Well, when I try to a get this error: 1) Error: test_steps(AccountManagementSteps): NoMethodError: undefined method `link' for nil:NilClass ./negative_tierI_steps.rb:37:in `test_steps' 2) Error: test_01_account_management(TC_Negative): ArgumentError: wrong number of arguments (0 for 1) C:/automation/src/thdf/projects/core/testharness/fixtures/admin_administration/tc_tierI_negative_tests.rb:67:in `initialize' C:/automation/src/thdf/projects/core/testharness/fixtures/admin_administration/tc_tierI_negative_tests.rb:67:in `new' C:/automation/src/thdf/projects/core/testharness/fixtures/admin_administration/tc_tierI_negative_tests.rb:67:in `test_01_account_management' Here is the code. The method I?m calling is called AccountManagementSteps. Require 'setup' halls my require statements including so I know the script has the proper require statements. require 'negative_tierI_steps.rb' contains the steps that are given me the problem. require 'setup' require 'negative_tierI_steps.rb' TOPDIR = File.join(File.dirname(__FILE__), '..') $LOAD_PATH.unshift TOPDIR class TC_Negative < Test::Unit::TestCase def test_01_account_management puts ''; puts ''; puts "############ Starting Test Class: TC_tierI_negative_tests ############"; puts '' puts 'Executing test 01 - Account Management Access' puts '' @login = Login.new($user, $password, $url, $submit_key); # create a random Admin user name @random_name = UserRandomName.new(); $username = @random_name.User(); # Create a new Admin User @admin_user = CreateUser.new($username); # Verify that user was created assert($ie.contains_text($save_msg)); @login.logout("admin"); assert($ie.contains_text($logoff_msg)); @login.shutdown(); # Login as superuser @login = Login.new($user, $password, $url, $submit_key); @group_details = 0 set_group = SetPermission.new() set_group.fSteps(@group_details); assert($ie.contains_text($save_msg)); @login.logout("admin"); assert($ie.contains_text($logoff_msg)); @login.shutdown(); @login = Login.new($username, $password, $url, $submit_key); @steps = AccountManagementSteps.new() @steps.test_steps() end This is the code in the method I?m calling. require 'setup' require 'watir' require 'test/unit' require 'test/unit/ui/console/testrunner' require 'watir/testUnitAddons' class AccountManagementSteps < Test::Unit::TestCase def initialize() end def test_steps() $ie.link(:text, "Account management").click(); assert($ie.contains_text("Manage Accounts")); $ie.link(:text, "Manage settings").click(); assert($ie.contains_text($no_autho_msg)); $ie.link(:text, "Manage affiliates").click(); assert($ie.contains_text($no_autho_msg)); $ie.link(:text, "Admin authentication").click(); $ie.link(:text, "AAUT").click(); assert($ie.contains_text($no_autho_msg)); $ie.link(:text, "Payment processing").click(); assert($ie.contains_text($no_autho_msg)); $ie.link(:text, "Promotions").click(); $ie.link(:text, "Create New Promotion").click(); assert($ie.contains_text($no_autho_msg)); $ie.link(:text, "Content keys").click(); assert($ie.contains_text($no_autho_msg)); $ie.link(:text, "Pay Model").click(); table = $ie.table(:index, 9) #table.flash sleep 1 table[1][5].image(:name, "updatetop").click assert($ie.contains_text($no_permission_msg)) $ie.link(:text, "Game Library").click(); table = $ie.table(:index, 9) sleep 1 table[1][3].image(:name, "updatetop").click assert($ie.contains_text($no_permission_msg)) $ie.link(:text, "Game Settings").click(); assert($ie.contains_text($no_autho_msg)); $ie.link(:text, "Game Menu Tabs").click(); table = $ie.table(:index, 9) sleep 1 table[1][3].image(:name, "updatetop").click assert($ie.contains_text($no_permission_msg)) $ie.link(:text, "Community Games").click(); #table = $ie.table(:index, 9) #sleep 1 #table[1][3].image(:name, "updatetop").click #assert($ie.contains_text($no_permission_msg)) $ie.link(:text, "Community User Migration").click(); # No update button available. Need to figure out how to assert false for no buttons $ie.link(:text, "Community User Upload").click(); # Need address attaching files #$ie.link(:text, "Community Management").click(); #$ie.text_field(:name, "newCommunity").set("Test") #table = $ie.table(:index, 10) #sleep 1 #table[1][3].image(:name, "form_top_singl_create").click #assert($ie.contains_text($no_permission_msg)) $ie.link(:text, "Jackpot List").click(); # Jackpot lists allowed - research test case $ie.link(:text, "Jackpot Details").click(); table = $ie.table(:index, 9) sleep 1 table[1][3].image(:name, "updatetop").click assert($ie.contains_text($no_permission_msg)) $ie.link(:text, "Jackpot Adjustments").click(); $ie.text_field(:name, "AdjustAmt").set("1000") $ie.text_field(:name, "ReasonText").set("This is a test") table = $ie.table(:index, 19) sleep 1 table[1][3].image(:name, "createbottom").click assert($ie.contains_text($no_permission_msg)) $ie.link(:text, "Settings").click(); end end Any ideas? Thanks David -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060320/be72be27/attachment.html From dsolis at yahoo.com Mon Mar 20 21:42:30 2006 From: dsolis at yahoo.com (David Solis) Date: Mon, 20 Mar 2006 18:42:30 -0800 (PST) Subject: [Wtr-general] Undefined method error Message-ID: <20060321024230.27756.qmail@web80514.mail.scd.yahoo.com> Hello, I?m running into a problem I think is a probably a programming error in my part. Here is what I?m trying to accomplish: I have script with 2800 lines of code. My test cases in the script have many repeatable steps. For each test case, I?m basically coding the same steps over an over again and thus I get hundreds of lines of code. My first inclination was to break out the test and make them into separate files so that the script is not so big and less error prone. But I would be doing the same thing as I was doing earlier except now I would have to maintain many files rather one. So what I want to do is create a method that contains the repeatable steps that are used in every test case and call the method when I need to execute the steps. The method would live in separate file. Sounds easy, right? Well, when I try to a get this error: 1) Error: test_steps(AccountManagementSteps): NoMethodError: undefined method `link' for nil:NilClass ./negative_tierI_steps.rb:37:in `test_steps' 2) Error: test_01_account_management(TC_Negative): ArgumentError: wrong number of arguments (0 for 1) C:/automation/src/thdf/projects/core/testharness/fixtures/admin_administration/tc_tierI_negative_tests.rb:67:in `initialize' C:/automation/src/thdf/projects/core/testharness/fixtures/admin_administration/tc_tierI_negative_tests.rb:67:in `new' C:/automation/src/thdf/projects/core/testharness/fixtures/admin_administration/tc_tierI_negative_tests.rb:67:in `test_01_account_management' Here is the code. The method I?m calling is called AccountManagementSteps. Require 'setup' halls my require statements including so I know the script has the proper require statements. require 'negative_tierI_steps.rb' contains the steps that are given me the problem. require 'setup' require 'negative_tierI_steps.rb' TOPDIR = File.join(File.dirname(__FILE__), '..') $LOAD_PATH.unshift TOPDIR class TC_Negative < Test::Unit::TestCase def test_01_account_management puts ''; puts ''; puts "############ Starting Test Class: TC_tierI_negative_tests ############"; puts '' puts 'Executing test 01 - Account Management Access' puts '' @login = Login.new($user, $password, $url, $submit_key); # create a random Admin user name @random_name = UserRandomName.new(); $username = @random_name.User(); # Create a new Admin User @admin_user = CreateUser.new($username); # Verify that user was created assert($ie.contains_text($save_msg)); @login.logout("admin"); assert($ie.contains_text($logoff_msg)); @login.shutdown(); # Login as superuser @login = Login.new($user, $password, $url, $submit_key); @group_details = 0 set_group = SetPermission.new() set_group.fSteps(@group_details); assert($ie.contains_text($save_msg)); @login.logout("admin"); assert($ie.contains_text($logoff_msg)); @login.shutdown(); @login = Login.new($username, $password, $url, $submit_key); @steps = AccountManagementSteps.new() @steps.test_steps() end This is the code in the method I?m calling. require 'setup' require 'watir' require 'test/unit' require 'test/unit/ui/console/testrunner' require 'watir/testUnitAddons' class AccountManagementSteps < Test::Unit::TestCase def initialize() end def test_steps() $ie.link(:text, "Account management").click(); assert($ie.contains_text("Manage Accounts")); $ie.link(:text, "Manage settings").click(); assert($ie.contains_text($no_autho_msg)); $ie.link(:text, "Manage affiliates").click(); assert($ie.contains_text($no_autho_msg)); $ie.link(:text, "Admin authentication").click(); $ie.link(:text, "AAUT").click(); assert($ie.contains_text($no_autho_msg)); $ie.link(:text, "Payment processing").click(); assert($ie.contains_text($no_autho_msg)); $ie.link(:text, "Promotions").click(); $ie.link(:text, "Create New Promotion").click(); assert($ie.contains_text($no_autho_msg)); $ie.link(:text, "Content keys").click(); assert($ie.contains_text($no_autho_msg)); $ie.link(:text, "Pay Model").click(); table = $ie.table(:index, 9) #table.flash sleep 1 table[1][5].image(:name, "updatetop").click assert($ie.contains_text($no_permission_msg)) $ie.link(:text, "Game Library").click(); table = $ie.table(:index, 9) sleep 1 table[1][3].image(:name, "updatetop").click assert($ie.contains_text($no_permission_msg)) $ie.link(:text, "Game Settings").click(); assert($ie.contains_text($no_autho_msg)); $ie.link(:text, "Game Menu Tabs").click(); table = $ie.table(:index, 9) sleep 1 table[1][3].image(:name, "updatetop").click assert($ie.contains_text($no_permission_msg)) $ie.link(:text, "Community Games").click(); #table = $ie.table(:index, 9) #sleep 1 #table[1][3].image(:name, "updatetop").click #assert($ie.contains_text($no_permission_msg)) $ie.link(:text, "Community User Migration").click(); # No update button available. Need to figure out how to assert false for no buttons $ie.link(:text, "Community User Upload").click(); # Need address attaching files #$ie.link(:text, "Community Management").click(); #$ie.text_field(:name, "newCommunity").set("Test") #table = $ie.table(:index, 10) #sleep 1 #table[1][3].image(:name, "form_top_singl_create").click #assert($ie.contains_text($no_permission_msg)) $ie.link(:text, "Jackpot List").click(); # Jackpot lists allowed - research test case $ie.link(:text, "Jackpot Details").click(); table = $ie.table(:index, 9) sleep 1 table[1][3].image(:name, "updatetop").click assert($ie.contains_text($no_permission_msg)) $ie.link(:text, "Jackpot Adjustments").click(); $ie.text_field(:name, "AdjustAmt").set("1000") $ie.text_field(:name, "ReasonText").set("This is a test") table = $ie.table(:index, 19) sleep 1 table[1][3].image(:name, "createbottom").click assert($ie.contains_text($no_permission_msg)) $ie.link(:text, "Settings").click(); table = $ie.table(:index, 9) sleep 1 table[1][3].image(:name, "updatetop").click assert($ie.contains_text($no_permission_msg)) $ie.link(:text, "Game Points").click(); table = $ie.table(:index, 9) sleep 1 table[1][3].image(:name, "updatetop").click assert($ie.contains_text($no_permission_msg)) $ie.link(:text, "Customer Search").click(); # User allowed to make Customer Search $ie.link(:text, "Tournament List").click(); table = $ie.table(:index, 9) sleep 1 table[1][3].image(:name, "updatetop").click assert($ie.contains_text($no_permission_msg)) $ie.link(:text, "Real Time List").click(); # Page is not displayed - Research test case $ie.link(:text, "Post Hoc Online").click(); # Page is not displayed - Research test case $ie.link(:text, "Post Hoc Offline").click(); # Page is not displayed - Research test case $ie.link(:text, "User Transaction Search").click(); $ie.text_field(:name, "username").set("Joe Tester") table = $ie.table(:index, 9) sleep 1 table[1][3].image(:name, "updatetop").click assert($ie.contains_text($no_permission_msg)) $ie.link(:text, "Action Score").click(); table = $ie.table(:index, 9) sleep 1 table[1][3].image(:name, "updatetop").click assert($ie.contains_text($no_permission_msg)) $ie.link(:text, "Group Weights").click(); table = $ie.table(:index, 9) sleep 1 table[1][3].image(:name, "updatetop").click assert($ie.contains_text($no_permission_msg)) $ie.link(:text, "Results Score").click(); table = $ie.table(:index, 9) sleep 1 table[1][3].image(:name, "updatetop").click assert($ie.contains_text($no_permission_msg)) $ie.link(:text, "Countries in Juris.").click(); $ie.link(:url, "javascript:submit_form('ADMINJurCountriesUpdate','1','select')").click(); assert($ie.contains_text($no_permission_msg)) $ie.link(:text, "Groups in Juris.").click(); table = $ie.table(:index, 9) sleep 1 table[1][3].image(:name, "updatetop").click assert($ie.contains_text($no_permission_msg)) $ie.link(:text, "DSPs in Group").click(); table = $ie.table(:index, 9) sleep 1 table[1][3].image(:name, "updatetop").click assert($ie.contains_text($no_permission_msg)) $ie.link(:text, "DSPs in Country/group").click(); $ie.text_field(:name, "VendorPriority0").set("88") $ie.checkbox(:name, "CurrentMember0").set table = $ie.table(:index, 9) sleep 1 table[1][3].image(:name, "updatetop").click assert($ie.contains_text($no_permission_msg)) $ie.link(:text, "Search MVF Users").click(); $ie.select_list( :name , "country").select("United Kingdom"); table = $ie.table(:index, 9) sleep 1 table[1][3].image(:name, "searchtop").click assert($ie.contains_text($no_permission_msg)) end end Any ideas? Thanks David -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060320/8dec1f07/attachment.html From bret at pettichord.com Tue Mar 21 00:08:34 2006 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 20 Mar 2006 23:08:34 -0600 Subject: [Wtr-general] Undefined Method Error In-Reply-To: <20060321030941.3347.qmail@web80507.mail.yahoo.com> References: <20060321030941.3347.qmail@web80507.mail.yahoo.com> Message-ID: <ade75c5b0603202108m687d2de5le4dff8d2fc42419b@mail.gmail.com> David, That error message indicates that $ie is nil, which is to say, it hasn't been initialized. It needs to be assigned in the test_* method or the initialize method. (Or you need to get fancy, which is what we do in our unit tests.) You said that you are trying to structure your test scripts. I suggest you do this in smaller steps. First just put the common code in a separate method (not called test*) in the same class. Then move it outside the class. And only then move it to a new file. There are small gotcha's with each step, so it's worth taking these small steps until you understand the source of each of them. Bret On 3/20/06, David Solis <dsolis at yahoo.com> wrote: > > > Hello, > > I'm running into a problem I think is a probably a programming error in my part. > > Here is what I'm trying to accomplish: I have script with 2800 lines of code. My test cases in the script have many repeatable steps. For each test case, I'm basically coding the same steps over an over again and thus I get hundreds of lines of code. > > My first inclination was to break out the test and make them into separate files so that the script is not so big and less error prone. But I would be doing the same thing as I was doing earlier except now I would have to maintain many files rather one. > > So what I want to do is create a method that contains the repeatable steps that are used in every test case and call the method when I need to execute the steps. The method would live in separate file. Sounds easy, right? Well, when I try to a get this error: ! > > 1) Error: > test_steps(AccountManagementSteps): > NoMethodError: undefined method `link' for nil:NilClass > ./negative_tierI_steps.rb:37:in `test_steps' > 2) Error: > test_01_account_management(TC_Negative): > ArgumentError: wrong number of arguments (0 for 1) > C:/automation/src/thdf/projects/core/testharness/fixtures/admin_administration/tc_tierI_negative_tests.rb:67:in `initialize' > C:/automation/src/thdf/projects/core/testharness/fixtures/admin_administration/tc_tierI_negative_tests.rb:67:in `new' > C:/automation/src/thdf/projects/core/testharness/fixtures/admin_administration/tc_tierI_negative_tests.rb:67:in `test_01_account_management' > > Here is the code. The method I'm calling is called AccountManagementSteps. Require 'setup' halls my require statements including so I know the script has the proper require statements. require 'negative_tierI_steps.rb' contains the steps that are given me the problem. > > require 'setup' > require 'negative_tierI_steps.rb' > > TOPDIR = File.join(File.dirname(__FILE__), '..') > $LOAD_PATH.unshift TOPDIR > > > class TC_Negative < Test::Unit::TestCase > > def test_01_account_management > puts ''; puts ''; > puts "############ Starting Test Class: TC_tierI_negative_tests ############"; > puts '' > puts 'Executing test 01 - Account Management Access' > puts '' > @login = Login.new($user, $password, $url, $submit_key); > # create a random Admin user name > @random_name = UserRandomName.new(); > $username = @random_name.User(); > # Create a new Admin User > @admin_user = CreateUser.new($username); > # Verify that user was created > assert($ie.contains_text($save_msg)); > @login.logout("admin"); > assert($ie.contains_text($logoff_msg)); > @login.shutdown(); > # Login as superuser > @login = Login.new($user, $password, $url, $submit_key); > @group_details = 0 > set_group = SetPermission.new() > set_group.fSteps(@group_details); > assert($ie.contains_text($save_msg)); > @login.logout("admin"); > assert($ie.contains_text($logoff_msg)); > @login.shutdown(); > > ! @login = Login.new($username, $password, $url, $submit_key); > @steps = AccountManagementSteps.new() > @steps.test_steps() > end > > This is the code in the method I'm calling. > > require 'setup' > require 'watir' > require 'test/unit' > require 'test/unit/ui/console/testrunner' > require 'watir/testUnitAddons' > > class AccountManagementSteps < Test::Unit::TestCase > > def initialize() > end > > def test_steps() > $ie.link(:text, "Account management").click(); > assert($ie.contains_text("Manage Accounts")); > $ie.link(:text, "Manage settings").click(); > assert($ie.contains_text($no_autho_msg)); > $ie.link(:text, "Manage affiliates").click(); > assert($ie.contains_text($no_autho_msg)); > $ie.link(:text, "Admin authentication").click(); > $ie.link(:text, "AAUT").click(); > assert($ie.contains_text($no_autho_msg)); > $ie.link(:text, "Payment processing").click(); > assert($ie.contains_text($no_autho_msg)); > $ie.link(:text, "Promotions").click(); > $ie.link(:text, "Create New Promotion").click(); > ! assert($ie.contains_text($no_autho_msg)); > $ie.link(:text, "Content keys").click(); > assert($ie.contains_text($no_autho_msg)); > $ie.link(:text, "Pay Model").click(); > table = $ie.table(:index, 9) > #table.flash > sleep 1 > table[1][5].image(:name, "updatetop").click > assert($ie.contains_text($no_permission_msg)) > ! $ie.link(:text, "Game Library").click(); > table = $ie.table(:index, 9) > sleep 1 > table[1][3].image(:name, "updatetop").click > assert($ie.contains_text($no_permission_msg)) > $ie.link(:text, "Game Settings").click(); > assert($ie.contains_text($no_autho_msg)); > $ie.link(:text, "Game Menu Tabs").click(); > table = $ie.table(:index, 9) > sleep 1 > table[1][3].image(:name, "updatetop").click > assert($ie.contains_text($no_permission_msg)) > $ie.link(:text, "Community Games").click(); > #table = $ie.table(:index, 9) > #sleep 1 > #table[1][3].image(:name, "updatetop").click > #assert($ie.contains_text($no_permission_msg)) > $ie.link(:text, "Community User Migration").click(); > # No update button available. Need to figure out how to assert false for no buttons > $ie.link(:text, "Community User Upload").click(); > # Need address attaching files > #$ie.link(:text, "Community Management").click(); > #$ie.text_field(:name, "newCommunity").set("Test") > #table = $ie.table(:index, 10) > #sleep 1 > #table[1][3].image(:name, "form_top_singl_create").click > #assert($ie.contains_text($no_permission_msg)) > $ie.link(:text, "Jackpot List").click(); > # Jackpot lists allowed - research test case > $ie.link(:text, "Jackpot Details").click(); > table = $ie.table(:index, 9) > sleep 1 ! > table[1][3].image(:name, "updatetop").click > assert($ie.contains_text($no_permission_msg)) > $ie.link(:text, "Jackpot Adjustments").click(); > $ie.text_field(:name, "AdjustAmt").set("1000") > $ie.text_field(:name, "ReasonText").set("This is a test") > table = $ie.table(:index, 19) > sleep 1 > table[1][3].image(:name, "createbottom").click > assert($ie.contains_text($no_permission_msg)) ! > $ie.link(:text, "Settings").click(); > > end > end > > > Any ideas? > > Thanks > > David > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > From bret at pettichord.com Tue Mar 21 00:15:57 2006 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 20 Mar 2006 23:15:57 -0600 Subject: [Wtr-general] How can my script wait until a new window has finished loading before using IE.attach? In-Reply-To: <37c405480603201332g39afe2c3o@mail.gmail.com> References: <37c405480603201332g39afe2c3o@mail.gmail.com> Message-ID: <ade75c5b0603202115m8935fc7uf9090a0f0597f401@mail.gmail.com> The code base in development allows you to configure this. IE.attach_timeout = 10 This is number of seconds to wait for the window specified in attach statements to appear/load. This should be exactly what you are asking for. Paul, Mark, Anyone: Lemme know happens if you try this out. Does it solve your problem? (There is a lot of great stuff in development, which is why i'm eager to stabilize the code base and make a new release.) Bret On 3/20/06, Paul Carvalho <tester.paul at gmail.com> wrote: > Hello again, > > I am having a bit of difficulty getting my script to wait for a window to > finish loading before attaching to it. Here's the original code: > ---- > $ie.link(:text, 'View Report').click > > ie2 = IE.attach(:title, /View Report/) > > # stuff happens > > ie2.close > ---- > > If I run it as above, I get the following error: > "Watir::Exception::NoMatchingWindowFoundException: Unable > to locate a window with title of (?-mix:View Report)" > > The problem seems to be that the Title bar initially has a URL displayed in > it and then, after a while (random number of seconds), it updates to the > correct <TITLE>. So the command will *eventually* work, but it will fail if > it checks the window too soon. > > I tried inserting a 'sleep' command between the first two lines above, but I > can't account for how long it will take the window to finish loading. > > I searched the message archives but I couldn't find anything that helps me > tell the script to wait as long as it needs before trying to attach to the > new window. > > I tried making up combinations of functions to try and help me, but so far > nothing has helped. For example, I tried working with commands like: > > IE.attach(:title, /View Report/).exists? # but this doesn't work as > I'd like > > and the ie.status() method only applies when you can actually connect to the > window first, so it doesn't help me either. > > I thought about creating a series of nested begin-rescue-end blocks to catch > and work with the exceptions, but I still couldn't quite figure out how to > get it to wait the random amount of time required before trying to attach to > the window. > > Has anyone else encountered a similar problem before? Do you have any > suggestions that might help? > > Please let me know. Thanks. > Paul. > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > From mb at michaelbolton.net Tue Mar 21 00:54:47 2006 From: mb at michaelbolton.net (Michael Bolton) Date: Tue, 21 Mar 2006 00:54:47 -0500 Subject: [Wtr-general] How can my script wait until a new window hasfinished loading before using IE.attach? In-Reply-To: <ade75c5b0603202115m8935fc7uf9090a0f0597f401@mail.gmail.com> Message-ID: <00ce01c64cab$fa216910$c5a8078b@Koko> I observe only one thing that's odd about this. When I start up IE manually, I'm taken to google.ca (the Canadian version). The title bar for the window reads "Google - Microsoft Internet Explorer". I set IE.attach_timeout to 15. I issue this command ie = Watir::IE.attach(:title, /oogle/) and the ie object successfully attaches. This line of code fails to find the same window: ie = Watir::IE.attach(:title, /Microsoft/) Watir::Exception::NoMatchingWindowFoundException: Unable to locate a window with title of (?-mix:Microsoft) from c:/ruby/lib/ruby/gems/1.8/gems/watir- 1.5.0.934/./watir.rb:1268:in `attach_browser_window' from c:/ruby/lib/ruby/gems/1.8/gems/watir- 1.5.0.934/./watir.rb:1135:in `attach_init' from c:/ruby/lib/ruby/gems/1.8/gems/watir- 1.5.0.934/./watir.rb:1128:in `attach' from (irb):9 from ?:0 However, it does find the "Microsoft" when I go to Microsoft's site. In this case, the window is titled "Microsoft Corporation - Microsoft Internet Explorer". I would conclude that the " - Microsoft Internet Explorer" is not part of the title, even though it looks like it from a human point of view. ---Michael B. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: March 21, 2006 12:16 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] How can my script wait until a new window hasfinished loading before using IE.attach? The code base in development allows you to configure this. IE.attach_timeout = 10 This is number of seconds to wait for the window specified in attach statements to appear/load. This should be exactly what you are asking for. Paul, Mark, Anyone: Lemme know happens if you try this out. Does it solve your problem? (There is a lot of great stuff in development, which is why i'm eager to stabilize the code base and make a new release.) Bret On 3/20/06, Paul Carvalho <tester.paul at gmail.com> wrote: > Hello again, > > I am having a bit of difficulty getting my script to wait for a window to > finish loading before attaching to it. Here's the original code: > ---- > $ie.link(:text, 'View Report').click > > ie2 = IE.attach(:title, /View Report/) > > # stuff happens > > ie2.close > ---- > > If I run it as above, I get the following error: > "Watir::Exception::NoMatchingWindowFoundException: Unable > to locate a window with title of (?-mix:View Report)" > > The problem seems to be that the Title bar initially has a URL displayed in > it and then, after a while (random number of seconds), it updates to the > correct <TITLE>. So the command will *eventually* work, but it will fail if > it checks the window too soon. > > I tried inserting a 'sleep' command between the first two lines above, but I > can't account for how long it will take the window to finish loading. > > I searched the message archives but I couldn't find anything that helps me > tell the script to wait as long as it needs before trying to attach to the > new window. > > I tried making up combinations of functions to try and help me, but so far > nothing has helped. For example, I tried working with commands like: > > IE.attach(:title, /View Report/).exists? # but this doesn't work as > I'd like > > and the ie.status() method only applies when you can actually connect to the > window first, so it doesn't help me either. > > I thought about creating a series of nested begin-rescue-end blocks to catch > and work with the exceptions, but I still couldn't quite figure out how to > get it to wait the random amount of time required before trying to attach to > the window. > > Has anyone else encountered a similar problem before? Do you have any > suggestions that might help? > > Please let me know. Thanks. > Paul. > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From alex at verk.info Tue Mar 21 01:09:28 2006 From: alex at verk.info (Alexey Verkhovsky) Date: Mon, 20 Mar 2006 23:09:28 -0700 Subject: [Wtr-general] How can my script wait until a new window hasfinished loading before using IE.attach? In-Reply-To: <00ce01c64cab$fa216910$c5a8078b@Koko> References: <00ce01c64cab$fa216910$c5a8078b@Koko> Message-ID: <441F9898.1090808@verk.info> Michael Bolton wrote: >I would conclude that the " - Microsoft Internet Explorer" is not part of >the title, even though it looks like it from a human point of view. > > Michael, Do the same sequence in IRB, and once you have a Watir::IE object attached to that browser, type "ie.title". You'll see first-hand that your conclusion is right :) Best regards, Alex Verkhovsky From bret at pettichord.com Tue Mar 21 02:59:58 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 21 Mar 2006 01:59:58 -0600 Subject: [Wtr-general] How can my script wait until a new window hasfinished loading before using IE.attach? In-Reply-To: <00ce01c64cab$fa216910$c5a8078b@Koko> References: <ade75c5b0603202115m8935fc7uf9090a0f0597f401@mail.gmail.com> <00ce01c64cab$fa216910$c5a8078b@Koko> Message-ID: <ade75c5b0603202359m557523fax79f6661aa4dfc7f@mail.gmail.com> > I would conclude that the " - Microsoft Internet Explorer" is not part of > the title, even though it looks like it from a human point of view. The title is actually the HTML Title, rather than the window title. Different browsers render the window title somewhat differently. For example, browser.title would be the same whether browser was an IE or Firefox browser. Bret From tester.paul at gmail.com Tue Mar 21 10:35:59 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Tue, 21 Mar 2006 10:35:59 -0500 Subject: [Wtr-general] How can my script wait until a new window has finished loading before using IE.attach? In-Reply-To: <ade75c5b0603202115m8935fc7uf9090a0f0597f401@mail.gmail.com> References: <37c405480603201332g39afe2c3o@mail.gmail.com> <ade75c5b0603202115m8935fc7uf9090a0f0597f401@mail.gmail.com> Message-ID: <37c405480603210735t9aa3a1m@mail.gmail.com> Hi Bret, I tried this out in my test environment and yes, it works perfectly. Thanks. Paul. On 21/03/06, Bret Pettichord <bret at pettichord.com> wrote: > > The code base in development allows you to configure this. > > IE.attach_timeout = 10 > > This is number of seconds to wait for the window specified in attach > statements to appear/load. This should be exactly what you are asking > for. > > Paul, Mark, Anyone: Lemme know happens if you try this out. Does it > solve your problem? > > (There is a lot of great stuff in development, which is why i'm eager > to stabilize the code base and make a new release.) > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060321/2e3b737f/attachment.html From tester.paul at gmail.com Tue Mar 21 11:06:31 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Tue, 21 Mar 2006 11:06:31 -0500 Subject: [Wtr-general] How do you attach to a Tab in IE 7? Message-ID: <37c405480603210806p9e13b4dq@mail.gmail.com> Is anyone else playing with Internet Explorer 7 (Beta)? I have a computer set up with Win XP Pro SP2 and Internet Explorer 7 Beta 1, and I ran one of my scripts to see what would happen. For the most part, everything ran as expected except for one thing - instead of opening a link in a new browser window, it opened it in a new tab. (Tabbed browsing is one of the new features of IE7.) I couldn't figure out how to switch to that tab in IE7 via Ruby/Watir. To illustrate, here's what I tried: in IE7 I had the first tab displaying our web application's Home page, and in a second tab I had the Google page up. I clicked on the first tab and noticed that the window title bar switched to show my app's Title. I opened up IRB in a new command prompt and tried: ie = IE.attach(:title, 'Google') --> It just sort of hangs until I manually click on the right tab in the browser. *Then* control returns to IRB. I don't know if this is on anybody's radar yet. It's not a part of my application or an immediate need. I'm just curious to know if anyone working on Watir has played with this yet. Do you think perhaps we can add a new command like: IE.tab(:title, /blah/) or would it be better to enhance IE.attach to sift through the tabs in addition to any other open browser windows? (Because we might not know if it's in a new tab or window depending on the user's browser settings.) Cheers. Paul. (In the meanwhile, I just enabled the IE7 option: Tools > Intenet Options > Advanced > "Tabbed Browsing > Always open pop-ups in a new window" and all's good.) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060321/90faae34/attachment.html From christopher.mcmahon at gmail.com Tue Mar 21 11:47:06 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 21 Mar 2006 10:47:06 -0600 Subject: [Wtr-general] How do you attach to a Tab in IE 7? In-Reply-To: <37c405480603210806p9e13b4dq@mail.gmail.com> References: <37c405480603210806p9e13b4dq@mail.gmail.com> Message-ID: <72799cd70603210847n4ecd9ed7ge25b8cd46b76c753@mail.gmail.com> On 3/21/06, Paul Carvalho <tester.paul at gmail.com> wrote: > Is anyone else playing with Internet Explorer 7 (Beta)? We're scared. :) -Chris From zeljko.filipin at gmail.com Tue Mar 21 11:58:42 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 21 Mar 2006 17:58:42 +0100 Subject: [Wtr-general] How do you attach to a Tab in IE 7? In-Reply-To: <72799cd70603210847n4ecd9ed7ge25b8cd46b76c753@mail.gmail.com> References: <37c405480603210806p9e13b4dq@mail.gmail.com> <72799cd70603210847n4ecd9ed7ge25b8cd46b76c753@mail.gmail.com> Message-ID: <f81b1250603210858w7a17365eue0f0c10ab99ca46f@mail.gmail.com> +1 :) On 3/21/06, Chris McMahon <christopher.mcmahon at gmail.com> wrote: > > We're scared. :) > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060321/32c36b83/attachment.html From bret at pettichord.com Tue Mar 21 15:13:10 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 21 Mar 2006 14:13:10 -0600 Subject: [Wtr-general] How do you attach to a Tab in IE 7? In-Reply-To: <37c405480603210806p9e13b4dq@mail.gmail.com> References: <37c405480603210806p9e13b4dq@mail.gmail.com> Message-ID: <ade75c5b0603211213x16fa75del6e0f34d85941351f@mail.gmail.com> On 3/21/06, Paul Carvalho <tester.paul at gmail.com> wrote: > Do you think perhaps we can add a new command like: IE.tab(:title, /blah/) > or would it be better to enhance IE.attach to sift through the tabs in > addition to any other open browser windows? (Because we might not know if > it's in a new tab or window depending on the user's browser settings.) > > Cheers. Paul. > > (In the meanwhile, I just enabled the IE7 option: Tools > Intenet Options > > Advanced > "Tabbed Browsing > Always open pop-ups in a new window" and all's > good.) I like the idea of the IE#tab command and if someone writes it, we'll consider committing it. I'm reluctant to change the semantics of IE.attach as you suggest. For one, IE#tab would be an instance method and IE#attach is a class method. But this discussion is academic until someone figures out how to access tabs at all. Bret From Mark_Cain at rl.gov Tue Mar 21 15:58:45 2006 From: Mark_Cain at rl.gov (Cain, Mark) Date: Tue, 21 Mar 2006 12:58:45 -0800 Subject: [Wtr-general] Error when window closes using IE.attach Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5CE@EX5V.rl.gov> It may be related but I have been seeing this since I put your suggestions into my script. The $ie.button("...").click_no_wait worked but gives this error: -e:1: C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1470:in `method_missing': busy (WIN32OLERuntimeError) OLE error code:80004005 in <Unknown> <No Description> HRESULT error code:0x80020009 Exception occurred. from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1470:in `wait' from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2258:in `click' from (eval):1 The script continues and completes without further error. By the way, $ie.button("...").ole_object.click did not I get this error: 1) Error: test_main(TC_ARM_Start): NoMethodError: undefined method `click' for nil:NilClass C:/watir_bonus/working/ARM/tc_ARM_Start.rb:40:in `test_main' Does anyone know why these errors are being thrown? Thanks, --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Wednesday, March 15, 2006 4:38 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Error when window closes using IE.attach Replace this code: $ie.button("...").click With this: $ie.button("...").ole_object.click The problem is that the normal click method has in implicit "wait" and this is failing because it is polling the browser to see if it is still loading a page when the browser disappears (which in your case is correct). This workaround does a click without a wait. Watir 1.5 has a new click_no_wait method which also should be able to handle this situation. This in any case a bug. Feel free to post it to Jira if you'd like to see a fix. Bret On 3/15/06, Cain, Mark <Mark_Cain at rl.gov> wrote: I am getting the following error when the window I have attached to closes and returns to the main window-actually the main window closes too and the error is displayed. I can't send the web page due to proprietary and confidential information, but what it does is there is a name picker that pops up in a new window (the one I am attaching to) and once a name is selected clicking the button closes the window and transfers the selected name to the main window and is displayed in a select box. Ruby version 1.8.4_16 Watir revision 934 (current from trunk) 1) Error: test_main(TC_ARM_Start): WIN32OLERuntimeError: busy OLE error code:80004005 in <Unknown> <No Description> HRESULT error code:0x80020009 Exception occurred. c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1465:in `method_missing' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1465:in `wait' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2253:in `click' C:/watir_bonus/working/ARM/tc_ARM_Start.rb:34:in `test_main' exit c:/ruby/lib/ruby/1.8/test/unit.rb:285:in `exit' c:/ruby/lib/ruby/1.8/test/unit.rb:285 C:/watir_bonus/working/ARM/tc_ARM_Start.rb:13 My watir script: def gotoPopUpPage() $ie.goto("http://apwtst200.rl.gov/ARM/main.cfm?screen=0") end def test_main $d = Time.now.strftime("%m/%d/%Y") gotoPopUpPage() $ie.selectBox( :name, "Program").select("LMIT") $ie.selectBox( :name, "myProjectID2").select(/MARK-TEST/i) $ie.selectBox( :name, "myProjectID2").fireEvent("OnBlur") $ie.selectBox( :name, "DocumentMethod").select("by Checklist Number") $ie.textField( :name, "SearchString").set("TST") $ie.button("Search").click #$ie.selectBox( :name, "myProjectID2").select(/MARK-TEST/i) $ie.radio( :id, '72').set $ie.button(/Start/i).click $ie.selectBox( :name, "ProjectVersion").select(/4.4/i) #$ie.selectBox( :name, "namedisplay").select(/4.4/i) $ie.button("...").click sleep 2 nw = IE.attach(:title, "ARM") nw.text_field( :name, "Filter").set("Cain, Mark") nw.button(:id, "PersonnelSearch").click nw.button(:id, "SelectButton").click $ie.status() $ie.text_field(:name, "d_date").set("#{d}") $ie.selectBox( :name, "d_time").select(/15 minutes/i) $ie.textArea(:name, "").set("Me\nMyself\nI") End End Anyone seen this before? I have used attach before without issue. Thanks, ____________________ Mark L. Cain LMIT - E *STARS (r) ~ Lead Test Engineer 1981 Snyder, MSIN: G3-62, Richland, WA 99354 Mark_Cain at RL.gov 509.376.5458 "640 Kilobytes of computer memory ought to be enough for anybody." - Bill Gates, 1981 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060321/5d434b04/attachment.html -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ATT108962.txt Url: http://rubyforge.org/pipermail/wtr-general/attachments/20060321/5d434b04/attachment.txt From gmaralina at beingpresent.org Tue Mar 21 19:15:19 2006 From: gmaralina at beingpresent.org (Galina Maralina) Date: Tue, 21 Mar 2006 16:15:19 -0800 Subject: [Wtr-general] Window attach problem. Message-ID: <007101c64d45$b456fe00$3700a8c0@dbrblackcompaq> Hello, I am having a problem to attach a window, this is a script: . $ie.link(:id, /ORG_POPUP/).click $ie1 = Watir::IE.attach(:title, "C2P -") . First click works and the window opens, then it gives an error: Watir::Exception::NoMatchingWindowFoundException: Unable to locate a window with title of C2P - When I run the same using irb, everything works just fine. irb(main):032:0> ie1 = Watir::IE.attach(:title, "C2P -") => #<Watir::IE:0x2b340a8 @defaultSleepTime=0.1, @activeObjectHighLightColor="yel low", @pageHasReloaded=false, @enable_spinner=false, @url_list=["http://66.81.10 3.43:4040/c2p/imperativeTerritoryCoveredInitCreate.do"], @logger=#<Watir::Defaul tLogger:0x2b32c98 @progname=nil, @logdev=#<Logger::LogDevice:0x2b325f0 @filename =nil, @dev=#<IO:0x278e7d0>, @shift_size=nil, @shift_age=nil>, @level=2, @datetim e_format="%d-%b-%Y %H:%M:%S">, @typingspeed=0.08, @form=nil, @ie=#<WIN32OLE:0x2b 33b98>, @down_load_time=0.047, @error_checkers=[#<Proc:0x02ac3200 at c:/ruby/lib/ru by/site_ruby/1.8/watir.rb:1135>]> irb(main):034:0> ie1.show_all_objects -----------Objects in page ------------- text/css id= text/css id= text/javascript id= src=/c2p/js/main.js text/javascript id= src=/c2p/js/imperatives/ImperativeMainPopu What can it be? Thank you, Gallina. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060321/4ef35994/attachment.html From BPaatsch at activevoice.com Tue Mar 21 20:27:36 2006 From: BPaatsch at activevoice.com (Paatsch, Bernd) Date: Tue, 21 Mar 2006 19:27:36 -0600 Subject: [Wtr-general] undefined method `add_assertion' for nil:NilClass Message-ID: <DB8B2DF09344624C84867DA023FA4ADE44A165@activevoice2.necam.prv> Hello watir team, I tried to use assertion's in my code and had absolutely now success today. I always get following error: TEST FAILED.undefined method `add_assertion' for nil:NilClass c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:115:in `add_assertion' c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:353:in `_wrap_assertion' c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:38:in `assert' ./utils.rb:1376:in `bpVerifyOnPage' Here is a code snipe (verify is a string that is passed to a function): The if statement works fine. The assert gives me trouble. Why? What is wrong? What is the nil class? class BPUtils < Test::Unit::TestCase def initialize end def .........some code begin assert($ie.contains_text( verify ) ) puts("TEST PASSED. Found test string #{verify}") #if $ie.contains_text( verify ) then # some #else # some code #end rescue => e puts("TEST FAILED." + e.message + "\n" + e.backtrace.join("\n")) # hand exception over to main program to quit the program raise QuitProgram, "quit program", caller end end -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060321/efa1c67b/attachment.html From bret at pettichord.com Tue Mar 21 20:46:12 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 21 Mar 2006 19:46:12 -0600 Subject: [Wtr-general] undefined method `add_assertion' for nil:NilClass In-Reply-To: <DB8B2DF09344624C84867DA023FA4ADE44A165@activevoice2.necam.prv> References: <DB8B2DF09344624C84867DA023FA4ADE44A165@activevoice2.necam.prv> Message-ID: <ade75c5b0603211746o6d004363u4afa810789a7ee7e@mail.gmail.com> On 3/21/06, Paatsch, Bernd <BPaatsch at activevoice.com> wrote: > def > .........some code > begin I suspect your problem is somewhere in here. From bret at pettichord.com Tue Mar 21 21:03:49 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 21 Mar 2006 20:03:49 -0600 Subject: [Wtr-general] Error when window closes using IE.attach In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5CE@EX5V.rl.gov> References: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D5CE@EX5V.rl.gov> Message-ID: <ade75c5b0603211803of2e909ci42c48e5600659a51@mail.gmail.com> On 3/21/06, Cain, Mark <Mark_Cain at rl.gov> wrote: > It may be related but I have been seeing this since I put your suggestions > into my script. The $ie.button("...").click_no_wait worked but gives this > error: > > -e:1: C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1470:in > `method_missing': busy (WIN32OLERuntimeError) > > OLE error code:80004005 in <Unknown> > > <No Description> > > HRESULT error code:0x80020009 > > Exception occurred. from > C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1470:in `wait' > > from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2258:in > `click' > > from (eval):1 > > The script continues and completes without further error. Hmm. I would say this is a bug in click_no_wait. The reality is that the current implementation still calls the wait code, but asynchronously, so it immediately passes control to the next command. Usually this is harmless, but this is a clear example demonstrating that this needs more work. Would you mind opening a Jira issue for this? > By the way, $ie.button("...").ole_object.click did not I > get this error: > > 1) Error: > > test_main(TC_ARM_Start): > > NoMethodError: undefined method `click' for nil:NilClass > > C:/watir_bonus/working/ARM/tc_ARM_Start.rb:40:in > `test_main' Try this instead. button = $ie.button(...) button.locate button.ole_object.click This should also work, but i won't be surprised if it doesn't: $ie.button(...).locate.ole_object.click Thank you for trying my suggestions and reporting these problems. Bret From bret at pettichord.com Tue Mar 21 21:05:20 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 21 Mar 2006 20:05:20 -0600 Subject: [Wtr-general] Window attach problem. In-Reply-To: <007101c64d45$b456fe00$3700a8c0@dbrblackcompaq> References: <007101c64d45$b456fe00$3700a8c0@dbrblackcompaq> Message-ID: <ade75c5b0603211805m47710a0fh6aa5525cb688e17e@mail.gmail.com> This is a timing problem in IE#attach. It is fixed in development. See the recent email discussion regarding IE.attach_timeout. Bret On 3/21/06, Galina Maralina <gmaralina at beingpresent.org> wrote: > > > > Hello, > > > > I am having a problem to attach a window, this is a script: > > > > ? > > $ie.link(:id, /ORG_POPUP/).click > > $ie1 = Watir::IE.attach(:title, "C2P -") > > > > ? > > First click works and the window opens, then it gives an error: > > > > Watir::Exception::NoMatchingWindowFoundException: Unable to > locate a window with > > title of C2P ? > > > > When I run the same using irb, everything works just fine? > > > > irb(main):032:0> ie1 = Watir::IE.attach(:title, "C2P -") > > => #<Watir::IE:0x2b340a8 @defaultSleepTime=0.1, > @activeObjectHighLightColor="yel > > low", @pageHasReloaded=false, @enable_spinner=false, > @url_list=["http://66.81.10 > > 3.43:4040/c2p/imperativeTerritoryCoveredInitCreate.do"], > @logger=#<Watir::Defaul > > tLogger:0x2b32c98 @progname=nil, @logdev=#<Logger::LogDevice:0x2b325f0 > @filename > > =nil, @dev=#<IO:0x278e7d0>, @shift_size=nil, @shift_age=nil>, @level=2, > @datetim > > e_format="%d-%b-%Y %H:%M:%S">, @typingspeed=0.08, @form=nil, > @ie=#<WIN32OLE:0x2b > > 33b98>, @down_load_time=0.047, > @error_checkers=[#<Proc:0x02ac3200 at c:/ruby/lib/ru > > by/site_ruby/1.8/watir.rb:1135>]> > > irb(main):034:0> ie1.show_all_objects > > -----------Objects in page ------------- > > text/css id= > > text/css id= > > text/javascript id= src=/c2p/js/main.js > > text/javascript id= > src=/c2p/js/imperatives/ImperativeMainPopu > > > > > > What can it be? > > > > Thank you, > > Gallina. > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > From BPaatsch at activevoice.com Tue Mar 21 21:22:03 2006 From: BPaatsch at activevoice.com (Paatsch, Bernd) Date: Tue, 21 Mar 2006 20:22:03 -0600 Subject: [Wtr-general] undefined method `add_assertion' for nil:NilCla ss Message-ID: <DB8B2DF09344624C84867DA023FA4ADE44A167@activevoice2.necam.prv> Still the same after I changed the code to: def bpVerifyPopupWindowOpen( ieCont, verify) #how, what, framename, verify ) begin assert( ieCont.contains_text( verify) ) puts("TEST PASSED. Found test string 'Programming Ruby' ") rescue => e puts("TEST FAILED." + e.message + "\n" + e.backtrace.join("\n")) end -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Tuesday, March 21, 2006 5:46 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] undefined method `add_assertion' for nil:NilClass On 3/21/06, Paatsch, Bernd <BPaatsch at activevoice.com> wrote: > def > .........some code > begin I suspect your problem is somewhere in here. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060321/8e01ac8e/attachment.html From bret at pettichord.com Tue Mar 21 21:37:09 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 21 Mar 2006 20:37:09 -0600 Subject: [Wtr-general] undefined method `add_assertion' for nil:NilCla ss In-Reply-To: <DB8B2DF09344624C84867DA023FA4ADE44A167@activevoice2.necam.prv> References: <DB8B2DF09344624C84867DA023FA4ADE44A167@activevoice2.necam.prv> Message-ID: <ade75c5b0603211837g20410144v6ccbce9e07ef8020@mail.gmail.com> That's what i needed to see. Make this change... On 3/21/06, Paatsch, Bernd <BPaatsch at activevoice.com> wrote: > Still the same after I changed the code to: > > def bpVerifyPopupWindowOpen( ieCont, verify) #how, what, framename, > verify ) > begin include Test::Unit::Assertions > assert( ieCont.contains_text( verify) ) > puts("TEST PASSED. Found test string 'Programming Ruby' ") > > rescue => e > puts("TEST FAILED." + e.message + "\n" + > e.backtrace.join("\n")) > end > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of > Bret Pettichord > Sent: Tuesday, March 21, 2006 5:46 PM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] undefined method `add_assertion' for nil:NilClass > > On 3/21/06, Paatsch, Bernd <BPaatsch at activevoice.com> wrote: > > def > > .........some code > > begin > > I suspect your problem is somewhere in here. > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > From tester.paul at gmail.com Tue Mar 21 21:39:34 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Tue, 21 Mar 2006 21:39:34 -0500 Subject: [Wtr-general] Window attach problem. In-Reply-To: <007101c64d45$b456fe00$3700a8c0@dbrblackcompaq> References: <007101c64d45$b456fe00$3700a8c0@dbrblackcompaq> Message-ID: <37c405480603211839ue150a7dv@mail.gmail.com> On 21/03/06, Galina Maralina <gmaralina at beingpresent.org> wrote: > > Hello, > > I am having a problem to attach a window, this is a script: > > ? > > *$ie.link(:id, /ORG_POPUP/).click* > > *$ie1 = Watir::IE.attach(:title, "C2P -")* > > ? > Hello there. I'm just curious.. should the extra space and dash be at the end of the title name? Is this the full title or just a part of it? Does it work if you try either of the following: > $ie1 = Watir::IE.attach(:title, "C2P") or > $ie1 = Watir::IE.attach(:title, /C2P/) Paul. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060321/ac0c73d6/attachment.html From BPaatsch at activevoice.com Tue Mar 21 21:54:57 2006 From: BPaatsch at activevoice.com (Paatsch, Bernd) Date: Tue, 21 Mar 2006 20:54:57 -0600 Subject: [Wtr-general] undefined method `add_assertion' for nil:NilCla ss Message-ID: <DB8B2DF09344624C84867DA023FA4ADE44A169@activevoice2.necam.prv> Now I get: TEST FAILED.undefined method `include' for (WebAC::BPUtils):WebAC::BPUtils -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Tuesday, March 21, 2006 6:37 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] undefined method `add_assertion' for nil:NilCla ss That's what i needed to see. Make this change... On 3/21/06, Paatsch, Bernd <BPaatsch at activevoice.com> wrote: > Still the same after I changed the code to: > > def bpVerifyPopupWindowOpen( ieCont, verify) #how, what, > framename, verify ) > begin include Test::Unit::Assertions > assert( ieCont.contains_text( verify) ) > puts("TEST PASSED. Found test string 'Programming Ruby' ") > > rescue => e > puts("TEST FAILED." + e.message + "\n" + > e.backtrace.join("\n")) > end > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret > Pettichord > Sent: Tuesday, March 21, 2006 5:46 PM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] undefined method `add_assertion' for > nil:NilClass > > On 3/21/06, Paatsch, Bernd <BPaatsch at activevoice.com> wrote: > > def > > .........some code > > begin > > I suspect your problem is somewhere in here. > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060321/533ea67a/attachment.html From bret at pettichord.com Wed Mar 22 00:31:26 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 21 Mar 2006 23:31:26 -0600 Subject: [Wtr-general] undefined method `add_assertion' for nil:NilCla ss In-Reply-To: <DB8B2DF09344624C84867DA023FA4ADE44A169@activevoice2.necam.prv> References: <DB8B2DF09344624C84867DA023FA4ADE44A169@activevoice2.necam.prv> Message-ID: <ade75c5b0603212131n1580edder82767ada390dbc40@mail.gmail.com> Oops. Put the include statement before the "def" instead of inside it. On 3/21/06, Paatsch, Bernd <BPaatsch at activevoice.com> wrote: > > > Now I get: > TEST FAILED.undefined method `include' for (WebAC::BPUtils):WebAC::BPUtils > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of > Bret Pettichord > Sent: Tuesday, March 21, 2006 6:37 PM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] undefined method `add_assertion' for nil:NilCla > ss > > > > > That's what i needed to see. Make this change... > > On 3/21/06, Paatsch, Bernd <BPaatsch at activevoice.com> wrote: > > Still the same after I changed the code to: > > > > def bpVerifyPopupWindowOpen( ieCont, verify) #how, what, > > framename, verify ) > > begin > include Test::Unit::Assertions > > assert( ieCont.contains_text( verify) ) > > puts("TEST PASSED. Found test string 'Programming Ruby' ") > > > > rescue => e > > puts("TEST FAILED." + e.message + "\n" + > > e.backtrace.join("\n")) > > end > > > > > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of > Bret > > Pettichord > > Sent: Tuesday, March 21, 2006 5:46 PM > > To: wtr-general at rubyforge.org > > Subject: Re: [Wtr-general] undefined method `add_assertion' for > > nil:NilClass > > > > On 3/21/06, Paatsch, Bernd <BPaatsch at activevoice.com> wrote: > > > def > > > .........some code > > > begin > > > > I suspect your problem is somewhere in here. > > > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > _______________________________________________ > > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > From dave at burt.id.au Wed Mar 22 00:37:40 2006 From: dave at burt.id.au (Dave Burt) Date: Wed, 22 Mar 2006 16:37:40 +1100 Subject: [Wtr-general] Watir 1.5? Message-ID: <3ad74bc80603212137t35948cc0tfb4dd8546247a37@mail.gmail.com> Hi Bret and anybody else hacking on the Watir library, What's the status on Watir 1.5? The changes I've heard about include effective ways of handling popups (confirm, alert, modal web dialogs, save-as) and more consistent returning of Watir wrappers rather than straight WIN32OLE handles, and I'm looking forward to the future. Do you have a time-frame in mind for a release? If I go to RubyForge and download stuff from CVS, should I expect problems with any particular areas? Thanks, Dave From bret at pettichord.com Wed Mar 22 00:54:19 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 21 Mar 2006 23:54:19 -0600 Subject: [Wtr-general] Watir 1.5? In-Reply-To: <3ad74bc80603212137t35948cc0tfb4dd8546247a37@mail.gmail.com> References: <3ad74bc80603212137t35948cc0tfb4dd8546247a37@mail.gmail.com> Message-ID: <ade75c5b0603212154i45fa3609l734f9d51279509bd@mail.gmail.com> Dave, First of all, you can look at the CVS code, but it would be better to look at our code on SVN (at openqa.org) or even just look at the versions that i posted to wiki.openqa.org the other day. They are both more current. The support for windows popups, however, is not really ready for testing yet. (The support for modal web popups, however, is 98% complete.) All the core-tests work, so the core code is stable. I've frequently pointed people to this build when they have found bugs in 1.4.1 that are fixed in dev and they usually come back satisfied. We've just started final regression testing on our main product at work, for the first release in six months, so that is probably going to be taking most of my energy for the next few weeks. I am in the process of moving the roadmap to jira, so we have an online map of what needs to be done to complete the release. Since moving the code to OpenQA, there are a lot of loose ends to tie up to explain what is going on. If you see one, it would help a lot if you could tie it off for us. The more help i get with the FAQ and the website, etc, the more time i have to write ruby code. Bret On 3/21/06, Dave Burt <dave at burt.id.au> wrote: > Hi Bret and anybody else hacking on the Watir library, > > What's the status on Watir 1.5? > > The changes I've heard about include effective ways of handling popups > (confirm, alert, modal web dialogs, save-as) and more consistent > returning of Watir wrappers rather than straight WIN32OLE handles, and > I'm looking forward to the future. > > Do you have a time-frame in mind for a release? > > If I go to RubyForge and download stuff from CVS, should I expect > problems with any particular areas? > > Thanks, > Dave > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From dave at burt.id.au Wed Mar 22 01:54:41 2006 From: dave at burt.id.au (Dave Burt) Date: Wed, 22 Mar 2006 17:54:41 +1100 Subject: [Wtr-general] Watir 1.5? References: <3ad74bc80603212137t35948cc0tfb4dd8546247a37@mail.gmail.com> <ade75c5b0603212154i45fa3609l734f9d51279509bd@mail.gmail.com> Message-ID: <000301c64d7d$7f6d5440$6602a8c0@telperion> Hi Bret, Thanks for your complete and helpful answer. I'll probably grab the dev code when I get a chance. Bret said: > Since moving the code to OpenQA, there are a lot of loose ends to tie > up to explain what is going on. If you see one, it would help a lot if > you could tie it off for us. > > The more help i get with the FAQ and the website, etc, the more time i > have to write ruby code. Are these "loose ends" the same thing as "the FAQ and the website, etc"? Or are they inconsistencies in Watir 1.5's object model? Or something else entirely? How can I help with the FAQ and the website, etc.? Cheers, Dave From angrez at gmail.com Wed Mar 22 03:23:50 2006 From: angrez at gmail.com (Angrez Singh) Date: Wed, 22 Mar 2006 13:53:50 +0530 Subject: [Wtr-general] FireWatir release alpha v1.0 In-Reply-To: <e26bda3e0603200726k6f5351d3g1717df965a8f2096@mail.gmail.com> References: <e26bda3e0603101010r1cc2f261mc4c16cb86ef4bcfd@mail.gmail.com> <f81b1250603200611l72735fdelfb2c97be11aecdde@mail.gmail.com> <e26bda3e0603200726k6f5351d3g1717df965a8f2096@mail.gmail.com> Message-ID: <e26bda3e0603220023q21e399b2p5cac57d97a1106bc@mail.gmail.com> Hi, I had run "mozilla_all_tests.rb" yesterday night & I got no failures: $ruby mozilla_all_tests.rb Loaded suite mozilla_all_tests Started .................................................Starting win setFileDialog in new process. Setting text file://d:/installations/watir/mozilla_unittests/html/fileupload.html Starting app: ruby d:/installations/ruby/lib/ruby/site_ruby/1.8/watir/setFileDialog.rb file://d:/installations/watir/mozilla_unittests/html/fileupload.html "File Upload" ....name: circle type: id: value: disabled: src: file:///d:/installations/watir/mozilla_unittests/html/images/circle.jpg file date: file size: width: 106 height: 106 alt: ..............Length of windows is : 3 Title is : New Browser Launcher Title is : Welcome to Gmail Title is : Pass Page Title is matched. Found window with number : 2 .............radio 1 is set : false .................... Finished in 44570.837 seconds. 100 tests, 520 assertions, 0 failures, 0 errors I'll try to run these test on some other machine & let you know if there are any failures. One thing that you can check is that your Firefox settings for opening new window. Don't open new window in a tab. Make the settings to open new window in new window. Regards, Angrez -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060322/9828dce2/attachment.html From zeljko.filipin at gmail.com Wed Mar 22 03:44:33 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 22 Mar 2006 09:44:33 +0100 Subject: [Wtr-general] FireWatir release alpha v1.0 In-Reply-To: <e26bda3e0603220023q21e399b2p5cac57d97a1106bc@mail.gmail.com> References: <e26bda3e0603101010r1cc2f261mc4c16cb86ef4bcfd@mail.gmail.com> <f81b1250603200611l72735fdelfb2c97be11aecdde@mail.gmail.com> <e26bda3e0603200726k6f5351d3g1717df965a8f2096@mail.gmail.com> <e26bda3e0603220023q21e399b2p5cac57d97a1106bc@mail.gmail.com> Message-ID: <f81b1250603220044m7a7c898ci63080a1335998b6@mail.gmail.com> I think it is my mistake. My Firefox opens new windows in new tab, and I think there is some pop-up blocker hiding. On 3/22/06, Angrez Singh <angrez at gmail.com> wrote: > > > I'll try to run these test on some other machine & let you know if there > are any failures. One thing that you can check is that your Firefox settings > for opening new window. Don't open new window in a tab. Make the settings to > open new window in new window. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060322/6ec1c4e1/attachment.html From rodrigo.martin at enratio.com Wed Mar 22 10:37:51 2006 From: rodrigo.martin at enratio.com (Rodrigo Julian Martin) Date: Wed, 22 Mar 2006 12:37:51 -0300 Subject: [Wtr-general] Introduction and Questions [find browser's objects] Message-ID: <A0CC17E6F0735B4E95C33832ECCD6763227065@enratio-sv03.enratio.com.ar> Hello Everybody, First i will introduce myself, my name is Rodrigo and i'm a new user of Watir/Ruby, from Argentina. I'm very excited and amazed with this, it seems that i've finally find home (i was using TestComplete and VbScript as tools for Web Testing). I have some questions, regarding finding Browser's Objects. 1) Can i find ALL the objects loadead in the browser, searching them by their classname [or any other propertie]? Is there a function or method that do this? P.S., i need to find all the objects loaded in the browser which has the value "error" in their classname propertie. I've read something about the GetObject method, but it alerts me that is used Internally by Watir and shouldn't be used externally. Thanks in Advance, i'm really glad of being part of this community! Regards Rodrigo J. Martin. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060322/394d1109/attachment.html From christopher.mcmahon at gmail.com Wed Mar 22 10:51:16 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 22 Mar 2006 09:51:16 -0600 Subject: [Wtr-general] Introduction and Questions [find browser's objects] In-Reply-To: <A0CC17E6F0735B4E95C33832ECCD6763227065@enratio-sv03.enratio.com.ar> References: <A0CC17E6F0735B4E95C33832ECCD6763227065@enratio-sv03.enratio.com.ar> Message-ID: <72799cd70603220751p7795be8ds296159000fe3f043@mail.gmail.com> > First i will introduce myself, my name is Rodrigo and i'm a new user of > Watir/Ruby, from Argentina. Good to meet you. > 1) Can i find ALL the objects loadead in the browser, searching them by > their classname [or any other propertie]? Is there a function or method If you open the file "watir.rb" in the directory "C:\watir" in an editor and do a text string search for "def show", you'll find all of the methods that expose various aspects of the page Watir has open. These were intended to be used from IRB, but they work in a script, too. We've recently been discussing improving the "show_all_objects" method to lend itself more to what you want to do. Right now, I suggest you explore the "show" methods that exist, and then ask more questions if you need to. Welcome to Watir... -Chris From bret at pettichord.com Wed Mar 22 11:30:06 2006 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 22 Mar 2006 10:30:06 -0600 Subject: [Wtr-general] Watir 1.5? In-Reply-To: <000301c64d7d$7f6d5440$6602a8c0@telperion> References: <3ad74bc80603212137t35948cc0tfb4dd8546247a37@mail.gmail.com> <ade75c5b0603212154i45fa3609l734f9d51279509bd@mail.gmail.com> <000301c64d7d$7f6d5440$6602a8c0@telperion> Message-ID: <ade75c5b0603220830v52bdb601r628269ef0a665ed2@mail.gmail.com> On 3/22/06, Dave Burt <dave at burt.id.au> wrote: > Are these "loose ends" the same thing as "the FAQ and the website, etc"? Or are > they inconsistencies in Watir 1.5's object model? Or something else entirely? We have both of course, but i was speaking of the lack of pointers on the new website about what we are doing. > How can I help with the FAQ and the website, etc.? You could write the "How to Help" page on the website that i've been collecting notes for! Just kidding. I need to post this, but it helps to motivate me to know that people will help out. Thanks. Bret From rodrigo.martin at enratio.com Wed Mar 22 12:42:21 2006 From: rodrigo.martin at enratio.com (Rodrigo Julian Martin) Date: Wed, 22 Mar 2006 14:42:21 -0300 Subject: [Wtr-general] Problem running Tests with FireWatir & Questions Message-ID: <A0CC17E6F0735B4E95C33832ECCD6763227071@enratio-sv03.enratio.com.ar> Hi, I've recently installed the FireWatir, apparently without any problem. But, when I try to run the mozilla_all_tests.rb, I receive this error message: C:/Program Files/Watir/mozilla_unittests/mozilla_all_tests.rb:1: syntax error <html> <head> ^ C:/Program Files/Watir/mozilla_unittests/mozilla_all_tests.rb:10: syntax error <title>FishEye: history watir/branches/firefox/mozilla_unittests/mozilla_all _tests.rb ^ Am I doing something wrong? I've installed the JSSH extension, throw the telnet sentence and everything looks fine. Also I've started Firefox manually (with the -jssh parameter, and no double dash =P) Thanks in advance! Oh, and one final question... with this extension, could I run old scripts programmed for Explorer against firefox? And.. installing this FireWatir, could I still use Watir for Explorer? Thanks for your Patience! Rodrigo Julian Martin. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060322/622d5345/attachment.html From rodrigo.martin at enratio.com Wed Mar 22 14:21:37 2006 From: rodrigo.martin at enratio.com (Rodrigo Julian Martin) Date: Wed, 22 Mar 2006 16:21:37 -0300 Subject: [Wtr-general] Problem Solved with FireWatir, but another one appeared =( Message-ID: Hi all, My mistake in the last message about Firewatir, I've just realized that I've downloaded wrongly the files of the release =( Now that I have all the files right, I still get this error message: C:\Program Files\Watir\mozilla_unittests>mozilla_all_tests.rb c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:483:in `initialize': LoadLibrary: c:\rub y\lib\ruby\site_ruby\1.8\watir\IEDialog\Release\IEDialog.dll (RuntimeError) from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:483:in `new' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:483 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re quire__' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re quire' from C:/Program Files/Watir/mozilla_unittests/../mozilla_unittests/setup .rb:4 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re quire__' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re quire' from C:/Program Files/Watir/mozilla_unittests/mozilla_all_tests.rb:6 C:\Program Files\Watir\mozilla_unittests> Any idea about this problem? Thanks in advance and thanks for your patience! Regards Rodrigo Julian Martin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060322/6caef4e5/attachment.html From gmaralina at beingpresent.org Wed Mar 22 14:47:28 2006 From: gmaralina at beingpresent.org (Galina Maralina) Date: Wed, 22 Mar 2006 11:47:28 -0800 Subject: [Wtr-general] Window attach problem. In-Reply-To: Message-ID: <00d601c64de9$73693030$3700a8c0@dbrblackcompaq> Thank you, Bret. I just verified that this is a timing issue, and if it works just fine, if I give it some more time... I saw the discussion of IE::attach_timeout. Can I use this fix from development somehow with the version of water I am using, or I need to wait for another release? If I need to wait, what can I do meanwhile. (Sorry, if my questions are silly, I am new to water and this list...) Galina. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Tuesday, March 21, 2006 6:05 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Window attach problem. This is a timing problem in IE#attach. It is fixed in development. See the recent email discussion regarding IE.attach_timeout. Bret On 3/21/06, Galina Maralina wrote: > > > > Hello, > > > > I am having a problem to attach a window, this is a script: > > > > . > > $ie.link(:id, /ORG_POPUP/).click > > $ie1 = Watir::IE.attach(:title, "C2P -") > > > > . > > First click works and the window opens, then it gives an error: > > > > Watir::Exception::NoMatchingWindowFoundException: Unable to > locate a window with > > title of C2P - > > > > When I run the same using irb, everything works just fine. > > > > irb(main):032:0> ie1 = Watir::IE.attach(:title, "C2P -") > > => # @activeObjectHighLightColor="yel > > low", @pageHasReloaded=false, @enable_spinner=false, > @url_list=["http://66.81.10 > > 3.43:4040/c2p/imperativeTerritoryCoveredInitCreate.do"], > @logger=# > tLogger:0x2b32c98 @progname=nil, @logdev=# @filename > > =nil, @dev=#, @shift_size=nil, @shift_age=nil>, @level=2, > @datetim > > e_format="%d-%b-%Y %H:%M:%S">, @typingspeed=0.08, @form=nil, > @ie=# > 33b98>, @down_load_time=0.047, > @error_checkers=[# > by/site_ruby/1.8/watir.rb:1135>]> > > irb(main):034:0> ie1.show_all_objects > > -----------Objects in page ------------- > > text/css id= > > text/css id= > > text/javascript id= src=/c2p/js/main.js > > text/javascript id= > src=/c2p/js/imperatives/ImperativeMainPopu > > > > > > What can it be? > > > > Thank you, > > Gallina. > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From tester.paul at gmail.com Wed Mar 22 16:15:24 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Wed, 22 Mar 2006 16:15:24 -0500 Subject: [Wtr-general] OT: Line Order in Scripts and Writing File Output Message-ID: <37c405480603221315w2294664ds@mail.gmail.com> Hi there, please forgive the Off-Topic question. Let me know if I should try another forum or resource (and which ones they are). I'm trying to refactor one set of Watir scripts into separate files so that it is more like the setup used in the UnitTests and I seem to be having some difficulty figuring out the right order of things. Maybe it's just the choice of my files that's hanging me up, but it's what I'm working with so I'd like to see if I can figure it out. Also, I imagine that there might be a better way of doing this, but this is my first complete set of Ruby/Watir scripts so bear with me if the setup seems inefficient or incorrect in some way. (All feedback appreciated.) Background: - I have 4 Performance scripts that walk through the site maps for 4 different apps. - Each script is currently independent and does the following things: (a) opens up two files for writing output: one for the performance measurements, and one for a separate progress/status report (used for troubleshooting in case something goes wrong). (b) walks through each page in the site map and records the (i) page size and (ii) download time. (c) closes the two files and the web browser. -> These scripts all work as expected when run individually. FIRST PROBLEM (with hack workaround): - The last step above (c) was interesting, because it took me a while to figure out how to close the files as the *last* step in the test run. - To do this, I put all of the setup and tests into the first class ( e.g. "class TC_BD01") and the 'close open files' step into a second class (e.g. "class TC_BD02"). I couldn't figure out any other way to ensure that this was performed in the correct order. On the downside, I have an extra unwanted Class with an unwanted TestCase that all it does is close some files and close the web browser. - As an example, here is the output of the test file that helped me work out this line/class/test order problem (the general structure is the same as my real script, except all the code has just been replaced with a simple 'puts' line): ----- >ruby BD_site_map_tests.rb ** TC_BD01_site_map_walkthru ** Loaded suite BD_site_map_tests Started ] TC_BD1 > test_a_Public_Pages ]=> TC_BD1 *teardown* .] TC_BD1 > test_b_First_Time_login ]=> TC_BD1 *teardown* .] TC_BD1 > test_c_Main_Menu ]=> TC_BD1 *teardown* . ] TC_BD2 > test_wrap_up *-*-*-*-*-*-*-*-*-* . Finished in 0.0 seconds. 4 tests, 0 assertions, 0 failures, 0 errors >Exit code: 0 ----- => So it kind of bugs me that it reports "4 tests" when really there are 3 tests and 1 'wrap_up' routine, but I can live with that (for now) because it works. In the long term I'd like to figure out how to solve this problem with the extra empty test cases. SECOND PROBLEM (working with the new integrated script suite): - I stripped out all the constant declarations and custom methods into separate files. (Thanks for the help with this Bret and Sean G.) - I created a master script file that has all the 'require' and 'include' statements and then calls the individual scripts one at a time. => What I've noticed is that Ruby (1) scans through *all* of the scripts, (2) groups all of the [non test case lines] and [test cases] and then (3) runs them in that group order. I think it's really whacked, but that's what I've seen. - Here's my Script_Order_TestSuite.rb file: ----- require 'common' # The Tests: puts '-= Wrapper A - BEFORE =-' require 'BD_shell_tests' puts '-= Wrapper A - AFTER =-' puts '' puts '-= Wrapper B - BEFORE =-' require 'SD_shell_tests' puts '-= Wrapper B - AFTER =-' puts '' # End ----- And here's the output: ----- >ruby Script_Order_TestSuite.rb -= Wrapper A - BEFORE =- ** TC_BD01_site_map_walkthru ** -= Wrapper A - AFTER =- -= Wrapper B - BEFORE =- ** TC_SD01_site_map_walkthru ** -= Wrapper B - AFTER =- Loaded suite Script_Order_TestSuite Started ] TC_BD1 > test_a_Public_Pages ]=> TC_BD1 *teardown* .] TC_BD1 > test_b_First_Time_login ]=> TC_BD1 *teardown* .] TC_BD1 > test_c_Main_Menu ]=> TC_BD1 *teardown* . ] TC_BD2 > test_wrap_up *-*-*-*-*-*-*-*-*-* .] TC_SD1 > test_a_Public_Pages ]=> TC_SD1 *teardown* .] TC_SD1 > test_b_First_Time_login ]=> TC_SD1 *teardown* .] TC_SD1 > test_c_Main_Menu ]=> TC_SD1 *teardown* .] TC_SD1 > test_d_Admin_Pages ]=> TC_SD1 *teardown* . ] TC_SD2 > test_wrap_up *-*-*-*-*-*-*-*-*-* . Finished in 0.0 seconds. 9 tests, 0 assertions, 0 failures, 0 errors >Exit code: 0 ----- => What I was *expecting* was that the master script would do the "Wrapper # - Before" stuff *prior* to running the test cases in the called script, and *then* perform the "Wrapper # - After" stuff when that called script was complete. But that's not what happens. MY QUESTION(S): - Given : Ruby will always pool *all* the TestCases together and run them as a set/suite in ascending order by class and then by TestCase. So I need to rethink how the output files are opened and closed, as well as how the browsers are opened and closed. Does anyone have any suggestions as to how I can properly close open files after each test script/suite run? (The reason I did this in each script was so that I could record the script start and end times. I think I may need to replace this with variables now if I can't write the output at the actual script start and stop times.) Or should I just open all the output files at the start and then close them at the very end of the master script completion? If so, what sort of module/class/whatever structure should I use in my scripts to ensure that certain steps are run *first* and *last* and hopefully without adding additional empty Classes and TestCases. (Aside: I ordered the 2nd edition Pickaxe book and am still waiting for it to arrive, so I can't look that up for reference just yet. If applicable, feel free to reference certain sections within it and I will look it up when I get it.) I just can't figure out how to run commands *after* the "suite" of test cases is complete. Everything I add always runs *prior* to the suite of test cases. I think that both problems above might share a common solution, but I just don't know what that could be. Thanks in advance for any useful suggestions and advice. Cheers. Paul. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060322/7995efc1/attachment.html From padhs2k at gmail.com Wed Mar 22 21:04:15 2006 From: padhs2k at gmail.com (Padhma N) Date: Wed, 22 Mar 2006 18:04:15 -0800 Subject: [Wtr-general] How to capture the screen which has scrollable content? Message-ID: <38c139080603221804n2e61ce33g562ea909981d058e@mail.gmail.com> Hi all, I have the following question- I would like to capture the entire content of my webpage. I used following Screen Capture functionality provided by Watir to capture the window. >> file_name= 'Schedule_List.jpg' screen_capture(file_name) >> It captured a screenshot of only the *visible portion* of my webpage. My webpage has a lot of scrollable content and those content are not being captured by Watir. I would like to take a screen shot of my entire webpage(both visible not visible region). Is it possible using Watir?? Please let me know..Also, I tried other applications like Fastone,SnagIt for just capturing the scrollable region(these applications have auto scrolling and screen capturing facility) but those applications too are not working for my webpage though they work for other webpages. Please let me know if Watir can resolve this problem. Thanks, Padhmavathy -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060322/46ca4e79/attachment.html From angrez at gmail.com Wed Mar 22 22:27:36 2006 From: angrez at gmail.com (Angrez Singh) Date: Thu, 23 Mar 2006 08:57:36 +0530 Subject: [Wtr-general] Problem running Tests with FireWatir & Questions In-Reply-To: References: Message-ID: HI, > > I've recently installed the FireWatir, apparently without any problem. > But, when I try to run the mozilla_all_tests.rb, I receive this error > message: > C:/Program Files/Watir/mozilla_unittests/mozilla_all_tests.rb:1: syntax > error > > C:/Program Files/Watir/mozilla_unittests/mozilla_all_tests.rb:10: syntax > error > FishEye: history > watir/branches/firefox/mozilla_unittests/mozilla_all_tests.rb > Am I doing something wrong? > I haven't seen this error before. I have tried running mozilla_all_tests.rb on my machine & it did ran successfully. > Oh, and one final question? with this extension, could I run old scripts > programmed for Explorer against firefox? > And.. installing this FireWatir, could I still use Watir for Explorer? > Yes, you can still use WATiR for Explorer. Old scripts will run against Firefox with no or some small changes :) Regards, Angrez -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060323/d7ce1fe2/attachment.html From angrez at gmail.com Thu Mar 23 03:20:28 2006 From: angrez at gmail.com (Angrez Singh) Date: Thu, 23 Mar 2006 13:50:28 +0530 Subject: [Wtr-general] Problem running Tests with FireWatir & Questions In-Reply-To: References: Message-ID: HI, > > I've recently installed the FireWatir, apparently without any problem. > But, when I try to run the mozilla_all_tests.rb, I receive this error > message: > C:/Program Files/Watir/mozilla_unittests/mozilla_all_tests.rb:1: syntax > error > > C:/Program Files/Watir/mozilla_unittests/mozilla_all_tests.rb:10: syntax > error > FishEye: history > watir/branches/firefox/mozilla_unittests/mozilla_all_tests.rb > Am I doing something wrong? > I haven't seen this error before. I have tried running mozilla_all_tests.rb on my machine & it did ran successfully. > Oh, and one final question? with this extension, could I run old scripts > programmed for Explorer against firefox? > And.. installing this FireWatir, could I still use Watir for Explorer? > Yes, you can still use WATiR for Explorer. Old scripts will run against Firefox with no or some small changes :) Regards, Angrez -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060323/aaba9117/attachment.html From angrez at gmail.com Thu Mar 23 03:22:25 2006 From: angrez at gmail.com (Angrez Singh) Date: Thu, 23 Mar 2006 13:52:25 +0530 Subject: [Wtr-general] Problem Solved with FireWatir, but another one appeared =( In-Reply-To: References: Message-ID: Hi, Please install latest version of WATiR from SVN. This problem will come if you have installed FireWatir on top of installation of 'WATiR 1.4.1'. Installling latest WATiR from SVN will solve this problem. Regards, Angrez On 3/23/06, Rodrigo Julian Martin wrote: > > Hi all, > > > > My mistake in the last message about Firewatir, I've just realized that > I've downloaded wrongly the files of the release =( > > > > Now that I have all the files right, I still get this error message: > > > > C:\Program Files\Watir\mozilla_unittests>mozilla_all_tests.rb > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:483:in `initialize': LoadLibrary: > c:\rub > > y\lib\ruby\site_ruby\1.8\watir\IEDialog\Release\IEDialog.dll > (RuntimeError) > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:483:in `new' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:483 > > from > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re > > quire__' > > from > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re > > quire' > > from C:/Program > Files/Watir/mozilla_unittests/../mozilla_unittests/setup > > .rb:4 > > from > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re > > quire__' > > from > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re > > quire' > > from C:/Program > Files/Watir/mozilla_unittests/mozilla_all_tests.rb:6 > > > > C:\Program Files\Watir\mozilla_unittests> > > > > Any idea about this problem? > > > > Thanks in advance and thanks for your patience! > > Regards > > > > Rodrigo Julian Martin > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060323/cf8fd9ee/attachment.html From zeljko.filipin at gmail.com Thu Mar 23 03:32:23 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Thu, 23 Mar 2006 09:32:23 +0100 Subject: [Wtr-general] Window attach problem. In-Reply-To: <00d601c64de9$73693030$3700a8c0@dbrblackcompaq> References: <00d601c64de9$73693030$3700a8c0@dbrblackcompaq> Message-ID: Here are the latest development builds. http://wiki.openqa.org/display/WTR/Development+Builds On 3/22/06, Galina Maralina wrote: > Can I use this fix from > development somehow with the version of water I am using, or I need to > wait for another release? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060323/5ed217a9/attachment.html From rodrigo.martin at enratio.com Thu Mar 23 08:53:42 2006 From: rodrigo.martin at enratio.com (Rodrigo Julian Martin) Date: Thu, 23 Mar 2006 10:53:42 -0300 Subject: [Wtr-general] Problem installing Watir 2.0 Message-ID: Hi! Thanks Angrez for your reply and help... ---------------[quote] Hi, Please install latest version of WATiR from SVN. This problem will come if you have installed FireWatir on top of installation of 'WATiR 1.4.1'. Installling latest WATiR from SVN will solve this problem. Regards, Angrez ------------------------[/quote] I'm now trying to install Watir2.0 (which I guess is the latest version) in order to be able to try FireWatir, but when I run Install.rb it show me the following errors: C:\tempwatir\watir>install C:\tempwatir\watir\watir.gif Going to install to C:\watir_bonus\ with startMenu=1 and desktop=1 Copying Files watir.rb -> c:\ruby\lib\ruby\site_ruby\1.8/watir.rb cp -r watir c:\ruby\lib\ruby\site_ruby\1.8 cp -r examples C:\watir_bonus\ cp -r unitTests C:\watir_bonus\ cp -r doc C:\watir_bonus\ cp -r rdoc C:\watir_bonus\ c:/ruby/lib/ruby/1.8/FileUtils.rb:525:in `stat': No such file or directory - rdo c (Errno::ENOENT) from c:/ruby/lib/ruby/1.8/FileUtils.rb:525:in `stat' from c:/ruby/lib/ruby/1.8/FileUtils.rb:501:in `_copy_content' from c:/ruby/lib/ruby/1.8/FileUtils.rb:462:in `copy_content' from c:/ruby/lib/ruby/1.8/FileUtils.rb:461:in `preserve' from c:/ruby/lib/ruby/1.8/FileUtils.rb:461:in `copy_content' from c:/ruby/lib/ruby/1.8/FileUtils.rb:424:in `copy_file' from c:/ruby/lib/ruby/1.8/FileUtils.rb:383:in `cp_r' from c:/ruby/lib/ruby/1.8/FileUtils.rb:376:in `fu_each_src_dest' from c:/ruby/lib/ruby/1.8/FileUtils.rb:845:in `fu_each_src_dest0' from c:/ruby/lib/ruby/1.8/FileUtils.rb:845:in `fu_each_src_dest' from c:/ruby/lib/ruby/1.8/FileUtils.rb:376:in `cp_r' from C:/tempwatir/watir/install.rb:120:in `install' from C:/tempwatir/watir/install.rb:202 from C:/tempwatir/watir/install.rb:201:in `call' from c:/ruby/lib/ruby/gems/1.8/gems/fxruby-1.2.6-mswin32/lib/fox12/respo nder2.rb:57:in `onHandleMsg' from C:/tempwatir/watir/install.rb:211:in `run' from C:/tempwatir/watir/install.rb:211 Thanks in Advance! Regards Rodrigo Julian Martin ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Angrez Singh Sent: Jueves, 23 de Marzo de 2006 05:22 a.m. To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Problem Solved with FireWatir,but another one appeared =( Hi, Please install latest version of WATiR from SVN. This problem will come if you have installed FireWatir on top of installation of 'WATiR 1.4.1'. Installling latest WATiR from SVN will solve this problem. Regards, Angrez On 3/23/06, Rodrigo Julian Martin wrote: Hi all, My mistake in the last message about Firewatir, I've just realized that I've downloaded wrongly the files of the release =( Now that I have all the files right, I still get this error message: C:\Program Files\Watir\mozilla_unittests>mozilla_all_tests.rb c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:483:in `initialize': LoadLibrary: c:\rub y\lib\ruby\site_ruby\1.8\watir\IEDialog\Release\IEDialog.dll (RuntimeError) from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:483:in `new' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:483 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re quire__' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re quire' from C:/Program Files/Watir/mozilla_unittests/../mozilla_unittests/setup .rb:4 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re quire__' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re quire' from C:/Program Files/Watir/mozilla_unittests/mozilla_all_tests.rb:6 C:\Program Files\Watir\mozilla_unittests> Any idea about this problem? Thanks in advance and thanks for your patience! Regards Rodrigo Julian Martin _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060323/f3e06173/attachment.html From zeljko.filipin at gmail.com Thu Mar 23 09:21:34 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Thu, 23 Mar 2006 15:21:34 +0100 Subject: [Wtr-general] Problem installing Watir 2.0 In-Reply-To: References: Message-ID: Watir 2.0 is still experimental, as far as I know. The latest working version should be here http://svn.openqa.org/svn/watir/trunk/watir On 3/23/06, Rodrigo Julian Martin wrote: > > > Please install latest version of WATiR from SVN. > Angrez > I'm now trying to install Watir2.0 (which I guess is the latest version) > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060323/b58bdfed/attachment.html From a.premkumar at gmail.com Thu Mar 23 10:08:21 2006 From: a.premkumar at gmail.com (Prem) Date: Thu, 23 Mar 2006 15:08:21 +0000 Subject: [Wtr-general] Frame with no 'src' tag value throws error (frame has onload handler for getting source) Message-ID: Hi, We are evaluating the fitness of Watir to automate web based BPM applications built on PRPC . We already know that QTP works fine for it, but I have taken up the task of trying out Watir on PRPC. Watir works fine when we tried it on our internal applications and I am very much enthusiastic about it, but I have run into some serious problems while trying it out for PRPC based apps. I cant go furthur than logging in to the application. I get the following error from Watir when it comes to the first screen after I log into the application. W, [23-Mar-2006 20:14:42#1432] WARN -- : frame error in waitdocument OLE error code:80070005 in Access is denied. HRESULT error code:0x80020009 Exception occurred. D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1485:in `method_missing' D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1485:in `wait' D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1484:in `wait' D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2248:in `click' D:/pmo_wip/FTA/PRPC/open.rb:34 D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2389:in `method_missing': document (WIN32OLERuntimeError) OLE error code:80070005 in Access is denied. HRESULT error code:0x80020009 Exception occurred. from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2389:in `document' from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1177:in `check_for_http_error' from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1162:in `set_defaults' from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1161:in `set_defaults' from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1512:in `run_error_checks' from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1511:in `run_error_checks' from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1499:in `wait' from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2248:in `click' from D:/pmo_wip/FTA/PRPC/open.rb:34 I found from one of the mails in the list archive that this might be because the frame is served from a different server & it might be a cross-site scripting limitation. But in our scenario it is not so. The situation is that in one of the frames there is no 'src' tag, rather there is an onload function handler which gets the frame source. The problematic portion is given below: We cannot do away with this approach for frames as this is a vendor provided tool upon which our application has been built and the tool itself generates the frames so. Can treat this a defect / deficiency in Watir or do I need to build in a workaround? I dont want to be using QTP, please help me! -- - Prem I spent a minute looking at my own code by accident. I was thinking "What the hell is this guy doing?" ---------------------------------------------------- Prem Kumar Aparanji M: 00919845226618 [Bangalore, KA, INDIA] http://prem.shaliniprem.com http://www.shaliniprem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060323/ccebd5eb/attachment.html From marcus.tettmar at gmail.com Thu Mar 23 10:44:23 2006 From: marcus.tettmar at gmail.com (Marcus Tettmar) Date: Thu, 23 Mar 2006 15:44:23 +0000 Subject: [Wtr-general] Watir WebRecorder 0.5 Update Message-ID: Hi, I've fixed the issue with WebRecorder recording leading and trailing spaces on the innertext of some links. I hadn't realised Watir strips leading and trailing spaces and therefore if a link had leading or trailing spaces the two failed to match up. WebRecorder now also trims innertext so the two now match. http://www.mjtnet.com/watir_webrecorder.htm -- Marcus Tettmar http://www.mjtnet.com/ Macro Scheduler & WebRecorder for Windows & Web Automation and Testing. WebRecorder for Ruby/Watir now available. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060323/b283808e/attachment.html From rodrigo.martin at enratio.com Thu Mar 23 12:16:36 2006 From: rodrigo.martin at enratio.com (Rodrigo Julian Martin) Date: Thu, 23 Mar 2006 14:16:36 -0300 Subject: [Wtr-general] Problem Installing Latest Watir Message-ID: Hi Thanks for your reply Zeljko! I've downloaded and tried to install the latest Watir from the link you gave me... ----------[quote] Watir 2.0 is still experimental, as far as I know. The latest working version should be here http://svn.openqa.org/svn/watir/trunk/watir ----------[/quote] And it still show me error messages: C:\watrev940>install C:\watrev940\watir.gif Going to install to C:\watir_bonus\ with startMenu=1 and desktop=1 Copying Files watir.rb -> c:\ruby\lib\ruby\site_ruby\1.8/watir.rb cp -r watir c:\ruby\lib\ruby\site_ruby\1.8 cp -r examples C:\watir_bonus\ c:/ruby/lib/ruby/1.8/FileUtils.rb:525:in `stat': No such file or directory - exa mples (Errno::ENOENT) from c:/ruby/lib/ruby/1.8/FileUtils.rb:525:in `stat' from c:/ruby/lib/ruby/1.8/FileUtils.rb:501:in `_copy_content' from c:/ruby/lib/ruby/1.8/FileUtils.rb:462:in `copy_content' from c:/ruby/lib/ruby/1.8/FileUtils.rb:461:in `preserve' from c:/ruby/lib/ruby/1.8/FileUtils.rb:461:in `copy_content' from c:/ruby/lib/ruby/1.8/FileUtils.rb:424:in `copy_file' from c:/ruby/lib/ruby/1.8/FileUtils.rb:383:in `cp_r' from c:/ruby/lib/ruby/1.8/FileUtils.rb:376:in `fu_each_src_dest' from c:/ruby/lib/ruby/1.8/FileUtils.rb:845:in `fu_each_src_dest0' from c:/ruby/lib/ruby/1.8/FileUtils.rb:845:in `fu_each_src_dest' from c:/ruby/lib/ruby/1.8/FileUtils.rb:376:in `cp_r' from C:/watrev940/install.rb:108:in `install' from C:/watrev940/install.rb:195 from C:/watrev940/install.rb:194:in `call' from c:/ruby/lib/ruby/gems/1.8/gems/fxruby-1.2.6-mswin32/lib/fox12/respo nder2.rb:57:in `onHandleMsg' from C:/watrev940/install.rb:202:in `run' from C:/watrev940/install.rb:202 Could it be some issue with my ruby version? [which is 182-15] I'm stucked, thanks for your patience!! Regards Rodrigo Julian Martin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060323/75a669bb/attachment.html From rodrigo.martin at enratio.com Thu Mar 23 13:29:22 2006 From: rodrigo.martin at enratio.com (Rodrigo Julian Martin) Date: Thu, 23 Mar 2006 15:29:22 -0300 Subject: [Wtr-general] Question about Plans for Watir 2.0 & Find Objects Message-ID: Hi all, I was reading the Brett Plans for Watir 2.0. And I am wondering if there is some release date in mind? Or something approximated at least... Thank you all! Ps: I'm working on a new method for finding objects accordly of their properties and values (passed as parameters) Someone is doing something similar? I'm studying the def show... of watir.rb, just as Chris McMahon suggest me... Regards, Rodrigo Julian Martin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060323/de950d48/attachment.html From christopher.mcmahon at gmail.com Thu Mar 23 13:46:11 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 23 Mar 2006 12:46:11 -0600 Subject: [Wtr-general] Question about Plans for Watir 2.0 & Find Objects In-Reply-To: References: Message-ID: <72799cd70603231046lb9aeed6pde4ef106e1c1a35e@mail.gmail.com> > Ps: I'm working on a new method for finding objects accordly of their > properties and values (passed as parameters) Someone is doing something > similar? I'm studying the def show? of watir.rb, just as Chris McMahon > suggest me? Probably easiest just to use them: C:\Documents and Settings\cmcmahon>irb irb(main):001:0> require 'watir' => true irb(main):002:0> include Watir => Object irb(main):003:0> ie = IE.attach(:title, /Google/) ...................................................... irb(main):007:0> ie.show_frames there are 0 frames => 0..-1 irb(main):008:0> ..................................... irb(main):008:0> ie.show_forms There are 1 forms Form name: f id: method: get action: /search => 0..0 irb(main):009:0> ................................................ irb(main):009:0> ie.show_images image: name: id: src: index: 1 image: name: id: src: http://www.google.com/intl/en/images/logo.gif index: 2 => nil irb(main):010:0> .................................. etc. etc. From bret at pettichord.com Thu Mar 23 14:11:49 2006 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 23 Mar 2006 13:11:49 -0600 Subject: [Wtr-general] Question about Plans for Watir 2.0 & Find Objects In-Reply-To: References: Message-ID: On 3/23/06, Rodrigo Julian Martin wrote: > Hi all, I was reading the Brett Plans for Watir 2.0. And I am wondering if > there is some release date in mind? Or something approximated at least? There is no date in mind. However, you can take a look at the firefox branch of Watir and try it out. > Ps: I'm working on a new method for finding objects accordly of their > properties and values (passed as parameters) Someone is doing something > similar? I'm studying the def show? of watir.rb, just as Chris McMahon > suggest me? The watir code in development (in subversion) supports this. E.g. ie.div(:text, "foo") will attach to the div whose text property is "foo". This is code is general and supports all objects (except maybe frames) and all attribute/properties. From David.J.Solis at wellsfargo.com Thu Mar 23 14:06:53 2006 From: David.J.Solis at wellsfargo.com (David.J.Solis at wellsfargo.com) Date: Thu, 23 Mar 2006 13:06:53 -0600 Subject: [Wtr-general] Undefined Method Error Message-ID: <493148DCF171954FBBF8E8AAB261638C057547@msgswbmnmsp35.wellsfargo.com> Bret, Here is a better example of what I'm doing. In the code below I created a class with a method that makes a call to method in another class. I want to make assertions in test_myTestCase. If I uncomment the assertion in test_myTestCase, I get an error. How can I assert in the called method? If I do this, the program runs: require 'test/unit' require 'test/unit/ui/console/testrunner' class TC_MyTest < Test::Unit::TestCase def test_myMethod puts 'test 1' assert(true, 'test 1') @test = TC_MyClass.new() @test_new = @test.test_myTestCase end End class TC_MyClass def initialize end def test_myTestCase puts 'test 2' #assert(true, 'test 2') puts 'test 3' puts 'test 4' end end If I do this, the program gives me errors: class TC_MyTest < Test::Unit::TestCase def test_myMethod puts 'test 1' assert(true, 'test 1') @test = TC_MyClass.new() @test_new = @test.test_myTestCase end End class TC_MyClass < Test::Unit::TestCase def initialize end def test_myTestCase puts 'test 2' assert(true, 'test 2') puts 'test 3' puts 'test 4' end end -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Monday, March 20, 2006 9:09 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Undefined Method Error David, That error message indicates that $ie is nil, which is to say, it hasn't been initialized. It needs to be assigned in the test_* method or the initialize method. (Or you need to get fancy, which is what we do in our unit tests.) You said that you are trying to structure your test scripts. I suggest you do this in smaller steps. First just put the common code in a separate method (not called test*) in the same class. Then move it outside the class. And only then move it to a new file. There are small gotcha's with each step, so it's worth taking these small steps until you understand the source of each of them. Bret On 3/20/06, David Solis wrote: > > > Hello, > > I'm running into a problem I think is a probably a programming error in my part. > > Here is what I'm trying to accomplish: I have script with 2800 lines of code. My test cases in the script have many repeatable steps. For each test case, I'm basically coding the same steps over an over again and thus I get hundreds of lines of code. > > My first inclination was to break out the test and make them into separate files so that the script is not so big and less error prone. But I would be doing the same thing as I was doing earlier except now I would have to maintain many files rather one. > > So what I want to do is create a method that contains the repeatable steps that are used in every test case and call the method when I need to execute the steps. The method would live in separate file. Sounds easy, right? Well, when I try to a get this error: ! > > 1) Error: > test_steps(AccountManagementSteps): > NoMethodError: undefined method `link' for nil:NilClass > ./negative_tierI_steps.rb:37:in `test_steps' > 2) Error: > test_01_account_management(TC_Negative): > ArgumentError: wrong number of arguments (0 for 1) > C:/automation/src/thdf/projects/core/testharness/fixtures/admin_administ ration/tc_tierI_negative_tests.rb:67:in `initialize' > C:/automation/src/thdf/projects/core/testharness/fixtures/admin_administ ration/tc_tierI_negative_tests.rb:67:in `new' > C:/automation/src/thdf/projects/core/testharness/fixtures/admin_administ ration/tc_tierI_negative_tests.rb:67:in `test_01_account_management' > > Here is the code. The method I'm calling is called AccountManagementSteps. Require 'setup' halls my require statements including so I know the script has the proper require statements. require 'negative_tierI_steps.rb' contains the steps that are given me the problem. > > require 'setup' > require 'negative_tierI_steps.rb' > > TOPDIR = File.join(File.dirname(__FILE__), '..') $LOAD_PATH.unshift > TOPDIR > > > class TC_Negative < Test::Unit::TestCase > > def test_01_account_management > puts ''; puts ''; > puts "############ Starting Test Class: TC_tierI_negative_tests ############"; > puts '' > puts 'Executing test 01 - Account Management Access' > puts '' > @login = Login.new($user, $password, $url, $submit_key); > # create a random Admin user name > @random_name = UserRandomName.new(); > $username = @random_name.User(); > # Create a new Admin User > @admin_user = CreateUser.new($username); > # Verify that user was created > assert($ie.contains_text($save_msg)); > @login.logout("admin"); > assert($ie.contains_text($logoff_msg)); > @login.shutdown(); > # Login as superuser > @login = Login.new($user, $password, $url, $submit_key); > @group_details = 0 > set_group = SetPermission.new() > set_group.fSteps(@group_details); > assert($ie.contains_text($save_msg)); > @login.logout("admin"); > assert($ie.contains_text($logoff_msg)); > @login.shutdown(); > > ! @login = Login.new($username, $password, $url, $submit_key); > @steps = AccountManagementSteps.new() > @steps.test_steps() > end > > This is the code in the method I'm calling. > > require 'setup' > require 'watir' > require 'test/unit' > require 'test/unit/ui/console/testrunner' > require 'watir/testUnitAddons' > > class AccountManagementSteps < Test::Unit::TestCase > > def initialize() > end > > def test_steps() > $ie.link(:text, "Account management").click(); > assert($ie.contains_text("Manage Accounts")); > $ie.link(:text, "Manage settings").click(); > assert($ie.contains_text($no_autho_msg)); > $ie.link(:text, "Manage affiliates").click(); > assert($ie.contains_text($no_autho_msg)); > $ie.link(:text, "Admin authentication").click(); > $ie.link(:text, "AAUT").click(); > assert($ie.contains_text($no_autho_msg)); > $ie.link(:text, "Payment processing").click(); > assert($ie.contains_text($no_autho_msg)); > $ie.link(:text, "Promotions").click(); > $ie.link(:text, "Create New Promotion").click(); > ! assert($ie.contains_text($no_autho_msg)); > $ie.link(:text, "Content keys").click(); > assert($ie.contains_text($no_autho_msg)); > $ie.link(:text, "Pay Model").click(); > table = $ie.table(:index, 9) > #table.flash > sleep 1 > table[1][5].image(:name, "updatetop").click > assert($ie.contains_text($no_permission_msg)) > ! $ie.link(:text, "Game Library").click(); > table = $ie.table(:index, 9) > sleep 1 > table[1][3].image(:name, "updatetop").click > assert($ie.contains_text($no_permission_msg)) > $ie.link(:text, "Game Settings").click(); > assert($ie.contains_text($no_autho_msg)); > $ie.link(:text, "Game Menu Tabs").click(); > table = $ie.table(:index, 9) > sleep 1 > table[1][3].image(:name, "updatetop").click > assert($ie.contains_text($no_permission_msg)) > $ie.link(:text, "Community Games").click(); > #table = $ie.table(:index, 9) > #sleep 1 > #table[1][3].image(:name, "updatetop").click > #assert($ie.contains_text($no_permission_msg)) > $ie.link(:text, "Community User Migration").click(); > # No update button available. Need to figure out how to assert false for no buttons > $ie.link(:text, "Community User Upload").click(); > # Need address attaching files > #$ie.link(:text, "Community Management").click(); > #$ie.text_field(:name, "newCommunity").set("Test") > #table = $ie.table(:index, 10) > #sleep 1 > #table[1][3].image(:name, "form_top_singl_create").click > #assert($ie.contains_text($no_permission_msg)) > $ie.link(:text, "Jackpot List").click(); > # Jackpot lists allowed - research test case > $ie.link(:text, "Jackpot Details").click(); > table = $ie.table(:index, 9) > sleep 1 ! > table[1][3].image(:name, "updatetop").click > assert($ie.contains_text($no_permission_msg)) > $ie.link(:text, "Jackpot Adjustments").click(); > $ie.text_field(:name, "AdjustAmt").set("1000") > $ie.text_field(:name, "ReasonText").set("This is a test") > table = $ie.table(:index, 19) > sleep 1 > table[1][3].image(:name, "createbottom").click > assert($ie.contains_text($no_permission_msg)) ! > $ie.link(:text, "Settings").click(); > > end > end > > > Any ideas? > > Thanks > > David > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Thu Mar 23 14:27:58 2006 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 23 Mar 2006 13:27:58 -0600 Subject: [Wtr-general] Problem Installing Latest Watir In-Reply-To: References: Message-ID: You should obtain the latest version from our wiki page, not from SVN. (If you want an installer that works.) If you want to see our firefox support, you'll need to go to the fire fox branch in SVN and do a manual install. Bret On 3/23/06, Rodrigo Julian Martin wrote: > > > > Hi > > > > Thanks for your reply Zeljko! I've downloaded and tried to install the > latest Watir from the link you gave me? > > > > > > ----------[quote] > > Watir 2.0 is still experimental, as far as I know. The latest working > version should be here > http://svn.openqa.org/svn/watir/trunk/watir > > > > ----------[/quote] > > > > And it still show me error messages: > > > > C:\watrev940>install > > C:\watrev940\watir.gif > > Going to install to C:\watir_bonus\ with startMenu=1 and desktop=1 > > Copying Files > > watir.rb -> c:\ruby\lib\ruby\site_ruby\1.8/watir.rb > > cp -r watir c:\ruby\lib\ruby\site_ruby\1.8 > > cp -r examples C:\watir_bonus\ > > c:/ruby/lib/ruby/1.8/FileUtils.rb:525:in `stat': No such > file or directory - exa > > mples (Errno::ENOENT) > > from c:/ruby/lib/ruby/1.8/FileUtils.rb:525:in > `stat' > > from c:/ruby/lib/ruby/1.8/FileUtils.rb:501:in > `_copy_content' > > from c:/ruby/lib/ruby/1.8/FileUtils.rb:462:in > `copy_content' > > from c:/ruby/lib/ruby/1.8/FileUtils.rb:461:in > `preserve' > > from c:/ruby/lib/ruby/1.8/FileUtils.rb:461:in > `copy_content' > > from c:/ruby/lib/ruby/1.8/FileUtils.rb:424:in > `copy_file' > > from c:/ruby/lib/ruby/1.8/FileUtils.rb:383:in > `cp_r' > > from c:/ruby/lib/ruby/1.8/FileUtils.rb:376:in > `fu_each_src_dest' > > from c:/ruby/lib/ruby/1.8/FileUtils.rb:845:in > `fu_each_src_dest0' > > from c:/ruby/lib/ruby/1.8/FileUtils.rb:845:in > `fu_each_src_dest' > > from c:/ruby/lib/ruby/1.8/FileUtils.rb:376:in > `cp_r' > > from C:/watrev940/install.rb:108:in `install' > > from C:/watrev940/install.rb:195 > > from C:/watrev940/install.rb:194:in `call' > > from > c:/ruby/lib/ruby/gems/1.8/gems/fxruby-1.2.6-mswin32/lib/fox12/respo > > nder2.rb:57:in `onHandleMsg' > > from C:/watrev940/install.rb:202:in `run' > > from C:/watrev940/install.rb:202 > > > > > > Could it be some issue with my ruby version? [which is 182-15] > > I'm stucked, thanks for your patience!! > > > > Regards > > Rodrigo Julian Martin > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > From bret at pettichord.com Thu Mar 23 14:26:03 2006 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 23 Mar 2006 13:26:03 -0600 Subject: [Wtr-general] Watir WebRecorder 0.5 Update In-Reply-To: References: Message-ID: Marcus, Thanks for fixing this problem. I did not realize this was a webrecorder bug. These problems have repeatedly been reported to this mailing list, and people have most frequently been blaming the email systems for adding the extra spaces. We are getting many requests for support for the webrecorder. Like these, they often come as "the recorder works, but watir doesn't". Of course they really have no way of knowing where the problem is. How do you suggest we handle supporting these users? In many cases they have less technical background or understanding than had Watir users heretofor. Also, many of the webrecorder users have run into a problem when they have a page with only one form. The webrecorder always includes the "form()" method, but we had designed this specifically for the case where there was more than one form. We've recently learned that in the case with only one form, the Watir form method actually fails. This bug is fixed in development, but is open in 1.4.1. How do you propose to get this information to your users? Your welcome to use a page (or more) on our wiki, if that seems helpful. Frankly, we need to find a better method for supporting the recorder users. I've been considering refusing to support them on this list because of the burden. Bret On 3/23/06, Marcus Tettmar wrote: > Hi, > > I've fixed the issue with WebRecorder recording leading and trailing spaces > on the innertext of some links. I hadn't realised Watir strips leading and > trailing spaces and therefore if a link had leading or trailing spaces the > two failed to match up. WebRecorder now also trims innertext so the two now > match. > > http://www.mjtnet.com/watir_webrecorder.htm > > -- > Marcus Tettmar > http://www.mjtnet.com/ > Macro Scheduler & WebRecorder for Windows & Web Automation and Testing. > WebRecorder for Ruby/Watir now available. > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From PGarigue at EXTEND.COM Thu Mar 23 14:47:29 2006 From: PGarigue at EXTEND.COM (Pierre Garigue) Date: Thu, 23 Mar 2006 14:47:29 -0500 Subject: [Wtr-general] Watir WebRecorder 0.5 Update Message-ID: should we start a mailing list for Webrecorder? Cheers Pierre -----Original Message----- From: Bret Pettichord [mailto:bret at pettichord.com] Sent: Thursday, March 23, 2006 2:26 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Watir WebRecorder 0.5 Update Marcus, Thanks for fixing this problem. I did not realize this was a webrecorder bug. These problems have repeatedly been reported to this mailing list, and people have most frequently been blaming the email systems for adding the extra spaces. We are getting many requests for support for the webrecorder. Like these, they often come as "the recorder works, but watir doesn't". Of course they really have no way of knowing where the problem is. How do you suggest we handle supporting these users? In many cases they have less technical background or understanding than had Watir users heretofor. Also, many of the webrecorder users have run into a problem when they have a page with only one form. The webrecorder always includes the "form()" method, but we had designed this specifically for the case where there was more than one form. We've recently learned that in the case with only one form, the Watir form method actually fails. This bug is fixed in development, but is open in 1.4.1. How do you propose to get this information to your users? Your welcome to use a page (or more) on our wiki, if that seems helpful. Frankly, we need to find a better method for supporting the recorder users. I've been considering refusing to support them on this list because of the burden. Bret On 3/23/06, Marcus Tettmar wrote: > Hi, > > I've fixed the issue with WebRecorder recording leading and trailing spaces > on the innertext of some links. I hadn't realised Watir strips leading and > trailing spaces and therefore if a link had leading or trailing spaces the > two failed to match up. WebRecorder now also trims innertext so the two now > match. > > http://www.mjtnet.com/watir_webrecorder.htm > > -- > Marcus Tettmar > http://www.mjtnet.com/ > Macro Scheduler & WebRecorder for Windows & Web Automation and Testing. > WebRecorder for Ruby/Watir now available. > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From mike.kolcun at uptimesoftware.com Thu Mar 23 15:51:55 2006 From: mike.kolcun at uptimesoftware.com (Mike Kolcun) Date: Thu, 23 Mar 2006 15:51:55 -0500 Subject: [Wtr-general] trying to grab a popup window Message-ID: <36296e3f83bbff1b8b31fc48f5513a0344230974@uptimesoftware.com> I've got a situation where I have a the main window of an application that pops up a new window using a JavaScript call on the click of a form button. The title of this new window varies from time to time with what I'm testing, so I'm not able to just attach to the title of the window. The url is also different, so that option is out too. Is there a way to get a handle for "the most recently opened window" or something of the like? Thanks very much /Mike Kolcun up.time software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060323/ff874a51/attachment.html From marcus.tettmar at gmail.com Thu Mar 23 15:53:51 2006 From: marcus.tettmar at gmail.com (Marcus Tettmar) Date: Thu, 23 Mar 2006 20:53:51 +0000 Subject: [Wtr-general] Watir WebRecorder 0.5 Update In-Reply-To: References: Message-ID: Hi, I've been keeping a close eye on this list but apart from the forms issue, which I raised myself, and one posting that brought the spaces thing to my attention, I wasn't aware of any extra support issues directly related to webrecorder or anything to the effect of "the recorder works, but watir doesn't" as you have suggested. Had I seen anything like that I would have jumped right in, I can assure you. In regards to the forms issue - I raised that myself in reference to WebRecorder, yes, but didn't necessarily expect you to have to change anything in Watir. An alternative approach would have been that I could have changed WebRecorder to not insert the form() reference if it found only one form on the page. I just needed to know how it was meant to work. I did not provide this version of WebRecorder in order to create any extra burden for you, and I am sorry if you feel that is all it has achieved. I'm not aware that it has in fact directly contributed to any extra support requests, but I suppose as a product grows in popularity, as Watir clearly is doing, and whether or not WebRecorder is in some way responsible for that, the support burden will increase as more and more people get to know about it, many of whom will be less technical than the earlier adopters. That's almost a fact of life - a side effect of success. I have made it quite clear when running WebRecorder and on the WebRecorder web page that knowledge of Watir and Ruby is essential and that any problems with recording are not indicative of any problem in Watir. But if you think WebRecorder is causing you undue burden then clearly we must do something about it. One thing that I think would benefit this mailing list, for a number of reasons, would be a weekly FAQ posting. By posting this regularly it will keep people aware of it and new subscribers would always see it. This could explain how best to post questions, how (not) to report bugs, where to find answers, how to download the latest version .. etc. This should help keep the quality of postings high and remove some repetition. This could also address WebRecorder in some way - something to the effect of - if you get a problem with a WebRecorder script don't post to the general Watir group until you've understood what it is doing and/or emailed Marcus, or, if we had a WebRecorder list it, you've posted there first. Ultimately, if WebRecorder is causing too big a nuisance for everyone then I could simply withdraw it altogether. I would be interested to hear what people feel about that. Is it useful? Is it bringing new users to Watir? If so, is that a good thing or a bad thing? Or is webrecorder just a complete waste of time? Happy to consider its future based on the feedback. I'm open to ideas. Marcus On 3/23/06, Pierre Garigue < PGarigue at extend.com> wrote: > > should we start a mailing list for Webrecorder? > > Cheers > Pierre > > -----Original Message----- > From: Bret Pettichord [mailto:bret at pettichord.com] > Sent: Thursday, March 23, 2006 2:26 PM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] Watir WebRecorder 0.5 Update > > > Marcus, > > Thanks for fixing this problem. I did not realize this was a > webrecorder bug. These problems have repeatedly been reported to this > mailing list, and people have most frequently been blaming the email > systems for adding the extra spaces. > > We are getting many requests for support for the webrecorder. Like > these, they often come as "the recorder works, but watir doesn't". Of > course they really have no way of knowing where the problem is. How do > you suggest we handle supporting these users? In many cases they have > less technical background or understanding than had Watir users > heretofor. > > Also, many of the webrecorder users have run into a problem when they > have a page with only one form. The webrecorder always includes the > "form()" method, but we had designed this specifically for the case > where there was more than one form. We've recently learned that in the > case with only one form, the Watir form method actually fails. This > bug is fixed in development, but is open in 1.4.1. > > How do you propose to get this information to your users? Your welcome > to use a page (or more) on our wiki, if that seems helpful. > > Frankly, we need to find a better method for supporting the recorder > users. I've been considering refusing to support them on this list > because of the burden. > > Bret > > On 3/23/06, Marcus Tettmar wrote: > > Hi, > > > > I've fixed the issue with WebRecorder recording leading and trailing > spaces > > on the innertext of some links. I hadn't realised Watir strips leading > and > > trailing spaces and therefore if a link had leading or trailing spaces > the > > two failed to match up. WebRecorder now also trims innertext so the two > now > > match. > > > > http://www.mjtnet.com/watir_webrecorder.htm > > > > -- > > Marcus Tettmar > > http://www.mjtnet.com/ > > Macro Scheduler & WebRecorder for Windows & Web Automation and Testing. > > WebRecorder for Ruby/Watir now available. > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- Marcus Tettmar http://www.mjtnet.com/ Macro Scheduler & WebRecorder for Windows & Web Automation and Testing. WebRecorder for Ruby/Watir now available. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060323/554feae8/attachment.html From padhs2k at gmail.com Thu Mar 23 16:05:25 2006 From: padhs2k at gmail.com (Padhma N) Date: Thu, 23 Mar 2006 13:05:25 -0800 Subject: [Wtr-general] How to capture a screen shot of scrollable webpage? Message-ID: <38c139080603231305j62e8d0e0h4d0b63724b493fc7@mail.gmail.com> Hi all, I have the following question- I would like to capture the entire content of my webpage. I used following Screen Capture functionality provided by Watir to capture the window. >> file_name= 'Schedule_List.jpg' screen_capture(file_name) >> It captured a screenshot of only the *visible portion* of my webpage. My webpage has a lot of scrollable content and those content are not being captured by Watir. I would like to take a screen shot of my entire webpage(both visible not visible region). Is it possible using Watir?? Please let me know..Also, I tried other applications like Fastone,SnagIt for just capturing the scrollable region(these applications have auto scrolling and screen capturing facility) but those applications too are not working for my webpage though they work for other webpages. Please let me know if Watir can resolve this problem. Thanks, Padhmavathy -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060323/b45198af/attachment.html From BPaatsch at activevoice.com Thu Mar 23 16:11:55 2006 From: BPaatsch at activevoice.com (Paatsch, Bernd) Date: Thu, 23 Mar 2006 15:11:55 -0600 Subject: [Wtr-general] undefined method `add_assertion' for nil:NilCla ss Message-ID: Thanks Bret for your help. I added following two lines to my code in my include section, which is at the begin of my main program: require 'test/unit/assertions' include Test::Unit::Assertions This solved all my assert problems in my code. Bernd -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Tuesday, March 21, 2006 9:31 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] undefined method `add_assertion' for nil:NilCla ss Oops. Put the include statement before the "def" instead of inside it. On 3/21/06, Paatsch, Bernd wrote: > > > Now I get: > TEST FAILED.undefined method `include' for > (WebAC::BPUtils):WebAC::BPUtils > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret > Pettichord > Sent: Tuesday, March 21, 2006 6:37 PM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] undefined method `add_assertion' for > nil:NilCla ss > > > > > That's what i needed to see. Make this change... > > On 3/21/06, Paatsch, Bernd wrote: > > Still the same after I changed the code to: > > > > def bpVerifyPopupWindowOpen( ieCont, verify) #how, what, > > framename, verify ) > > begin > include Test::Unit::Assertions > > assert( ieCont.contains_text( verify) ) > > puts("TEST PASSED. Found test string 'Programming Ruby' ") > > > > rescue => e > > puts("TEST FAILED." + e.message + "\n" + > > e.backtrace.join("\n")) > > end > > > > > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of > Bret > > Pettichord > > Sent: Tuesday, March 21, 2006 5:46 PM > > To: wtr-general at rubyforge.org > > Subject: Re: [Wtr-general] undefined method `add_assertion' for > > nil:NilClass > > > > On 3/21/06, Paatsch, Bernd wrote: > > > def > > > .........some code > > > begin > > > > I suspect your problem is somewhere in here. > > > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > _______________________________________________ > > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060323/9a40b848/attachment.html From jkohl at telusplanet.net Thu Mar 23 16:15:04 2006 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Thu, 23 Mar 2006 13:15:04 -0800 Subject: [Wtr-general] Watir WebRecorder 0.5 Update In-Reply-To: References: Message-ID: <1143148504.44230fd8801ec@webmail.telusplanet.net> +1 Quoting Pierre Garigue : > should we start a mailing list for Webrecorder? > > Cheers > Pierre > > -----Original Message----- > From: Bret Pettichord [mailto:bret at pettichord.com] > Sent: Thursday, March 23, 2006 2:26 PM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] Watir WebRecorder 0.5 Update > > > Marcus, > > Thanks for fixing this problem. I did not realize this was a > webrecorder bug. These problems have repeatedly been reported to this > mailing list, and people have most frequently been blaming the email > systems for adding the extra spaces. > > We are getting many requests for support for the webrecorder. Like > these, they often come as "the recorder works, but watir doesn't". Of > course they really have no way of knowing where the problem is. How do > you suggest we handle supporting these users? In many cases they have > less technical background or understanding than had Watir users > heretofor. > > Also, many of the webrecorder users have run into a problem when they > have a page with only one form. The webrecorder always includes the > "form()" method, but we had designed this specifically for the case > where there was more than one form. We've recently learned that in the > case with only one form, the Watir form method actually fails. This > bug is fixed in development, but is open in 1.4.1. > > How do you propose to get this information to your users? Your welcome > to use a page (or more) on our wiki, if that seems helpful. > > Frankly, we need to find a better method for supporting the recorder > users. I've been considering refusing to support them on this list > because of the burden. > > Bret > > On 3/23/06, Marcus Tettmar wrote: > > Hi, > > > > I've fixed the issue with WebRecorder recording leading and trailing > spaces > > on the innertext of some links. I hadn't realised Watir strips leading > and > > trailing spaces and therefore if a link had leading or trailing spaces the > > two failed to match up. WebRecorder now also trims innertext so the two > now > > match. > > > > http://www.mjtnet.com/watir_webrecorder.htm > > > > -- > > Marcus Tettmar > > http://www.mjtnet.com/ > > Macro Scheduler & WebRecorder for Windows & Web Automation and Testing. > > WebRecorder for Ruby/Watir now available. > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From PGarigue at EXTEND.COM Thu Mar 23 16:15:09 2006 From: PGarigue at EXTEND.COM (Pierre Garigue) Date: Thu, 23 Mar 2006 16:15:09 -0500 Subject: [Wtr-general] Watir WebRecorder 0.5 Update Message-ID: I think it is very usefull tool. I have in fact already used it. I think it should have its own maling list. By the way I consider indicating what form for every form actions a good practice. Cheer Pierre -----Original Message----- From: Marcus Tettmar [mailto:marcus.tettmar at gmail.com] Sent: Thursday, March 23, 2006 3:54 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Watir WebRecorder 0.5 Update Hi, I've been keeping a close eye on this list but apart from the forms issue, which I raised myself, and one posting that brought the spaces thing to my attention, I wasn't aware of any extra support issues directly related to webrecorder or anything to the effect of "the recorder works, but watir doesn't" as you have suggested. Had I seen anything like that I would have jumped right in, I can assure you. In regards to the forms issue - I raised that myself in reference to WebRecorder, yes, but didn't necessarily expect you to have to change anything in Watir. An alternative approach would have been that I could have changed WebRecorder to not insert the form() reference if it found only one form on the page. I just needed to know how it was meant to work. I did not provide this version of WebRecorder in order to create any extra burden for you, and I am sorry if you feel that is all it has achieved. I'm not aware that it has in fact directly contributed to any extra support requests, but I suppose as a product grows in popularity, as Watir clearly is doing, and whether or not WebRecorder is in some way responsible for that, the support burden will increase as more and more people get to know about it, many of whom will be less technical than the earlier adopters. That's almost a fact of life - a side effect of success. I have made it quite clear when running WebRecorder and on the WebRecorder web page that knowledge of Watir and Ruby is essential and that any problems with recording are not indicative of any problem in Watir. But if you think WebRecorder is causing you undue burden then clearly we must do something about it. One thing that I think would benefit this mailing list, for a number of reasons, would be a weekly FAQ posting. By posting this regularly it will keep people aware of it and new subscribers would always see it. This could explain how best to post questions, how (not) to report bugs, where to find answers, how to download the latest version .. etc. This should help keep the quality of postings high and remove some repetition. This could also address WebRecorder in some way - something to the effect of - if you get a problem with a WebRecorder script don't post to the general Watir group until you've understood what it is doing and/or emailed Marcus, or, if we had a WebRecorder list it, you've posted there first. Ultimately, if WebRecorder is causing too big a nuisance for everyone then I could simply withdraw it altogether. I would be interested to hear what people feel about that. Is it useful? Is it bringing new users to Watir? If so, is that a good thing or a bad thing? Or is webrecorder just a complete waste of time? Happy to consider its future based on the feedback. I'm open to ideas. Marcus On 3/23/06, Pierre Garigue < PGarigue at extend.com> wrote: should we start a mailing list for Webrecorder? Cheers Pierre -----Original Message----- From: Bret Pettichord [mailto: bret at pettichord.com] Sent: Thursday, March 23, 2006 2:26 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Watir WebRecorder 0.5 Update Marcus, Thanks for fixing this problem. I did not realize this was a webrecorder bug. These problems have repeatedly been reported to this mailing list, and people have most frequently been blaming the email systems for adding the extra spaces. We are getting many requests for support for the webrecorder. Like these, they often come as "the recorder works, but watir doesn't". Of course they really have no way of knowing where the problem is. How do you suggest we handle supporting these users? In many cases they have less technical background or understanding than had Watir users heretofor. Also, many of the webrecorder users have run into a problem when they have a page with only one form. The webrecorder always includes the "form()" method, but we had designed this specifically for the case where there was more than one form. We've recently learned that in the case with only one form, the Watir form method actually fails. This bug is fixed in development, but is open in 1.4.1. How do you propose to get this information to your users? Your welcome to use a page (or more) on our wiki, if that seems helpful. Frankly, we need to find a better method for supporting the recorder users. I've been considering refusing to support them on this list because of the burden. Bret On 3/23/06, Marcus Tettmar < marcus.tettmar at gmail.com> wrote: > Hi, > > I've fixed the issue with WebRecorder recording leading and trailing spaces > on the innertext of some links. I hadn't realised Watir strips leading and > trailing spaces and therefore if a link had leading or trailing spaces the > two failed to match up. WebRecorder now also trims innertext so the two now > match. > > http://www.mjtnet.com/watir_webrecorder.htm > > -- > Marcus Tettmar > http://www.mjtnet.com/ > Macro Scheduler & WebRecorder for Windows & Web Automation and Testing. > WebRecorder for Ruby/Watir now available. > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -- Marcus Tettmar http://www.mjtnet.com/ Macro Scheduler & WebRecorder for Windows & Web Automation and Testing. WebRecorder for Ruby/Watir now available. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060323/682c142e/attachment.html From rodrigo.martin at enratio.com Thu Mar 23 16:22:11 2006 From: rodrigo.martin at enratio.com (Rodrigo Julian Martin) Date: Thu, 23 Mar 2006 18:22:11 -0300 Subject: [Wtr-general] Another FireWatir Question Message-ID: Hi all Thanks Brett, I've downloaded now the Watir 1.5.0 from the Wiki Page... Then I manually installed FireWatir as the guide suggests... When I try to run mozilla_all_tests it keeps showing me these error messages: C:\Program Files\Watir\mozilla_unittests>mozilla_all_tests c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:483:in `initialize': LoadLibrary: c:\rub y\lib\ruby\site_ruby\1.8\watir\IEDialog\Release\IEDialog.dll (RuntimeError) from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:483:in `new' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:483 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re quire__' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re quire' from C:/Program Files/Watir/mozilla_unittests/../mozilla_unittests/setup .rb:4 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re quire__' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re quire' from C:/Program Files/Watir/mozilla_unittests/mozilla_all_tests.rb:6 Sorry for this, I feel bad because I'm overloading the list with this stuff... One question, the watir.rb that is in the package of Firewatir is 54Kb, and the watir.rb of the Watir 1.5 is 144Kb. What I do is overwriting the file... but, is this ok? Only 54Kb? Again, thanks for your patience... Regards Rodrigo Julian Martin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060323/76123c0a/attachment.html From padhs2k at gmail.com Thu Mar 23 20:00:07 2006 From: padhs2k at gmail.com (Padhma N) Date: Thu, 23 Mar 2006 17:00:07 -0800 Subject: [Wtr-general] Send results to console and text file Message-ID: <38c139080603231700p58c934f5w8d35487cb00cd7be@mail.gmail.com> Hi, I have 2 questions. (1) I would like to send the results of my test suite to a .txt file and also want the results to be seen on the console. How do I do that? I know that I can use the following command in the command prompt- function1.rb > results.txt But I want something more like,the program itself directing its each output to both the console and the results.txt file. I tried f.syswrite but that seems inefficient as I have to use f.syswrite at all places I use puts statement. Is there a better way to do this? (2) I would like to click on a webpage -not on a button,or image, just on the page. Is there any command that clicks on the page? $IE0.form(:name,"").click doesn't help Can anyone please help? Thanks, Padhma -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060323/beb3346b/attachment.html From billagee at gmail.com Thu Mar 23 21:11:51 2006 From: billagee at gmail.com (Bill Agee) Date: Thu, 23 Mar 2006 18:11:51 -0800 Subject: [Wtr-general] trying to grab a popup window In-Reply-To: <36296e3f83bbff1b8b31fc48f5513a0344230974@uptimesoftware.com> References: <36296e3f83bbff1b8b31fc48f5513a0344230974@uptimesoftware.com> Message-ID: <73e7817e0603231811k3119f639i6493a5b6d593b926@mail.gmail.com> On 3/23/06, Mike Kolcun wrote: > > I've got a situation where I have a the main window of an application that > pops up a new window using a JavaScript call on the click of a form button. > > The title of this new window varies from time to time with what I'm testing, > so I'm not able to just attach to the title of the window. The url is also > different, so that option is out too. > > Is there a way to get a handle for "the most recently opened window" or > something of the like? If it's safe to assume that the only two browser windows open will be the parent window and the popup window, then the following example might work for you. There may be a more graceful way to do this, but this seemed to work when I tested it out. Also, if more than two windows are open, then it will probably not do the right thing, either. :) In that case it may match the wrong window. The technique of using the regexp "//" to loop through all browsers is from an example for closing all open browsers that someone posted to the list a while ago. == BEGIN CODE SNIPPET == unwantedTitle = ie.title # assumes 'ie' contains your parent browser. done = 'unknown' while (done != 'yes') # Start looping through all open browsers. begin header = Regexp.new(//) tempIE = IE.attach(:title, header) # The first time the temp IE title does not match the parent's title, # assume we're done and bail out of the loop, saving the match in 'ie2' if (tempIE.title != unwantedTitle) ie2 = tempIE done = 'yes' end rescue NoMatchingWindowFoundException # If we didn't find a match, just leave the loop. done = 'yes' end end p ie2.title # to check what browser was matched == END CODE SNIPPET == From welkin_inc at hotmail.com Thu Mar 23 21:31:25 2006 From: welkin_inc at hotmail.com (Andrew McFarlane) Date: Thu, 23 Mar 2006 19:31:25 -0700 Subject: [Wtr-general] Question about Plans for Watir 2.0 & Find Objects In-Reply-To: Message-ID: Bret, I was also looking at the 2.0 plan that you laid out on 5/27/2005, and I didn't see a mention of being able to specify elements using multiple attribute/value pairs. I have seen you mention, however, that you were considering merging (some? all?) WET functionality into WATIR. What do you see here, if anything? >From: "Bret Pettichord" >Reply-To: wtr-general at rubyforge.org >To: wtr-general at rubyforge.org >Subject: Re: [Wtr-general] Question about Plans for Watir 2.0 & Find >Objects >Date: Thu, 23 Mar 2006 13:11:49 -0600 > >On 3/23/06, Rodrigo Julian Martin wrote: > > Hi all, I was reading the Brett Plans for Watir 2.0. And I am wondering >if > > there is some release date in mind? Or something approximated at least? > >There is no date in mind. However, you can take a look at the firefox >branch of Watir and try it out. > > > Ps: I'm working on a new method for finding objects accordly of their > > properties and values (passed as parameters) Someone is doing something > > similar? I'm studying the def show? of watir.rb, just as Chris McMahon > > suggest me? > >The watir code in development (in subversion) supports this. > >E.g. ie.div(:text, "foo") will attach to the div whose text property >is "foo". This is code is general and supports all objects (except >maybe frames) and all attribute/properties. > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general From angrez at gmail.com Thu Mar 23 22:03:42 2006 From: angrez at gmail.com (Angrez Singh) Date: Fri, 24 Mar 2006 08:33:42 +0530 Subject: [Wtr-general] Another FireWatir Question In-Reply-To: References: Message-ID: Hi, Thanks Brett, I've downloaded now the Watir 1.5.0 from the Wiki Page? > > Then I manually installed FireWatir as the guide suggests? > > When I try to run mozilla_all_tests it keeps showing me these error > messages > > C:\Program Files\Watir\mozilla_unittests>mozilla_all_tests > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:483:in `initialize': LoadLibrary: > c:\rub > > y\lib\ruby\site_ruby\1.8\watir\IEDialog\Release\IEDialog.dll > (RuntimeError) > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:483:in `new' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:483 > > from > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re > > quire__' > > from > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re > > quire' > > from C:/Program > Files/Watir/mozilla_unittests/../mozilla_unittests/setup > > .rb:4 > > from > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re > > quire__' > > from > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re > > quire' > > from C:/Program > Files/Watir/mozilla_unittests/mozilla_all_tests.rb:6 > Again I think this is not WATiR 1.5. I'll check & let you know. > Sorry for this, I feel bad because I'm overloading the list with this > stuff? > Its OK... > One question, the watir.rb that is in the package of Firewatir is 54Kb, > and the watir.rb of the Watir 1.5 is 144Kb. What I do is overwriting the > file? but, is this ok? Only 54Kb? > For FireWatir, I have splitted the code of 'watir.rb' file into different files so that much of the code can be re-used. Regards, Angrez -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060324/28a9d66e/attachment.html From billagee at gmail.com Fri Mar 24 02:17:57 2006 From: billagee at gmail.com (Bill Agee) Date: Thu, 23 Mar 2006 23:17:57 -0800 Subject: [Wtr-general] Send results to console and text file In-Reply-To: <38c139080603231700p58c934f5w8d35487cb00cd7be@mail.gmail.com> References: <38c139080603231700p58c934f5w8d35487cb00cd7be@mail.gmail.com> Message-ID: <73e7817e0603232317j5d0835cn44bfc7ec087730a7@mail.gmail.com> On 3/23/06, Padhma N wrote: > > Hi, > > I have 2 questions. > > (1) I would like to send the results of my test suite to a .txt file and > also want the results to be seen on the console. How do I do that? > I know that I can use the following command in the command prompt- > function1.rb > results.txt > > But I want something more like,the program itself directing its each output > to both the console and the results.txt file. > I tried f.syswrite but that seems inefficient as I have to use f.syswrite at > all places I use puts statement. Is there a better way to do this? Not sure of a way to do your question (2). However, as for question (1) I was sort of able to split output from running a suite to $stdout and a file, by passing an io handle into TestRunner.new(), then using << to send the test run output to $stdout as shown in this example: ==================================================== require 'test/unit/testsuite' require 'test/unit/ui/console/testrunner' outputFileName = 'suite.log' outputFileHandle = File.new(outputFileName, "w+") ...require test cases and create suite here... # create new runner and start suite: $stdout << Test::Unit::UI::Console::TestRunner.new(TS_MyTests, output_level=2, io=outputFileHandle).start ==================================================== However, while this puts all the runner output into 'suite.log', only the final summary line (with the number of tests/assertions/failures/errors) is displayed on the console. So what I currently do in this case is just 'tail -f suite.log' using Cygwin's tail util to get up-to-the-minute status as the suite runs. :) However, I'm sure there's some way to direct the script to send all the output to $stdout as well as the suite logfile. I just haven't run across it so far... Thanks Bill From zeljko.filipin at gmail.com Fri Mar 24 03:22:45 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 24 Mar 2006 09:22:45 +0100 Subject: [Wtr-general] Undefined Method Error In-Reply-To: <493148DCF171954FBBF8E8AAB261638C057547@msgswbmnmsp35.wellsfargo.com> References: <493148DCF171954FBBF8E8AAB261638C057547@msgswbmnmsp35.wellsfargo.com> Message-ID: Add this at the beggining of your script: require "test/unit/assertions" include Test::Unit::Assertions On 3/23/06, David.J.Solis at wellsfargo.com wrote: > > > I want to make assertions in test_myTestCase. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060324/d47c94ef/attachment.html From zeljko.filipin at gmail.com Fri Mar 24 03:34:05 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 24 Mar 2006 09:34:05 +0100 Subject: [Wtr-general] Watir WebRecorder 0.5 Update In-Reply-To: References: Message-ID: I do not use Webrecorder for scripting my test cases, but I planned to use it for logging my actions while exploratory testing. After I find a bug or crash something I could know my every move that led to it. On 3/23/06, Marcus Tettmar wrote: > > Is it useful? > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060324/07c62ce4/attachment.html From zeljko.filipin at gmail.com Fri Mar 24 03:50:52 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 24 Mar 2006 09:50:52 +0100 Subject: [Wtr-general] Fwd: [scripting-for-testers-reviewers] bit by an interesting Ruby problem today In-Reply-To: <6068B434-8F92-46EC-A403-F7AA6CF64170@testing.com> References: <72799cd70603221325pdee9510pdac8b617e7a15cff@mail.gmail.com> <6068B434-8F92-46EC-A403-F7AA6CF64170@testing.com> Message-ID: Brian Marick wrote interesting article about variables and objects. ---------- Forwarded message ---------- From: Brian Marick < marick at testing.com> Date: Mar 23, 2006 8:02 AM Subject: Re: [scripting-for-testers-reviewers] bit by an interesting Ruby problem today To: scripting-for-testers-reviewers at testing.com The key to avoiding misunderstanding is remembering that variables and objects are *different kinds of things*. The name of a thing is not the thing itself. This is best illustrated by pictures. I just drew some pictures that explain what was happening in your example. (I simplified to make it just one each, since the nested eaches don't have anything to do with the problem you had.) They are here: < http://www.testing.com/review-copies/variables.pdf> I'm rather pleased with them, plus I stayed up way too late to make them, so you all have to look at them. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060324/8e8cd54a/attachment.html From zeljko.filipin at gmail.com Fri Mar 24 04:05:58 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 24 Mar 2006 10:05:58 +0100 Subject: [Wtr-general] Send results to console and text file In-Reply-To: <73e7817e0603232317j5d0835cn44bfc7ec087730a7@mail.gmail.com> References: <38c139080603231700p58c934f5w8d35487cb00cd7be@mail.gmail.com> <73e7817e0603232317j5d0835cn44bfc7ec087730a7@mail.gmail.com> Message-ID: I also do not understand what do you want to do. How do you manually "click on a webpage"? On 3/24/06, Bill Agee wrote: > > On 3/23/06, Padhma N wrote: > > Not sure of a way to do your question (2). > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060324/b3f0f5f7/attachment.html From browne.daniel at gmail.com Fri Mar 24 04:40:45 2006 From: browne.daniel at gmail.com (Daniel Browne) Date: Fri, 24 Mar 2006 09:40:45 +0000 Subject: [Wtr-general] trying to grab a popup window In-Reply-To: <36296e3f83bbff1b8b31fc48f5513a0344230974@uptimesoftware.com> References: <36296e3f83bbff1b8b31fc48f5513a0344230974@uptimesoftware.com> Message-ID: <79518aef0603240140s20f11b40n@mail.gmail.com> I gather there is no way you can just use a reguler expression to match the title? What is the form of it's title and how does it vary? Cheers, Daniel. On 23/03/06, Mike Kolcun wrote: > > I've got a situation where I have a the main window of an application that > pops up a new window using a JavaScript call on the click of a form button. > > The title of this new window varies from time to time with what I'm testing, > so I'm not able to just attach to the title of the window. The url is also > different, so that option is out too. > > Is there a way to get a handle for "the most recently opened window" or > something of the like? > > Thanks very much > /Mike Kolcun > up.time software > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > From tester.paul at gmail.com Fri Mar 24 09:27:51 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Fri, 24 Mar 2006 09:27:51 -0500 Subject: [Wtr-general] Send results to console and text file In-Reply-To: <38c139080603231700p58c934f5w8d35487cb00cd7be@mail.gmail.com> References: <38c139080603231700p58c934f5w8d35487cb00cd7be@mail.gmail.com> Message-ID: <37c405480603240627q1e5ceafdk@mail.gmail.com> On 23/03/06, Padhma N wrote: > > > (2) I would like to click on a webpage -not on a button,or image, just on > the page. Is there any command that clicks on the page? > $IE0.form(:name,"").click doesn't help > > We need to understand a bit more about what it is you are trying to accomplish here. Do you want to click the page so that you can bring the window to the forefront? If so, have you tried: IE.bring_to_front() If you haven't done so already, you might want to check out the various methods listed in the "Watir API Reference" for "Watir::IE". You may find something in there that is what you are looking for. Otherwise, you don't need to click the web page just to interact with it. Once you 'attach' to it, you can work with any object on the page. Hope that helps. Paul. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060324/96bc5d95/attachment.html From mike.kolcun at uptimesoftware.com Fri Mar 24 09:36:17 2006 From: mike.kolcun at uptimesoftware.com (Mike Kolcun) Date: Fri, 24 Mar 2006 09:36:17 -0500 Subject: [Wtr-general] trying to grab a popup window In-Reply-To: <73e7817e0603231811k3119f639i6493a5b6d593b926@mail.gmail.com> Message-ID: <8655c7c2e1699da79d8c8c156ffd3c11442402f1@uptimesoftware.com> Bill, et al. Thanks very much for the help, this is what I ended up with. --code-- def get_window_not_named(title) loop do begin window = Watir::IE.attach(:title, //) return window if window.title != title rescue Watir::NoMatchingWindowFoundException break end end return nil end --code-- /Mike -----Original Message----- On 3/23/06, Mike Kolcun wrote: > > I've got a situation where I have a the main window of an application that > pops up a new window using a JavaScript call on the click of a form button. > > The title of this new window varies from time to time with what I'm testing, > so I'm not able to just attach to the title of the window. The url is also > different, so that option is out too. > > Is there a way to get a handle for "the most recently opened window" or > something of the like? If it's safe to assume that the only two browser windows open will be the parent window and the popup window, then the following example might work for you. There may be a more graceful way to do this, but this seemed to work when I tested it out. Also, if more than two windows are open, then it will probably not do the right thing, either. :) In that case it may match the wrong window. The technique of using the regexp "//" to loop through all browsers is from an example for closing all open browsers that someone posted to the list a while ago. --snipped code-- From satti at qantom.com Fri Mar 24 10:16:26 2006 From: satti at qantom.com (Sathya Shankar) Date: Fri, 24 Mar 2006 20:46:26 +0530 Subject: [Wtr-general] Send results to console and text file In-Reply-To: <38c139080603231700p58c934f5w8d35487cb00cd7be@mail.gmail.com> References: <38c139080603231700p58c934f5w8d35487cb00cd7be@mail.gmail.com> Message-ID: <44240D4A.4030604@qantom.com> $IE0.form(:name,"").click doesn't help >> $IEO.form(:name, "xxxx").submit >> I am using watir 1.4.1. I dont have the head version. In this particular version >> I dont see any method for form to click. > > Can anyone please help? > Let me know if it doesnt works... > Thanks, > Padhma > > > >------------------------------------------------------------------------ > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > -- Happiness keeps u Sweet, Trials keep u Strong, Sorrow keeps u Human, Failure Keeps u Humble, Success keeps u Glowing, But only God Keeps u Going..... Keep Going..... Sathya Shankar M G Software Test Engineer Qantom Software Pvt. Ltd. http://www.qantom.com Ph : 41315953 Xtn. 123 sip : satti at sip411.com From bret at pettichord.com Fri Mar 24 13:08:21 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 24 Mar 2006 12:08:21 -0600 Subject: [Wtr-general] Send results to console and text file In-Reply-To: <38c139080603231700p58c934f5w8d35487cb00cd7be@mail.gmail.com> References: <38c139080603231700p58c934f5w8d35487cb00cd7be@mail.gmail.com> Message-ID: On 3/23/06, Padhma N wrote: > (1) I would like to send the results of my test suite to a .txt file and > also want the results to be seen on the console. How do I do that? > I know that I can use the following command in the command prompt- > function1.rb > results.txt > > But I want something more like,the program itself directing its each output > to both the console and the results.txt file. > I tried f.syswrite but that seems inefficient as I have to use f.syswrite at > all places I use puts statement. Is there a better way to do this? Using cygwin, this will give you what you want: function1.rb | tee results.txt See also http://www.mcse.ms/archive40-2004-7-914432.html for other ways to do this on Windows. From bret at pettichord.com Fri Mar 24 13:49:31 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 24 Mar 2006 12:49:31 -0600 Subject: [Wtr-general] Watir WebRecorder 0.5 Update In-Reply-To: References: Message-ID: On 3/23/06, Marcus Tettmar wrote: > I've been keeping a close eye on this list but apart from the forms issue, > which I raised myself, and one posting that brought the spaces thing to my > attention, I wasn't aware of any extra support issues directly related to > webrecorder or anything to the effect of "the recorder works, but watir > doesn't" as you have suggested. Had I seen anything like that I would have > jumped right in, I can assure you. We have had many people send problem scripts and the problem was that there were extra spaces. This is the problem you just sent mail about fixing. This was the first i'd heard that this frequently discussed problem was actually a webrecorder bug and not an emailer issue, as had been frequently suggested. I didn't see you jumping in on these problems. > In regards to the forms issue - I raised that myself in reference to > WebRecorder, yes, but didn't necessarily expect you to have to change > anything in Watir. An alternative approach would have been that I could > have changed WebRecorder to not insert the form() reference if it found only > one form on the page. I just needed to know how it was meant to work. Watir 1.4.1 has a bug when using form() and there is only one form. This bug is fixed in development. I don't recall you reporting this bug. This came from users of WebRecorder. I could probably release 1.4.2 with this fix. It's a one-line change. It's going to be a while before 1.5 becomes generally released and supported. Or you could update WebRecorder to work around this bug. What do you suggest? > I did not provide this version of WebRecorder in order to create any extra > burden for you, and I am sorry if you feel that is all it has achieved. I'm > not aware that it has in fact directly contributed to any extra support > requests, but I suppose as a product grows in popularity, as Watir clearly > is doing, and whether or not WebRecorder is in some way responsible for > that, the support burden will increase as more and more people get to know > about it, many of whom will be less technical than the earlier adopters. > That's almost a fact of life - a side effect of success. This is complete bull. You are either not actually following the list or you are completely deluded. > I have made it quite clear when running WebRecorder and on the WebRecorder > web page that knowledge of Watir and Ruby is essential and that any problems > with recording are not indicative of any problem in Watir. But if you think > WebRecorder is causing you undue burden then clearly we must do something > about it. I think there is agreement that there needs to be separate list to support web recorder users. > One thing that I think would benefit this mailing list, for a number of > reasons, would be a weekly FAQ posting. By posting this regularly it will > keep people aware of it and new subscribers would always see it. This could > explain how best to post questions, how (not) to report bugs, where to find > answers, how to download the latest version .. etc. This should help keep > the quality of postings high and remove some repetition. This could also > address WebRecorder in some way - something to the effect of - if you get a > problem with a WebRecorder script don't post to the general Watir group > until you've understood what it is doing and/or emailed Marcus, or, if we > had a WebRecorder list it, you've posted there first. I agree that we need more work in this area. > Ultimately, if WebRecorder is causing too big a nuisance for everyone then I > could simply withdraw it altogether. I would be interested to hear what > people feel about that. Is it useful? Is it bringing new users to Watir? > If so, is that a good thing or a bad thing? Or is webrecorder just a > complete waste of time? Happy to consider its future based on the feedback. > I'm open to ideas. My suggestion is that you make WebRecorder open source and add unit tests to it. And create a separate mailing list to support these people. I was at Segue when they added a recorder to QA Partner. Originally the people calling for tech support were pretty savvy and they talked to knowledgeable people right away. But with time they had to create a new tier of tech support just to deal with the recorder people. By then i had left Segue, but was still using their tools. It was frustrating for me because when i called in i had to work my way through a layer of staff who knew less about the tool than me, but who were convinced that i was just a stupid user (because 90% of their users were in fact stupid users). Widespread use of recorders for Watir will also force us to create a tiered community. From bret at pettichord.com Fri Mar 24 13:53:58 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 24 Mar 2006 12:53:58 -0600 Subject: [Wtr-general] Question about Plans for Watir 2.0 & Find Objects In-Reply-To: References: Message-ID: Take a look at this plan for 1.5. http://wtr.rubyforge.org/wiki/wiki.pl?RoadMap This plan is still a good description of our intentions. The main thing missing is that we also have xpath support in 1.5. Much of this is already implemented in development. Bret On 3/23/06, Andrew McFarlane wrote: > Bret, > > I was also looking at the 2.0 plan that you laid out on 5/27/2005, and I > didn't see a mention of being able to specify elements using multiple > attribute/value pairs. I have seen you mention, however, that you were > considering merging (some? all?) WET functionality into WATIR. > > What do you see here, if anything? From PGarigue at EXTEND.COM Fri Mar 24 14:30:42 2006 From: PGarigue at EXTEND.COM (Pierre Garigue) Date: Fri, 24 Mar 2006 14:30:42 -0500 Subject: [Wtr-general] Watir WebRecorder 0.5 Update Message-ID: Just one think that I may want to say about the use of Webrecorder. One of the things it does is shows the Ruby code created as you are using the browser. This for changes the nature of the tool. I used webrecorder to get snips of code when I was unsure. Once I had those I modified them by adding variables and putting them in a loop. For me that is very different from the Seque recorder which (I hope I'm not presumptuous here) was marketed as a replacement for coding rather than an adjunct. Cheers Pierre Garigue -----Original Message----- From: Bret Pettichord [mailto:bret at pettichord.com] Sent: Friday, March 24, 2006 1:50 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Watir WebRecorder 0.5 Update [stuff deleted] My suggestion is that you make WebRecorder open source and add unit tests to it. And create a separate mailing list to support these people. I was at Segue when they added a recorder to QA Partner. Originally the people calling for tech support were pretty savvy and they talked to knowledgeable people right away. But with time they had to create a new tier of tech support just to deal with the recorder people. By then i had left Segue, but was still using their tools. It was frustrating for me because when i called in i had to work my way through a layer of staff who knew less about the tool than me, but who were convinced that i was just a stupid user (because 90% of their users were in fact stupid users). Widespread use of recorders for Watir will also force us to create a tiered community. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Fri Mar 24 14:47:56 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 24 Mar 2006 13:47:56 -0600 Subject: [Wtr-general] OT: Line Order in Scripts and Writing File Output In-Reply-To: <37c405480603221315w2294664ds@mail.gmail.com> References: <37c405480603221315w2294664ds@mail.gmail.com> Message-ID: As i've said before, questions about Ruby in the context of testing are always welcome here. All of your questions really amount to Test::Unit questions, and the answer is that you need to learn about this Ruby library. I can give a very brief summary. Test::Unit has a set of default behaviors. What you are saying is that you want to change these. In some ways you've found ugly hacks to make it work the way you want. In other cases you haven't. But it is designed to be very configurable and can in fact be configured to do exactly what you want. Specifically, you don't want to use the default test suite nor the default test runner. You want to create these yourselves. You'll need to check out the documentation and code for Test::Unit from here. http://www.ruby-doc.org/stdlib/libdoc/test/unit/rdoc/index.html If you have more questions on this, also consider posting to comp.lang.ruby. That's where i post my Test::Unit questions (when i don't send them to Nathaniel directly). Bret On 3/22/06, Paul Carvalho wrote: > Hi there, please forgive the Off-Topic question. Let me know if I should > try another forum or resource (and which ones they are). > > I'm trying to refactor one set of Watir scripts into separate files so that > it is more like the setup used in the UnitTests and I seem to be having some > difficulty figuring out the right order of things. Maybe it's just the > choice of my files that's hanging me up, but it's what I'm working with so > I'd like to see if I can figure it out. Also, I imagine that there might be > a better way of doing this, but this is my first complete set of Ruby/Watir > scripts so bear with me if the setup seems inefficient or incorrect in some > way. (All feedback appreciated.) > > Background: > - I have 4 Performance scripts that walk through the site maps for 4 > different apps. > - Each script is currently independent and does the following things: > (a) opens up two files for writing output: one for the performance > measurements, and one for a separate progress/status report (used for > troubleshooting in case something goes wrong). > (b) walks through each page in the site map and records the (i) page size > and (ii) download time. > (c) closes the two files and the web browser. > > -> These scripts all work as expected when run individually. > > > FIRST PROBLEM (with hack workaround): > > - The last step above (c) was interesting, because it took me a while to > figure out how to close the files as the *last* step in the test run. > - To do this, I put all of the setup and tests into the first class ( e.g. > "class TC_BD01") and the 'close open files' step into a second class (e.g. > "class TC_BD02"). I couldn't figure out any other way to ensure that this > was performed in the correct order. On the downside, I have an extra > unwanted Class with an unwanted TestCase that all it does is close some > files and close the web browser. > - As an example, here is the output of the test file that helped me work out > this line/class/test order problem (the general structure is the same as my > real script, except all the code has just been replaced with a simple 'puts' > line): > ----- > >ruby BD_site_map_tests.rb > ** TC_BD01_site_map_walkthru ** > Loaded suite BD_site_map_tests > Started > ] TC_BD1 > test_a_Public_Pages > ]=> TC_BD1 *teardown* > .] TC_BD1 > test_b_First_Time_login > ]=> TC_BD1 *teardown* > .] TC_BD1 > test_c_Main_Menu > ]=> TC_BD1 *teardown* > . > ] TC_BD2 > test_wrap_up > *-*-*-*-*-*-*-*-*-* > . > Finished in 0.0 seconds. > > 4 tests, 0 assertions, 0 failures, 0 errors > >Exit code: 0 > ----- > > => So it kind of bugs me that it reports "4 tests" when really there are 3 > tests and 1 'wrap_up' routine, but I can live with that (for now) because it > works. In the long term I'd like to figure out how to solve this problem > with the extra empty test cases. > > > SECOND PROBLEM (working with the new integrated script suite): > > - I stripped out all the constant declarations and custom methods into > separate files. (Thanks for the help with this Bret and Sean G.) > - I created a master script file that has all the 'require' and 'include' > statements and then calls the individual scripts one at a time. > => What I've noticed is that Ruby (1) scans through *all* of the scripts, > (2) groups all of the [non test case lines] and [test cases] and then (3) > runs them in that group order. I think it's really whacked, but that's what > I've seen. > > - Here's my Script_Order_TestSuite.rb file: > ----- > require 'common' > > # The Tests: > puts '-= Wrapper A - BEFORE =-' > require 'BD_shell_tests' > puts '-= Wrapper A - AFTER =-' > puts '' > > puts '-= Wrapper B - BEFORE =-' > require 'SD_shell_tests' > puts '-= Wrapper B - AFTER =-' > puts '' > > # End > ----- > > And here's the output: > ----- > >ruby Script_Order_TestSuite.rb > -= Wrapper A - BEFORE =- > ** TC_BD01_site_map_walkthru ** > -= Wrapper A - AFTER =- > > -= Wrapper B - BEFORE =- > ** TC_SD01_site_map_walkthru ** > -= Wrapper B - AFTER =- > > Loaded suite Script_Order_TestSuite > Started > ] TC_BD1 > test_a_Public_Pages > ]=> TC_BD1 *teardown* > .] TC_BD1 > test_b_First_Time_login > ]=> TC_BD1 *teardown* > .] TC_BD1 > test_c_Main_Menu > ]=> TC_BD1 *teardown* > . > ] TC_BD2 > test_wrap_up > *-*-*-*-*-*-*-*-*-* > .] TC_SD1 > test_a_Public_Pages > ]=> TC_SD1 *teardown* > .] TC_SD1 > test_b_First_Time_login > ]=> TC_SD1 *teardown* > .] TC_SD1 > test_c_Main_Menu > ]=> TC_SD1 *teardown* > .] TC_SD1 > test_d_Admin_Pages > ]=> TC_SD1 *teardown* > . > ] TC_SD2 > test_wrap_up > *-*-*-*-*-*-*-*-*-* > . > Finished in 0.0 seconds. > > 9 tests, 0 assertions, 0 failures, 0 errors > >Exit code: 0 > ----- > > => What I was *expecting* was that the master script would do the "Wrapper # > - Before" stuff *prior* to running the test cases in the called script, and > *then* perform the "Wrapper # - After" stuff when that called script was > complete. But that's not what happens. > > > MY QUESTION(S): > > - Given : Ruby will always pool *all* the TestCases together and run them as > a set/suite in ascending order by class and then by TestCase. So I need to > rethink how the output files are opened and closed, as well as how the > browsers are opened and closed. > > Does anyone have any suggestions as to how I can properly close open files > after each test script/suite run? (The reason I did this in each script was > so that I could record the script start and end times. I think I may need > to replace this with variables now if I can't write the output at the actual > script start and stop times.) > > Or should I just open all the output files at the start and then close them > at the very end of the master script completion? If so, what sort of > module/class/whatever structure should I use in my scripts to ensure that > certain steps are run *first* and *last* and hopefully without adding > additional empty Classes and TestCases. > > (Aside: I ordered the 2nd edition Pickaxe book and am still waiting for it > to arrive, so I can't look that up for reference just yet. If applicable, > feel free to reference certain sections within it and I will look it up when > I get it.) > > I just can't figure out how to run commands *after* the "suite" of test > cases is complete. Everything I add always runs *prior* to the suite of > test cases. I think that both problems above might share a common solution, > but I just don't know what that could be. Thanks in advance for any useful > suggestions and advice. > > Cheers. Paul. > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > From bret at pettichord.com Fri Mar 24 14:57:09 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 24 Mar 2006 13:57:09 -0600 Subject: [Wtr-general] Frame with no 'src' tag value throws error (frame has onload handler for getting source) In-Reply-To: References: Message-ID: >From your description, it sounds like Watir might be able to be modified to handle these applications. I encourage you to look at our Frame support and see if it can be modified to fit. Bret On 3/23/06, Prem wrote: > Hi, > > We are evaluating the fitness of Watir to automate web based BPM > applications built on PRPC. We already know that QTP works fine for it, but > I have taken up the task of trying out Watir on PRPC. Watir works fine when > we tried it on our internal applications and I am very much enthusiastic > about it, but I have run into some serious problems while trying it out for > PRPC based apps. I cant go furthur than logging in to the application. > > I get the following error from Watir when it comes to the first screen after > I log into the application. > > W, [23-Mar-2006 20:14:42#1432] WARN -- : frame error in waitdocument > OLE error code:80070005 in > Access is denied. > > > HRESULT error code:0x80020009 > Exception occurred. > D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1485:in > `method_missing' > D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1485:in `wait' > D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1484:in `wait' > D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2248:in `click' > D:/pmo_wip/FTA/PRPC/open.rb:34 > D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2389:in > `method_missing': document (WIN32OLERuntimeError) > OLE error code:80070005 in > Access is denied. > > > HRESULT error code:0x80020009 > Exception occurred. from > D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2389:in `document' > from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1177:in > `check_for_http_error' > from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1162:in > `set_defaults' > from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1161:in > `set_defaults' > from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1512:in > `run_error_checks' > from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1511:in > `run_error_checks' > from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1499:in > `wait' > from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2248:in > `click' > from D:/pmo_wip/FTA/PRPC/open.rb:34 > > I found from one of the mails in the list archive that this might be because > the frame is served from a different server & it might be a cross-site > scripting limitation. > > But in our scenario it is not so. The situation is that in one of the frames > there is no 'src' tag, rather there is an onload function handler which gets > the frame source. The problematic portion is given below: > > framespacing="2" onload="framesetscript_initialize()" > onbeforeunload="framesetscript_onbeforeunload()"> > > We cannot do away with this approach for frames as this is a vendor provided > tool upon which our application has been built and the tool itself generates > the frames so. > > Can treat this a defect / deficiency in Watir or do I need to build in a > workaround? > > I dont want to be using QTP, please help me! > > -- > - Prem > > I spent a minute looking at my own code by accident. > I was thinking "What the hell is this guy doing?" > ---------------------------------------------------- > Prem Kumar Aparanji > M: 00919845226618 > [Bangalore, KA, INDIA] > > http://prem.shaliniprem.com > http://www.shaliniprem.com > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > From welkin_inc at hotmail.com Fri Mar 24 15:22:59 2006 From: welkin_inc at hotmail.com (Andrew McFarlane) Date: Fri, 24 Mar 2006 13:22:59 -0700 Subject: [Wtr-general] Question about Plans for Watir 2.0 & Find Objects In-Reply-To: Message-ID: Thanks. That clears up some things. I did not see mention that one would be able to specify an element by multiple attribute/value pairs, so I'm assuming that will not be in 1.5. >From: "Bret Pettichord" >Reply-To: wtr-general at rubyforge.org >To: wtr-general at rubyforge.org >Subject: Re: [Wtr-general] Question about Plans for Watir 2.0 & Find >Objects >Date: Fri, 24 Mar 2006 12:53:58 -0600 > >Take a look at this plan for 1.5. >http://wtr.rubyforge.org/wiki/wiki.pl?RoadMap > >This plan is still a good description of our intentions. The main >thing missing is that we also have xpath support in 1.5. > >Much of this is already implemented in development. > >Bret > >On 3/23/06, Andrew McFarlane wrote: > > Bret, > > > > I was also looking at the 2.0 plan that you laid out on 5/27/2005, and I > > didn't see a mention of being able to specify elements using multiple > > attribute/value pairs. I have seen you mention, however, that you were > > considering merging (some? all?) WET functionality into WATIR. > > > > What do you see here, if anything? > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Fri Mar 24 15:37:44 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 24 Mar 2006 14:37:44 -0600 Subject: [Wtr-general] Question about Plans for Watir 2.0 & Find Objects In-Reply-To: References: Message-ID: On 3/24/06, Andrew McFarlane wrote: > Thanks. That clears up some things. > > I did not see mention that one would be able to specify an element by > multiple attribute/value pairs, so I'm assuming that will not be in 1.5. That sounds right. I've actually heard little demand for it, except for the case of radio lists (where we have a workaround). You can always put it on Jira and see how many votes it gets. > >From: "Bret Pettichord" > >Reply-To: wtr-general at rubyforge.org > >To: wtr-general at rubyforge.org > >Subject: Re: [Wtr-general] Question about Plans for Watir 2.0 & Find > >Objects > >Date: Fri, 24 Mar 2006 12:53:58 -0600 > > > >Take a look at this plan for 1.5. > >http://wtr.rubyforge.org/wiki/wiki.pl?RoadMap > > > >This plan is still a good description of our intentions. The main > >thing missing is that we also have xpath support in 1.5. > > > >Much of this is already implemented in development. > > > >Bret > > > >On 3/23/06, Andrew McFarlane wrote: > > > Bret, > > > > > > I was also looking at the 2.0 plan that you laid out on 5/27/2005, and I > > > didn't see a mention of being able to specify elements using multiple > > > attribute/value pairs. I have seen you mention, however, that you were > > > considering merging (some? all?) WET functionality into WATIR. > > > > > > What do you see here, if anything? > > > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From marcus.tettmar at gmail.com Fri Mar 24 17:18:33 2006 From: marcus.tettmar at gmail.com (Marcus Tettmar) Date: Fri, 24 Mar 2006 22:18:33 +0000 Subject: [Wtr-general] Watir WebRecorder 0.5 Update In-Reply-To: References: Message-ID: Hi, On 3/24/06, Bret Pettichord wrote: > > We have had many people send problem scripts and the problem was that > there were extra spaces. This is the problem you just sent mail about > fixing. This was the first i'd heard that this frequently discussed > problem was actually a webrecorder bug and not an emailer issue, as > had been frequently suggested. I didn't see you jumping in on these > problems. I recall one email about that. I wasn't aware that it was frequently discussed. I have been following the list. Someone emailed me about the spaces and I looked into it and fixed it. I perhaps should have gone back over the list and replied to specific posts. I really am sorry if I missed it earlier. Watir 1.4.1 has a bug when using form() and there is only one form. > This bug is fixed in development. I don't recall you reporting this > bug. This came from users of WebRecorder. I sent an email to the list on March 3rd entitled "problem enumerating forms" in which I asked about this issue. You replied on Mar 15 that you had committed a fix to SVN. I could probably release 1.4.2 with this fix. It's a one-line change. > It's going to be a while before 1.5 becomes generally released and > supported. Or you could update WebRecorder to work around this bug. > What do you suggest? It is easy enough to update WR so I will do that. > I did not provide this version of WebRecorder in order to create any extra > > burden for you, and I am sorry if you feel that is all it has > achieved. I'm > > not aware that it has in fact directly contributed to any extra support > > requests, but I suppose as a product grows in popularity, as Watir > clearly > > is doing, and whether or not WebRecorder is in some way responsible for > > that, the support burden will increase as more and more people get to > know > > about it, many of whom will be less technical than the earlier adopters. > > > That's almost a fact of life - a side effect of success. > > This is complete bull. You are either not actually following the list > or you are completely deluded. I am not deluded. I don't particularly like your tone one bit! I read all the posts to the list every day. I am offering my opinion of what can happen as a product grows in use and reaches a wider audience. You are entitled to feel that my opinion is BS of course, but do you have to be so rude? > I have made it quite clear when running WebRecorder and on the WebRecorder > > > web page that knowledge of Watir and Ruby is essential and that any > problems > > with recording are not indicative of any problem in Watir. But if you > think > > WebRecorder is causing you undue burden then clearly we must do > something > > about it. > > I think there is agreement that there needs to be separate list to > support web recorder users. > > My suggestion is that you make WebRecorder open source and add unit > tests to it. And create a separate mailing list to support these > people. I'll look into that - it is based on proprietary code in a commercial product so I'd have to find out if that is possible. Until then I will remove Watir WebRecorder from our site. I don't like to feel I am causing a nuisance. That was never my intention. I only was impressed with Watir and felt a Watir version of WebRecorder could be a useful complement. Perhaps I am wrong. > Widespread use of recorders for Watir will also force us to create a > tiered community. I don't believe it should have to. I believe they have their place. But it's clear we won't agree on that :-/ -- Marcus Tettmar http://www.mjtnet.com/ Macro Scheduler & WebRecorder for Windows & Web Automation and Testing. WebRecorder for Ruby/Watir now available. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060324/c2dc97b7/attachment.html From bret at pettichord.com Fri Mar 24 19:03:50 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 24 Mar 2006 18:03:50 -0600 Subject: [Wtr-general] Watir WebRecorder 0.5 Update In-Reply-To: References: Message-ID: On 3/23/06, Marcus Tettmar wrote: > I've been keeping a close eye on this list but apart from the forms issue, > which I raised myself, and one posting that brought the spaces thing to my > attention, I wasn't aware of any extra support issues directly related to > webrecorder or anything to the effect of "the recorder works, but watir > doesn't" as you have suggested. Had I seen anything like that I would have > jumped right in, I can assure you. On 3/24/06, Marcus Tettmar wrote: > On 3/24/06, Bret Pettichord wrote: > > We have had many people send problem scripts and the problem was that > > there were extra spaces. This is the problem you just sent mail about > > fixing. This was the first i'd heard that this frequently discussed > > problem was actually a webrecorder bug and not an emailer issue, as > > had been frequently suggested. I didn't see you jumping in on these > > problems. > > I recall one email about that. I wasn't aware that it was frequently > discussed. I have been following the list. Someone emailed me about the > spaces and I looked into it and fixed it. I perhaps should have gone back > over the list and replied to specific posts. I really am sorry if I missed > it earlier. On Mar 15 you said: "My script doesn't have the space in - must have happened somehow when pasting it into gmail." On Mar 10, Tanushree reported a script with an extra space in it. He was using the web recorder. Zeljko responded to his email pointing out this problem. I did not see you "jump right in." On Feb 23, Saud Aziz had a problem with extra spaces in his script. It was also blamed on gmail. It's not clear whether he was using the WebRecorder. After reviewing the email records, it occurs to me that there is actually a possibility that there are two extra space bugs -- one in gmail and one in WebRecorder. On the other hand, i don't recall seeing this extra space problem show up on this list at all before WebRecorder was released. I really don't know. It would have been of service to the open-source community that is supporting your commercial product to if you had acknowledged your extra-space bug when you became aware of it. It would also be helpful if you would help us understand the degree to which this common problem has been due to the WebRecorder. Bret From jkohl at telusplanet.net Fri Mar 24 23:59:17 2006 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Fri, 24 Mar 2006 20:59:17 -0800 Subject: [Wtr-general] Watir WebRecorder 0.5 Update In-Reply-To: References: Message-ID: <1143262757.4424ce25306ae@webmail.telusplanet.net> > > This is complete bull. You are either not actually following the list > > or you are completely deluded. > I am not deluded. I don't particularly like your tone one bit! I read all > the posts to the list every day. I am offering my opinion of what can > happen as a product grows in use and reaches a wider audience. You are > entitled to feel that my opinion is BS of course, but do you have to be so > rude? I am completely in agreement with Bret when it comes to recorders for testing, but I do agree with Marcus that this statement was a bit over the top. If Marcus wants to write and maintain a recorder, and there is a mailing list and community of practice around it, that is cool with me. I don?t really want to support the recorded scripts either, but this was harsh. -Jonathan From bret at pettichord.com Sat Mar 25 00:54:11 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 24 Mar 2006 23:54:11 -0600 Subject: [Wtr-general] Watir WebRecorder 0.5 Update In-Reply-To: <1143262757.4424ce25306ae@webmail.telusplanet.net> References: <1143262757.4424ce25306ae@webmail.telusplanet.net> Message-ID: [Bret] > > > This is complete bull. You are either not actually following the list > > > or you are completely deluded. [Marcus] > > I am not deluded. I don't particularly like your tone one bit! I read all > > the posts to the list every day. I am offering my opinion of what can > > happen as a product grows in use and reaches a wider audience. You are > > entitled to feel that my opinion is BS of course, but do you have to be so > > rude? [Jonathan] > I am completely in agreement with Bret when it comes to recorders for testing, > but I do agree with Marcus that this statement was a bit over the top. If Marcus > wants to write and maintain a recorder, and there is a mailing list and > community of practice around it, that is cool with me. I don?t really want to > support the recorded scripts either, but this was harsh. There is an issue with recorders for testing. Different people have different views, and i think that it is fair for people to challenge my views in this area. A completely separate issue concerns the relationship between commercial tools and open-source communities. It was in response to my suggestion that we consider stop providing support for recorder users on this list, and that a new list be created, that he made statements that i claim are bull. Specifically: "I'm not aware that it [WebRecorder] has in fact directly contributed to any extra support requests..." I say this is bull because it meets the definition of bull: it is false, it is knowingly false, and it is declared with the expectation that it will be heard as false. (This is the definition from "On Bullshit" by Harry Frankfort.) 1. It is false. In Marcus's own email, it elsewhere acknowledged that he'd made a support request and that he knew of one other request. A simple google search of the archives will uncover more. 2. It is knowingly false. Since he acknowledges these support requests elsewhere in his email, it is clear that he knows it is false. 3. He knows that we will read it as false. This is harder to prove, but if you look at the rhetorical sweep of the paragraph it is found in, you will see that he is both trying to deny that these support requests exist, but also and at the same time, suggest that they are an inseparable part of success. Reread the paragraph and judge for yourself. > I did not provide this version of WebRecorder in order to create any extra > burden for you, and I am sorry if you feel that is all it has achieved. I'm > not aware that it has in fact directly contributed to any extra support > requests, but I suppose as a product grows in popularity, as Watir clearly > is doing, and whether or not WebRecorder is in some way responsible for > that, the support burden will increase as more and more people get to know > about it, many of whom will be less technical than the earlier adopters. > That's almost a fact of life - a side effect of success. Several people in this community have made it clear that we don't want to support recorder users. It was this sentiment that lead to Marcus's rhetorical bull. Is this harsh? Is it harsh to call a liar a liar? I decided to call it what it was. ("Bullshit" is the current vernacular, but the original term is "bull." I used the older term specifically to avoid the scatalogical emphasis, which would make me more vulnerable to the charge of being over the top. The only other English word for bull is "humbug," which is truly obscure.) Marcus's response has been to take WebRecorder off his website. No one asked him to do this. We asked him to create a separate list. But it is important for us to realize that as a commercial tool vendor, he was always free to do this. It is his right. It's his code. We can support it, help its users, report bugs in it, make sugggestions and then he can turn around and decide that he wants to start charge $100 or $1,000 a copy. Or he can take it offline completely. We can't do that. Watir is open-source. It belongs to the community. No one can take it away. And no one can tell us what to do with it. Not even me. Suppose that I were totally opposed to FireFox support. There still would be nothing i could do to stop Angrez from creating FireWatir. The code is public and there is nothing i could do legally or morally to stop him, except argue against it. I hate to say it, but i think it is time for us to discuss creating an open-source recorder. Actually i'd prefer more of a spy tool, but i think we need to create something that we can support (possibly on a separate list) and that supports our vision for what a useful recorder would be. My personal view is that a really useful recorder would need to be tuned for specific applications. You have to use different identification strategies with different applications and different controls. You all know this, and much of traffic on this list is really focussed on helping others learn what the best strategies are for their applications. A truly useful recorder would be tuned to understand that a tests for a particular application should use names for text_fields, but identify dropdowns by their prior text. That's my view. Watir has resulted from years of interaction between the vision of a few of us for what a testing tool should be and frequent and detailed feedback from many users, many of them completely new to the tool, about what they expect the tool to do. I suspect that it was also take years to create a good, usable open-source recorder that actually teaches users about automation as it is used instead of letting them think, even for a moment, that they somehow can be successful without understanding the details. Where should we start? From saudaziz at gmail.com Sat Mar 25 01:30:43 2006 From: saudaziz at gmail.com (saud aziz) Date: Fri, 24 Mar 2006 22:30:43 -0800 Subject: [Wtr-general] Watir WebRecorder 0.5 Update In-Reply-To: References: Message-ID: <24d0cb380603242230x2bf30534g10aab277253593c7@mail.gmail.com> I was not using WebRecorder, but rather modified version of WatirMaker by Scott. And still do every now and then to capture chunks of code that i can later modify to create more structured and better script. And space(s) never was or is a problem in that tool. It definately has something to do with gmail as i was able to make the script work by making small modification to use "Button" instead of "image" for image buttons per your (Bret) suggestion. Scott's Original along with my small modification(s) in seperate directory along with code is available from: http://saudaziz.googlepages.com/WatirMaker.zip You can test it your yourself whether or not it adds extra spaces. Also i agree with most here that recorders should have their own mailing list as they have several issues of their own. Thanks. On 3/24/06, Bret Pettichord wrote: > > On 3/23/06, Marcus Tettmar wrote: > > I've been keeping a close eye on this list but apart from the forms > issue, > > which I raised myself, and one posting that brought the spaces thing to > my > > attention, I wasn't aware of any extra support issues directly related > to > > webrecorder or anything to the effect of "the recorder works, but watir > > doesn't" as you have suggested. Had I seen anything like that I would > have > > jumped right in, I can assure you. > > On 3/24/06, Marcus Tettmar wrote: > > On 3/24/06, Bret Pettichord wrote: > > > We have had many people send problem scripts and the problem was that > > > there were extra spaces. This is the problem you just sent mail about > > > fixing. This was the first i'd heard that this frequently discussed > > > problem was actually a webrecorder bug and not an emailer issue, as > > > had been frequently suggested. I didn't see you jumping in on these > > > problems. > > > > I recall one email about that. I wasn't aware that it was frequently > > discussed. I have been following the list. Someone emailed me about > the > > spaces and I looked into it and fixed it. I perhaps should have gone > back > > over the list and replied to specific posts. I really am sorry if I > missed > > it earlier. > > On Mar 15 you said: "My script doesn't have the space in - must have > happened somehow when pasting it into gmail." > > On Mar 10, Tanushree reported a script with an extra space in it. He > was using the web recorder. Zeljko responded to his email pointing out > this problem. I did not see you "jump right in." > > On Feb 23, Saud Aziz had a problem with extra spaces in his script. It > was also blamed on gmail. It's not clear whether he was using the > WebRecorder. > > After reviewing the email records, it occurs to me that there is > actually a possibility that there are two extra space bugs -- one in > gmail and one in WebRecorder. On the other hand, i don't recall seeing > this extra space problem show up on this list at all before > WebRecorder was released. I really don't know. > > It would have been of service to the open-source community that is > supporting your commercial product to if you had acknowledged your > extra-space bug when you became aware of it. It would also be helpful > if you would help us understand the degree to which this common > problem has been due to the WebRecorder. > > Bret > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- Saud Aziz "Whenever you find yourself on the side of the majority, it is time to pause and reflect." - Mark Twain -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060324/9391de9d/attachment.html From saudaziz at gmail.com Sat Mar 25 01:43:25 2006 From: saudaziz at gmail.com (saud aziz) Date: Fri, 24 Mar 2006 22:43:25 -0800 Subject: [Wtr-general] Watir WebRecorder 0.5 Update In-Reply-To: <24d0cb380603242230x2bf30534g10aab277253593c7@mail.gmail.com> References: <24d0cb380603242230x2bf30534g10aab277253593c7@mail.gmail.com> Message-ID: <24d0cb380603242243h7f5e37e8i3873b4c4ab814653@mail.gmail.com> My personal view is that a really useful recorder would need to be tuned for specific applications. You have to use different identification strategies with different applications and different controls. You all know this, and much of traffic on this list is really focussed on helping others learn what the best strategies are for their applications. A truly useful recorder would be tuned to understand that a tests for a particular application should use names for text_fields, but identify dropdowns by their prior text. That's my view. Thats exactly what i ran into everytime i tried to record any application that i was testing with either or the recorders. Which is why i found this Scott's free solution much better than Marcus's because i have to constantly go in and change the behavior (in recorder's code) of some of the elements to make it record as it should. Saud On 3/24/06, saud aziz wrote: > > I was not using WebRecorder, but rather modified version of WatirMaker by > Scott. And still do every now and then to capture chunks of code that i can > later modify to create more structured and better script. And space(s) never > was or is a problem in that tool. It definately has something to do with > gmail as i was able to make the script work by making small modification to > use "Button" instead of "image" for image buttons per your (Bret) > suggestion. > > Scott's Original along with my small modification(s) in seperate directory > along with code is available from: > > http://saudaziz.googlepages.com/WatirMaker.zip > > You can test it your yourself whether or not it adds extra spaces. > > Also i agree with most here that recorders should have their own mailing > list as they have several issues of their own. > > Thanks. > > > > On 3/24/06, Bret Pettichord wrote: > > > > On 3/23/06, Marcus Tettmar wrote: > > > I've been keeping a close eye on this list but apart from the forms > > issue, > > > which I raised myself, and one posting that brought the spaces thing > > to my > > > attention, I wasn't aware of any extra support issues directly related > > to > > > webrecorder or anything to the effect of "the recorder works, but > > watir > > > doesn't" as you have suggested. Had I seen anything like that I would > > have > > > jumped right in, I can assure you. > > > > On 3/24/06, Marcus Tettmar wrote: > > > On 3/24/06, Bret Pettichord < bret at pettichord.com > wrote: > > > > We have had many people send problem scripts and the problem was > > that > > > > there were extra spaces. This is the problem you just sent mail > > about > > > > fixing. This was the first i'd heard that this frequently discussed > > > > problem was actually a webrecorder bug and not an emailer issue, as > > > > had been frequently suggested. I didn't see you jumping in on these > > > > problems. > > > > > > I recall one email about that. I wasn't aware that it was frequently > > > discussed. I have been following the list. Someone emailed me about > > the > > > spaces and I looked into it and fixed it. I perhaps should have gone > > back > > > over the list and replied to specific posts. I really am sorry if I > > missed > > > it earlier. > > > > On Mar 15 you said: "My script doesn't have the space in - must have > > happened somehow when pasting it into gmail." > > > > On Mar 10, Tanushree reported a script with an extra space in it. He > > was using the web recorder. Zeljko responded to his email pointing out > > this problem. I did not see you "jump right in." > > > > On Feb 23, Saud Aziz had a problem with extra spaces in his script. It > > was also blamed on gmail. It's not clear whether he was using the > > WebRecorder. > > > > After reviewing the email records, it occurs to me that there is > > actually a possibility that there are two extra space bugs -- one in > > gmail and one in WebRecorder. On the other hand, i don't recall seeing > > this extra space problem show up on this list at all before > > WebRecorder was released. I really don't know. > > > > It would have been of service to the open-source community that is > > supporting your commercial product to if you had acknowledged your > > extra-space bug when you became aware of it. It would also be helpful > > if you would help us understand the degree to which this common > > problem has been due to the WebRecorder. > > > > Bret > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > -- > Saud Aziz > > "Whenever you find yourself on the side of the majority, it is time to > pause and reflect." - Mark Twain > > > > -- Saud Aziz "Whenever you find yourself on the side of the majority, it is time to pause and reflect." - Mark Twain -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060324/ccdefed8/attachment.html From scotthanselman at gmail.com Sat Mar 25 01:57:25 2006 From: scotthanselman at gmail.com (Scott Hanselman) Date: Fri, 24 Mar 2006 22:57:25 -0800 Subject: [Wtr-general] Watir WebRecorder 0.5 Update In-Reply-To: <24d0cb380603242230x2bf30534g10aab277253593c7@mail.gmail.com> References: <24d0cb380603242230x2bf30534g10aab277253593c7@mail.gmail.com> Message-ID: Yikes. I remember, Bret, that you were opposed to the whole recorder concept when I lower-case-L "launched" WatirMaker a while back. I understood why and I continue to respect your opinion. I was opposed to AOL when I was a Compuserve user. Noobs are noobs. Mort is Mort and not everyone can be an Elvis or an Einstein. There's a few issues here, IMHO and I think that most folks would agree: * Watir is easy, but some folks (of all skill levels) like to jump start with a recorder. These folks should have a tool. Watir shouldn't be relegated to the literati. * WatirMaker was written in C# because I'm a Ruby Noob. It's lame and it was written for me. It's not a good recorder to start with even though Saud and others have expanded it. * WatirWebRecorder was a nice thing for MJTNet to release and it's way better than WatirMaker. I pimped it appropriately and spread the word because Noobs were suffering and I knew that Watir was the answer. A recorder was just the "gateway drug" to getting them on the Watir wagon. * An open source Recorder is a good idea. I respect why Marcus can't release WatirWebRecorder as OS. * Michael Kelly (cc'ed) has the framework of a Ruby-based WatirMaker that, IMHO, is quite clever, and I'd hope he'd give it to the people and the people would build a recorder around it. Count me in. All that said, Bret, I respect your ability, your opinions, and your freedom of speech and right to call "B.S" when you see it, but this whole thread could have been handled with more grace. It's a shame that WatirWebRecorder was yanked, but that's Marcus' right as well. Noobs will lose out in the short term, but hopefully a Ruby-based Recorder (or several specific variants) will rise quickly to fill the vacuum. In conclusion - Michael, can we start with your recorder and make something useful? Scott Hanselman On 3/24/06, saud aziz wrote: > > I was not using WebRecorder, but rather modified version of WatirMaker by > Scott. And still do every now and then to capture chunks of code that i can > later modify to create more structured and better script. And space(s) never > was or is a problem in that tool. It definately has something to do with > gmail as i was able to make the script work by making small modification to > use "Button" instead of "image" for image buttons per your (Bret) > suggestion. > > Scott's Original along with my small modification(s) in seperate directory > along with code is available from: > > http://saudaziz.googlepages.com/WatirMaker.zip > > You can test it your yourself whether or not it adds extra spaces. > > Also i agree with most here that recorders should have their own mailing > list as they have several issues of their own. > > Thanks. > > > > On 3/24/06, Bret Pettichord wrote: > > > > On 3/23/06, Marcus Tettmar wrote: > > > I've been keeping a close eye on this list but apart from the forms > > issue, > > > which I raised myself, and one posting that brought the spaces thing > > to my > > > attention, I wasn't aware of any extra support issues directly related > > to > > > webrecorder or anything to the effect of "the recorder works, but > > watir > > > doesn't" as you have suggested. Had I seen anything like that I would > > have > > > jumped right in, I can assure you. > > > > On 3/24/06, Marcus Tettmar wrote: > > > On 3/24/06, Bret Pettichord < bret at pettichord.com > wrote: > > > > We have had many people send problem scripts and the problem was > > that > > > > there were extra spaces. This is the problem you just sent mail > > about > > > > fixing. This was the first i'd heard that this frequently discussed > > > > problem was actually a webrecorder bug and not an emailer issue, as > > > > had been frequently suggested. I didn't see you jumping in on these > > > > problems. > > > > > > I recall one email about that. I wasn't aware that it was frequently > > > discussed. I have been following the list. Someone emailed me about > > the > > > spaces and I looked into it and fixed it. I perhaps should have gone > > back > > > over the list and replied to specific posts. I really am sorry if I > > missed > > > it earlier. > > > > On Mar 15 you said: "My script doesn't have the space in - must have > > happened somehow when pasting it into gmail." > > > > On Mar 10, Tanushree reported a script with an extra space in it. He > > was using the web recorder. Zeljko responded to his email pointing out > > this problem. I did not see you "jump right in." > > > > On Feb 23, Saud Aziz had a problem with extra spaces in his script. It > > was also blamed on gmail. It's not clear whether he was using the > > WebRecorder. > > > > After reviewing the email records, it occurs to me that there is > > actually a possibility that there are two extra space bugs -- one in > > gmail and one in WebRecorder. On the other hand, i don't recall seeing > > this extra space problem show up on this list at all before > > WebRecorder was released. I really don't know. > > > > It would have been of service to the open-source community that is > > supporting your commercial product to if you had acknowledged your > > extra-space bug when you became aware of it. It would also be helpful > > if you would help us understand the degree to which this common > > problem has been due to the WebRecorder. > > > > Bret > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > -- > Saud Aziz > > "Whenever you find yourself on the side of the majority, it is time to > pause and reflect." - Mark Twain > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -- Scott Hanselman http://www.computerzen.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060324/37d26eb9/attachment.html From christopher.mcmahon at gmail.com Sat Mar 25 20:07:54 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Sat, 25 Mar 2006 19:07:54 -0600 Subject: [Wtr-general] OT: basic authentication in Ruby SOAP libs? Message-ID: <72799cd70603251707k6d102b59xe3ce268b36da07b1@mail.gmail.com> Hi... I spent a good chunk of the afternoon trying to get SOAP::WSDLDriverFactory.new(WSDL_URL).createDriver (or some other likely Ruby library) to accept username/password at runtime, but as far as I can tell, you can't get there from here. I even installed http-access2 trying to manipulate headers, but no dice. Which is odd, because it's fairly trivial to do in Perl and Java. In Perl using SOAP::Lite, it looks like my $USER = 'user'; my $PASS = 'password'; my $WSDL = 'http://192.168.2.103/soap/wsdl'; my $SOAP = SOAP::Lite -> service($WSDL); Anyone know how to do basic authentication in Ruby SOAP? -Chris From bret at pettichord.com Sun Mar 26 12:29:31 2006 From: bret at pettichord.com (Bret Pettichord) Date: Sun, 26 Mar 2006 11:29:31 -0600 Subject: [Wtr-general] OT: basic authentication in Ruby SOAP libs? In-Reply-To: <72799cd70603251707k6d102b59xe3ce268b36da07b1@mail.gmail.com> References: <72799cd70603251707k6d102b59xe3ce268b36da07b1@mail.gmail.com> Message-ID: this is a great question for ruby-talk aka comp.lang.ruby. On 3/25/06, Chris McMahon wrote: > Hi... > I spent a good chunk of the afternoon trying to get > SOAP::WSDLDriverFactory.new(WSDL_URL).createDriver (or some other > likely Ruby library) to accept username/password at runtime, but as > far as I can tell, you can't get there from here. I even installed > http-access2 trying to manipulate headers, but no dice. > > Which is odd, because it's fairly trivial to do in Perl and Java. In > Perl using SOAP::Lite, it looks like > > my $USER = 'user'; > my $PASS = 'password'; > my $WSDL = 'http://192.168.2.103/soap/wsdl'; > my $SOAP = SOAP::Lite -> service($WSDL); > > Anyone know how to do basic authentication in Ruby SOAP? > > -Chris > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From bret at pettichord.com Sun Mar 26 18:00:52 2006 From: bret at pettichord.com (Bret Pettichord) Date: Sun, 26 Mar 2006 17:00:52 -0600 Subject: [Wtr-general] Question about Plans for Watir 2.0 & Find Objects In-Reply-To: References: Message-ID: Actually i think this should be able to be done using Watir's new Xpath support in 1.5. On 3/24/06, Bret Pettichord wrote: > On 3/24/06, Andrew McFarlane wrote: > > Thanks. That clears up some things. > > > > I did not see mention that one would be able to specify an element by > > multiple attribute/value pairs, so I'm assuming that will not be in 1.5. > > That sounds right. I've actually heard little demand for it, except > for the case of radio lists (where we have a workaround). > > You can always put it on Jira and see how many votes it gets. From bret at pettichord.com Sun Mar 26 22:31:42 2006 From: bret at pettichord.com (Bret Pettichord) Date: Sun, 26 Mar 2006 21:31:42 -0600 Subject: [Wtr-general] OLE Errors Message-ID: This is about the development code. While looking at the xpath work, i ran into this problem, previously reported: But when I tried to run xpath_tests.rb or all_tests.rb I got lots of > exceptions & errors. One thing that was strange was two IE instances were > getting opened when I tried to run any of these files. Then one got closed & > there were lot of failures each was saying 'The object invoked has > disconnected from its clients.'. So what I think is the IE instance that was > closed (don't know how) was the correct IE that was being referenced in the > tests. The IE instance that remained open (don't know how it got opened) is > the one that is not used anywhere in the scripts. This problem actually has nothing to do with xpath. I tracked down this problem and believe i've fixed it. Here are my notes: This fixes a long standing nagging problem -- or at least one that has been nagging me a lot, although there has been little public discussion. The problem showed up either as a delay when successively running scripts. If you ran one script and then ran another (as a new ruby process) then the second script would usually wait about 30 seconds before running. This was really annoying especially when running short unit tests. The other way that the problem would show up would be that a script would get unable to connect to OLE errors on first running it. Analysis showed that this problem was coincident with the fact that there was an iexplore.exe process that was living for about 30 seconds after a script exited. If you killed this process manually, then the delayed/failed behavior would be avoided. This problem now appears to have been a side effect of a solution to a similar problem. That problem was that users would get OLE errors when they ran successive test scripts (in the same test suite) that closed and opened browsers (typically one per script). The solution was to create an additional, hidden browser that would essentially keep the iexplore process from closing (which was the source of the OLE errors). The new solution was to only create this additional, hidden browser when the @@persist_ole_connection class variable is true. It is now nil by default. Users that want to open and close browsers in their scripts will want to set this to true. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060326/44a29058/attachment.html From bret at pettichord.com Sun Mar 26 23:28:30 2006 From: bret at pettichord.com (Bret Pettichord) Date: Sun, 26 Mar 2006 22:28:30 -0600 Subject: [Wtr-general] Watir 1.5 In-Reply-To: References: Message-ID: (this email is subject to this disclaimer -- all disclaimers are null and void) Leon, the support for modal web dialogs works. i plan to clean up some of the interfaces, but they are operational today. look at unittests/modal_dialog_test.rb for an example. this is the development version of 1.5. Bret On 3/26/06, Leon.Ouretski at au.ey.com wrote: > > This email is to be read subject to the disclaimer below. > > Hello Bret, > > I came across a post, which mentioned that Watir 1.5, which will include > support for web dialogs, is in development. > I was wondering if you could give me an indication on how far away is it? > > Best Regards > > Leon Ouretski > Tax Transformation Services > Ernst & Young > Direct: +61 3 9288 8073 > Email: Leon.Ouretski at au.ey.com > > -------------------- > NOTICE - This communication contains information which is confidential and > the copyright of Ernst & Young or a third party. > > If you are not the intended recipient of this communication please delete > and destroy all copies and telephone Ernst & Young on 1800 655 717 > immediately. If you are the intended recipient of this communication you > should not copy, disclose or distribute this communication without the > authority of Ernst & Young. > > Any views expressed in this Communication are those of the individual > sender, except where the sender specifically states them to be the views of > Ernst & Young. > > Except as required at law, Ernst & Young does not represent, warrant > and/or guarantee that the integrity of this communication has been > maintained nor that the communication is free of errors, virus, interception > or interference. > > Liability limited by a scheme approved under Professional Standards > Legislation. > -------------------- > > > If this communication is a "commercial electronic message" (as defined in > the Spam Act 2003) and you do not wish to receive communications such as > this, please forward this communication to unsubscribe at au.ey.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060326/c0cc9dcc/attachment.html From a.premkumar at gmail.com Mon Mar 27 08:53:49 2006 From: a.premkumar at gmail.com (Prem) Date: Mon, 27 Mar 2006 13:53:49 +0000 Subject: [Wtr-general] iFrames? Message-ID: Hi, May be this has been asked many times before, but is there any plans to support iFrames in Watir? I could find no such information on the Wiki/mail archive, hence this query to the list. I am unable to suggest Watir as the automation tool to my management as it currently doesn't support iFrames. -- - Prem -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060327/e7843bf8/attachment.html From rodrigo.martin at enratio.com Mon Mar 27 09:17:55 2006 From: rodrigo.martin at enratio.com (Rodrigo Julian Martin) Date: Mon, 27 Mar 2006 11:17:55 -0300 Subject: [Wtr-general] Programming a function for Recognizing and Storing Objects by Properties Message-ID: Hi, Chris McMahon, you wrote me: >> Ps: I'm working on a new method for finding objects accordly of their >> properties and values (passed as parameters) Someone is doing >> something similar? I'm studying the def show... of watir.rb, just as >> Chris McMahon suggest me... > Probably easiest just to use them: > C:\Documents and Settings\cmcmahon>irb > irb(main):001:0> require 'watir' > => true > irb(main):002:0> include Watir > => Object > irb(main):003:0> ie = IE.attach(:title, /Google/) ...................................................... > irb(main):007:0> ie.show_frames > there are 0 frames > => 0..-1 > irb(main):008:0> > ..................................... > irb(main):008:0> ie.show_forms > There are 1 forms > Form name: f > id: > method: get > action: /search > => 0..0 > irb(main):009:0> > ................................................ > irb(main):009:0> ie.show_images > image: name: > id: > src: > index: 1 > image: name: > id: > src: http://www.google.com/intl/en/images/logo.gif > index: 2 > => nil > irb(main):010:0> > .................................. > etc. etc. Thanks for the reply, but i don't get how can I use that commands for what I want to do. I will tell you exactly what I'm triying to do. With a script, I load data in a web in order to sign up a user. When I press the submit button, there are two possibilities: 1) All the data is correct. It show's me a confirmation page. or 2) Some data is incorrect. Dynamic Objects appears (named Item(...), where ... is an integer) with the classname: "error" and a "value" containing the error text. What i'm trying to do is to store all this dynamic objects into an object array, in order to analyze them and show some reports of their values. I was thinking that I could take the code of watir.rb, specifically from the def show_all_objects and start there. I'm a new user of watir and also of ruby, but I guess I could do it.. Maybe some of you guys have already done it or is in the way to... I'll post my code when it's done or in progress. Thanks in Advance! Rodrigo Julian Martin. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060327/32db3cba/attachment.html From christopher.mcmahon at gmail.com Mon Mar 27 09:40:43 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 27 Mar 2006 08:40:43 -0600 Subject: [Wtr-general] iFrames? In-Reply-To: References: Message-ID: <72799cd70603270640q24e35acctaacb6e41f95c108a@mail.gmail.com> > I am unable to suggest Watir as the automation tool to my management as it > currently doesn't support iFrames. Watir supports frames and iframes very nicely, and has for some time. Nearly 2 years, if I'm counting correctly. I suggest that you try it yourself. Look in the 'unittests' folders for code to handle frames and iframes. -Chris From browne.daniel at gmail.com Mon Mar 27 10:16:24 2006 From: browne.daniel at gmail.com (Daniel Browne) Date: Mon, 27 Mar 2006 16:16:24 +0100 Subject: [Wtr-general] Programming a function for Recognizing and Storing Objects by Properties In-Reply-To: References: Message-ID: <79518aef0603270716v2dad36a9td886cba0c2f98ff1@mail.gmail.com> Can you just use the "contains_text" or "match" (on the page or on the actual html using the "html" method) with a regular expression and extract text you want to be stored in the array? I'm pretty new to ruby and Watir so it might not be suitable for what you are doing. Cheers, Daniel. On 27/03/06, Rodrigo Julian Martin wrote: > > > > Hi, > > > > Chris McMahon, you wrote me: > > > > >> Ps: I'm working on a new method for finding objects accordly of their > > >> properties and values (passed as parameters) Someone is doing > > >> something similar? I'm studying the def show? of watir.rb, just as > > >> Chris McMahon suggest me? > > > > > Probably easiest just to use them: > > > > > C:\Documents and Settings\cmcmahon>irb > > > irb(main):001:0> require 'watir' > > > => true > > > irb(main):002:0> include Watir > > > => Object > > > irb(main):003:0> ie = IE.attach(:title, /Google/) > ...................................................... > > > irb(main):007:0> ie.show_frames > > > there are 0 frames > > > => 0..-1 > > > irb(main):008:0> > > > ..................................... > > > irb(main):008:0> ie.show_forms > > > There are 1 forms > > > Form name: f > > > id: > > > method: get > > > action: /search > > > => 0..0 > > > irb(main):009:0> > > > ................................................ > > > irb(main):009:0> ie.show_images > > > image: name: > > > id: > > > src: > > > index: 1 > > > image: name: > > > id: > > > src: > http://www.google.com/intl/en/images/logo.gif > > > index: 2 > > > => nil > > > irb(main):010:0> > > > .................................. > > > etc. etc. > > > > > > Thanks for the reply, but i don't get how can I use that commands for what I > want to do. > > > > I will tell you exactly what I'm triying to do. > > > > With a script, I load data in a web in order to sign up a user. When I press > the submit button, there are two possibilities: > > > > 1) All the data is correct. It show's me a confirmation page. > > > > or > > > > 2) Some data is incorrect. Dynamic Objects appears (named Item(...), where > ... is an integer) with the classname: "error" and > > > > a "value" containing the error text. > > > > What i'm trying to do is to store all this dynamic objects into an object > array, in order to analyze them and show some > > reports of their values. I was thinking that I could take the code of > watir.rb, specifically from the def show_all_objects and start there. > > I'm a new user of watir and also of ruby, but I guess I could do it.. Maybe > some of you guys have already done it or is in > > > > the way to... > > > > I'll post my code when it's done or in progress. > > > > Thanks in Advance! > > > > Rodrigo Julian Martin. > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > From a.premkumar at gmail.com Mon Mar 27 10:57:24 2006 From: a.premkumar at gmail.com (Prem) Date: Mon, 27 Mar 2006 15:57:24 +0000 Subject: [Wtr-general] iFrames? Message-ID: > > > I am unable to suggest Watir as the automation tool to my management as > it > > currently doesn't support iFrames. > > I suggest that you try it yourself. Look in the 'unittests' folders > for code to handle frames and iframes. > > -Chris > Thanks a ton for the inputs Chris. I went through the unit tests & tried to figure where I am going wrong. Then found that the iFrame in the page does not have a "name" value but do have an "id" value. HTML Document name= id=newworkdropdown src=/prweb/PRServlet?pyActivity=PegaSample.GetWorkPoolClass When I want to access the iFrame's objects like this : ie.frame(:id, 'newworkdropdown').show_all_objects Then I get an error like this: D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2375:in `locate': Unable to locate a frame with name newworkdropdown (Watir::Exception::UnknownFrameException) from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2384:in `initialize' from (eval):3:in `frame' from D:/pmo_wip/FTA/PRPC/open.rb:48 How can I over come this issue? I cannot change the code nor can the developers. It is a packaged tool (servlets based). Regards, Prem -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060327/821f1680/attachment.html From tester.paul at gmail.com Mon Mar 27 11:18:54 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Mon, 27 Mar 2006 11:18:54 -0500 Subject: [Wtr-general] iFrames? In-Reply-To: References: Message-ID: <37c405480603270818l68199af8rcb4ad0bb87bb2f84@mail.gmail.com> Hi Prem, can you reference the iFrame using it's *index* number instead? It's not as pretty as using a name or id, but it should work. ' ie.show_frames' should show you the index numbers for each of the frames and iframes on a page. Paul. On 27/03/06, Prem wrote: > > When I want to access the iFrame's objects like this : > ie.frame(:id, 'newworkdropdown').show_all_objects > > Then I get an error like this: > [snip] How can I over come this issue? I cannot change the code nor can the > developers. It is a packaged tool (servlets based). > > Regards, > Prem > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060327/db906195/attachment.html From marcus.tettmar at gmail.com Mon Mar 27 11:20:43 2006 From: marcus.tettmar at gmail.com (Marcus Tettmar) Date: Mon, 27 Mar 2006 17:20:43 +0100 Subject: [Wtr-general] iFrames? In-Reply-To: References: Message-ID: On 3/27/06, Prem wrote: > > When I want to access the iFrame's objects like this : > ie.frame(:id, 'newworkdropdown').show_all_objects > > How can I over come this issue? I cannot change the code nor can the > developers. It is a packaged tool (servlets based). > You could use the index of the frame instead: ie.frame(:index, 1).show_all_objects -- Marcus Tettmar http://www.mjtnet.com/ Macro Scheduler & WebRecorder for Windows & Web Automation and Testing. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060327/13a797c4/attachment.html From christopher.mcmahon at gmail.com Mon Mar 27 11:23:55 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 27 Mar 2006 10:23:55 -0600 Subject: [Wtr-general] (frames by id?) Re: iFrames? Message-ID: <72799cd70603270823gdf276cbs4214f2b6baf27bcd@mail.gmail.com> > Then found that the iFrame in the page does not have a "name" value but do > have an "id" value. > HTML Document name= id=newworkdropdown > src=/prweb/PRServlet?pyActivity= > PegaSample.GetWorkPoolClass You can also read C:\watir\watir.rb. In there you'll find # Typical usage: # # ie.frame(:index, 1) # ie.frame(:name , 'main_frame') # ie.frame('main_frame') # in this case, just a name is supplied so it looks like right now you can't get to a frame by "id", but you *can* get there by index. Maybe that will do the job for you. Alternatively, get your developers to put a name on their frame. In the meantime, you might try to talk someone on the list into adding frame access by id (Paul?) or tackle it yourself. -Chris From a.premkumar at gmail.com Mon Mar 27 11:50:37 2006 From: a.premkumar at gmail.com (Prem) Date: Mon, 27 Mar 2006 16:50:37 +0000 Subject: [Wtr-general] iFrames? In-Reply-To: References: Message-ID: On 3/27/06, Prem wrote: > > > Then found that the iFrame in the page does not have a "name" value but do > have an "id" value. > HTML Document name= id=newworkdropdown > src=/prweb/PRServlet?pyActivity= PegaSample.GetWorkPoolClass > > When I want to access the iFrame's objects like this : > ie.frame(:id, 'newworkdropdown').show_all_objects > > Then I get an error like this: > D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2375:in `locate': Unable to locate > a frame with name newworkdropdown (Watir::Exception::UnknownFrameException) > > from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2384:in `initialize' > from (eval):3:in `frame' > from D:/pmo_wip/FTA/PRPC/open.rb:48 > > How can I over come this issue? I cannot change the code nor can the > developers. It is a packaged tool (servlets based). > I am sorry, I reported a wrong message. My code looks like this: assert($ie.frame(:id, "leftFrameId").frame(:id, 'newworkdropdown').exists?) And the error message I get is like this: NoMethodError: undefined method `invoke' for nil:NilClass D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2366:in `locate' D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2350:in `locate' D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2384:in `initialize' (eval):3:in `frame' D:/pmo_wip/FTA/PRPC/open.rb:59:in `test_get_iframe' Is this an iFrames related issue in Watir or am I doing things the wrong way? Regards, Prem -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060327/589cd827/attachment.html From bret at pettichord.com Mon Mar 27 12:04:13 2006 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 27 Mar 2006 11:04:13 -0600 Subject: [Wtr-general] (frames by id?) Re: iFrames? In-Reply-To: <72799cd70603270823gdf276cbs4214f2b6baf27bcd@mail.gmail.com> References: <72799cd70603270823gdf276cbs4214f2b6baf27bcd@mail.gmail.com> Message-ID: We actually do currently support :id for frames, but not for iframes. This is in the development code base. Sadly, much of that inline documentation (aka rdoc) is out of date. Bret On 3/27/06, Chris McMahon wrote: > > > Then found that the iFrame in the page does not have a "name" value but > do > > have an "id" value. > > HTML Document name= id=newworkdropdown > > src=/prweb/PRServlet?pyActivity= > > PegaSample.GetWorkPoolClass > > You can also read C:\watir\watir.rb. In there you'll find > > # Typical usage: > # > # ie.frame(:index, 1) > # ie.frame(:name , 'main_frame') > # ie.frame('main_frame') # in this case, just a name > is supplied > > so it looks like right now you can't get to a frame by "id", but you > *can* get there by index. Maybe that will do the job for you. > Alternatively, get your developers to put a name on their frame. > > In the meantime, you might try to talk someone on the list into adding > frame access by id (Paul?) or tackle it yourself. > > -Chris > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060327/89fb81f0/attachment.html From bret at pettichord.com Mon Mar 27 12:06:23 2006 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 27 Mar 2006 11:06:23 -0600 Subject: [Wtr-general] iFrames? In-Reply-To: References: Message-ID: Watir does not currently support finding iframes by id. You can't change the code, but you could change Watir to make this work. Bret On 3/27/06, Prem wrote: > > On 3/27/06, Prem wrote: > > > > > Then found that the iFrame in the page does not have a "name" value but > > do have an "id" value. > > HTML Document name= id=newworkdropdown > > src=/prweb/PRServlet?pyActivity= PegaSample.GetWorkPoolClass > > > > When I want to access the iFrame's objects like this : > > ie.frame(:id, 'newworkdropdown').show_all_objects > > > > Then I get an error like this: > > D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2375:in `locate': Unable to > > locate a frame with name newworkdropdown > > (Watir::Exception::UnknownFrameException) > > from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2384:in `initialize' > > from (eval):3:in `frame' > > from D:/pmo_wip/FTA/PRPC/open.rb:48 > > > > How can I over come this issue? I cannot change the code nor can the > > developers. It is a packaged tool (servlets based). > > > > I am sorry, I reported a wrong message. My code looks like this: > assert($ie.frame(:id, "leftFrameId").frame(:id, > 'newworkdropdown').exists?) > And the error message I get is like this: > NoMethodError: undefined method `invoke' for nil:NilClass > D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2366:in `locate' > D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2350:in `locate' > > D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2384:in `initialize' > (eval):3:in `frame' > D:/pmo_wip/FTA/PRPC/open.rb:59:in `test_get_iframe' > > Is this an iFrames related issue in Watir or am I doing things the wrong > way? > > Regards, > Prem > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060327/c6822620/attachment.html From kevin.jackson at it.fts-vn.com Mon Mar 27 22:27:41 2006 From: kevin.jackson at it.fts-vn.com (Kev Jackson) Date: Tue, 28 Mar 2006 10:27:41 +0700 Subject: [Wtr-general] possible bug / Shift_jis encoding error Message-ID: <4428AD2D.6090501@it.fts-vn.com> Hi, I think that there may be a bug in Watir with respect to how it handles character encodings. I have a fairly simple test and a test data file (in yml format). In my data file, I have a Shift_jis encoded character sequence (I don't read japanese, so I have no idea what it says!). I set my encoding in the script using the jcode library. When printing to the console (cmd on XP2), I get the correct string of characters, however when I use the text_field.set method, the characters enetered in the text field in IE are mangeled, they look like UTf8 or perhaps CP932, again I'm not a real expert on this. I've had a fiddle with Iconv to see if I can reproduce the same encoding on the command line, but I can't reproduce (I can mangle the characters, but not the same output as I'm experiencing in IE). I can manually copy/paste the data into IE and it's perfectly fine, so it's definitely something to do with how watir is handling the data I'm passing in to text_field.set Thanks Kev From kevin.jackson at it.fts-vn.com Mon Mar 27 23:11:57 2006 From: kevin.jackson at it.fts-vn.com (Kev Jackson) Date: Tue, 28 Mar 2006 11:11:57 +0700 Subject: [Wtr-general] possible bug / Shift_jis encoding error In-Reply-To: <4428AD2D.6090501@it.fts-vn.com> References: <4428AD2D.6090501@it.fts-vn.com> Message-ID: <4428B78D.8000905@it.fts-vn.com> I've discovered that there is a difference between set and value= for text_fields @@ie.text_field(:id, @test_data['pg_401']['address_1_field']).set(@test_data['pg_401']['address_1']) This breaks the encoding of the data read from @test_data @@ie.text_field(:id, @test_data['pg_401']['address_1_field']).value=@test_data['pg_401']['address_1'] This preserves the encoding of the data So my workaround to resolve this is to use value= whenever I have shift_jis encoded data and set when I have ascii data. Just FYI Thanks Kev From Leon.Ouretski at au.ey.com Mon Mar 27 23:33:34 2006 From: Leon.Ouretski at au.ey.com (Leon.Ouretski at au.ey.com) Date: Tue, 28 Mar 2006 14:33:34 +1000 Subject: [Wtr-general] Right-click menu. Message-ID: This email is to be read subject to the disclaimer below. Hello guys, I imagine this question has been ask a number of times, but I couldn't find any clear references on the Web, so... How do I automate a click in a context menu (ie. right-click on a page and click on a menu item)? thank you very much. Best Regards Leon -------------------- NOTICE - This communication contains information which is confidential and the copyright of Ernst & Young or a third party. If you are not the intended recipient of this communication please delete and destroy all copies and telephone Ernst & Young on 1800 655 717 immediately. If you are the intended recipient of this communication you should not copy, disclose or distribute this communication without the authority of Ernst & Young. Any views expressed in this Communication are those of the individual sender, except where the sender specifically states them to be the views of Ernst & Young. Except as required at law, Ernst & Young does not represent, warrant and/or guarantee that the integrity of this communication has been maintained nor that the communication is free of errors, virus, interception or interference. Liability limited by a scheme approved under Professional Standards Legislation. -------------------- If this communication is a "commercial electronic message" (as defined in the Spam Act 2003) and you do not wish to receive communications such as this, please forward this communication to unsubscribe at au.ey.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060328/9a826043/attachment.html From manishs at reconnex.net Mon Mar 27 23:37:44 2006 From: manishs at reconnex.net (Manish Sapariya) Date: Mon, 27 Mar 2006 20:37:44 -0800 Subject: [Wtr-general] running ruby developement branch code when 1.4.1 is also installed Message-ID: <4428BD98.5040601@reconnex.net> There was thread but I cant find it in archives... Could somebody please tell me how do I run code checkout from SVN.... I am not sure what Path varibale i need to change... Thanks, Manish From christopher.mcmahon at gmail.com Mon Mar 27 23:38:52 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 27 Mar 2006 22:38:52 -0600 Subject: [Wtr-general] [OT] me vs. SOAP + Basic Authentication in Ruby Message-ID: <72799cd70603272038o42f71b71ta872635755720082@mail.gmail.com> Not really Watir, but but definitely web-related: if you ever need to poke at some web services in SOAP, I made a little blog entry: http://chrismcmahonsblog.blogspot.com/ One of the most interesting things about this exercise was seeing how primitive Ruby is in this area as compared to Perl (despite what the Pickaxe says). It was painless in Perl, it was highly frustrating in Ruby. If Ruby didn't have so much other Tester Kidz Goodness, I would have been tempted to backslide. :) -Chris From manishs at reconnex.net Mon Mar 27 23:40:25 2006 From: manishs at reconnex.net (Manish Sapariya) Date: Mon, 27 Mar 2006 20:40:25 -0800 Subject: [Wtr-general] running watir developement branch code when 1.4.1 is also installed In-Reply-To: <4428BD98.5040601@reconnex.net> References: <4428BD98.5040601@reconnex.net> Message-ID: <4428BE39.5060905@reconnex.net> Ooops...Subject was wrong.... :-) Thanks, Manish Manish Sapariya wrote: > There was thread but I cant find it in archives... > Could somebody please tell me how do I run code checkout > from SVN.... > I am not sure what Path varibale i need to change... > > Thanks, > Manish > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From zeljko.filipin at gmail.com Tue Mar 28 02:18:25 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 28 Mar 2006 09:18:25 +0200 Subject: [Wtr-general] possible bug / Shift_jis encoding error In-Reply-To: <4428B78D.8000905@it.fts-vn.com> References: <4428AD2D.6090501@it.fts-vn.com> <4428B78D.8000905@it.fts-vn.com> Message-ID: Maybe this would help. http://www.mail-archive.com/wtr-general at rubyforge.org/msg02811.html -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060328/851aaee2/attachment.html From zeljko.filipin at gmail.com Tue Mar 28 02:22:12 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 28 Mar 2006 09:22:12 +0200 Subject: [Wtr-general] Right-click menu. In-Reply-To: References: Message-ID: Maybe this would help. http://wiki.openqa.org/display/WTR/FAQ#FAQ-TriggeringJavaScriptevents On 3/28/06, Leon.Ouretski at au.ey.com wrote: > > This email is to be read subject to the disclaimer below. > > > Hello guys, > > I imagine this question has been ask a number of times, but I couldn't > find any clear references on the Web, so... > > How do I automate a click in a context menu (ie. right-click on a page and > click on a menu item)? > > thank you very much. > > Best Regards > > Leon > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060328/16475f6a/attachment.html From zeljko.filipin at gmail.com Tue Mar 28 02:24:47 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 28 Mar 2006 09:24:47 +0200 Subject: [Wtr-general] running ruby developement branch code when 1.4.1 is also installed In-Reply-To: <4428BD98.5040601@reconnex.net> References: <4428BD98.5040601@reconnex.net> Message-ID: Visit http://openqa.org/watir/cvs.action On 3/28/06, Manish Sapariya wrote: > > There was thread but I cant find it in archives... > Could somebody please tell me how do I run code checkout > from SVN.... > I am not sure what Path varibale i need to change... > > Thanks, > Manish -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060328/8b162f21/attachment.html From zeljko.filipin at gmail.com Tue Mar 28 02:26:48 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 28 Mar 2006 09:26:48 +0200 Subject: [Wtr-general] running watir developement branch code when 1.4.1 is also installed In-Reply-To: <4428BE39.5060905@reconnex.net> References: <4428BD98.5040601@reconnex.net> <4428BE39.5060905@reconnex.net> Message-ID: But the answer is the same. :) Visit http://openqa.org/watir/cvs.action On 3/28/06, Manish Sapariya wrote: > > Ooops...Subject was wrong.... > :-) > Thanks, > Manish > > Manish Sapariya wrote: > > There was thread but I cant find it in archives... > > Could somebody please tell me how do I run code checkout > > from SVN.... > > I am not sure what Path varibale i need to change... -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060328/b1df6986/attachment.html From katy246 at gmail.com Tue Mar 28 04:58:33 2006 From: katy246 at gmail.com (Katy ) Date: Tue, 28 Mar 2006 11:58:33 +0200 Subject: [Wtr-general] How to run Watir in Cygwin or Windows Command window [=not in fxri] ? Message-ID: I've got Ruby and Watir installed,Ruby seems to be recognized in Cygwin as following : $ruby -v ruby 1.8.4 (2005-12-24) [i386-cygwin] When trying to run irb however ,i receive a '/usr/bin/ruby :no such file to load --- ubygems (LoadError)' When running irb in command window the following is received when running 'require 'watir'" irb(main):001:0> require 'watir' LoadError: No such file to load -- watir from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re quire__' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re quire' from (irb):1 irb(main):002:0> I've searched the mailing list for info on this subject and only found some reference to the win32ole-0.5.2 in regards to Watir ... Would appreciate any help on this - I'd rather use Cygwin than windows commandline,but any one of them will do as an non-fxri option. -- Katy -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060328/620d1028/attachment.html From eduardorochabr at gmail.com Tue Mar 28 08:35:28 2006 From: eduardorochabr at gmail.com (Eduardo Rocha) Date: Tue, 28 Mar 2006 10:35:28 -0300 Subject: [Wtr-general] How to run Watir in Cygwin or Windows Command window [=not in fxri] ? In-Reply-To: References: Message-ID: I use Watir with Cygwin successfully, but my setup may differs from yours. I found out that using Ruby installation for Windows works best than the Ruby which can be installed via Cygwin. So my Ruby instalation is at directory d:\ruby\ruby-1.8.4-16, which becomes /cygdrive/d/ruby/ruby-1.8.4-16 for Cygwin. I think Ruby 1.8.2 there were some problems with the .cmd extension, but 1.8.4 version replaces then for .bat extensions and I don't think I need to create alias like this anymore ~/.bashrc: alias irb='irb.bat' alias ri='ri.bat' etc.... As for executing a Ruby script directly I give up, so instead of trying "$ ./my_script.rb" I always write "$ ruby ./my_script.rb". Was that helpful? Good luck! 2006/3/28, Katy : > I've got Ruby and Watir installed,Ruby seems to be recognized in Cygwin as > following : > > $ruby -v > ruby 1.8.4 (2005-12-24) [i386-cygwin] > > When trying to run irb however ,i receive a '/usr/bin/ruby :no such file to > load --- ubygems (LoadError)' > When running irb in command window the following is received when running > 'require 'watir'" > > irb(main):001:0> require 'watir' > LoadError: No such file to load -- watir > from > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in > `re > quire__' > from > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in > `re > quire' > from (irb):1 > irb(main):002:0> > > I've searched the mailing list for info on this subject and only found some > reference to the win32ole-0.5.2 in regards to Watir ... > > Would appreciate any help on this - I'd rather use Cygwin than windows > commandline,but any one of them will do as an non-fxri option. > > -- > Katy > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > From rodrigo.martin at enratio.com Tue Mar 28 11:02:17 2006 From: rodrigo.martin at enratio.com (Rodrigo Julian Martin) Date: Tue, 28 Mar 2006 13:02:17 -0300 Subject: [Wtr-general] [FIREWATIR] Specifying which browser will be used? Message-ID: Hi all! I'm starting the development of a script for a WebPage. This Unit Test should run in Explorer and also in Internet Explorer. I'm running FireWatir, and I have a question: 1) How should I specify wheter a script will be run against Firefox or Internet Explorer? If I'm not wrong, in order to run a script for Firefox, you should run the browser manually with the "-jssh" parameter. If you start an instance of Internet Explorer by code, FireWatir asumes that is for Internet Explorer? Sorry, i'm a little confused as you can see.. Thanks in Advance! Regards Rodrigo Julian Martin. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060328/384feddd/attachment.html From Sean.Gallagher at ticketmaster.com Tue Mar 28 11:43:54 2006 From: Sean.Gallagher at ticketmaster.com (Sean Gallagher) Date: Tue, 28 Mar 2006 08:43:54 -0800 Subject: [Wtr-general] How to run Watir in Cygwin or Windows Command w indow [=not in fxri] ? Message-ID: <71D28C8451BFD5119B2B00508BE26E640C9F4DBB@pasmail3.office.tmcs> Search Google for "--- ubygems (LoadError". There are many posts about this problem. Unset RUBYOPT. > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Katy > Sent: Tuesday, March 28, 2006 1:59 AM > To: wtr-general at rubyforge.org > Subject: [Wtr-general] How to run Watir in Cygwin or Windows > Command window [=not in fxri] ? > > I've got Ruby and Watir installed,Ruby seems to be recognized > in Cygwin as following : > > $ruby -v > ruby 1.8.4 (2005-12-24) [i386-cygwin] > > When trying to run irb however ,i receive a '/usr/bin/ruby > :no such file to load --- ubygems (LoadError)' > When running irb in command window the following is received > when running 'require 'watir'" > > irb(main):001:0> require 'watir' > LoadError: No such file to load -- watir > from > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re > quire__' > from > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re > quire' > from (irb):1 > irb(main):002:0> > > I've searched the mailing list for info on this subject and > only found some reference to the win32ole-0.5.2 in regards > to Watir ... > > Would appreciate any help on this - I'd rather use Cygwin > than windows commandline,but any one of them will do as an > non-fxri option. > > -- > Katy > From Sean.Gallagher at ticketmaster.com Tue Mar 28 11:59:43 2006 From: Sean.Gallagher at ticketmaster.com (Sean Gallagher) Date: Tue, 28 Mar 2006 08:59:43 -0800 Subject: [Wtr-general] Send results to console and text file Message-ID: <71D28C8451BFD5119B2B00508BE26E640C9F4DFC@pasmail3.office.tmcs> > > Using cygwin, this will give you what you want: > function1.rb | tee results.txt You can also use tee.exe from the Windows command line. Check out: GNU utilities for Win32 http://unxutils.sourceforge.net/ Simply unzip and add usr\local\wbin to your path. Sean -- http://testmethods.net/ From angrez at gmail.com Tue Mar 28 12:04:26 2006 From: angrez at gmail.com (Angrez Singh) Date: Tue, 28 Mar 2006 22:34:26 +0530 Subject: [Wtr-general] [FIREWATIR] Specifying which browser will be used? In-Reply-To: References: Message-ID: Hi, You need to create new instance of Firefox instead of IE. For e.g: If your script is like this: ie = IE.new ie.goto("http://google.com/") Corresponding script for Firefox will look like: browser = Firefox.new #You need to create new Firefox instance. Rest will remain same. browser.goto("http://google.com") Regards, Angrez On 3/28/06, Rodrigo Julian Martin wrote: > > Hi all! > > > > I'm starting the development of a script for a WebPage. This Unit Test > should run in Explorer and also in Internet Explorer. > > > > I'm running FireWatir, and I have a question: > > > > 1) How should I specify wheter a script will be run against Firefox or > Internet Explorer? If I'm not wrong, in order to > > run a script for Firefox, you should run the browser manually with the > "-jssh" parameter. If you start an instance of > > Internet Explorer by code, FireWatir asumes that is for Internet Explorer? > > > > > Sorry, i'm a little confused as you can see.. > > > > > > Thanks in Advance! > > Regards > > > > > > Rodrigo Julian Martin. > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060328/954e984d/attachment.html From bret at pettichord.com Tue Mar 28 13:48:06 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 28 Mar 2006 12:48:06 -0600 Subject: [Wtr-general] running watir developement branch code when 1.4.1 is also installed In-Reply-To: References: <4428BD98.5040601@reconnex.net> <4428BE39.5060905@reconnex.net> Message-ID: Also see http://wiki.openqa.org/display/WTR/Development+Builds On 3/28/06, Zeljko Filipin wrote: > > But the answer is the same. :) > > Visit http://openqa.org/watir/cvs.action > > > On 3/28/06, Manish Sapariya wrote: > > > > Ooops...Subject was wrong.... > > :-) > > Thanks, > > Manish > > > > Manish Sapariya wrote: > > > There was thread but I cant find it in archives... > > > Could somebody please tell me how do I run code checkout > > > from SVN.... > > > I am not sure what Path varibale i need to change... > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060328/8ac8d1d5/attachment.html From bret at pettichord.com Tue Mar 28 13:49:45 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 28 Mar 2006 12:49:45 -0600 Subject: [Wtr-general] [OT] me vs. SOAP + Basic Authentication in Ruby In-Reply-To: <72799cd70603272038o42f71b71ta872635755720082@mail.gmail.com> References: <72799cd70603272038o42f71b71ta872635755720082@mail.gmail.com> Message-ID: Let Marick know. He is the president of the Ruby for Testing club. On 3/27/06, Chris McMahon wrote: > > Not really Watir, but but definitely web-related: if you ever need to > poke at some web services in SOAP, I made a little blog entry: > http://chrismcmahonsblog.blogspot.com/ > > One of the most interesting things about this exercise was seeing how > primitive Ruby is in this area as compared to Perl (despite what the > Pickaxe says). It was painless in Perl, it was highly frustrating in > Ruby. If Ruby didn't have so much other Tester Kidz Goodness, I would > have been tempted to backslide. :) > > -Chris > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060328/7e09839c/attachment.html From rodrigo.martin at enratio.com Tue Mar 28 14:14:48 2006 From: rodrigo.martin at enratio.com (Rodrigo Julian Martin) Date: Tue, 28 Mar 2006 16:14:48 -0300 Subject: [Wtr-general] [FIREWATIR] Specifying which browser will be used? Message-ID: Hi Angrez, thanks for the quick reply! I've tried the code: require 'watir' browser = Firefox.new #You need to create new Firefox instance. Rest will remain same. browser.goto("http://google.com") and when I run it, this was the output: Untitled.rb:2: uninitialized constant Firefox (NameError) Execution completed with exit code 1. I've installed FireWatir and run all the mozilla_unittests correctly. Am I doing something wrong? Also, there's one thing I don't get it... With the mozilla_unittests, you should start Firefox Manually with the parameter "-jssh". With this code you gave me, is no more necessary to do that? Thanks for your patience and help Regards Rodrigo Julian Martin ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Angrez Singh Sent: Martes, 28 de Marzo de 2006 02:04 p.m. To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] [FIREWATIR] Specifying which browser will be used? Hi, You need to create new instance of Firefox instead of IE. For e.g: If your script is like this: ie = IE.new ie.goto("http://google.com/") Corresponding script for Firefox will look like: browser = Firefox.new #You need to create new Firefox instance. Rest will remain same. browser.goto("http://google.com") Regards, Angrez On 3/28/06, Rodrigo Julian Martin wrote: Hi all! I'm starting the development of a script for a WebPage. This Unit Test should run in Explorer and also in Internet Explorer. I'm running FireWatir, and I have a question: 1) How should I specify wheter a script will be run against Firefox or Internet Explorer? If I'm not wrong, in order to run a script for Firefox, you should run the browser manually with the "-jssh" parameter. If you start an instance of Internet Explorer by code, FireWatir asumes that is for Internet Explorer? Sorry, i'm a little confused as you can see.. Thanks in Advance! Regards Rodrigo Julian Martin. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060328/db62d122/attachment.html From rodrigo.martin at enratio.com Tue Mar 28 15:40:25 2006 From: rodrigo.martin at enratio.com (Rodrigo Julian Martin) Date: Tue, 28 Mar 2006 17:40:25 -0300 Subject: [Wtr-general] Question About Global Variables between ruby files Message-ID: Hi all, I've another question... Is there a way to share variables between several .rb files which are loaded as a Test Suite? e.g. An array which is loaded in test1.rb and that I want to use in test2.rb. Thanks in Advance! Rodrigo Julian Martin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060328/397ac0cb/attachment.html From phanideepam at yahoo.com Tue Mar 28 18:27:52 2006 From: phanideepam at yahoo.com (Deepa Mallapareddy) Date: Tue, 28 Mar 2006 15:27:52 -0800 (PST) Subject: [Wtr-general] Question About Global Variables between ruby files In-Reply-To: Message-ID: <20060328232752.92707.qmail@web50915.mail.yahoo.com> Hi Rodrigo, Yes you can. I havent treid for an array but am sure you can. I have used global variable with '$' in front of the variable and then use it in other ruby files. I have declared this in the set up file. For example $Yahoolink="www.yahoo.com" and I can use "$Yahoolink" in other ruby files Thanks! Deepa Rodrigo Julian Martin wrote: Hi all, I?ve another question Is there a way to share variables between several .rb files which are loaded as a Test Suite? e.g. An array which is loaded in test1.rb and that I want to use in test2.rb. Thanks in Advance! Rodrigo Julian Martin _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general Whatever you can do or dream you can, begin it. Boldness has genius, power, and magic in it. --Johann Wolfgang von Goethe ------------------------------------------------------------------------ Deepa Mallapareddy, 4981,Catoctin Drive, Apt#15,San Diego CA - 92115 --------------------------------- New Yahoo! Messenger with Voice. Call regular phones from your PC and save big. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060328/66212fd7/attachment.html From bret at pettichord.com Tue Mar 28 19:17:34 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 28 Mar 2006 18:17:34 -0600 Subject: [Wtr-general] [FIREWATIR] Specifying which browser will be used? In-Reply-To: References: Message-ID: Try this browser = Watir::Firefox.new Bret On 3/28/06, Rodrigo Julian Martin wrote: > > Hi Angrez, thanks for the quick reply! > > > > I've tried the code: > > > > require 'watir' > > browser = Firefox.new #You need to create new Firefox instance. Rest > will remain same. > > browser.goto("http://google.com") > > > > and when I run it, this was the output: > > > > Untitled.rb:2: uninitialized constant Firefox (NameError) > > Execution completed with exit code 1. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060328/b6933c66/attachment.html From bret at pettichord.com Tue Mar 28 19:20:22 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 28 Mar 2006 18:20:22 -0600 Subject: [Wtr-general] Question About Global Variables between ruby files In-Reply-To: References: Message-ID: You could store them in global variables. The tricky part is making sure that the execute in the order you want them to. The standard Test::Unit framework puts together test suites in a somewhat random order. This is by design, because unit tests should be independent of each other and not depend on order. Since you want to break with this convention, you should construct your own test suite rather than depend on the default methods. Bret On 3/28/06, Rodrigo Julian Martin wrote: > > Hi all, > > > > I've another question? Is there a way to share variables between several > .rb files which are loaded as a Test Suite? e.g. An array which is loaded > in test1.rb and that I want to use in test2.rb. > > > > Thanks in Advance! > > Rodrigo Julian Martin > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060328/7761c4be/attachment.html From padhs2k at gmail.com Tue Mar 28 20:06:04 2006 From: padhs2k at gmail.com (Padhma N) Date: Tue, 28 Mar 2006 17:06:04 -0800 Subject: [Wtr-general] Send results to console and text file Message-ID: <38c139080603281706o4f492df2i29637845aecab955@mail.gmail.com> Hi All, Thanks to all who replied patiently to my question! Like Sean suggested, teeing works, but I did not want to make cygwin a mandatory requirement to log the results. Instead I am using the logger.logfunction.. I think it should solve my requirement of seeing the results in both console and text file. Please correct me if I am wrong. Also, I was wondering whether it is possible to get rid of the word 'log' being seen on the console when I use logger.log function. Can someone please let me know? Thanks, Padhma -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060328/81dec7c0/attachment.html From ravishan at BIWORLDWIDE.com Tue Mar 28 23:17:47 2006 From: ravishan at BIWORLDWIDE.com (Ravishankar, MG) Date: Tue, 28 Mar 2006 22:17:47 -0600 Subject: [Wtr-general] Using Watir with javascript HTML-editor (textarea)? Message-ID: <03CAD54D1DFAE5488B6C53178EF9EA3C051BBC82@EXCHANGE1.biperf.com> Hi: I am facing the exact same issue as detailed below. Just wondering if any of you resolved it already. Meantime, I am going to explore the suggestion given by Bret and will post if I get somewhere. Thanks, Ravi --------------------------------------------------------------------------------------------------------------------------------------- === from a post dt. 08/23/2005 === It looks like you have the right object, but it has been heavily customized -- as you know. You're probably going to have rewrite the TextField class to support this control. Fundamentally that means doing ie.text_field(:id, /elm1/).getObject.ole_methods to see what methods are supported and then using trial and error and MS doc to figure out which will help you do what you want... I'd start by removing the focus call. Bret At 12:36 AM 8/23/2005, Thomas ?hrbom wrote: >Hi! >I'm still struggling with this problem so I'm going to try this mailing >list once more. Sorry about the repeat... > >Our main product uses a javascript HTML-editor (much like TinyMCE[1]) to >let the user create documents to be published. > >So far I've not managed to in any way to interact with this HTML-editor >using Watir. Neither manipulating text in the textarea nor accessing the >toolbar buttons works. When trying to input text in the textarea I >always get an error like this: > > irb(main):026:0> ie.text_field(:id, /elm1/).set("Test") > WIN32OLERuntimeError: focus > OLE error code:800A083E in htmlfile > Can't move focus to the control because it is invisible, not > enabled, or of a type that does not accept the focus. > HRESULT error code:0x80020009 > Exception occurred. > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3399:in > method_missing' > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3399:in `set' > from (irb):26 > from :0 > >I realize I might be trying to access the wrong object here, but I've >tried others with no luck. I've also tried using name instead of id. > >If anyone can help me sorting out this problem that would be greatly >appreciated. > > >[1] TinyMCE is a platform independent web based Javascript HTML WYSIWYG > editor control released as Open Source under LGPL by Moxiecode > Systems AB. It has the ability to convert HTML TEXTAREA fields or > other HTML elements to editor instances. > http://tinymce.moxiecode.com/example_full.php?example=true > >Kind regards, >-- >Thomas Ohrbom This e-mail message is being sent solely for use by the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by phone or reply by e-mail, delete the original message and destroy all copies. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060328/328c4f76/attachment.html From rodrigo.martin at enratio.com Wed Mar 29 07:54:57 2006 From: rodrigo.martin at enratio.com (Rodrigo Julian Martin) Date: Wed, 29 Mar 2006 09:54:57 -0300 Subject: [Wtr-general] Question About Global Variables between ruby files Message-ID: Thanks Deepa and Brett! As you said, I will have to construct my own test suite, based on a Main program which will call the other tests as functions. Regards! Rodrigo Julian Martin ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Martes, 28 de Marzo de 2006 09:20 p.m. To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Question About Global Variables between ruby files You could store them in global variables. The tricky part is making sure that the execute in the order you want them to. The standard Test::Unit framework puts together test suites in a somewhat random order. This is by design, because unit tests should be independent of each other and not depend on order. Since you want to break with this convention, you should construct your own test suite rather than depend on the default methods. Bret On 3/28/06, Rodrigo Julian Martin wrote: Hi all, I've another question... Is there a way to share variables between several .rb files which are loaded as a Test Suite? e.g. An array which is loaded in test1.rb and that I want to use in test2.rb. Thanks in Advance! Rodrigo Julian Martin _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060329/02778073/attachment.html From rodrigo.martin at enratio.com Wed Mar 29 07:56:54 2006 From: rodrigo.martin at enratio.com (Rodrigo Julian Martin) Date: Wed, 29 Mar 2006 09:56:54 -0300 Subject: [Wtr-general] [FIREWATIR] Specifying which browser will be used? Message-ID: Thanks Bret! I've tried the code: require 'watir' browser = Watir::Firefox.new browser.goto("http://google.com") And the output was: c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1263:in `initialize': No connection could be made because the target machine actively refused it. - connect(2) (Errno::ECONNREFUSED) from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1263:in `new' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1263:in `initialize' from Untitled.rb:2:in `new' from Untitled.rb:2 Execution completed with exit code 1. Any help will be really appreciated, thanks in advance! I guess this has something to do with the -jssh parameter, Am I Wrong? Regards Rodrigo Julian Martin ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Martes, 28 de Marzo de 2006 09:18 p.m. To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] [FIREWATIR] Specifying which browser will be used? Try this browser = Watir::Firefox.new Bret On 3/28/06, Rodrigo Julian Martin wrote: Hi Angrez, thanks for the quick reply! I've tried the code: require 'watir' browser = Firefox.new #You need to create new Firefox instance. Rest will remain same. browser.goto(" http://google.com ") and when I run it, this was the output: Untitled.rb:2: uninitialized constant Firefox (NameError) Execution completed with exit code 1. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060329/6b9d55cd/attachment.html From hmh_74 at yahoo.com Wed Mar 29 08:29:08 2006 From: hmh_74 at yahoo.com (hassan mohammed hashem) Date: Wed, 29 Mar 2006 05:29:08 -0800 (PST) Subject: [Wtr-general] (no subject) Message-ID: <20060329132908.66695.qmail@web31205.mail.mud.yahoo.com> how can i access button from " Form " opened in the same frame --------------------------------- Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060329/f289bc36/attachment.html From zeljko.filipin at gmail.com Wed Mar 29 09:20:08 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 29 Mar 2006 16:20:08 +0200 Subject: [Wtr-general] (no subject) In-Reply-To: <20060329132908.66695.qmail@web31205.mail.mud.yahoo.com> References: <20060329132908.66695.qmail@web31205.mail.mud.yahoo.com> Message-ID: You want to click a button that is inside a form that is inside a frame? You will have to be more precise if you want somebody to help you. A piece of your html would help. More info is here http://wtr.rubyforge.org/watir_user_guide.html On 3/29/06, hassan mohammed hashem wrote: > > how can i access button from " Form " opened in the same frame > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060329/5e84f1df/attachment.html From pjablonski at hotmail.com Wed Mar 29 10:05:59 2006 From: pjablonski at hotmail.com (Peter Jablonski) Date: Wed, 29 Mar 2006 10:05:59 -0500 Subject: [Wtr-general] Unable to checkout Fire Watir Message-ID: I've been trying to check out Fire Watir via SVN from http://svn.openqa.org/svn/watir/trunk and keep getting the following error: Error: REPORT request failed on '/svn/watir/!svn/vcc/default' Error: REPORT of '/svn/watir/!svn/vcc/default': 400 Bad Request (http://svn.openqa.org) Can someone tell me why this is happening? I'm new to this so bear with me on these seemingly simple questions. Thanks in advance. Pete -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060329/887393c3/attachment.html From zeljko.filipin at gmail.com Wed Mar 29 10:39:07 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 29 Mar 2006 17:39:07 +0200 Subject: [Wtr-general] Unable to checkout Fire Watir In-Reply-To: References: Message-ID: Firewatir is here http://svn.openqa.org/svn/watir/branches/firefox On 3/29/06, Peter Jablonski wrote: > > I've been trying to check out Fire Watir via SVN from > http://svn.openqa.org/svn/watir/trunk and keep getting the following > error: > > > Error: REPORT request failed on '/svn/watir/!svn/vcc/default' > Error: REPORT of '/svn/watir/!svn/vcc/default': 400 Bad Request ( > http://svn.openqa.org) > > > Can someone tell me why this is happening? I'm new to this so bear with me > on these seemingly simple questions. Thanks in advance. > > Pete > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -- http://www.testingreflections.com/blog/3071 http://iskusivac.blog.hr/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060329/b2f04f0a/attachment.html From pjablonski at hotmail.com Wed Mar 29 11:03:31 2006 From: pjablonski at hotmail.com (Peter Jablonski) Date: Wed, 29 Mar 2006 11:03:31 -0500 Subject: [Wtr-general] Unable to checkout Fire Watir Message-ID: Thanks for the information. Unfortunately, I still get these errors with URL you mention: Error: REPORT request failed on '/svn/watir/!svn/vcc/default' Error: REPORT of '/svn/watir/!svn/vcc/default': 400 Bad Request (http://svn.openqa.org) I must be missing something simple. I have a folder on my desktop, and I go to checkout with the URL using SVN: http://svn.openqa.org/svn/watir/branches/firefox I haven't had trouble checking out other SVN directories in the past. Pete -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060329/30e81b24/attachment.html From angrez at gmail.com Wed Mar 29 11:16:16 2006 From: angrez at gmail.com (Angrez Singh) Date: Wed, 29 Mar 2006 21:46:16 +0530 Subject: [Wtr-general] [FIREWATIR] Specifying which browser will be used? In-Reply-To: References: Message-ID: Hi, Did you started Firefox with '-jssh' option before running the script? In the current implementation, creating an object of Firefox class doesn't open a new instance of Firefox. So you need to manually start Firefox and then run the script. Regards, Angrez On 3/29/06, Rodrigo Julian Martin wrote: > > Thanks Bret! > > > > I've tried the code: > > > > require 'watir' > > browser = Watir::Firefox.new > > browser.goto("http://google.com") > > > > And the output was: > > > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1263:in `initialize': No > connection could be made because the target machine actively refused it. - > connect(2) (Errno::ECONNREFUSED) > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1263:in `new' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1263:in > `initialize' > > from Untitled.rb:2:in `new' > > from Untitled.rb:2 > > Execution completed with exit code 1. > > > > Any help will be really appreciated, thanks in advance! I guess this has > something to do with the ?jssh parameter, Am I Wrong? > > > > Regards > > Rodrigo Julian Martin > > > ------------------------------ > > *From:* wtr-general-bounces at rubyforge.org [mailto: > wtr-general-bounces at rubyforge.org] *On Behalf Of *Bret Pettichord > *Sent:* Martes, 28 de Marzo de 2006 09:18 p.m. > > *To:* wtr-general at rubyforge.org > *Subject:* Re: [Wtr-general] [FIREWATIR] Specifying which browser will be > used? > > > > Try this > > browser = Watir::Firefox.new > > Bret > > On 3/28/06, *Rodrigo Julian Martin* wrote: > > Hi Angrez, thanks for the quick reply! > > > > I've tried the code: > > > > require 'watir' > > browser = Firefox.new #You need to create new Firefox instance. Rest > will remain same. > > browser.goto(" http://google.com") > > > > and when I run it, this was the output: > > > > Untitled.rb:2: uninitialized constant Firefox (NameError) > > Execution completed with exit code 1. > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060329/ed983dbd/attachment.html From Mark_Cain at rl.gov Wed Mar 29 11:57:49 2006 From: Mark_Cain at rl.gov (Cain, Mark) Date: Wed, 29 Mar 2006 08:57:49 -0800 Subject: [Wtr-general] Unable to checkout Fire Watir Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04E020F7694@EX5V.rl.gov> If you are using Windows, I would recommend installing TortiseSVN at: http://tortoisesvn.tigris.org/. This is an open source Subersion client that integrated with windows explorer. Once that is done, right click on your folder on your desktop (or wherever) and select TortiseSVN >> Repo-Browser. The window that appears will ask for a URL, paste in http://svn.openqa.org/svn/watir/branches/ and click OK. Expland 'branches' by clicking the +. Right click on the firefox folder and select checkout. Click the '...' button on the Checkout directory line and point it to your desktop folder (or wherever). The folder should be empty. NOTE you only need to do a checkout the first time you get the files, after that all you need to do is right click on your local folder and select TortiseSVN >> Update and any files that have change will be retrieved. Hope this is helpful, --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Peter Jablonski Sent: Wednesday, March 29, 2006 8:04 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Unable to checkout Fire Watir Thanks for the information. Unfortunately, I still get these errors with URL you mention: Error: REPORT request failed on '/svn/watir/!svn/vcc/default' Error: REPORT of '/svn/watir/!svn/vcc/default': 400 Bad Request (http://svn.openqa.org) I must be missing something simple. I have a folder on my desktop, and I go to checkout with the URL using SVN: http://svn.openqa.org/svn/watir/branches/firefox I haven't had trouble checking out other SVN directories in the past. Pete -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060329/92207b76/attachment.html From linda-list at innovatesolutions.com Wed Mar 29 12:56:44 2006 From: linda-list at innovatesolutions.com (Linda Derezinski) Date: Wed, 29 Mar 2006 12:56:44 -0500 Subject: [Wtr-general] XPath & "The object invoked has disconnected from its clients." Error Message-ID: <004d01c6535a$24ba0290$140117ac@piwo> We are using Watir with RubyFIT another developer wrote some tests which use XPath and I'm trying get them running on my system. I have ruby 1.8.2 installed from ruby182-15.exe The version of watir which I started with was installed via gem install watir Searching through the list's archives it seemed that I needed to get the current cvs version and run install.rb which I did. The good news is that our tests no longer complain about missing XPath functions . the bad news is that I am seeing "The object invoked has disconnected from its clients." I am able to reproduce the same thing when running the xpath_tests.rb found in unitTests However if I run the xpath tests one by one I don't see the error. Anyone know what is the difference here? These work: buttons_xpath_test.rb checkbox_xpath_test.rb div_xpath_test.rb filefield_xpath_test.rb form_xpath_test.rb images_xpath_test.rb links_xpath_test.rb radios_xpath_test.rb selectbox_xpath_test.rb tableCell_using_xpath_test.rb table_xpath_test.rb textAreafields_xpath_test.rb textfields_xpath_test.rb -Linda -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060329/132cbd4f/attachment.html From pjablonski at hotmail.com Wed Mar 29 13:01:10 2006 From: pjablonski at hotmail.com (Peter Jablonski) Date: Wed, 29 Mar 2006 13:01:10 -0500 Subject: [Wtr-general] Unable to checkout Fire Watir References: <9C0BD1E3DAF1204D842D72E2DCE2A04E020F7694@EX5V.rl.gov> Message-ID: Thanks Mark. The process you described is exactly what I've been trying to do with Tortise SVN :-). I followed your instructions to the tee and when I click on the + sign of the firefox folder an error is reported: Error *REPORT request failed on 'http://svn.openqa.org/svn/watir/branches/firefox' REPORT of 'http://svn.openqa.org/svn/watir/branches/firefox'; 400 Bad Request (http://svn.openqa.org) Sigh...... Any additional insight is appreciated as I've run out of things to try :-( Pete ----- Original Message ----- From: Cain, Mark To: wtr-general at rubyforge.org Sent: Wednesday, March 29, 2006 11:57 AM Subject: Re: [Wtr-general] Unable to checkout Fire Watir If you are using Windows, I would recommend installing TortiseSVN at: http://tortoisesvn.tigris.org/. This is an open source Subersion client that integrated with windows explorer. Once that is done, right click on your folder on your desktop (or wherever) and select TortiseSVN >> Repo-Browser. The window that appears will ask for a URL, paste in http://svn.openqa.org/svn/watir/branches/ and click OK. Expland 'branches' by clicking the +. Right click on the firefox folder and select checkout. Click the '.' button on the Checkout directory line and point it to your desktop folder (or wherever). The folder should be empty. NOTE you only need to do a checkout the first time you get the files, after that all you need to do is right click on your local folder and select TortiseSVN >> Update and any files that have change will be retrieved. Hope this is helpful, --Mark ------------------------------------------------------------------------------ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Peter Jablonski Sent: Wednesday, March 29, 2006 8:04 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Unable to checkout Fire Watir Thanks for the information. Unfortunately, I still get these errors with URL you mention: Error: REPORT request failed on '/svn/watir/!svn/vcc/default' Error: REPORT of '/svn/watir/!svn/vcc/default': 400 Bad Request (http://svn.openqa.org) I must be missing something simple. I have a folder on my desktop, and I go to checkout with the URL using SVN: http://svn.openqa.org/svn/watir/branches/firefox I haven't had trouble checking out other SVN directories in the past. Pete ------------------------------------------------------------------------------ _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060329/006c374f/attachment.html From bret at pettichord.com Wed Mar 29 13:05:21 2006 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 29 Mar 2006 12:05:21 -0600 Subject: [Wtr-general] Unable to checkout Fire Watir In-Reply-To: References: Message-ID: I think the problem is that you are using "http:" instead of "https:" Bret On 3/29/06, Peter Jablonski wrote: > > Thanks for the information. Unfortunately, I still get these errors with > URL you mention: > > Error: REPORT request failed on '*/svn/watir/*!svn/vcc/default' Error: > REPORT of '*/svn/watir/*!svn/vcc/default': 400 Bad Request ( > http://svn.openqa.org) > I must be missing something simple. I have a folder on my desktop, and I > go to checkout with the URL using SVN: > > http://svn.openqa.org/svn/watir/branches/firefox > > I haven't had trouble checking out other SVN directories in the past. > Pete > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060329/223c601b/attachment.html From Mark_Cain at rl.gov Wed Mar 29 13:27:03 2006 From: Mark_Cain at rl.gov (Cain, Mark) Date: Wed, 29 Mar 2006 10:27:03 -0800 Subject: [Wtr-general] Unable to checkout Fire Watir Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04E020F7698@EX5V.rl.gov> Right click on your local folder and select TortiseSVN >> Settings Select Network and add your proxy setting and port. In the exceptions box put in your domain like (*.rl.gov) Click OK and see if that works for you. --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Peter Jablonski Sent: Wednesday, March 29, 2006 10:01 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Unable to checkout Fire Watir Thanks Mark. The process you described is exactly what I've been trying to do with Tortise SVN :-). I followed your instructions to the tee and when I click on the + sign of the firefox folder an error is reported: Error *REPORT request failed on 'http://svn.openqa.org/svn/watir/branches/firefox' REPORT of 'http://svn.openqa.org/svn/watir/branches/firefox'; 400 Bad Request (http://svn.openqa.org) Sigh...... Any additional insight is appreciated as I've run out of things to try :-( Pete ----- Original Message ----- From: Cain, Mark To: wtr-general at rubyforge.org Sent: Wednesday, March 29, 2006 11:57 AM Subject: Re: [Wtr-general] Unable to checkout Fire Watir If you are using Windows, I would recommend installing TortiseSVN at: http://tortoisesvn.tigris.org/. This is an open source Subersion client that integrated with windows explorer. Once that is done, right click on your folder on your desktop (or wherever) and select TortiseSVN >> Repo-Browser. The window that appears will ask for a URL, paste in http://svn.openqa.org/svn/watir/branches/ and click OK. Expland 'branches' by clicking the +. Right click on the firefox folder and select checkout. Click the '...' button on the Checkout directory line and point it to your desktop folder (or wherever). The folder should be empty. NOTE you only need to do a checkout the first time you get the files, after that all you need to do is right click on your local folder and select TortiseSVN >> Update and any files that have change will be retrieved. Hope this is helpful, --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Peter Jablonski Sent: Wednesday, March 29, 2006 8:04 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Unable to checkout Fire Watir Thanks for the information. Unfortunately, I still get these errors with URL you mention: Error: REPORT request failed on '/svn/watir/!svn/vcc/default' Error: REPORT of '/svn/watir/!svn/vcc/default': 400 Bad Request (http://svn.openqa.org) I must be missing something simple. I have a folder on my desktop, and I go to checkout with the URL using SVN: http://svn.openqa.org/svn/watir/branches/firefox I haven't had trouble checking out other SVN directories in the past. Pete ________________________________ _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060329/477fae19/attachment.html From rodrigo.martin at enratio.com Wed Mar 29 13:27:36 2006 From: rodrigo.martin at enratio.com (Rodrigo Julian Martin) Date: Wed, 29 Mar 2006 15:27:36 -0300 Subject: [Wtr-general] [FIREWATIR] Specifying which browser will be used? Message-ID: Hi, Thanks Angrez, its working! That's what I've missed. I Thought that using the line "browser = Firefox.new", I didn't need to start the browser manually. Thank you again! Regards Rodrigo Julian Martin ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Angrez Singh Sent: Mi?rcoles, 29 de Marzo de 2006 01:16 p.m. To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] [FIREWATIR] Specifying which browser will be used? Hi, Did you started Firefox with '-jssh' option before running the script? In the current implementation, creating an object of Firefox class doesn't open a new instance of Firefox. So you need to manually start Firefox and then run the script. Regards, Angrez On 3/29/06, Rodrigo Julian Martin wrote: Thanks Bret! I've tried the code: require 'watir' browser = Watir::Firefox.new browser.goto(" http://google.com ") And the output was: c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1263:in `initialize': No connection could be made because the target machine actively refused it. - connect(2) (Errno::ECONNREFUSED) from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1263:in `new' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1263:in `initialize' from Untitled.rb:2:in `new' from Untitled.rb:2 Execution completed with exit code 1. Any help will be really appreciated, thanks in advance! I guess this has something to do with the -jssh parameter, Am I Wrong? Regards Rodrigo Julian Martin ________________________________ From: wtr-general-bounces at rubyforge.org [mailto: wtr-general-bounces at rubyforge.org ] On Behalf Of Bret Pettichord Sent: Martes, 28 de Marzo de 2006 09:18 p.m. To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] [FIREWATIR] Specifying which browser will be used? Try this browser = Watir::Firefox.new Bret On 3/28/06, Rodrigo Julian Martin wrote: Hi Angrez, thanks for the quick reply! I've tried the code: require 'watir' browser = Firefox.new #You need to create new Firefox instance. Rest will remain same. browser.goto(" http://google.com ") and when I run it, this was the output: Untitled.rb:2: uninitialized constant Firefox (NameError) Execution completed with exit code 1. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060329/df56c8de/attachment.html From pjablonski at hotmail.com Wed Mar 29 13:38:22 2006 From: pjablonski at hotmail.com (Peter Jablonski) Date: Wed, 29 Mar 2006 13:38:22 -0500 Subject: [Wtr-general] Unable to checkout Fire Watir References: Message-ID: That did it! A simple "s" solved the problem. Thanks and have a great day! Pete ----- Original Message ----- From: Bret Pettichord To: wtr-general at rubyforge.org Sent: Wednesday, March 29, 2006 1:05 PM Subject: Re: [Wtr-general] Unable to checkout Fire Watir I think the problem is that you are using "http:" instead of "https:" Bret On 3/29/06, Peter Jablonski < pjablonski at hotmail.com> wrote: Thanks for the information. Unfortunately, I still get these errors with URL you mention: Error: REPORT request failed on '/svn/watir/!svn/vcc/default' Error: REPORT of '/svn/watir/!svn/vcc/default': 400 Bad Request ( http://svn.openqa.org) I must be missing something simple. I have a folder on my desktop, and I go to checkout with the URL using SVN: http://svn.openqa.org/svn/watir/branches/firefox I haven't had trouble checking out other SVN directories in the past. Pete _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ------------------------------------------------------------------------------ _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060329/b74de8df/attachment.html From bret at pettichord.com Wed Mar 29 13:41:22 2006 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 29 Mar 2006 12:41:22 -0600 Subject: [Wtr-general] XPath & "The object invoked has disconnected from its clients." Error In-Reply-To: <004d01c6535a$24ba0290$140117ac@piwo> References: <004d01c6535a$24ba0290$140117ac@piwo> Message-ID: Linda, I just uploaded a new development gem (1.5.0.945) with a fix to this problem, which was intermittent. http://wiki.openqa.org/display/WTR/Development+Builds Bret On 3/29/06, Linda Derezinski wrote: > > > > > We are using Watir with RubyFIT another developer wrote some tests which use XPath and I'm trying get them running on my system. > > > > I have ruby 1.8.2 installed from ruby182-15.exe > > The version of watir which I started with was installed via gem install watir > > > > Searching through the list's archives it seemed that I needed to get the current cvs version and run install.rb which I did. > > > > The good news is that our tests no longer complain about missing XPath functions ? the bad news is that I am seeing > > > > "The object invoked has disconnected from its clients." > > > > I am able to reproduce the same thing when running the xpath_tests.rb found in unitTests > > > > However if I run the xpath tests one by one I don't see the error. Anyone know what is the difference here? > > > > These work: > > buttons_xpath_test.rb > > checkbox_xpath_test.rb > > div_xpath_test.rb > > filefield_xpath_test.rb > > form_xpath_test.rb > > images_xpath_test.rb > > links_xpath_test.rb > > radios_xpath_test.rb > > selectbox_xpath_test.rb > > tableCell_using_xpath_test.rb > > table_xpath_test.rb > > textAreafields_xpath_test.rb > > textfields_xpath_test.rb > > > > > > -Linda > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060329/ed5f073a/attachment.html From linda-list at innovatesolutions.com Wed Mar 29 14:50:34 2006 From: linda-list at innovatesolutions.com (Linda Derezinski) Date: Wed, 29 Mar 2006 14:50:34 -0500 Subject: [Wtr-general] XPath & "The object invoked has disconnected fromits clients." Error In-Reply-To: Message-ID: <003f01c6536a$0ecb2170$140117ac@piwo> Brett, Thanks for uploading the new version but I'm still seeing the same behavior. xpath_tests.rb fails and individual tests work fine. I did a fresh install of ruby182-15.exe then gem install watir-1.5.0.945.gem. Here is the first Error there are a total of 87 errors C:\ruby\lib\ruby\gems\1.8\gems\watir-1.5.0.945\unittests>xpath_tests.rb Loaded suite C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.945/unittests/xpath_tests Started EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE EEEEEEEEEEE. Finished in 0.05 seconds. 1) Error: test_Button_Enabled(TC_Buttons_XPath): WIN32OLERuntimeError: Unknown property or method `navigate' HRESULT error code:0x80010108 The object invoked has disconnected from its clients. C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.945/unittests/../watir.rb:1343:in `method_missing' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.945/unittests/../watir.rb:1343:in `goto' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.945/unittests/../unittests/button s_xpath_test.rb:11:in `setup' This works: C:\ruby\lib\ruby\gems\1.8\gems\watir-1.5.0.945\unittests>buttons_xpath_test. rb Loaded suite C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.945/unittests/buttons_xpath_test Started F..... Finished in 3.195 seconds. 1) Failure: test_Button_Enabled(TC_Buttons_XPath) [C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.945/unittests/../watir/testUnitA ddons.rb:5:in `assert_false' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.945/unittests/../watir/testUnitAd dons.rb:3:in `_wrap_assertion' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.945/unittests/../watir/testUnitAd dons.rb:3:in `assert_false' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.945/unittests/buttons_xpath_test. rb:62:in `test_Button_Enabled']: is not false. 6 tests, 24 assertions, 1 failures, 0 errors Here is my version information for ruby and watir ruby -e 'require "watir"; puts Watir::IE::VERSION' 1.5.0.945 ruby --version ruby 1.8.2 (2004-12-25) [i386-mswin32] Thanks, Linda _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Wednesday, March 29, 2006 1:41 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] XPath & "The object invoked has disconnected fromits clients." Error Linda, I just uploaded a new development gem (1.5.0.945) with a fix to this problem, which was intermittent. http://wiki.openqa.org/display/WTR/Development+Builds Bret On 3/29/06, Linda Derezinski wrote: > > > > > We are using Watir with RubyFIT another developer wrote some tests which use XPath and I'm trying get them running on my system. > > > > I have ruby 1.8.2 installed from ruby182-15.exe > > The version of watir which I started with was installed via gem install watir > > > > Searching through the list's archives it seemed that I needed to get the current cvs version and run install.rb which I did. > > > > The good news is that our tests no longer complain about missing XPath functions . the bad news is that I am seeing > > > > "The object invoked has disconnected from its clients." > > > > I am able to reproduce the same thing when running the xpath_tests.rb found in unitTests > > > > However if I run the xpath tests one by one I don't see the error. Anyone know what is the difference here? > > > > These work: > > buttons_xpath_test.rb > > checkbox_xpath_test.rb > > div_xpath_test.rb > > filefield_xpath_test.rb > > form_xpath_test.rb > > images_xpath_test.rb > > links_xpath_test.rb > > radios_xpath_test.rb > > selectbox_xpath_test.rb > > tableCell_using_xpath_test.rb > > table_xpath_test.rb > > textAreafields_xpath_test.rb > > textfields_xpath_test.rb > > > > > > -Linda > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060329/30c508a7/attachment.html From linda-list at innovatesolutions.com Wed Mar 29 15:39:20 2006 From: linda-list at innovatesolutions.com (Linda Derezinski) Date: Wed, 29 Mar 2006 15:39:20 -0500 Subject: [Wtr-general] XPath & "The object invoked has disconnectedfromits clients." Error In-Reply-To: <003f01c6536a$0ecb2170$140117ac@piwo> Message-ID: <005901c65370$db1951b0$140117ac@piwo> I found what is causing the problem. In setup.rb if you comment out the top line (#END {$ie.close if $ie; Watir::IE.quit} # close ie at completion of the tests) All of the "The object invoked has disconnected from its clients" messages disappear. -Linda _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Linda Derezinski Sent: Wednesday, March 29, 2006 2:51 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] XPath & "The object invoked has disconnectedfromits clients." Error Brett, Thanks for uploading the new version but I'm still seeing the same behavior. xpath_tests.rb fails and individual tests work fine. I did a fresh install of ruby182-15.exe then gem install watir-1.5.0.945.gem. Here is the first Error there are a total of 87 errors C:\ruby\lib\ruby\gems\1.8\gems\watir-1.5.0.945\unittests>xpath_tests.rb Loaded suite C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.945/unittests/xpath_tests Started EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE EEEEEEEEEEE. Finished in 0.05 seconds. 1) Error: test_Button_Enabled(TC_Buttons_XPath): WIN32OLERuntimeError: Unknown property or method `navigate' HRESULT error code:0x80010108 The object invoked has disconnected from its clients. C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.945/unittests/../watir.rb:1343:in `method_missing' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.945/unittests/../watir.rb:1343:in `goto' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.945/unittests/../unittests/button s_xpath_test.rb:11:in `setup' This works: C:\ruby\lib\ruby\gems\1.8\gems\watir-1.5.0.945\unittests>buttons_xpath_test. rb Loaded suite C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.945/unittests/buttons_xpath_test Started F..... Finished in 3.195 seconds. 1) Failure: test_Button_Enabled(TC_Buttons_XPath) [C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.945/unittests/../watir/testUnitA ddons.rb:5:in `assert_false' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.945/unittests/../watir/testUnitAd dons.rb:3:in `_wrap_assertion' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.945/unittests/../watir/testUnitAd dons.rb:3:in `assert_false' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.945/unittests/buttons_xpath_test. rb:62:in `test_Button_Enabled']: is not false. 6 tests, 24 assertions, 1 failures, 0 errors Here is my version information for ruby and watir ruby -e 'require "watir"; puts Watir::IE::VERSION' 1.5.0.945 ruby --version ruby 1.8.2 (2004-12-25) [i386-mswin32] Thanks, Linda _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Wednesday, March 29, 2006 1:41 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] XPath & "The object invoked has disconnected fromits clients." Error Linda, I just uploaded a new development gem (1.5.0.945) with a fix to this problem, which was intermittent. http://wiki.openqa.org/display/WTR/Development+Builds Bret On 3/29/06, Linda Derezinski wrote: > > > > > We are using Watir with RubyFIT another developer wrote some tests which use XPath and I'm trying get them running on my system. > > > > I have ruby 1.8.2 installed from ruby182-15.exe > > The version of watir which I started with was installed via gem install watir > > > > Searching through the list's archives it seemed that I needed to get the current cvs version and run install.rb which I did. > > > > The good news is that our tests no longer complain about missing XPath functions . the bad news is that I am seeing > > > > "The object invoked has disconnected from its clients." > > > > I am able to reproduce the same thing when running the xpath_tests.rb found in unitTests > > > > However if I run the xpath tests one by one I don't see the error. Anyone know what is the difference here? > > > > These work: > > buttons_xpath_test.rb > > checkbox_xpath_test.rb > > div_xpath_test.rb > > filefield_xpath_test.rb > > form_xpath_test.rb > > images_xpath_test.rb > > links_xpath_test.rb > > radios_xpath_test.rb > > selectbox_xpath_test.rb > > tableCell_using_xpath_test.rb > > table_xpath_test.rb > > textAreafields_xpath_test.rb > > textfields_xpath_test.rb > > > > > > -Linda > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060329/b3ed6e03/attachment.html From plightbo at gmail.com Wed Mar 29 23:40:45 2006 From: plightbo at gmail.com (Patrick Lightbody) Date: Wed, 29 Mar 2006 20:40:45 -0800 Subject: [Wtr-general] OpenQA Migration Help Message-ID: Hey everyone, First, I'd like to say I've very excited to have Watir joining the OpenQA community. OpenQA is quickly become a great place for some very interesting tools. As you know Selenium covers a wide array of programming languages. In addition to the Ruby support from Watir and WET, a new Java project called Floyd, and now a Python project that tests Windows applications called pyWinAuto. I'm very pleased with the diversity of OpenQA and hope it continues! Part of the migration to OpenQA involves making sure that the standard project website at http://www.openqa.org/watir look decent and have the correct information. I know that some parts of Watir are staying at rubyforge, including the main website itself. However, in order for it to be clear which projects are part of the OpenQA community and using the various resources, a basic website at OpenQA is also required. I'm looking for volunteers to help put together some very simple. A page that just points to the main page is perfectly fine. The bigger issue is helping make sure all the standard links in the left hand column that are part of the default project template are accurate. I know, for example, that the mailing list and forums information is wrong. To fix these, some changes are required in trunk/website/ meta.xml, as well as potentially some changes in the OpenQA website template. I can take care of the website template, but I need help from you guys to guide me. Thanks! Patrick Lightbody Founder Autoriginate, Inc. http://www.autoriginate.com 503-488-5402 patrick at autoriginate.com "Intelligent testing made convenient" From bret at pettichord.com Thu Mar 30 00:12:47 2006 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 29 Mar 2006 23:12:47 -0600 Subject: [Wtr-general] getting xpath to work Message-ID: Angrez (and other xpath lovers), Tonight i've found that i've had much better look running the xpath unit tests out of the install gem than the development source tree. Ultimately, i tracked down the problem to the fact that i forget to include watir/rexml/element.rb and watir/rexml/functions.rb in the gem. My understanding had been that we were supposed to install Rexml 3.1.3 and then hand copy these over. I recently updated Watir so that it modified the load_path obviating the need for the hand-copying. But now it seems that this hand copying is unnecessary. Your doc says we need Rexml 3.1.4. I thought these two files were what was need to upgrade us from Rexml 3.1.3 (which is the latest available) to 3.1.4. I feel like there is something that i must not be understanding correctly. Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060329/694f198a/attachment.html From bret at pettichord.com Thu Mar 30 00:22:11 2006 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 29 Mar 2006 23:22:11 -0600 Subject: [Wtr-general] OpenQA Migration Help In-Reply-To: References: Message-ID: I wanted to let everyone know how much we've appreciated the new project support at OpenQA.org. Patrick helped us move to SVN from CVS and he's provided Jira (for bug/issue tracking) and Confluence (for wiki), which are really much nicer than what we had at RubyForge.org. We are only starting to really make use of them. One of the things that we've wanted to do for a while was make it easier for people to share code and examples and libraries. Confluence really gives us the tools we need to make this happen. The Selenium project already has done this, if you want to see one way of doing this. Patrick has been sending me little hints for a while that he'd like to see our website cleaned up at openqa.org. It is mostly empty and has incorrect information in many places. I could update this myself, but i'd rather focus on getting Watir 1.5 ready for release. If one or two people would volunteer to update this website, we would all appreciate it. It would make OpenQA look more inhabited and make it easier for new people to find our FAQ and Wiki and learn how get the latest from SVN. I often get emails saying "how can i help?" Well, this would be a big way to help. Bret On 3/29/06, Patrick Lightbody wrote: > > Hey everyone, > First, I'd like to say I've very excited to have Watir joining the > OpenQA community. OpenQA is quickly become a great place for some > very interesting tools. As you know Selenium covers a wide array of > programming languages. In addition to the Ruby support from Watir and > WET, a new Java project called Floyd, and now a Python project that > tests Windows applications called pyWinAuto. I'm very pleased with > the diversity of OpenQA and hope it continues! > > Part of the migration to OpenQA involves making sure that the > standard project website at http://www.openqa.org/watir look decent > and have the correct information. I know that some parts of Watir are > staying at rubyforge, including the main website itself. However, in > order for it to be clear which projects are part of the OpenQA > community and using the various resources, a basic website at OpenQA > is also required. > > I'm looking for volunteers to help put together some very simple. A > page that just points to the main page is perfectly fine. The bigger > issue is helping make sure all the standard links in the left hand > column that are part of the default project template are accurate. I > know, for example, that the mailing list and forums information is > wrong. To fix these, some changes are required in trunk/website/ > meta.xml, as well as potentially some changes in the OpenQA website > template. > > I can take care of the website template, but I need help from you > guys to guide me. Thanks! > > Patrick Lightbody > Founder > Autoriginate, Inc. > http://www.autoriginate.com > 503-488-5402 > patrick at autoriginate.com > > "Intelligent testing made convenient" > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060329/d12d2f20/attachment.html From oblomov.consulting at googlemail.com Thu Mar 30 04:44:06 2006 From: oblomov.consulting at googlemail.com (George Hawthorne) Date: Thu, 30 Mar 2006 10:44:06 +0100 Subject: [Wtr-general] click_no_wait with divs Message-ID: <880925dd0603300144j2956e444ye2919ff505ed07b5@mail.gmail.com> Hi, The app I'm testing has lots of Javascript pop-ups. The method used for clicking them in the dialog_test.rb unit test works in some cases, as in: $ie.link( :text, "Delete contact").click_no_wait # "click OK or cancel" pop-up appears assert dialog.exists? dialog.button('OK').click # "OK" button on pop-up is successfully clicked But when I try it on a button in a div, as in the following code, I get an undefined method error. # the delete button is in a div $ie.div(:id, 'divXdatat').button(:index,1).click_no_wait assert dialog.exists? dialog.button('OK').click produces: NoMethodError: undefined method `eval_in_spawned_process' for # c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2264:in `click_no_wait' Does anyone know of a solution or workaround for this? If I change the 'click_no_wait' to a 'click' the pop-up appears but I can't close it. I've tried Winclicker but it is unreliable. I'm using Watir version 1.5.0.934. Thanks for any suggestions, George From bret at pettichord.com Thu Mar 30 09:12:23 2006 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 30 Mar 2006 08:12:23 -0600 Subject: [Wtr-general] click_no_wait with divs In-Reply-To: <880925dd0603300144j2956e444ye2919ff505ed07b5@mail.gmail.com> References: <880925dd0603300144j2956e444ye2919ff505ed07b5@mail.gmail.com> Message-ID: This is a known bug. the click_no_wait method currently only works for elements which are directly referenced from an IE object. On 3/30/06, George Hawthorne wrote: > > Hi, > > The app I'm testing has lots of Javascript pop-ups. The method used > for clicking them in the dialog_test.rb unit test works in some cases, > as in: > > $ie.link( :text, "Delete contact").click_no_wait > # "click OK or cancel" pop-up appears > assert dialog.exists? > dialog.button('OK').click > # "OK" button on pop-up is successfully clicked > > But when I try it on a button in a div, as in the following code, I > get an undefined method error. > > # the delete button is in a div > $ie.div(:id, 'divXdatat').button(:index,1).click_no_wait > assert dialog.exists? > dialog.button('OK').click > > produces: > > NoMethodError: undefined method `eval_in_spawned_process' for > # > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2264:in `click_no_wait' > > Does anyone know of a solution or workaround for this? If I change the > 'click_no_wait' to a 'click' the pop-up appears but I can't close it. > > I've tried Winclicker but it is unreliable. > > I'm using Watir version 1.5.0.934. > > Thanks for any suggestions, > > George > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060330/e209fe18/attachment.html From linda-list at innovatesolutions.com Thu Mar 30 11:52:44 2006 From: linda-list at innovatesolutions.com (Linda Derezinski) Date: Thu, 30 Mar 2006 11:52:44 -0500 Subject: [Wtr-general] version 945 Frame div and click Message-ID: <007801c6541a$5dbe8e10$140117ac@piwo> Hello, I just upgraded from 1.4.1 to 1.5.0.945 I'm having problem with this line of code: @ie2.frame("main").frame("mid").div(:id,"myID").click When I run this code from the 1.4.1 environment it works In the 1.5.0.945 I get "unable to locate object using id . Is this the same issue as click_no_wait_divs ?? Since frame no longer has ie any suggestions on debugging this? -Linda -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060330/832a6086/attachment.html From psattu at gmail.com Thu Mar 30 12:14:04 2006 From: psattu at gmail.com (Prakash Sattu) Date: Thu, 30 Mar 2006 11:14:04 -0600 Subject: [Wtr-general] Update opens up another window with updated page but control stays in the orginal window and not able to move to next page in the flow from orginal window Message-ID: I have been using Watir from past 1 month, it worked pretty good in automating of our application.Now , there is a problem testing in one of the page in our application. The page that I am testing uses AJAX methodalogy . I am trying to change quantity from x to y and clicking update button on that page, when it clicks update, it opens up another page with update quantiy that should not happens it should suppose stay in the same page( that is the way manually works). The problem here is, even though I get corrected update new page but control stays in the orgianl page and not able to move to the next page. Any help would be helpful regarding this. Thanks & Regards, Prakash R Sattu (309) 676-5876 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060330/499a1d9f/attachment.html From rodrigo.martin at enratio.com Thu Mar 30 12:17:07 2006 From: rodrigo.martin at enratio.com (Rodrigo Julian Martin) Date: Thu, 30 Mar 2006 14:17:07 -0300 Subject: [Wtr-general] Error getting document.all on Firefox with FireWatir Message-ID: Hi all! I'm trying to get all the objects in a web page using the following code: require 'watir' browser=Watir::Firefox.new browser.goto("http://www.dolarhoy.com") test=browser.document.all p test With this, test returns as nil. Is there any function or something like that to return the same as document.all in internet explorer? Another question, just, in case, is there any way of getting the html source code of the page loaded in Firefox Thank you so much Regards Rodrigo Julian Martin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060330/e9c2a9ae/attachment.html From bret at pettichord.com Thu Mar 30 12:25:55 2006 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 30 Mar 2006 11:25:55 -0600 Subject: [Wtr-general] version 945 Frame div and click In-Reply-To: <007801c6541a$5dbe8e10$140117ac@piwo> References: <007801c6541a$5dbe8e10$140117ac@piwo> Message-ID: Can you give us a full error message and stack trace? I think this is separate from the div click_no_wait problem. Bret On 3/30/06, Linda Derezinski wrote: > > Hello, > > > > I just upgraded from 1.4.1 to 1.5.0.945 > > I'm having problem with this line of code: @ie2.frame > ("main").frame("mid").div(:id,"myID").click > > > > When I run this code from the 1.4.1 environment it works > > In the 1.5.0.945 I get "unable to locate object using id ? > > > > Is this the same issue as click_no_wait_divs ?? > > > > Since frame no longer has ie any suggestions on debugging this? > > > > -Linda > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060330/ae917e05/attachment.html From bret at pettichord.com Thu Mar 30 12:30:06 2006 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 30 Mar 2006 11:30:06 -0600 Subject: [Wtr-general] Where should we discuss bugs in Watir 1.5? Message-ID: I have a question for the list. I'm working pretty hard on Watir 1.5 and there is a lot of discussion around bugs, etc in it. Would it be better to have a separate list to discuss this effort, so that wtr-general could focus more on supporting the released code? I'd read both, so it would make no difference for me, but i'm concerned that this may be confusing for others. Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060330/ee524fd3/attachment.html From Sean.Gallagher at ticketmaster.com Thu Mar 30 12:46:03 2006 From: Sean.Gallagher at ticketmaster.com (Sean Gallagher) Date: Thu, 30 Mar 2006 09:46:03 -0800 Subject: [Wtr-general] Where should we discuss bugs in Watir 1.5? Message-ID: <71D28C8451BFD5119B2B00508BE26E640CA37274@pasmail3.office.tmcs> +1 to create separate mailing lists for watir-users and watir-dev (and maybe another, watir-announce, for release information, etc). I also think that wet, recorders, etc should be discussed on other mailing lists. Sean -- http://testmethods.net/ > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret > Pettichord > Sent: Thursday, March 30, 2006 9:30 AM > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Where should we discuss bugs in Watir 1.5? > > I have a question for the list. > > I'm working pretty hard on Watir 1.5 and there is a lot of > discussion around bugs, etc in it. > > Would it be better to have a separate list to discuss this > effort, so that wtr-general could focus more on supporting > the released code? > > I'd read both, so it would make no difference for me, but i'm > concerned that this may be confusing for others. > > Bret > > From rodrigo.martin at enratio.com Thu Mar 30 12:53:46 2006 From: rodrigo.martin at enratio.com (Rodrigo Julian Martin) Date: Thu, 30 Mar 2006 14:53:46 -0300 Subject: [Wtr-general] Where should we discuss bugs in Watir 1.5? Message-ID: Bret I think that your idea is really good. And will help to keep things organized. Regards! Rodrigo Julian Martin ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Jueves, 30 de Marzo de 2006 02:30 p.m. To: wtr-general at rubyforge.org Subject: [Wtr-general] Where should we discuss bugs in Watir 1.5? I have a question for the list. I'm working pretty hard on Watir 1.5 and there is a lot of discussion around bugs, etc in it. Would it be better to have a separate list to discuss this effort, so that wtr-general could focus more on supporting the released code? I'd read both, so it would make no difference for me, but i'm concerned that this may be confusing for others. Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060330/90df8d5c/attachment.html From psattu at gmail.com Thu Mar 30 13:09:15 2006 From: psattu at gmail.com (Prakash Sattu) Date: Thu, 30 Mar 2006 12:09:15 -0600 Subject: [Wtr-general] Update opens up another window with updated page but control stays in the orginal window and not able to move to next page in the flow from orginal window Message-ID: I have been using Watir from past 1 month, it worked pretty good in automating of our application.Now , there is a problem testing in one of the page in our application. The page that I am testing uses AJAX methodalogy . I am trying to change quantity from x to y and clicking update button on that page, when it clicks update, it opens up another page with update quantiy that should not happens it should suppose stay in the same page( that is the way manually works). The problem here is, even though I get corrected update new page but control stays in the orgianl page and not able to move to the next page. Any help would be helpful regarding this. Thanks & Regards, Prakash R Sattu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060330/856c298c/attachment.html From Mark_Cain at rl.gov Thu Mar 30 13:24:56 2006 From: Mark_Cain at rl.gov (Cain, Mark) Date: Thu, 30 Mar 2006 10:24:56 -0800 Subject: [Wtr-general] Update opens up another window with updated page butcontrol stays in the orginal window and not able to move tonext page in the flow from orginal window Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04E020F7699@EX5V.rl.gov> If you could post the code from your script and the HTML page your testing that would be helpful. --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Prakash Sattu Sent: Thursday, March 30, 2006 10:09 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Update opens up another window with updated page butcontrol stays in the orginal window and not able to move tonext page in the flow from orginal window I have been using Watir from past 1 month, it worked pretty good in automating of our application.Now , there is a problem testing in one of the page in our application. The page that I am testing uses AJAX methodalogy . I am trying to change quantity from x to y and clicking update button on that page, when it clicks update, it opens up another page with update quantiy that should not happens it should suppose stay in the same page( that is the way manually works). The problem here is, even though I get corrected update new page but control stays in the orgianl page and not able to move to the next page. Any help would be helpful regarding this. Thanks & Regards, Prakash R Sattu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060330/82d8ebd8/attachment.html From linda-list at innovatesolutions.com Thu Mar 30 13:28:06 2006 From: linda-list at innovatesolutions.com (Linda Derezinski) Date: Thu, 30 Mar 2006 13:28:06 -0500 Subject: [Wtr-general] version 945 Frame div and click In-Reply-To: Message-ID: <00bc01c65427$b08dd260$140117ac@piwo> Brett, I'm in the process of changing our code to use xpath. But right now xpath doesn't handle frames. So I'm kind of stuck here. Is there a way to get the information displayed by show_all_objects from a frame now? I didn't see the method_missing busy part since it was pretty far down, perhaps that is the real issue. I don't see an IE.busy defined. BTW I checked the following unit tests work fine on my system: frame_test.rb, buttons_test.rb, buttons_xpath_test.rb test_02_chat_with_user(Chat::TC_chat_test): Watir::Exception::UnknownObjectException: Unable to locate object, using id and myID C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.945/./watir.rb:2136:in `assert_exists' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.945/./watir.rb:2277:in `click' C:/workspace/vFit/chat_test.rb:41:in `chat_with_user' C:/workspace/vFit/test/TC_chat_test.rb:29:in `test_02_chat_with_user' 3 tests, 0 assertions, 0 failures, 1 errors -e:1: C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.945/./watir.rb:1479:in `method_missing': busy (WIN32OLERuntimeError) OLE error code:80004005 in HRESULT error code:0x80020009 Exception occurred. from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.945/./watir.rb:1479:in `wait' from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.945/./watir.rb:2282:in `click' from (eval):1 _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Thursday, March 30, 2006 12:26 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] version 945 Frame div and click Can you give us a full error message and stack trace? I think this is separate from the div click_no_wait problem. Bret On 3/30/06, Linda Derezinski wrote: Hello, I just upgraded from 1.4.1 to 1.5.0.945 I'm having problem with this line of code: @ie2.frame("main").frame("mid").div(:id,"myID").click When I run this code from the 1.4.1 environment it works In the 1.5.0.945 I get "unable to locate object using id . Is this the same issue as click_no_wait_divs ?? Since frame no longer has ie any suggestions on debugging this? -Linda _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060330/37df6816/attachment.html From linda-list at innovatesolutions.com Thu Mar 30 13:33:55 2006 From: linda-list at innovatesolutions.com (Linda Derezinski) Date: Thu, 30 Mar 2006 13:33:55 -0500 Subject: [Wtr-general] Where should we discuss bugs in Watir 1.5? In-Reply-To: Message-ID: <00c701c65428$80887790$140117ac@piwo> +1 for wtr-general (released issues) wtr-dev (development build issues) wtr-announce (new releases announced) _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Thursday, March 30, 2006 12:30 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Where should we discuss bugs in Watir 1.5? I have a question for the list. I'm working pretty hard on Watir 1.5 and there is a lot of discussion around bugs, etc in it. Would it be better to have a separate list to discuss this effort, so that wtr-general could focus more on supporting the released code? I'd read both, so it would make no difference for me, but i'm concerned that this may be confusing for others. Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060330/b9d58f06/attachment.html From psattu at gmail.com Thu Mar 30 13:52:16 2006 From: psattu at gmail.com (Prakash Sattu) Date: Thu, 30 Mar 2006 12:52:16 -0600 Subject: [Wtr-general] Update opens up another window with updated page butcontrol stays in the orginal window and not able to move tonext page in the flow from orginal window In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04E020F7699@EX5V.rl.gov> References: <9C0BD1E3DAF1204D842D72E2DCE2A04E020F7699@EX5V.rl.gov> Message-ID: Below is the part of test script code, Let me explain you clearly what was the issue here.. When I click Update after changing some quatity in one of the the text fields in the page, it does updates but it opens up another page but origianl page stays as it was earliar.. When watir testing tool try to click Next button after Update button, it will try clicking in the origianl page and it does't work.. When I do update manually going to page, it updates the same page, it does't open up new page. To make it long story short.. how to avoid opening new browser after clicking update button?, It should suppose to do update in the same browser and should not open up a new browser startClicker("OK" , 1) $ie.text_field(:index,"3").set("5") $ie.button(:value, "Update").click $ie.button(:value, "Next").click Prakash On 3/30/06, Cain, Mark wrote: > > If you could post the code from your script and the HTML page your > testing that would be helpful. > > > > *--Mark* > > > ------------------------------ > > *From:* wtr-general-bounces at rubyforge.org [mailto: > wtr-general-bounces at rubyforge.org] *On Behalf Of *Prakash Sattu > *Sent:* Thursday, March 30, 2006 10:09 AM > *To:* wtr-general at rubyforge.org > *Subject:* [Wtr-general] Update opens up another window with updated page > butcontrol stays in the orginal window and not able to move tonext page in > the flow from orginal window > > > > I have been using Watir from past 1 month, it worked pretty good in > automating of our application.Now , there is a problem testing in one of > the page in our application. The page that I am testing uses AJAX > methodalogy . I am trying to change quantity from x to y and clicking update > button on that page, when it clicks update, it opens up another page with > update quantiy that should not happens it should suppose stay in the same > page( that is the way manually works). The problem here is, even though I > get corrected update new page but control stays in the orgianl page and not > able to move to the next page. Any help would be helpful regarding this. > > Thanks & Regards, > > Prakash R Sattu > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060330/85a41dbb/attachment.html From linda-list at innovatesolutions.com Thu Mar 30 14:17:10 2006 From: linda-list at innovatesolutions.com (Linda Derezinski) Date: Thu, 30 Mar 2006 14:17:10 -0500 Subject: [Wtr-general] version 945 Frame div and click In-Reply-To: <00bc01c65427$b08dd260$140117ac@piwo> Message-ID: <00e901c6542e$8b6af830$140117ac@piwo> Brett, Sorry my bad on matching the id it *was my mistake* in the regular expression. I am however still seeing the missing IE.busy method. But the tests seem to be working ok. 3 tests, 0 assertions, 0 failures, 0 errors -e:1: C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.945/./watir.rb:1479:in `method_missing': busy (WIN32OLERuntimeError) OLE error code:80004005 in HRESULT error code:0x80020009 Exception occurred. from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.945/./watir.rb:1479:in `wait' from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.945/./watir.rb:2282:in `click' from (eval):1 -Linda _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Linda Derezinski Sent: Thursday, March 30, 2006 1:28 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] version 945 Frame div and click Brett, I'm in the process of changing our code to use xpath. But right now xpath doesn't handle frames. So I'm kind of stuck here. Is there a way to get the information displayed by show_all_objects from a frame now? I didn't see the method_missing busy part since it was pretty far down, perhaps that is the real issue. I don't see an IE.busy defined. BTW I checked the following unit tests work fine on my system: frame_test.rb, buttons_test.rb, buttons_xpath_test.rb test_02_chat_with_user(Chat::TC_chat_test): Watir::Exception::UnknownObjectException: Unable to locate object, using id and myID C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.945/./watir.rb:2136:in `assert_exists' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.945/./watir.rb:2277:in `click' C:/workspace/vFit/chat_test.rb:41:in `chat_with_user' C:/workspace/vFit/test/TC_chat_test.rb:29:in `test_02_chat_with_user' 3 tests, 0 assertions, 0 failures, 1 errors -e:1: C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.945/./watir.rb:1479:in `method_missing': busy (WIN32OLERuntimeError) OLE error code:80004005 in HRESULT error code:0x80020009 Exception occurred. from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.945/./watir.rb:1479:in `wait' from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.945/./watir.rb:2282:in `click' from (eval):1 _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Thursday, March 30, 2006 12:26 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] version 945 Frame div and click Can you give us a full error message and stack trace? I think this is separate from the div click_no_wait problem. Bret On 3/30/06, Linda Derezinski wrote: Hello, I just upgraded from 1.4.1 to 1.5.0.945 I'm having problem with this line of code: @ie2.frame("main").frame("mid").div(:id,"myID").click When I run this code from the 1.4.1 environment it works In the 1.5.0.945 I get "unable to locate object using id . Is this the same issue as click_no_wait_divs ?? Since frame no longer has ie any suggestions on debugging this? -Linda _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060330/88a219d8/attachment.html From guru_sc at yahoo.com Thu Mar 30 17:22:43 2006 From: guru_sc at yahoo.com (Guru Subramanyam) Date: Thu, 30 Mar 2006 14:22:43 -0800 (PST) Subject: [Wtr-general] Double click on Javascript tree view Message-ID: <20060330222243.77680.qmail@web80323.mail.yahoo.com> Hi, I would like to know if Watir supports double clicks on a Javascript tree view. For my application, clicking on the plus is not very reliable and hence would prefer a double click action to expand contents Thanks in advance Regards Guru From zeljko.filipin at gmail.com Fri Mar 31 02:35:24 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 31 Mar 2006 09:35:24 +0200 Subject: [Wtr-general] Where should we discuss bugs in Watir 1.5? In-Reply-To: References: Message-ID: I would also read both. On 3/30/06, Bret Pettichord wrote: > > I have a question for the list. > > I'm working pretty hard on Watir 1.5 and there is a lot of discussion > around bugs, etc in it. > > Would it be better to have a separate list to discuss this effort, so that > wtr-general could focus more on supporting the released code? > > I'd read both, so it would make no difference for me, but i'm concerned > that this may be confusing for others. > > Bret > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -- http://www.testingreflections.com/blog/3071 http://iskusivac.blog.hr/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060331/407d94b9/attachment.html From zeljko.filipin at gmail.com Fri Mar 31 02:37:15 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 31 Mar 2006 09:37:15 +0200 Subject: [Wtr-general] Where should we discuss bugs in Watir 1.5? In-Reply-To: <00c701c65428$80887790$140117ac@piwo> References: <00c701c65428$80887790$140117ac@piwo> Message-ID: -1 for wtr-announce (new releases announced) I think announcements can stay at wtr-general (there are not so much of them, for now). On 3/30/06, Linda Derezinski wrote: > > +1 for wtr-general (released issues) > > wtr-dev (development build issues) > > wtr-announce (new releases announced) > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060331/b3f35b62/attachment.html From zeljko.filipin at gmail.com Fri Mar 31 02:42:51 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 31 Mar 2006 09:42:51 +0200 Subject: [Wtr-general] Update opens up another window with updated page butcontrol stays in the orginal window and not able to move tonext page in the flow from orginal window In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04E020F7699@EX5V.rl.gov> References: <9C0BD1E3DAF1204D842D72E2DCE2A04E020F7699@EX5V.rl.gov> Message-ID: +1 On 3/30/06, Cain, Mark wrote: > > If you could post [...] the HTML page your testing that would be helpful. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060331/2b0b6ca4/attachment.html From zeljko.filipin at gmail.com Fri Mar 31 02:58:37 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 31 Mar 2006 09:58:37 +0200 Subject: [Wtr-general] Double click on Javascript tree view In-Reply-To: <20060330222243.77680.qmail@web80323.mail.yahoo.com> References: <20060330222243.77680.qmail@web80323.mail.yahoo.com> Message-ID: I guess that double click fires some javascript event. Read here how to do it: http://wiki.openqa.org/display/WTR/FAQ#FAQ-TriggeringJavaScriptevents On 3/31/06, Guru Subramanyam wrote: > > > Hi, > > I would like to know if Watir supports double clicks > on a Javascript tree view. For my application, > clicking on the plus is not very reliable and hence > would prefer a double click action to expand contents > > Thanks in advance > > Regards > Guru > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- http://www.testingreflections.com/blog/3071 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060331/d5915068/attachment.html From browne.daniel at gmail.com Fri Mar 31 03:16:00 2006 From: browne.daniel at gmail.com (Daniel Browne) Date: Fri, 31 Mar 2006 09:16:00 +0100 Subject: [Wtr-general] Error getting document.all on Firefox with FireWatir In-Reply-To: References: Message-ID: <79518aef0603310016r5810ea9cm82ef9769851f74c7@mail.gmail.com> I'm new to Watir and have never used FireWatir, but do you not have to use: test = browser.show_all_objects p test I find it useful to experiment using "irb". Apologies if my advice isn't correct. Cheers, Daniel. On 30/03/06, Rodrigo Julian Martin wrote: > > > > Hi all! > > > > I'm trying to get all the objects in a web page using the following code: > > > > require 'watir' > > browser=Watir::Firefox.new > > browser.goto("http://www.dolarhoy.com") > > test=browser.document.all > > p test > > > > > > With this, test returns as nil. > > Is there any function or something like that to return the same as > document.all in internet explorer? > > > > Another question, just, in case, is there any way of getting the html source > code of the page loaded in Firefox > > > > > > Thank you so much > > Regards > > > > > > Rodrigo Julian Martin > > > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > From angrez at gmail.com Fri Mar 31 03:29:48 2006 From: angrez at gmail.com (Angrez Singh) Date: Fri, 31 Mar 2006 13:59:48 +0530 Subject: [Wtr-general] Error getting document.all on Firefox with FireWatir In-Reply-To: References: Message-ID: Hi, Try test = browser.document.body.all; This is how its currently implemented. For getting HTML source use: browser.text() Regards, Angrez On 3/30/06, Rodrigo Julian Martin wrote: > > Hi all! > > > > I'm trying to get all the objects in a web page using the following code: > > > > require 'watir' > > browser=Watir::Firefox.new > > browser.goto("http://www.dolarhoy.com") > > test=browser.document.all > > p test > > > > > > With this, test returns as nil. > > Is there any function or something like that to return the same as > document.all in internet explorer? > > > > Another question, just, in case, is there any way of getting the html > source code of the page loaded in Firefox > > > > > > Thank you so much > > Regards > > > > > > Rodrigo Julian Martin > > > > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060331/af1206a0/attachment.html From angrez at gmail.com Fri Mar 31 03:43:18 2006 From: angrez at gmail.com (Angrez Singh) Date: Fri, 31 Mar 2006 14:13:18 +0530 Subject: [Wtr-general] getting xpath to work In-Reply-To: References: Message-ID: Hi Bret, My understanding had been that we were supposed to install Rexml 3.1.3 and > then hand copy these over. > Correct. I recently updated Watir so that it modified the load_path obviating the > need for the hand-copying. > Sounds great.. But now it seems that this hand copying is unnecessary. Your doc says we > need Rexml 3.1.4. I thought these two files were what was need to upgrade > us from Rexml 3.1.3 (which is the latest available) to 3.1.4. > The latest available version of REXML is 3.1.3. This version has some bugs that were related to XPath support in WATiR. Without fixing these bugs we were not able to fire the XPath queries correctly. The two files fix bugs that are related to XPath support in WATiR only. The next version of REXML i.e. 3.1.4 will contain these fixes as well as other fixes for some other bugs . So, these two files are just for making XPath work correctly on top of the current official REXML version, not for upgrading REXML from 3.1.3 to 3.1.4. I'm guessing (I haven't tried this yet) that if someone were to install a development version of REXML later than 3.1.3, this should work out of the box and no additional files will then need to be used or distributed with WATiR to get XPath to work. Regards, Angrez -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060331/c83164e4/attachment.html From linda-list at innovatesolutions.com Fri Mar 31 04:44:15 2006 From: linda-list at innovatesolutions.com (Linda Derezinski) Date: Fri, 31 Mar 2006 04:44:15 -0500 Subject: [Wtr-general] Where should we discuss bugs in Watir 1.5? In-Reply-To: Message-ID: <00ac01c654a7$ac6e9e00$140117ac@piwo> Agreed that wtr-announce would be very low band width. That is the whole point. For people who subscribe to the digest version of wtr-general it's easy for the announcement messages to be missed due to the high volume (at times). My 2 cents -Linda _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: Friday, March 31, 2006 2:37 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Where should we discuss bugs in Watir 1.5? -1 for wtr-announce (new releases announced) I think announcements can stay at wtr-general (there are not so much of them, for now). -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060331/280af0b0/attachment.html From psattu at gmail.com Fri Mar 31 10:44:59 2006 From: psattu at gmail.com (Prakash Sattu) Date: Fri, 31 Mar 2006 09:44:59 -0600 Subject: [Wtr-general] How to Kill session in Watir Message-ID: I will go to my application through another application by supplying username and password, After successfully login, I will get access to my application. Once I am in the application there is no way to logout from my application unless I close the browser. The problem with testing Watir is, first time when I run the test case, it will run fine but if I run second time by default it logs in automatically but in the test it expects to login that is where it get fails.Even though, I close the browser by end of each test still when I run the test it logs in automatically. How to kill the session so that if I run the test next time, it should suppose to ask for username and password. Any help would be a great help. Regards Prakash -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060331/e3ddb2b2/attachment.html From linda-list at innovatesolutions.com Fri Mar 31 11:03:02 2006 From: linda-list at innovatesolutions.com (Linda Derezinski) Date: Fri, 31 Mar 2006 11:03:02 -0500 Subject: [Wtr-general] How to Kill session in Watir In-Reply-To: Message-ID: <013601c654dc$96b23ec0$140117ac@piwo> If you do the same thing by hand log into first application, log into your application then close your application, go to your application are you prompted with the login? _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Prakash Sattu Sent: Friday, March 31, 2006 10:45 AM To: Wtr-general at rubyforge.org Subject: [Wtr-general] How to Kill session in Watir I will go to my application through another application by supplying username and password, After successfully login, I will get access to my application. Once I am in the application there is no way to logout from my application unless I close the browser. The problem with testing Watir is, first time when I run the test case, it will run fine but if I run second time by default it logs in automatically but in the test it expects to login that is where it get fails.Even though, I close the browser by end of each test still when I run the test it logs in automatically. How to kill the session so that if I run the test next time, it should suppose to ask for username and password. Any help would be a great help. Regards Prakash -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060331/76d997c4/attachment.html From zeljko.filipin at gmail.com Fri Mar 31 11:03:22 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 31 Mar 2006 18:03:22 +0200 Subject: [Wtr-general] How to Kill session in Watir In-Reply-To: References: Message-ID: I am shure there is a better way, but I would insert sleep statement after ie.close (even sleep 30 or longer). Maybe your problem is already resolved in the latest watir. http://wiki.openqa.org/display/WTR/Development+Builds On 3/31/06, Prakash Sattu wrote: > > I will go to my application through another application by supplying > username and password, After successfully login, I will get access to my > application. Once I am in the application there is no way to logout from my > application unless I close the browser. The problem with testing Watir is, > first time when I run the test case, it will run fine but if I run second > time by default it logs in automatically but in the test it expects to login > that is where it get fails.Even though, I close the browser by end of each > test still when I run the test it logs in automatically. How to kill the > session so that if I run the test next time, it should suppose to ask for > username and password. Any help would be a great help. > > Regards > Prakash > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -- http://www.testingreflections.com/blog/3071 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060331/a3b9c859/attachment.html From tester.paul at gmail.com Fri Mar 31 11:07:18 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Fri, 31 Mar 2006 11:07:18 -0500 Subject: [Wtr-general] How to Kill session in Watir In-Reply-To: References: Message-ID: <37c405480603310807v47e421a5o55193a6cc5ef5b01@mail.gmail.com> Hello Prakash, unless I'm mistaken (and it's quite possible), it sounds like your session cookie is persistent between script runs. So even when you close the browser, it remembers that you were logged in so the next time you go to the site it logs you in automatically. Does that sound right? I'm not sure how to kill the session cookie for your app because every app is different. One thing I might suggest would be to include a bypass in your login script to see if the username field exists on the page. If the field exists, then proceed with login. If it doesn't, then just continue on with the home page. For example, something like: ie.goto( URL ) if ie.text_field(:name, /username/).exists? # enter username # enter password # click sign in button (or whatever) end ... Or something like that. There could be a dozen variations on a check like this. I did something similar with one of my login scripts too because sometimes a user will be prompted to change their password upon login, and sometimes they won't. I had to include the check so that the script didn't always assume that it had to enter that information. Hope this helps. Paul. On 31/03/06, Prakash Sattu wrote: > > I will go to my application through another application by supplying > username and password, After successfully login, I will get access to my > application. Once I am in the application there is no way to logout from my > application unless I close the browser. The problem with testing Watir is, > first time when I run the test case, it will run fine but if I run second > time by default it logs in automatically but in the test it expects to login > that is where it get fails.Even though, I close the browser by end of each > test still when I run the test it logs in automatically. How to kill the > session so that if I run the test next time, it should suppose to ask for > username and password. Any help would be a great help. > > Regards > Prakash > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060331/9c619e60/attachment.html From psattu at gmail.com Fri Mar 31 11:18:37 2006 From: psattu at gmail.com (Prakash Sattu) Date: Fri, 31 Mar 2006 10:18:37 -0600 Subject: [Wtr-general] How to Kill session in Watir In-Reply-To: <013601c654dc$96b23ec0$140117ac@piwo> References: <013601c654dc$96b23ec0$140117ac@piwo> Message-ID: If I do it manully, logging into the application, placing an order and closing the browser if I open new broswer, it will ask for username and password but with Watir test it automatically logins if I run the test second time, it does't ask for username and password. On 3/31/06, Linda Derezinski wrote: > > If you do the same thing by hand log into first application, log into > your application then close your application, go to your application are you > prompted with the login? > > > ------------------------------ > > *From:* wtr-general-bounces at rubyforge.org [mailto: > wtr-general-bounces at rubyforge.org] *On Behalf Of *Prakash Sattu > *Sent:* Friday, March 31, 2006 10:45 AM > *To:* Wtr-general at rubyforge.org > *Subject:* [Wtr-general] How to Kill session in Watir > > > > I will go to my application through another application by supplying > username and password, After successfully login, I will get access to my > application. Once I am in the application there is no way to logout from my > application unless I close the browser. The problem with testing Watir is, > first time when I run the test case, it will run fine but if I run second > time by default it logs in automatically but in the test it expects to login > that is where it get fails.Even though, I close the browser by end of each > test still when I run the test it logs in automatically. How to kill the > session so that if I run the test next time, it should suppose to ask for > username and password. Any help would be a great help. > > > > Regards > > Prakash > > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060331/b9a4f573/attachment.html From psattu at gmail.com Fri Mar 31 11:42:11 2006 From: psattu at gmail.com (Prakash Sattu) Date: Fri, 31 Mar 2006 10:42:11 -0600 Subject: [Wtr-general] How to Kill session in Watir In-Reply-To: <37c405480603310807v47e421a5o55193a6cc5ef5b01@mail.gmail.com> References: <37c405480603310807v47e421a5o55193a6cc5ef5b01@mail.gmail.com> Message-ID: Thanks Paul..Whatever you said perfectly right! The suggestion you gave me definately going to work for my problem let me try. Thanks & Regards, Prakash On 3/31/06, Paul Carvalho wrote: > > Hello Prakash, unless I'm mistaken (and it's quite possible), it sounds > like your session cookie is persistent between script runs. So even when > you close the browser, it remembers that you were logged in so the next time > you go to the site it logs you in automatically. Does that sound right? > > I'm not sure how to kill the session cookie for your app because every app > is different. One thing I might suggest would be to include a bypass in > your login script to see if the username field exists on the page. If the > field exists, then proceed with login. If it doesn't, then just continue on > with the home page. > > For example, something like: > > ie.goto( URL ) > if ie.text_field(:name, /username/).exists? > # enter username > # enter password > # click sign in button (or whatever) > end > ... > > Or something like that. There could be a dozen variations on a check like > this. > > I did something similar with one of my login scripts too because sometimes > a user will be prompted to change their password upon login, and sometimes > they won't. I had to include the check so that the script didn't always > assume that it had to enter that information. > > Hope this helps. Paul. > > > > On 31/03/06, Prakash Sattu wrote: > > > > I will go to my application through another application by supplying > > username and password, After successfully login, I will get access to my > > application. Once I am in the application there is no way to logout from my > > application unless I close the browser. The problem with testing Watir is, > > first time when I run the test case, it will run fine but if I run second > > time by default it logs in automatically but in the test it expects to login > > that is where it get fails.Even though, I close the browser by end of > > each test still when I run the test it logs in automatically. How to kill > > the session so that if I run the test next time, it should suppose to ask > > for username and password. Any help would be a great help. > > > > Regards > > Prakash > > > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060331/01876110/attachment.html From bret at pettichord.com Fri Mar 31 11:54:43 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 31 Mar 2006 10:54:43 -0600 Subject: [Wtr-general] Where should we discuss bugs in Watir 1.5? In-Reply-To: <00ac01c654a7$ac6e9e00$140117ac@piwo> References: <00ac01c654a7$ac6e9e00$140117ac@piwo> Message-ID: FYI, in the past i've always sent out watir announcements so that they show up in ruby-forge news. http://rubyforge.org/projects/wtr/ Bret On 3/31/06, Linda Derezinski wrote: > > Agreed that wtr-announce would be very low band width. That is the whole > point. > > For people who subscribe to the digest version of wtr-general it's easy > for the announcement messages to be missed due to the high volume (at > times). > > My 2 cents > > -Linda > > > ------------------------------ > > *From:* wtr-general-bounces at rubyforge.org [mailto: > wtr-general-bounces at rubyforge.org] *On Behalf Of *Zeljko Filipin > *Sent:* Friday, March 31, 2006 2:37 AM > > *To:* wtr-general at rubyforge.org > *Subject:* Re: [Wtr-general] Where should we discuss bugs in Watir 1.5? > > > > -1 for wtr-announce (new releases announced) > > I think announcements can stay at wtr-general (there are not so much of > them, for now). > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060331/d98df6f9/attachment.html From christopher.mcmahon at gmail.com Fri Mar 31 12:07:20 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 31 Mar 2006 11:07:20 -0600 Subject: [Wtr-general] How to Kill session in Watir In-Reply-To: References: Message-ID: <72799cd70603310907x2ee0e173l2c2ca842bf866e30@mail.gmail.com> How to kill the > session so that if I run the test next time, it should suppose to ask for > username and password. Any help would be a great help. require 'win32ole' require 'watir' # the controller include Watir require 'Win32API' @ie = IE.new hWnd = @ie.ie.hWnd pid=" " * 32 thread= Win32API.new("user32", "GetWindowThreadProcessId", 'IP', 'I').Call(hWnd,pid) fixnum_pid = pid.unpack("L")[0] puts fixnum_pid Process.kill( 9 , fixnum_pid) From psattu at gmail.com Fri Mar 31 12:13:35 2006 From: psattu at gmail.com (Prakash Sattu) Date: Fri, 31 Mar 2006 11:13:35 -0600 Subject: [Wtr-general] How to Kill session in Watir In-Reply-To: <72799cd70603310907x2ee0e173l2c2ca842bf866e30@mail.gmail.com> References: <72799cd70603310907x2ee0e173l2c2ca842bf866e30@mail.gmail.com> Message-ID: Thank you very much Chris, let me try code On 3/31/06, Chris McMahon wrote: > > How to kill the > > session so that if I run the test next time, it should suppose to ask > for > > username and password. Any help would be a great help. > > > require 'win32ole' > require 'watir' # the controller > include Watir > require 'Win32API' > > @ie = IE.new > hWnd = @ie.ie.hWnd > pid=" " * 32 > thread= Win32API.new("user32", "GetWindowThreadProcessId", 'IP', > 'I').Call(hWnd,pid) > fixnum_pid = pid.unpack("L")[0] > puts fixnum_pid > Process.kill( 9 , fixnum_pid) > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060331/f6c3c289/attachment.html From warren at meyer-pollans.net Fri Mar 31 15:56:50 2006 From: warren at meyer-pollans.net (Warren Pollans) Date: Fri, 31 Mar 2006 15:56:50 -0500 Subject: [Wtr-general] firewatir question Message-ID: <442D9792.1030004@meyer-pollans.net> Hello, I've just installed firewatir and upgraded to the latest watir from svn at openqa.org - following the instructions given on this list. I'm running the tests now - they take a very very long time - for example: $ ruby checkbox_xpath_test.rb Loaded suite checkbox_xpath_test Started ....... Finished in -43.812 seconds. 7 tests, 45 assertions, 0 failures, 0 errors Can this be correct? I'm running xp pro in a vmware vm with a ubuntu 5.10 host (dell 700m, 1.25 GB memory). My watir tests, using IE, are pretty quick - and they're accessing remote sites. Is there something that I need to configure (or unconfigure) on firefox? I just installed it (1.5.0.1) and the firewatir extension. mozilla_all_tests.rb is running now - there are 14 dots on the line below "Started" - it doesn't look like anything is changing in the firefox window - it's changed from buttons to checkboxes. What have I missed? Thanks, Warren From guru_sc at yahoo.com Fri Mar 31 18:24:17 2006 From: guru_sc at yahoo.com (Guru Subramanyam) Date: Fri, 31 Mar 2006 15:24:17 -0800 (PST) Subject: [Wtr-general] Ruby and Watir version from IRB Message-ID: <20060331232417.91612.qmail@web80322.mail.yahoo.com> Hi, Is there a way to find out the version of Ruby and Watir from within the IRB? Thanks Guru From phanideepam at yahoo.com Fri Mar 31 18:38:41 2006 From: phanideepam at yahoo.com (Deepa Mallapareddy) Date: Fri, 31 Mar 2006 15:38:41 -0800 (PST) Subject: [Wtr-general] Files as argument when running a suite Message-ID: <20060331233841.97917.qmail@web50908.mail.yahoo.com> Hi all, I have to give a config file( file with variables like username and pwd and URL ) as an argument when running a suite. and I should be able to use the variables in this entire test suite Im eunning. Can you please suggest Any input on this will be appreciated. Thanks in Advance! Deepa Whatever you can do or dream you can, begin it. Boldness has genius, power, and magic in it. --Johann Wolfgang von Goethe ------------------------------------------------------------------------ Deepa Mallapareddy, 4981,Catoctin Drive, Apt#15,San Diego CA - 92115 --------------------------------- How low will we go? Check out Yahoo! Messenger?s low PC-to-Phone call rates. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060331/90a95199/attachment.html From padhs2k at gmail.com Fri Mar 31 21:28:27 2006 From: padhs2k at gmail.com (Padhma N) Date: Fri, 31 Mar 2006 18:28:27 -0800 Subject: [Wtr-general] Help using Screen Capture Message-ID: <38c139080603311828vad5a37dw954551a4c565125@mail.gmail.com> Hi All, Sorry for my repost. I am still stuck up on this particular thing and thought I can try my luck again here.. Is there an autoscroll feature in Watir? I need to use screen_capture on my web page but the webpage is kinda long that it has be scrolled down to see the entire web page. The screen_capture functioanlity in Watir captures only the visible page. I am not whether there is an auto scroll feature that exists in Watir...Can someone please let me know?? Any suggestion will be really helpful. Thanks, Padhma -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060331/4f77249e/attachment.html