From bret at pettichord.com Mon Aug 1 00:25:49 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sun, 31 Jul 2005 23:25:49 -0500 Subject: [Wtr-general] Help Object Repository? In-Reply-To: <99DF6C0285C2CE4C99F02D7838571966017B7754@hue.cybersoft-vn. com> Message-ID: <5.1.0.14.2.20050731232421.06d4cae0@127.0.0.1> This is high on my list to make this work. Many people expect it to work this way and are surprised when it doesn't. Last week i paired with Elisabeth Hendrickson and Andy Tinkham and we started working on what it would take to implement this. Bret At 08:45 PM 7/28/2005, Hue Mach Dieu wrote: >Dear ALL, >Does anyone have define all object in one file and these object >reference by other test cases like [QuickTest Pro] or [Silktest] object >repository > ># ObjectRepository >require 'watir' >include Watir > >@ie = IE.new >@obj_leftFrame = @ie.frame("leftframe") >@obj_btnSubmit = @ie.frame("rightframe").button(:name, "Submit") > >I create test case ># testcase > >.. >@ie('http://localhost:8080') >... >@obj_btnSubmit.click > > >But it don't work > >Thank you for help > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Mon Aug 1 00:41:41 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sun, 31 Jul 2005 23:41:41 -0500 Subject: [Wtr-general] (possibly) Introducing WatirMaker In-Reply-To: <640C9D8653C87C44AB5F00F91A91FE210D4B25@edison.elevenwirele ss.com> Message-ID: <5.1.0.14.2.20050731233652.06d5ca88@127.0.0.1> At 10:27 AM 7/28/2005, Michael Kelly wrote: >There's no reason why it couldn't be written in Ruby, no? The support for working with events in Ruby's WIN32OLE library is extremely limited. You can take a look at the code for IE#capture_events -- this pretty much pushes the limits of what you can do with events using the current WIN32OLE implementation. Undoubtedly, .Net gives much better support for COM. It would be really cool if someone were to beef up the WIN32OLE library to provide better support here -- this would require some C programming. Bret _____________________ Bret Pettichord www.pettichord.com From zeljko.filipin at gmail.com Mon Aug 1 03:32:14 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Mon, 1 Aug 2005 09:32:14 +0200 Subject: [Wtr-general] press 'Yes' using Watir In-Reply-To: <200507310524.j6V5OKcR029663@rubyforge.org> Message-ID: <42edcfd0.320b70f8.6d86.5ff5@mx.gmail.com> Go to the page with 'Yes' button. Click 'View > Source' in IE. If you can find something like this: then this will click it: ie.button(:value,'Yes').click If your button is JavaScript pop up, then go here for help: http://rubyforge.org/pipermail/wtr-general/2005-May/001676.html Zeljko ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Dmytro Sent: Sunday, July 31, 2005 7:30 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] press 'Yes' using Watir Does any one know how to press 'Yes' button on the window using Watir 1.3? From huemach at Cybersoft-VN.com Mon Aug 1 04:39:22 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Mon, 1 Aug 2005 15:39:22 +0700 Subject: [Wtr-general] Help check Popup dialog exist? Message-ID: <99DF6C0285C2CE4C99F02D7838571966017E5DCA@hue.cybersoft-vn.com> Hi All, How can I check popup dialog exist or not Thank you for help? Regards, Hue From zeljko.filipin at gmail.com Mon Aug 1 05:25:11 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Mon, 1 Aug 2005 11:25:11 +0200 Subject: [Wtr-general] id In-Reply-To: Message-ID: <42edea47.42e70824.0b55.7e17@mx.gmail.com> Thanks, I got lost in this asp.net code, so I will pass it to the developer and see if he can and will use it. :) Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Atilla Ozgur Sent: Thursday, July 21, 2005 4:13 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] id Also your developer override naming of these identifiers. But i do not think he will want to do that. these should be Also your can developer override naming of these identifiers. But i do not think he will want to do that. protected void ctlDataGrid_RowDataBound(object sender, GridViewRowEventArgs e) { Label lbl = e.Row.FindControl("lblName") as Label; if (lbl != null) { // gets the server control Name generated by Asp.Net string unique = lbl.UniqueID; // gets the server control ID generated by Asp.Net string clientID = lbl.ClientID; // this is programmatic identifier you give to your control like lblName // this is what you can set. string id = lbl.ID; // this is my databinder object, most probably your developer uses // datarow of datatable object he needs to cast it accordingly. AppCenterEntity entity = e.Row.DataItem as AppCenterEntity; // RID is my primary key. lbl.ID = "lblName" + entity.RID.ToString(); lbl. } } _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From zeljko.filipin at gmail.com Mon Aug 1 07:25:41 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Mon, 1 Aug 2005 13:25:41 +0200 Subject: [Wtr-general] file_field.set Message-ID: <42ee0687.536ea523.2525.ffffc830@mx.gmail.com> 1) After I do: ie.file_field(:index,1).set('C:\file.txt') I get: Starting win setFileDialog in new process. Setting text C:\file.txt Starting app: C:/ruby/lib/ruby/site_ruby/1.8/watir/setFileDialog.rb C:\file.txt Is there a way to do this without this output? 2) After I do (there is a file field with this title at page): ie.file_field(:title,'title').set('C:\file.txt') I get: C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1939:in `assert_exists': Unable to locate object, using title and Document filename (Watir::Exception::UnknownObject Exception) from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3099:in `set' ... Will title be supported for file fields? I would like it. Zeljko From zeljko.filipin at gmail.com Mon Aug 1 08:26:09 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Mon, 1 Aug 2005 14:26:09 +0200 Subject: [Wtr-general] RE: file_field.set Message-ID: <42ee14b3.1fa14c0b.026a.ffff858e@mx.gmail.com> I would also like title support for other html elements (like checkbox). Zeljko -----Original Message----- From: Zeljko Filipin [mailto:zeljko.filipin at gmail.com] Sent: Monday, August 01, 2005 1:26 PM To: wtr-general at rubyforge.org Subject: file_field.set 1) After I do: ie.file_field(:index,1).set('C:\file.txt') I get: Starting win setFileDialog in new process. Setting text C:\file.txt Starting app: C:/ruby/lib/ruby/site_ruby/1.8/watir/setFileDialog.rb C:\file.txt Is there a way to do this without this output? 2) After I do (there is a file field with this title at page): ie.file_field(:title,'title').set('C:\file.txt') I get: C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1939:in `assert_exists': Unable to locate object, using title and Document filename (Watir::Exception::UnknownObject Exception) from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3099:in `set' ... Will title be supported for file fields? I would like it. Zeljko From Mark_Cain at rl.gov Mon Aug 1 10:31:13 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Mon, 1 Aug 2005 07:31:13 -0700 Subject: [Wtr-general] Question - Why ruby? Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D300@EX5V.rl.gov> My 2 cents...for whatever it is worth. I started using Python's PAMIE framework to automate. However, the support was sporadic (the guy working on it was very busy and couldn't devote enough time to support the framework). Eventually I ran into a roadblock with popups (ironic given the volume of messages on this subject)--the framework had not evolved enough to support this activity yet. I also looked at SAMIE (way too cryptic), IEUnit (same roadblock as PAMIE) as well as a bout 15 other frameworks all boasting to have what I needed at a price. Enter Ruby. WATIR is by far the most complete web testing framework out here--that doesn't cost an arm and a leg. And this forum is the most active and well supported that I have seen. You can post a question and is just a short period of time get someone (most of the time the architects of the framework!) who will steer you in the right direct, give you a work around to get over any roadblocks, or add it to the framework if it doesn't currently exist. That is the reason I switched and tell everyone interest (and those not) that Ruby is the way to go! Save your money, get WATIR! --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Raghu Venkataramana Sent: Sunday, July 31, 2005 8:28 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Question - Why ruby? Bret, Jonathan: Thanks for these notes. I personally like Ruby's object oriented approach. The only 'flip' I found about ruby that I find is the relatively scarce resources / documentation when compared to Python. Almost all searches point to a different version of the 'pragmatic programmer'. Are there other online resources that you guys could point me to? For example, when trying to do something with the Win32 API callbacks, I couldn't find much help. Thanks Raghu Bret Pettichord wrote: > Perl encourages cryptic code, which makes it a bad choice. It also > lacks an interactive shell. > > Python could work. Ruby was Brian Marick's choice and he was convinced > to switch from Python to Ruby when he sat with Dave Thomas and Andy > Hunt on a bus. > > At 12:26 PM 7/31/2005, Raghu Venkataramana wrote: > >> Hi All, >> >> I was explaining to my friend about Watir and its nice capabilities. >> In the middle of the conversation he asked me as to why Watir uses >> Ruby, which is not as well known as Perl, Python or other scripting >> languages. Is there a special reason why Ruby is being used or is >> just incidental. >> >> Thanks >> Raghu >> _______________________________________________ >> Wtr-general mailing list >> Wtr-general at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-general > > > _____________________ > Bret Pettichord > www.pettichord.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/20050801/2d47bb53/attachment.html From rubytalk at koredesign.com Mon Aug 1 11:42:18 2005 From: rubytalk at koredesign.com (Dmytro) Date: 01 Aug 2005 10:42:18 -0500 Subject: [Wtr-general] press 'Yes' using Watir In-Reply-To: <42edcfd0.320b70f8.6d86.5ff5@mx.gmail.com> Message-ID: <200508011536.j71FaTcR008171@rubyforge.org> RE: [Wtr-general] press 'Yes' using WatirSorry, I make a mistake. I need to click 'OK' button on the pop-up window. I've looked at http://rubyforge.org/pipermail/wtr-general/2005-May/001676.html about clearSecurityAlertBox... But I can't find answer for my problem there. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050801/dde157b9/attachment.html From alex at verk.info Mon Aug 1 12:24:40 2005 From: alex at verk.info (Alex Verhovsky) Date: Mon, 01 Aug 2005 10:24:40 -0600 Subject: [Wtr-general] Help Object Repository? In-Reply-To: <5.1.0.14.2.20050731232421.06d4cae0@127.0.0.1> References: <5.1.0.14.2.20050731232421.06d4cae0@127.0.0.1> Message-ID: <42EE4CC8.2060704@verk.info> Bret Pettichord wrote: > This is high on my list to make this work. Many people expect it to > work this way and are surprised when it doesn't. At 08:45 PM 7/28/2005, Hue Mach Dieu wrote: >> Does anyone have define all object in one file and these object >> reference by other test cases like [QuickTest Pro] or [Silktest] object >> repository > I take it, you are talking about page definitions, declarative style. I was thinking to write little something for our project that would allow me to declare UI elements in various pages, such as: test/watir/gui_maps/login.yml : url : /login.aspx user_name : @ie.text_field(:id, 'user_name') password : @ie.text_field(:id, 'password') submit_button : @ie.button(:id, 'submit') test/watir/test_login.rb ie = IE.new GuiMaps.set_app_root APP_ROOT_URL ... # go to login page and perform login GuiMaps.connect(ie, 'login') do |login_page| login_page.user_name.set_value('me') login_page.user_name.set_value('mypassword') login_page.submit_button.click end # now we should be at main page GuiMaps.apply_map(ie, 'main') do |page| ... end ...and so on Is that roughly what you are after? Best regards, Alex From bret at pettichord.com Mon Aug 1 12:04:44 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 01 Aug 2005 11:04:44 -0500 Subject: [Wtr-general] Pop up handling improvements In-Reply-To: <005701c592d9$5e6a9910$6400a8c0@NewDell> Message-ID: <5.1.0.14.2.20050801105952.03038378@127.0.0.1> I have a scheme that doesn't require this code to be in separate ruby files at all. I've tested it out and it works. Right now, using this code looks like this: ie.remote_eval <<-END button(:name, 'foo').click END dialog.button('Yes').click I'd appreciate comments on this interface, and the names it uses (remote_eval, dialog). Note that the first button click is run in a separate process (that blocks). This allows the script actions to appear in a logical sequence, rather than the inverted one that you need when the dialog button click is in the remote process. Bret At 01:31 PM 7/27/2005, Paul Rogers wrote: >The scripts that handle pop ups are in the unit test directory > >jscriptExtraAlert.rb >jscriptExtraConfirmCancel.rb >jscriptExtraConfirmOk.rb >jscriptPushButton.rb > >I suggest we move these to a better location - > >The C:\ruby\lib\ruby\site_ruby\1.8\watir seems like the best place ( or >maybe another dir below) > >We can then maybe add some methods to launch these from watir directly - > > >ie.launch_js_confirm_clicker() > >Or similar. I think this would be one small step to making these popups >easier to deal with. > >Any suggestions? > >Paul > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From christopher.mcmahon at gmail.com Mon Aug 1 12:39:45 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 1 Aug 2005 11:39:45 -0500 Subject: [Wtr-general] Pop up handling improvements In-Reply-To: <5.1.0.14.2.20050801105952.03038378@127.0.0.1> References: <005701c592d9$5e6a9910$6400a8c0@NewDell> <5.1.0.14.2.20050801105952.03038378@127.0.0.1> Message-ID: <72799cd70508010939490f6c38@mail.gmail.com> > I'd appreciate comments on this interface, and the names it uses > (remote_eval, dialog). Are you interested in using Wayne Vucenic' Ruby guitest for this? (There should be some big public announcements about a Rubyforge project for this RSN.) -Chris From tuyet.ctn at mscibarra.com Mon Aug 1 13:59:56 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Mon, 1 Aug 2005 10:59:56 -0700 Subject: [Wtr-general] irb: Terminate Batch Job message? Message-ID: Thanks, Tim, for the suggestion. It very helpful! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050801/bfe10fa2/attachment.html From zeljko.filipin at gmail.com Mon Aug 1 16:44:03 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Mon, 1 Aug 2005 22:44:03 +0200 Subject: [Wtr-general] press 'Yes' using Watir In-Reply-To: <200508011536.j71FaTcR008171@rubyforge.org> Message-ID: <42ee8963.1fba7000.2540.ffffe237@mx.gmail.com> 1) Look at watir unit tests 2) For searching archives try this in Google: site:rubyforge.org "[Wtr-general]" javascript (instead of "javascript" you can use anything you think can be usefull) Zeljko ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Dmytro Sent: Monday, August 01, 2005 5:42 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] press 'Yes' using Watir Sorry, I make a mistake. I need to click 'OK' button on the pop-up window. I've looked at http://rubyforge.org/pipermail/wtr-general/2005-May/001676.html about clearSecurityAlertBox... But I can't find answer for my problem there. From tuyet.ctn at mscibarra.com Mon Aug 1 18:05:12 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Mon, 1 Aug 2005 15:05:12 -0700 Subject: [Wtr-general] Calling a method with a regular expression as argument Message-ID: 1) In my script A, I have these commands that call a do_click method: w = RptFunctions.new icon = "/icon_customize.gif/" w.do_click(icon) 2) In the do_click method, I have this statement which clicks on an icon (there are 5 possible icons it can click on) ie.frame("main").frame("body").frame("tabs").image(:src, icon).click The problem is that the above statement always clicks on the first icon eventhough, the /icon_customize.gif/ is the 5th icon However, if I change the do_click method to specify to the "exact" icon, then it works: ie.frame("main").frame("body").frame("tabs").image(:src, /icon_customize.gif/ But, I need to be able to be able to click on any one of the 5 icons, so how do I do this without having to specify the exact icon. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050801/5db07da8/attachment.html From shaorobics at gmail.com Mon Aug 1 19:01:28 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Mon, 1 Aug 2005 19:01:28 -0400 Subject: [Wtr-general] Calling a method with a regular expression as argument In-Reply-To: References: Message-ID: <593b9ae8050801160137618116@mail.gmail.com> I don't think you need the quotes: icon = "/icon_customize.gif/" ....try changing it to icon = /icon_customize.gif/ From tuyet.ctn at mscibarra.com Mon Aug 1 21:55:20 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Mon, 1 Aug 2005 18:55:20 -0700 Subject: [Wtr-general] Calling a method with a regular expression as Message-ID: Thanks, Shao. It didn't work either. I decided to do a CASE statement inside the called routine and set the icon to the specific one depending on the icon number that I send in from the calling module. That seems to work. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050801/bb611ea2/attachment.html From tuyet.ctn at mscibarra.com Mon Aug 1 22:11:40 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Mon, 1 Aug 2005 19:11:40 -0700 Subject: [Wtr-general] Create an Equivalent of Segue's TestPlan in Watir? Message-ID: I'd like to create a Test Plan that contains 2 or more test cases. How do I do that? I read the WATIR User Guide p.18/19, and tried to copy what's there, but nothing got executed. I have two test cases: 1) login.rb 2) analysis.rb 1) This is the outline of Login.rb: class TC_Login < Test::Unit::TestCase def test_b_Login1 ...lots of WATIR code here - methods, etc. End End 2) This is the outline of Analysis.rb: class TC_Analysis < Test::Unit::TestCase def test_a_analysis1 ...lots of WATIR code here - methods, etc. End End 3) TestPlan.rb containing both of these test cases should like this? require 'test/unit' require 'test/unit/ui/console/testrunner' require 'watir/windowhelper' require 'watir/testUnitAddons' require 'login.rb' require 'analysis.rb' class TC_TestPlanA < Test::Unit::TestCase def test_a_analysis1 what should be here in this space? end def test_b_login1 what is should be here in this space? end end 4) One the DOS-prompt, I do this: > TestPlan.rb I know I am missing something crucial here because nothing is running. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050801/90906613/attachment.html From tuyet.ctn at mscibarra.com Mon Aug 1 22:13:46 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Mon, 1 Aug 2005 19:13:46 -0700 Subject: [Wtr-general] Command Line Arguments Message-ID: One of the developers asked me whether WATIR can read and process arguments from the DOS-prompt command line? Is there an easy way for WATIR to interface with the command line? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050801/c79ce95d/attachment.html From Tim.Feltham at orionhealth.com Mon Aug 1 22:22:15 2005 From: Tim.Feltham at orionhealth.com (Tim Feltham) Date: Tue, 2 Aug 2005 14:22:15 +1200 Subject: [Wtr-general] Command Line Arguments Message-ID: <0FDF67DB50EC904AAEA1B2A83A281050013A8B2D@mail.orion.internal> type "irb" at the command prompt (without the ") ________________________________ From: wtr-general-bounces at rubyforge.org on behalf of Tuyet Cong-Ton-Nu Sent: Tue 2/08/2005 2:13 p.m. To: wtr-general at rubyforge.org Subject: [Wtr-general] Command Line Arguments One of the developers asked me whether WATIR can read and process arguments from the DOS-prompt command line? Is there an easy way for WATIR to interface with the command line? -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 3674 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050802/bf6651e8/attachment.bin From bret at pettichord.com Mon Aug 1 22:28:50 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 01 Aug 2005 21:28:50 -0500 Subject: [Wtr-general] Pop up handling improvements In-Reply-To: <72799cd70508010939490f6c38@mail.gmail.com> References: <5.1.0.14.2.20050801105952.03038378@127.0.0.1> <005701c592d9$5e6a9910$6400a8c0@NewDell> <5.1.0.14.2.20050801105952.03038378@127.0.0.1> Message-ID: <5.1.0.14.2.20050801212203.031a39d8@127.0.0.1> What Wayne has done so far is send_keys. Whereas AutoIt has a lot more in it. It can attach to windows by title. It can pull text from dialogs. Lots of stuff. I plan to make heavy use of AutoIt in the updated popup code that will be released post 1.4. A pure Ruby solution would be more ... pure, but we need to be pragmatic. If the Ruby guitest gets to the point that it approaches AutoIt, then i'll look at using it. Bret At 11:39 AM 8/1/2005, Chris McMahon wrote: > > I'd appreciate comments on this interface, and the names it uses > > (remote_eval, dialog). > >Are you interested in using Wayne Vucenic' Ruby guitest for this? >(There should be some big public announcements about a Rubyforge >project for this RSN.) >-Chris > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From alex at verk.info Mon Aug 1 22:42:08 2005 From: alex at verk.info (Alex Verhovsky) Date: Mon, 01 Aug 2005 20:42:08 -0600 Subject: [Wtr-general] Command Line Arguments In-Reply-To: <0FDF67DB50EC904AAEA1B2A83A281050013A8B2D@mail.orion.internal> References: <0FDF67DB50EC904AAEA1B2A83A281050013A8B2D@mail.orion.internal> Message-ID: <42EEDD80.9000504@verk.info> Tim Feltham wrote: >type "irb" at the command prompt (without the ") > > Even better, there is this RubyForge project called 'breakpoint', http://ruby-breakpoint.rubyforge.org/wiki/wiki.pl?HomePage, which opens an IRB session inside a running Ruby program. With it, you can do something like test/watir/long_convoluted_test_script.rb require 'watir' include Watir config = load_configuration database = connect_to_database ie = IE.start('http:/foo.bar.com/login') ie.text_field(:id, 'username').set_value('me') ... ... ... # somewhere in the middle require 'breakpoint' breakpoint ... and this will execute the script until breakpoint and then open an IRB session in which the actual values of ie, configuration, database are available and even can be modified. As well as any other variable visible from the breakpoint location. Exiting the IRB continues the program. This is often the easiest way to get to the state that you want to play with. Besides, you can do conditional breakpoints breakpoint if Bottom line: don't leave home without it. Alex From bret at pettichord.com Mon Aug 1 22:32:04 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 01 Aug 2005 21:32:04 -0500 Subject: [Wtr-general] irb: Terminate Batch Job message? In-Reply-To: <0FDF67DB50EC904AAEA1B2A83A281050013A8B10@mail.orion.intern al> Message-ID: <5.1.0.14.2.20050801213100.03190b58@127.0.0.1> This uses an "unsupported" API. At 07:55 PM 7/29/2005, Tim Feltham wrote: >ie = IE.new(true) # the true tells it to not open an IE window >ie.attach_init("WindowTitle") # whatever the title of your window is The correct way is: ie = IE.attach(:title, "WindowTitle") _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Mon Aug 1 22:39:08 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 01 Aug 2005 21:39:08 -0500 Subject: [Wtr-general] irb: Terminate Batch Job message? In-Reply-To: <42EB73FA.4030502@clabs.org> References: Message-ID: <5.1.0.14.2.20050801213230.031d6df0@127.0.0.1> I discussed this at length last week with Brian Marick. He claims that you should be able to do ctrl-c in IRB and have it reset, without losing history etc. This would be useful if you get in a situation where you have unmatched quotes and parens and the like. He gets this all the time on his Mac and has seen it work right on Windows too. The problem is the windows batch script intercepts the ctrl-c before IRB can get it. The solution is to directly start irb without using the batch file. Thus: C:\>ruby c:\ruby\bin\irb irb(main):001:0> lets mess things up(" irb(main):002:1" a irb(main):003:1" why isn't irb working? irb(main):004:1" ^C irb(main):004:0> puts 'now it is fixed' now it is fixed => nil At 07:35 AM 7/30/2005, Chris Morris wrote: >Tuyet Cong-Ton-Nu wrote: > >>I don't know how to get back to irb when it gives me this message: >> >>Terminate batch job Y/N? >> >>It doesn't matter if I say Y or N, it terminates irb and sends me back to >>the command prompt which is not what I want when >> >>I select N. >The "terminate batch job Y/N" is not a part of irb itself, that's a >Windows thing. I believe the Windows installer for Ruby (which is not part >of the official Ruby release, but a separate project) creates this batch >file to make launching irb a simpler thing to do. The underlying problem >in your case is figuring out why irb is terminating suddenly. Once you get >the prompt to terminate the batch job or not, irb is already lost, which >is why answering N does no good. If you can figure out what sort of steps >lead to this behavior and post them here or to the Ruby list, maybe you >can get some better assistance. > >-- >Chris >http://clabs.org/blogki > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From chrismo at clabs.org Mon Aug 1 23:12:38 2005 From: chrismo at clabs.org (Chris Morris) Date: Mon, 01 Aug 2005 22:12:38 -0500 Subject: [Wtr-general] Question - Why ruby? In-Reply-To: <42ED96D2.7040509@qantom.com> References: <5.1.0.14.2.20050731150451.02e201a0@127.0.0.1> <42ED96D2.7040509@qantom.com> Message-ID: <42EEE4A6.8080105@clabs.org> Raghu Venkataramana wrote: > Are there other > online resources that you guys could point me to? For example, when > trying > to do something with the Win32 API callbacks, I couldn't find much help. Not a specific answer, but the Ruby list (comp.lang.ruby mirrored on the main Ruby mailing list, which you can get subscribe info from www.ruby-lang.org) is a great place to get help of any sort. Usually very responsive and informative. It's where I go if a quick Google doesn't turn up much. -- Chris http://clabs.org/blogki From jared at kilmore.info Mon Aug 1 23:27:32 2005 From: jared at kilmore.info (Jared Quinert) Date: Tue, 02 Aug 2005 13:27:32 +1000 Subject: [Wtr-general] Command Line Arguments In-Reply-To: References: Message-ID: <42EEE824.60505@kilmore.info> I think you are interested in ARGV[], which is an array containing all the command line arguments given when the ruby program was invoked. If you typed test_program.rb One Two Three, then ARGV[] would be the array ["One","Two","Three"] Jared > One of the developers asked me whether WATIR can read and process > arguments from the DOS-prompt command line? > > Is there an easy way for WATIR to interface with the command line? > >------------------------------------------------------------------------ > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > From bret at pettichord.com Mon Aug 1 22:47:28 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 01 Aug 2005 21:47:28 -0500 Subject: [Wtr-general] Create an Equivalent of Segue's TestPlan in Watir? In-Reply-To: Message-ID: <5.1.0.14.2.20050801214621.030e08a8@127.0.0.1> It's very easy: # testplan.rb require 'login.rb' require 'analysis.rb' that's it. At 09:11 PM 8/1/2005, Tuyet Cong-Ton-Nu wrote: >I d like to create a Test Plan that contains 2 or more test cases. > >How do I do that? I read the WATIR User Guide p.18/19, and tried to copy >what s there, but nothing got executed. > >I have two test cases: > >1) login.rb > >2) analysis.rb > > > >1) This is the outline of Login.rb: > >class TC_Login < Test::Unit::TestCase > > def test_b_Login1 > > &lots of WATIR code here methods, etc. > > End > >End > > > >2) This is the outline of Analysis.rb: > >class TC_Analysis < Test::Unit::TestCase > > def test_a_analysis1 > > &lots of WATIR code here methods, etc. > > End > >End > > > >3) TestPlan.rb containing both of these test cases should like this? > >require 'test/unit' > >require 'test/unit/ui/console/testrunner' > >require 'watir/windowhelper' > >require 'watir/testUnitAddons' > >require 'login.rb' > >require 'analysis.rb' > > > >class TC_TestPlanA < Test::Unit::TestCase > > def test_a_analysis1 > > what should be here in this space? > > end > > > > def test_b_login1 > > what is should be here in this space? > > end > >end > > > >4) One the DOS-prompt, I do this: > > > TestPlan.rb > > > >I know I am missing something crucial here because nothing is running. >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Tue Aug 2 00:21:40 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 01 Aug 2005 23:21:40 -0500 Subject: [Wtr-general] RE: file_field.set In-Reply-To: <42ee14b3.1fa14c0b.026a.ffff858e@mx.gmail.com> Message-ID: <5.1.0.14.2.20050801232032.030e5ec0@127.0.0.1> I don't understand this request. Can you show the html that includes the "title" for a checkbox? I didn't realize this was possible. Bret At 07:26 AM 8/1/2005, Zeljko Filipin wrote: >I would also like title support for other html elements (like checkbox). > >Zeljko > >-----Original Message----- >From: Zeljko Filipin [mailto:zeljko.filipin at gmail.com] >Sent: Monday, August 01, 2005 1:26 PM >To: wtr-general at rubyforge.org >Subject: file_field.set > >1) After I do: > >ie.file_field(:index,1).set('C:\file.txt') > >I get: > >Starting win setFileDialog in new process. Setting text C:\file.txt >Starting app: C:/ruby/lib/ruby/site_ruby/1.8/watir/setFileDialog.rb >C:\file.txt > >Is there a way to do this without this output? > >2) After I do (there is a file field with this title at page): > >ie.file_field(:title,'title').set('C:\file.txt') > >I get: > >C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1939:in `assert_exists': Unable to >locate object, using title and Document filename >(Watir::Exception::UnknownObject >Exception) > from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3099:in `set' >... > >Will title be supported for file fields? I would like it. > >Zeljko > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From zeljko.filipin at gmail.com Tue Aug 2 03:43:09 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 2 Aug 2005 09:43:09 +0200 Subject: [Wtr-general] RE: file_field.set In-Reply-To: <5.1.0.14.2.20050801232032.030e5ec0@127.0.0.1> Message-ID: <42ef23de.51bef19b.5dcb.1f14@mx.gmail.com> >From http://www.w3schools.com/tags/standardattributes.asp: Standard Attributes - HTML tags can have attributes. The special attributes for each tag are listed under each tag description. The attributes listed here are the core and language attributes that are standard for all tags (with a few exceptions). Core Attributes - Not valid in base, head, html, meta, param, script, style, and title elements. Attribute / Value / Description ... title / tooltip_text / A text to display in a tool tip ----- My html: Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Tuesday, August 02, 2005 6:22 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] RE: file_field.set I don't understand this request. Can you show the html that includes the "title" for a checkbox? I didn't realize this was possible. Bret At 07:26 AM 8/1/2005, Zeljko Filipin wrote: >I would also like title support for other html elements (like checkbox). > >Zeljko > >-----Original Message----- >From: Zeljko Filipin [mailto:zeljko.filipin at gmail.com] >Sent: Monday, August 01, 2005 1:26 PM >To: wtr-general at rubyforge.org >Subject: file_field.set > >1) After I do: > >ie.file_field(:index,1).set('C:\file.txt') > >I get: > >Starting win setFileDialog in new process. Setting text C:\file.txt >Starting app: C:/ruby/lib/ruby/site_ruby/1.8/watir/setFileDialog.rb >C:\file.txt > >Is there a way to do this without this output? > >2) After I do (there is a file field with this title at page): > >ie.file_field(:title,'title').set('C:\file.txt') > >I get: > >C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1939:in `assert_exists': Unable to >locate object, using title and Document filename >(Watir::Exception::UnknownObject >Exception) > from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3099:in `set' >... > >Will title be supported for file fields? I would like it. > >Zeljko > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From zeljko.filipin at gmail.com Tue Aug 2 05:37:13 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 2 Aug 2005 11:37:13 +0200 Subject: [Wtr-general] Inheritance Message-ID: <42ef3e9b.43d9dd46.0b55.570a@mx.gmail.com> This is not a watir, but a ruby question. In application under test, some items have attachments, some have description, and some have both. I know ruby does not support multiple inheritance, so I made class ItemDescriptionAttachment that has some redundant code ("attr_reader :attachments" and "@attachments=attachments"). Can class ItemDescriptionAttachment inherit "attr_reader :attachments" and "@attachments=attachments" from class ItemAttachment? Thaks. This is my code: class Item attr_reader :title def initialize(title) @title=title end end class ItemAttachment < Item attr_reader :attachments def initialize(title,attachments=nil) super(title) @attachments=attachments end end class ItemDescription < Item attr_reader :description def initialize(title,description=nil) super(title) @description=description end end class ItemDescriptionAttachment < ItemDescription attr_reader :attachments def initialize(title,description=nil,attachments=nil) super(title,description) @attachments=attachments end end Zeljko From Neumann at encoway.de Tue Aug 2 11:02:56 2005 From: Neumann at encoway.de (Neumann, Carsten - ENCOWAY) Date: Tue, 2 Aug 2005 17:02:56 +0200 Subject: [Wtr-general] space in link text Message-ID: <0E46E3619326224CB40CC30C2E36364E20BFE3@zde008.lenze.com> How can I click on a text-link in ruby, which contains a space between two words? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050802/f64c1a14/attachment.html From paul.rogers at shaw.ca Tue Aug 2 11:31:27 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 02 Aug 2005 09:31:27 -0600 Subject: [Wtr-general] RE: file_field.set Message-ID: <233865e233853a.233853a233865e@shaw.ca> the title is the tooltip for the checkbox. We support this on other objects, so it should be simple to make it work on checkboxes too Paul ----- Original Message ----- From: Bret Pettichord Date: Monday, August 1, 2005 10:21 pm Subject: Re: [Wtr-general] RE: file_field.set > I don't understand this request. Can you show the html that > includes the > "title" for a checkbox? I didn't realize this was possible. > > Bret > > At 07:26 AM 8/1/2005, Zeljko Filipin wrote: > >I would also like title support for other html elements (like > checkbox).> > >Zeljko > > > >-----Original Message----- > >From: Zeljko Filipin [zeljko.filipin at gmail.com] > >Sent: Monday, August 01, 2005 1:26 PM > >To: wtr-general at rubyforge.org > >Subject: file_field.set > > > >1) After I do: > > > >ie.file_field(:index,1).set('C:\file.txt') > > > >I get: > > > >Starting win setFileDialog in new process. Setting text C:\file.txt > >Starting app: C:/ruby/lib/ruby/site_ruby/1.8/watir/setFileDialog.rb > >C:\file.txt > > > >Is there a way to do this without this output? > > > >2) After I do (there is a file field with this title at page): > > > >ie.file_field(:title,'title').set('C:\file.txt') > > > >I get: > > > >C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1939:in `assert_exists': > Unable to > >locate object, using title and Document filename > >(Watir::Exception::UnknownObject > >Exception) > > from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3099:in `set' > >... > > > >Will title be supported for file fields? I would like it. > > > >Zeljko > > > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From tomfeo at presslogic.com Tue Aug 2 11:36:03 2005 From: tomfeo at presslogic.com (Tom) Date: Tue, 2 Aug 2005 09:36:03 -0600 Subject: [Wtr-general] space in link text In-Reply-To: <0E46E3619326224CB40CC30C2E36364E20BFE3@zde008.lenze.com> Message-ID: .link(:text, "Space Between Words").click Works for me, but if you're lazy: .link(:text, /Space/).click As long as the first link the regexp matches is the one you want clicked. _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Neumann, Carsten - ENCOWAY Sent: Tuesday, August 02, 2005 9:03 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] space in link text How can I click on a text-link in ruby, which contains a space between two words? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050802/9f032de4/attachment.html From paul.rogers at shaw.ca Tue Aug 2 11:36:30 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 02 Aug 2005 09:36:30 -0600 Subject: [Wtr-general] Pop up handling improvements Message-ID: <2335e26233700e.233700e2335e26@shaw.ca> nice! Im not sure about remote_eval, but dialog.button is great. Unfortunately I have no suggestions for remote_eval. Paul ----- Original Message ----- From: Bret Pettichord Date: Monday, August 1, 2005 10:04 am Subject: Re: [Wtr-general] Pop up handling improvements > I have a scheme that doesn't require this code to be in separate > ruby files > at all. I've tested it out and it works. > > Right now, using this code looks like this: > > ie.remote_eval <<-END > button(:name, 'foo').click > END > dialog.button('Yes').click > > I'd appreciate comments on this interface, and the names it uses > (remote_eval, dialog). > > Note that the first button click is run in a separate process > (that > blocks). This allows the script actions to appear in a logical > sequence, > rather than the inverted one that you need when the dialog button > click is > in the remote process. > > Bret > > > At 01:31 PM 7/27/2005, Paul Rogers wrote: > >The scripts that handle pop ups are in the unit test directory > > > >jscriptExtraAlert.rb > >jscriptExtraConfirmCancel.rb > >jscriptExtraConfirmOk.rb > >jscriptPushButton.rb > > > >I suggest we move these to a better location - > > > >The C:\ruby\lib\ruby\site_ruby\1.8\watir seems like the best > place ( or > >maybe another dir below) > > > >We can then maybe add some methods to launch these from watir > directly - > > > > > >ie.launch_js_confirm_clicker() > > > >Or similar. I think this would be one small step to making these > popups>easier to deal with. > > > >Any suggestions? > > > >Paul > > > > > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From bret at pettichord.com Tue Aug 2 11:43:31 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 02 Aug 2005 10:43:31 -0500 Subject: [Wtr-general] space in link text In-Reply-To: <0E46E3619326224CB40CC30C2E36364E20BFE3@zde008.lenze.com> Message-ID: <5.1.0.14.2.20050802104310.0314f030@127.0.0.1> ie.link(:text, "one two").click At 10:02 AM 8/2/2005, Neumann, Carsten - ENCOWAY wrote: >Content-class: urn:content-classes:message >Content-Type: multipart/alternative; > boundary="----_=_NextPart_001_01C59772.E23653B6" > >How can I click on a text-link in ruby, which contains a space between two >words? > >Thanks! > > > > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Tue Aug 2 11:42:19 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 02 Aug 2005 10:42:19 -0500 Subject: [Wtr-general] RE: file_field.set In-Reply-To: <42ef23de.51bef19b.5dcb.1f14@mx.gmail.com> References: <5.1.0.14.2.20050801232032.030e5ec0@127.0.0.1> Message-ID: <5.1.0.14.2.20050802104153.031c6368@127.0.0.1> Thanks for the clarification. I now realize that this is a reasonable request. Bret At 02:43 AM 8/2/2005, Zeljko Filipin wrote: > >From http://www.w3schools.com/tags/standardattributes.asp: > >Standard Attributes - HTML tags can have attributes. The special attributes >for each tag are listed under each tag description. The attributes listed >here are the core and language attributes that are standard for all tags >(with a few exceptions). > >Core Attributes - Not valid in base, head, html, meta, param, script, style, >and title elements. > >Attribute / Value / Description >... >title / tooltip_text / A text to display in a tool tip > >----- > >My html: > > > >Zeljko > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord >Sent: Tuesday, August 02, 2005 6:22 AM >To: wtr-general at rubyforge.org >Subject: Re: [Wtr-general] RE: file_field.set > >I don't understand this request. Can you show the html that includes the >"title" for a checkbox? I didn't realize this was possible. > >Bret > >At 07:26 AM 8/1/2005, Zeljko Filipin wrote: > >I would also like title support for other html elements (like checkbox). > > > >Zeljko > > > >-----Original Message----- > >From: Zeljko Filipin [mailto:zeljko.filipin at gmail.com] > >Sent: Monday, August 01, 2005 1:26 PM > >To: wtr-general at rubyforge.org > >Subject: file_field.set > > > >1) After I do: > > > >ie.file_field(:index,1).set('C:\file.txt') > > > >I get: > > > >Starting win setFileDialog in new process. Setting text C:\file.txt > >Starting app: C:/ruby/lib/ruby/site_ruby/1.8/watir/setFileDialog.rb > >C:\file.txt > > > >Is there a way to do this without this output? > > > >2) After I do (there is a file field with this title at page): > > > >ie.file_field(:title,'title').set('C:\file.txt') > > > >I get: > > > >C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1939:in `assert_exists': Unable to > >locate object, using title and Document filename > >(Watir::Exception::UnknownObject > >Exception) > > from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3099:in `set' > >... > > > >Will title be supported for file fields? I would like it. > > > >Zeljko > > > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > >_____________________ > Bret Pettichord > www.pettichord.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 _____________________ Bret Pettichord www.pettichord.com From Kim.Alexander at ElPaso.com Tue Aug 2 14:26:24 2005 From: Kim.Alexander at ElPaso.com (Alexander, Kim (Kim)) Date: Tue, 2 Aug 2005 13:26:24 -0500 Subject: [Wtr-general] Pop up handling improvements Message-ID: <51A0D9881DD5F1498CA1AAC9D30AFD2C1DB227@corhouexs08m.corp.epec.com> Is this in the tarball? How do we get access to this wonderful functinality? -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, August 02, 2005 10:37 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Pop up handling improvements nice! Im not sure about remote_eval, but dialog.button is great. Unfortunately I have no suggestions for remote_eval. Paul ----- Original Message ----- From: Bret Pettichord Date: Monday, August 1, 2005 10:04 am Subject: Re: [Wtr-general] Pop up handling improvements > I have a scheme that doesn't require this code to be in separate > ruby files > at all. I've tested it out and it works. > > Right now, using this code looks like this: > > ie.remote_eval <<-END > button(:name, 'foo').click > END > dialog.button('Yes').click > > I'd appreciate comments on this interface, and the names it uses > (remote_eval, dialog). > > Note that the first button click is run in a separate process > (that > blocks). This allows the script actions to appear in a logical > sequence, > rather than the inverted one that you need when the dialog button > click is > in the remote process. > > Bret > > > At 01:31 PM 7/27/2005, Paul Rogers wrote: > >The scripts that handle pop ups are in the unit test directory > > > >jscriptExtraAlert.rb > >jscriptExtraConfirmCancel.rb > >jscriptExtraConfirmOk.rb > >jscriptPushButton.rb > > > >I suggest we move these to a better location - > > > >The C:\ruby\lib\ruby\site_ruby\1.8\watir seems like the best > place ( or > >maybe another dir below) > > > >We can then maybe add some methods to launch these from watir > directly - > > > > > >ie.launch_js_confirm_clicker() > > > >Or similar. I think this would be one small step to making these > popups>easier to deal with. > > > >Any suggestions? > > > >Paul > > > > > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > _____________________ > Bret Pettichord > www.pettichord.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 ****************************************************************** This email and any files transmitted with it from the ElPaso Corporation are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. ****************************************************************** From tuyet.ctn at mscibarra.com Tue Aug 2 18:04:22 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Tue, 2 Aug 2005 15:04:22 -0700 Subject: [Wtr-general] Using Asserts Message-ID: I still can't get "Asserts" commands to work in the irb. I got all the "require" statements correctly (they return true), but here are some asserts statements that don't give me back anything. Maybe I don't know how to use them or decipher whether it's true or false: irb(main):046:1> assert_true(ie.contains_text("none") irb(main):047:2> assert_true(ie.contains_text("%%%none") irb(main):048:3> rescue => e irb(main):049:3> puts e irb(main):050:3> I get nothing here! I expected it to fail since there is no such text on my IE page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050802/5d1cc86a/attachment.html From Ben.Torres at rhi.com Tue Aug 2 18:06:17 2005 From: Ben.Torres at rhi.com (Torres, Ben (HQP)) Date: Tue, 2 Aug 2005 15:06:17 -0700 Subject: [Wtr-general] click image problem Message-ID: <1641BB0AA7287848817A63C3EE9677D5071D59E4@hqp-ex-mb05.na.msds.rhi.com> I tried doing ie.image(:src, /save_continue/).click but got the following error: c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2162:in `assert_exists': Unable to locat e object, using src and (?-mix:save_continue) (Watir::Exception::UnknownObjectEx ception) Am I missing something? Source from the page under test is below: -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Wednesday, July 27, 2005 7:44 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] click image problem Give this a go: $ie.image(:src ,/FBK-and/).click You may have to change the reg-exp if there are other images with the same ( or similar) name Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jan.Montano at thomson.com Sent: 27 July 2005 20:19 To: wtr-general at rubyforge.org Subject: [Wtr-general] click image problem Hi! I have this problem clicking this image... pls see attached htm for added info. here's the line of the image I want to click... I tried $ie.link(:url,"javascript:AddText(' AND ')").click $ie.button(:url,"javascript:AddText(' AND ')").click but it says unable to locate object. The only difference with this object is that the link does not appear in the status bar during mouseover. Thanks. <> -Jan _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From jkohl at telusplanet.net Tue Aug 2 18:08:11 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Tue, 2 Aug 2005 16:08:11 -0600 Subject: [Wtr-general] Using Asserts In-Reply-To: Message-ID: <20050802220845.QDWI7100.priv-edtnes28.telusplanet.net@tintin> I haven't been able to get assertions to work in IRB when using Watir either. I do a require for both Watir and test::unit, but it gets into a strange state. I wanted to do this for live demos, but have had to hand-wave at this point, and then run a script that prints out the assertions. Maybe someone else has a suggestion. Out of curiosity, why do you want to do this in IRB instead of saving the tests in test files? -Jonathan _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tuyet Cong-Ton-Nu Sent: August 2, 2005 4:04 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Using Asserts I still can't get "Asserts" commands to work in the irb. I got all the "require" statements correctly (they return true), but here are some asserts statements that don't give me back anything. Maybe I don't know how to use them or decipher whether it's true or false: irb(main):046:1> assert_true(ie.contains_text("none") irb(main):047:2> assert_true(ie.contains_text("%%%none") irb(main):048:3> rescue => e irb(main):049:3> puts e irb(main):050:3> I get nothing here! I expected it to fail since there is no such text on my IE page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050802/aeea650f/attachment.html From paul.rogers at shaw.ca Tue Aug 2 18:12:06 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 02 Aug 2005 16:12:06 -0600 Subject: [Wtr-general] click image problem Message-ID: <240439e2408482.2408482240439e@shaw.ca> I think an input type=image is actually a button. I need to add examples of this to the docs, so try: ie.button(:src , /save_continue/).click I dont have the code here with me right now, so Im guessing a bit... ----- Original Message ----- From: "Torres, Ben (HQP)" Date: Tuesday, August 2, 2005 4:06 pm Subject: RE: [Wtr-general] click image problem > I tried doing ie.image(:src, /save_continue/).click but got the > following error: > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2162:in `assert_exists': > Unableto locat > e object, using src and (?-mix:save_continue) > (Watir::Exception::UnknownObjectEx > ception) > > Am I missing something? Source from the page under test is below: > > > > src="/portal/beans/candidateregistrationbean/jsp/images/LOB/buttons/at-u > s/en/US/save_continue.gif" > width="135" height="30" border="0" > > onclick="document.frmCandidateInterview.Submit.value='Continue';return > monitor();" > /> > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Wednesday, July 27, 2005 7:44 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] click image problem > > Give this a go: > > $ie.image(:src ,/FBK-and/).click > > You may have to change the reg-exp if there are other images with the > same ( or similar) name > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [wtr-general-bounces at rubyforge.org] On Behalf Of > Jan.Montano at thomson.com > Sent: 27 July 2005 20:19 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] click image problem > > > Hi! > > I have this problem clicking this image... pls see attached htm for > added info. here's the line of the image I want to click... > SRC="../../images/RBJ_FBK-and.gif" WIDTH="48" HEIGHT="18" > border="0"> > > I tried > $ie.link(:url,"javascript:AddText(' AND ')").click > $ie.button(:url,"javascript:AddText(' AND ')").click > > but it says unable to locate object. The only difference with this > object is that the link does not appear in the status bar during > mouseover. Thanks. > > <> > -Jan > > _______________________________________________ > 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 Ben.Torres at rhi.com Tue Aug 2 18:15:37 2005 From: Ben.Torres at rhi.com (Torres, Ben (HQP)) Date: Tue, 2 Aug 2005 15:15:37 -0700 Subject: [Wtr-general] Command Line Arguments Message-ID: <1641BB0AA7287848817A63C3EE9677D5071D59F3@hqp-ex-mb05.na.msds.rhi.com> Hi, When I try using breakpoint from below, I get the following error: c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__': No such file to load -- breakpoint (LoadError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re quire' from C:/watir/CRIScripts/JobApply.rb:39 -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Alex Verhovsky Sent: Monday, August 01, 2005 7:42 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Command Line Arguments Tim Feltham wrote: >type "irb" at the command prompt (without the ") > > Even better, there is this RubyForge project called 'breakpoint', http://ruby-breakpoint.rubyforge.org/wiki/wiki.pl?HomePage, which opens an IRB session inside a running Ruby program. With it, you can do something like test/watir/long_convoluted_test_script.rb require 'watir' include Watir config = load_configuration database = connect_to_database ie = IE.start('http:/foo.bar.com/login') ie.text_field(:id, 'username').set_value('me') ... ... ... # somewhere in the middle require 'breakpoint' breakpoint ... and this will execute the script until breakpoint and then open an IRB session in which the actual values of ie, configuration, database are available and even can be modified. As well as any other variable visible from the breakpoint location. Exiting the IRB continues the program. This is often the easiest way to get to the state that you want to play with. Besides, you can do conditional breakpoints breakpoint if Bottom line: don't leave home without it. Alex _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Tue Aug 2 18:39:20 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 02 Aug 2005 17:39:20 -0500 Subject: [Wtr-general] Using Asserts In-Reply-To: Message-ID: <5.1.0.14.2.20050802173535.033555c0@127.0.0.1> You need to balance your parentheses. At 05:04 PM 8/2/2005, Tuyet Cong-Ton-Nu wrote: >I still can t get Asserts commands to work in the irb. > >I got all the require statements correctly (they return true), but here >are some asserts statements that don t give me back anything. > >Maybe I don t know how to use them or decipher whether it s true or false: > > > >irb(main):046:1> assert_true(ie.contains_text("none") > >irb(main):047:2> assert_true(ie.contains_text("%%%none") > >irb(main):048:3> rescue => e > >irb(main):049:3> puts e > >irb(main):050:3> I get nothing here! I expected it to fail since there is >no such text on my IE page > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Tue Aug 2 18:40:04 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 02 Aug 2005 17:40:04 -0500 Subject: [Wtr-general] Using Asserts In-Reply-To: <20050802220845.QDWI7100.priv-edtnes28.telusplanet.net@tint in> References: Message-ID: <5.1.0.14.2.20050802173933.01c2a7f8@127.0.0.1> Works for me: irb(main):010:0> require 'test/unit/assertions' => true irb(main):011:0> include Test::Unit::Assertions => Object irb(main):012:0> assert(true) => nil irb(main):013:0> assert(false) Test::Unit::AssertionFailedError: is not true. from c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:30:in `assert_block' from c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:28:in `_wrap_assertion ' from c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:28:in `assert_block' from c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:40:in `assert' from c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:38:in `_wrap_assertion ' from c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:38:in `assert' from (irb):13 irb(main):014:0> At 05:08 PM 8/2/2005, Jonathan Kohl wrote: >I haven t been able to get assertions to work in IRB when using Watir >either. I do a require for both Watir and test::unit, but it gets into a >strange state. I wanted to do this for live demos, but have had to >hand-wave at this point, and then run a script that prints out the >assertions. Maybe someone else has a suggestion. > > > >Out of curiosity, why do you want to do this in IRB instead of saving the >tests in test files? > > > >-Jonathan > > > > > >---------- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tuyet Cong-Ton-Nu >Sent: August 2, 2005 4:04 PM >To: wtr-general at rubyforge.org >Subject: [Wtr-general] Using Asserts > > > >I still can t get Asserts commands to work in the irb. > >I got all the require statements correctly (they return true), but here >are some asserts statements that don t give me back anything. > >Maybe I don t know how to use them or decipher whether it s true or false: > > > >irb(main):046:1> assert_true(ie.contains_text("none") > >irb(main):047:2> assert_true(ie.contains_text("%%%none") > >irb(main):048:3> rescue => e > >irb(main):049:3> puts e > >irb(main):050:3> I get nothing here! I expected it to fail since there is >no such text on my IE page > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From Ben.Torres at rhi.com Tue Aug 2 18:40:14 2005 From: Ben.Torres at rhi.com (Torres, Ben (HQP)) Date: Tue, 2 Aug 2005 15:40:14 -0700 Subject: [Wtr-general] If-else statements Message-ID: <1641BB0AA7287848817A63C3EE9677D5071D5A0F@hqp-ex-mb05.na.msds.rhi.com> What is the syntax for if-else statements? I am getting syntax errors when I have the following: if var1 != 'nil' test_env = var1 test_site = "http://web#{test_env}-at/" else test_env = "qae" test_site = "http://web#{test_env}-at/" From Ben.Torres at rhi.com Tue Aug 2 18:56:01 2005 From: Ben.Torres at rhi.com (Torres, Ben (HQP)) Date: Tue, 2 Aug 2005 15:56:01 -0700 Subject: [Wtr-general] click image problem Message-ID: <1641BB0AA7287848817A63C3EE9677D5071D5A2E@hqp-ex-mb05.na.msds.rhi.com> Cool, that worked...thanks! What if I have two buttons that are the same, but pushing one button adds from LIST1 and pushing the other button adds from LIST2? Here is the source below: -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, August 02, 2005 3:12 PM To: wtr-general at rubyforge.org Subject: Re: RE: [Wtr-general] click image problem I think an input type=image is actually a button. I need to add examples of this to the docs, so try: ie.button(:src , /save_continue/).click I dont have the code here with me right now, so Im guessing a bit... ----- Original Message ----- From: "Torres, Ben (HQP)" Date: Tuesday, August 2, 2005 4:06 pm Subject: RE: [Wtr-general] click image problem > I tried doing ie.image(:src, /save_continue/).click but got the > following error: > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2162:in `assert_exists': > Unableto locat > e object, using src and (?-mix:save_continue) > (Watir::Exception::UnknownObjectEx > ception) > > Am I missing something? Source from the page under test is below: > > > src="/portal/beans/candidateregistrationbean/jsp/images/LOB/buttons/at > -u > s/en/US/save_continue.gif" > width="135" height="30" border="0" > > onclick="document.frmCandidateInterview.Submit.value='Continue';return > monitor();" > /> > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Wednesday, July 27, 2005 7:44 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] click image problem > > Give this a go: > > $ie.image(:src ,/FBK-and/).click > > You may have to change the reg-exp if there are other images with the > same ( or similar) name > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [wtr-general-bounces at rubyforge.org] On Behalf Of > Jan.Montano at thomson.com > Sent: 27 July 2005 20:19 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] click image problem > > > Hi! > > I have this problem clicking this image... pls see attached htm for > added info. here's the line of the image I want to click... > SRC="../../images/RBJ_FBK-and.gif" WIDTH="48" HEIGHT="18" > border="0"> > > I tried > $ie.link(:url,"javascript:AddText(' AND ')").click > $ie.button(:url,"javascript:AddText(' AND ')").click > > but it says unable to locate object. The only difference with this > object is that the link does not appear in the status bar during > mouseover. Thanks. > > <> > -Jan > > _______________________________________________ > 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 jkohl at telusplanet.net Tue Aug 2 18:57:57 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Tue, 2 Aug 2005 16:57:57 -0600 Subject: [Wtr-general] Using Asserts In-Reply-To: <5.1.0.14.2.20050802173933.01c2a7f8@127.0.0.1> Message-ID: <20050802225830.EXGW14730.priv-edtnes56.telusplanet.net@tintin> Does that work if you also use Watir? I can get one or the other, but not both. > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Bret Pettichord > Sent: August 2, 2005 4:40 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Using Asserts > > Works for me: > > irb(main):010:0> require 'test/unit/assertions' > => true > irb(main):011:0> include Test::Unit::Assertions > => Object > irb(main):012:0> assert(true) > => nil > irb(main):013:0> assert(false) > Test::Unit::AssertionFailedError: is not true. > from c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:30:in > `assert_block' > from c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:28:in > `_wrap_assertion > ' > from c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:28:in > `assert_block' > from c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:40:in `assert' > from c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:38:in > `_wrap_assertion > ' > from c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:38:in `assert' > from (irb):13 > irb(main):014:0> > > At 05:08 PM 8/2/2005, Jonathan Kohl wrote: > > >I haven t been able to get assertions to work in IRB when using Watir > >either. I do a require for both Watir and test::unit, but it gets into a > >strange state. I wanted to do this for live demos, but have had to > >hand-wave at this point, and then run a script that prints out the > >assertions. Maybe someone else has a suggestion. > > > > > > > >Out of curiosity, why do you want to do this in IRB instead of saving the > >tests in test files? > > > > > > > >-Jonathan > > > > > > > > > > > >---------- > >From: wtr-general-bounces at rubyforge.org > >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tuyet Cong-Ton-Nu > >Sent: August 2, 2005 4:04 PM > >To: wtr-general at rubyforge.org > >Subject: [Wtr-general] Using Asserts > > > > > > > >I still can t get Asserts commands to work in the irb. > > > >I got all the require statements correctly (they return true), but here > >are some asserts statements that don t give me back anything. > > > >Maybe I don t know how to use them or decipher whether it s true or > false: > > > > > > > >irb(main):046:1> assert_true(ie.contains_text("none") > > > >irb(main):047:2> assert_true(ie.contains_text("%%%none") > > > >irb(main):048:3> rescue => e > > > >irb(main):049:3> puts e > > > >irb(main):050:3> I get nothing here! I expected it to fail since there > is > >no such text on my IE page > > > > > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From shaorobics at gmail.com Tue Aug 2 19:05:38 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Tue, 2 Aug 2005 19:05:38 -0400 Subject: [Wtr-general] If-else statements In-Reply-To: <1641BB0AA7287848817A63C3EE9677D5071D5A0F@hqp-ex-mb05.na.msds.rhi.com> References: <1641BB0AA7287848817A63C3EE9677D5071D5A0F@hqp-ex-mb05.na.msds.rhi.com> Message-ID: <593b9ae8050802160546a31d9c@mail.gmail.com> You're missing an "end" to close it off... if var1 != nil something else something else end You can also do something like this (which is easier if you have multiple conditions) case var1 when nil, "nil" # do this if var1 = 'nil' or var1 = nil something when 1, 3 # do this if var1 = 1 or var1 = 3 something when 2, 4 # do this if var1 = 2 or var1 = 4 something else # do this if var1 isn't any of the above something else end From paul.rogers at shaw.ca Tue Aug 2 19:17:48 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 02 Aug 2005 17:17:48 -0600 Subject: [Wtr-general] click image problem Message-ID: <241e1e0241c3a6.241c3a6241e1e0@shaw.ca> looks like in this case you will have to use an :index ie.image(:index, 1 ).click # add from LIST1 ie.image(:index, 2 ).click # add from LIST1 :index is ugly, so maybe this is a place where your deelopers can add an id to either the image tag or the link tag, like this: this.document.frmSkills.skillProf,this.document.frmSkills.skillProf, false, masterProfSkillsList);"> ----- Original Message ----- From: "Torres, Ben (HQP)" Date: Tuesday, August 2, 2005 4:56 pm Subject: RE: RE: [Wtr-general] click image problem > Cool, that worked...thanks! > > What if I have two buttons that are the same, but pushing one button > adds from LIST1 and pushing the other button adds from LIST2? > Here is > the source below: > > this.document.frmSkills.skillProf,this.document.frmSkills.skillProf, > false, masterProfSkillsList);"> > src="/registrationbean/jsp/images/LOB/buttons/at-us/en/US/add.gif" > alt="" width="87" height="30" hspace="5" border="0"> > > > this.document.frmSkills.skillSoft,this.document.frmSkills.skillSoft, > false, masterSoftwareSkillsList);"> > src="/registrationbean/jsp/images/LOB/buttons/at-us/en/US/add.gif" > alt="" width="87" height="30" hspace="5" border="0"> > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Tuesday, August 02, 2005 3:12 PM > To: wtr-general at rubyforge.org > Subject: Re: RE: [Wtr-general] click image problem > > I think an input type=image is actually a button. I need to add > examplesof this to the docs, so try: > > ie.button(:src , /save_continue/).click > > I dont have the code here with me right now, so Im guessing a bit... > > ----- Original Message ----- > From: "Torres, Ben (HQP)" > Date: Tuesday, August 2, 2005 4:06 pm > Subject: RE: [Wtr-general] click image problem > > > I tried doing ie.image(:src, /save_continue/).click but got the > > following error: > > > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2162:in `assert_exists': > > Unableto locat > > e object, using src and (?-mix:save_continue) > > (Watir::Exception::UnknownObjectEx > > ception) > > > > Am I missing something? Source from the page under test is below: > > > > > > > > src="/portal/beans/candidateregistrationbean/jsp/images/LOB/buttons/at> -u > > s/en/US/save_continue.gif" > > width="135" height="30" border="0" > > > > > onclick="document.frmCandidateInterview.Submit.value='Continue';return> monitor();" > > /> > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > > Sent: Wednesday, July 27, 2005 7:44 PM > > To: wtr-general at rubyforge.org > > Subject: RE: [Wtr-general] click image problem > > > > Give this a go: > > > > $ie.image(:src ,/FBK-and/).click > > > > You may have to change the reg-exp if there are other images > with the > > same ( or similar) name > > > > Paul > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [wtr-general-bounces at rubyforge.org] On Behalf Of > > Jan.Montano at thomson.com > > Sent: 27 July 2005 20:19 > > To: wtr-general at rubyforge.org > > Subject: [Wtr-general] click image problem > > > > > > Hi! > > > > I have this problem clicking this image... pls see attached htm > for > > added info. here's the line of the image I want to click... > > > SRC="../../images/RBJ_FBK-and.gif" WIDTH="48" HEIGHT="18" > > border="0"> > > > > I tried > > $ie.link(:url,"javascript:AddText(' AND ')").click > > $ie.button(:url,"javascript:AddText(' AND ')").click > > > > but it says unable to locate object. The only difference with > this > > object is that the link does not appear in the status bar during > > mouseover. Thanks. > > > > <> > > -Jan > > > > _______________________________________________ > > 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 Ben.Torres at rhi.com Tue Aug 2 19:59:31 2005 From: Ben.Torres at rhi.com (Torres, Ben (HQP)) Date: Tue, 2 Aug 2005 16:59:31 -0700 Subject: [Wtr-general] Security Alert pop up Message-ID: <1641BB0AA7287848817A63C3EE9677D5071D5A74@hqp-ex-mb05.na.msds.rhi.com> Can someone help me with the security alert box that pops up after I log into a webpage? The pop-up has "Security Alert" for the window title and 'Yes' and 'No' buttons. I would like to have Watir hit the 'Yes' button. I tried the following, but it didn't work: w = WinClicker.new w.clearSecurityAlertBox() The 'Yes' button wasn't pushed, and when I pushed yes manually and the script ended, some stuff printed on the screen: getWindowHandle - looking for: Security Alert Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: BaseBar Caption = Found window: BaseBar Caption = Found window: Auto-Suggest Dropdown Caption = Found window: tooltips_class32 Caption = Found window: WorkerW Caption = Found window: tooltips_class32 Caption = Found window: DV2ControlHost Caption =Start Menu Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: Shell_TrayWnd Caption = Found window: OfficeTooltip Caption =Font Size Found window: Auto-Suggest Dropdown Caption = Found window: SysFader Caption =SysFader Found window: tooltips_class32 Caption = Found window: ComboLBox Caption = Found window: OfficeTooltip Caption =Decrease Indent -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050802/c9bf8a76/attachment.html From tuyet.ctn at mscibarra.com Tue Aug 2 20:42:08 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Tue, 2 Aug 2005 17:42:08 -0700 Subject: [Wtr-general] Security Alert pop up Message-ID: You need these 2 attached files that will make it work; You need to put both in the C:\ruby\lib\ruby\site_ruby\1.8\watir directory I don't think they are in the 1.3 version (probably in tarball). Also add the code below, it works great for me. require 'watir' include Watir require 'watir/windowhelper' t = Thread.new(){ puts "Started thread for win helper" system('ruby winHelper_security.rb') } ie=IE.new() m = Thread.new(ie) { ie.goto("https://www.mysite.com") } m.join t.join -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050802/10984595/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: winHelper_security.rb Type: application/octet-stream Size: 165 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050802/10984595/attachment.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: WindowHelper.rb Type: application/octet-stream Size: 1341 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050802/10984595/attachment-0001.obj From wmamed at comcast.net Tue Aug 2 20:43:47 2005 From: wmamed at comcast.net (Walter Mamed) Date: Tue, 2 Aug 2005 19:43:47 -0500 Subject: [Wtr-general] Accolades to the WaTiR Developers and Community !! Message-ID: <000601c597c4$698e6110$6501a8c0@TopGun> WaTiR Rocks! I started using Watir back in February as a "Skunkworks Project" in order to reduce the test time after a push to "Production". I added more test cases daily and started using the same scripts in our "Staging Env". The progress continued until I was using the same WaTiR scripts for a larger and larger portion of regression testing in the "Test Env". The only unfortunate part is that I have had to do this on nights and weekends due to staffing reductions (but it's getting less and less as more automation is added) About a month (or so) ago I downloaded version 1.3! Access to the Hidden fields allowed me to login to my Single Sign On (SSO) portals (up to that point I was logging in manually and using the ie.attach ability - which was still better than testing manually!) Now I can regression test end-to-end! With the AutoIT capability addon and community posts I was able to use the file upload capabilities and extrapolate how to accomplish file download functionality and subsequently compare "test" files using the Ruby FileUtils.cmp capability! Needless to say, WaTiR is a great Test Automation Framework, the Developers are very responsive, the Community is very helpful as well and I have learned quite a bit. I plan to make a test tools presentation that includes WaTiR in Dallas at the Metro-SQA meeting in October! Thanks All! Walt Mamed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050802/a691b05c/attachment.html From jeff.darklight at gmail.com Tue Aug 2 22:36:53 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Tue, 2 Aug 2005 19:36:53 -0700 Subject: [Wtr-general] I have a couple of questions... Message-ID: I haven't gotten a computer setup with WATiR yet, but I wanted to see if I could get an answer before I got to it... #1 - If I do something like ie.link( :id, "blah" ) will it find the link regardless of frame on the page? or do I have to add stuff to specify the frame & then the link within it... #2 - If an auth dialog pops up, can I fill in the fields @ run time ... I know if the browser shows the login as part of a web page, I can set the text and submit, but I want to know, if it's truly AUTH based HTTP, will it let me fill in THOSE? I know I can do that with information in the URL, but I want to know about the dialog option. j. -- "So long, and thanks for all the fish" Jeff Wood From jkohl at telusplanet.net Tue Aug 2 22:45:08 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Tue, 2 Aug 2005 20:45:08 -0600 Subject: [Wtr-general] Using Asserts In-Reply-To: <5.1.0.14.2.20050802173933.01c2a7f8@127.0.0.1> Message-ID: <20050803024539.IVSY22059.priv-edtnes57.telusplanet.net@tintin> Thanks. I've got it now. I wasn't doing a require 'test/unit/assertions' -- I was mistakenly doing require 'test/unit', and not including this: Test::Unit::Assertions. (smacks forehead) Paul gave me a couple pointers and I have this working like a charm: irb(main):001:0> require 'watir' => true irb(main):002:0> require 'test/unit/assertions' => true irb(main):003:0> include Test::Unit::Assertions => Object irb(main):004:0> ie = Watir::IE.new => #, @defaultSleepTime=0.1, @error_ch eckers=[#], @logger=#, @shift_size=nil, @shift_age=nil, @filename=nil>, @level=2, @datetime_format="%d-%b-%Y %H:%M:%S" >, @typingspeed=0.08, @activeObjectHighLightColor="yellow", @enable_spinner=false, @url_list=[] > irb(main):005:0> ie.goto("http://www.google.com") => 0.391 irb(main):006:0> ie.text_field(:name, "q").set("pickaxe") => nil irb(main):007:0> ie.button(:value, "Google Search").click => nil irb(main):008:0> begin irb(main):009:1* assert(ie.contains_text("Programming Ruby") ) irb(main):010:1> puts("TEST PASSED. Found test string 'Programming Ruby' ") irb(main):011:1> rescue => e irb(main):012:1> puts("TEST FAILED." + e.message + "\n" + e.backtrace.join("\n")) irb(main):013:1>end TEST PASSED. Found test string 'Programming Ruby' => nil > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Bret Pettichord > Sent: August 2, 2005 4:40 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Using Asserts > > Works for me: > > irb(main):010:0> require 'test/unit/assertions' > => true > irb(main):011:0> include Test::Unit::Assertions > => Object > irb(main):012:0> assert(true) > => nil > irb(main):013:0> assert(false) > Test::Unit::AssertionFailedError: is not true. > from c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:30:in > `assert_block' > from c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:28:in > `_wrap_assertion > ' > from c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:28:in > `assert_block' > from c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:40:in `assert' > from c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:38:in > `_wrap_assertion > ' > from c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:38:in `assert' > from (irb):13 > irb(main):014:0> > > At 05:08 PM 8/2/2005, Jonathan Kohl wrote: > > >I haven t been able to get assertions to work in IRB when using Watir > >either. I do a require for both Watir and test::unit, but it gets into a > >strange state. I wanted to do this for live demos, but have had to > >hand-wave at this point, and then run a script that prints out the > >assertions. Maybe someone else has a suggestion. > > > > > > > >Out of curiosity, why do you want to do this in IRB instead of saving the > >tests in test files? > > > > > > > >-Jonathan > > > > > > > > > > > >---------- > >From: wtr-general-bounces at rubyforge.org > >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tuyet Cong-Ton-Nu > >Sent: August 2, 2005 4:04 PM > >To: wtr-general at rubyforge.org > >Subject: [Wtr-general] Using Asserts > > > > > > > >I still can t get Asserts commands to work in the irb. > > > >I got all the require statements correctly (they return true), but here > >are some asserts statements that don t give me back anything. > > > >Maybe I don t know how to use them or decipher whether it s true or > false: > > > > > > > >irb(main):046:1> assert_true(ie.contains_text("none") > > > >irb(main):047:2> assert_true(ie.contains_text("%%%none") > > > >irb(main):048:3> rescue => e > > > >irb(main):049:3> puts e > > > >irb(main):050:3> I get nothing here! I expected it to fail since there > is > >no such text on my IE page > > > > > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Tue Aug 2 22:52:40 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 02 Aug 2005 20:52:40 -0600 Subject: [Wtr-general] I have a couple of questions... In-Reply-To: Message-ID: <009601c597d6$69e22130$6400a8c0@NewDell> 1. no - you must specify the frame, like ie.frame(:index,2).link(:id,'blah').click 2. yes, but you have to use the Autoit tool to help you, its not too hard though. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood Sent: 02 August 2005 20:37 To: wtr-general at rubyforge.org Subject: [Wtr-general] I have a couple of questions... I haven't gotten a computer setup with WATiR yet, but I wanted to see if I could get an answer before I got to it... #1 - If I do something like ie.link( :id, "blah" ) will it find the link regardless of frame on the page? or do I have to add stuff to specify the frame & then the link within it... #2 - If an auth dialog pops up, can I fill in the fields @ run time ... I know if the browser shows the login as part of a web page, I can set the text and submit, but I want to know, if it's truly AUTH based HTTP, will it let me fill in THOSE? I know I can do that with information in the URL, but I want to know about the dialog option. j. -- "So long, and thanks for all the fish" Jeff Wood _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From jeff.darklight at gmail.com Tue Aug 2 22:57:49 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Tue, 2 Aug 2005 19:57:49 -0700 Subject: [Wtr-general] I have a couple of questions... In-Reply-To: <009601c597d6$69e22130$6400a8c0@NewDell> References: <009601c597d6$69e22130$6400a8c0@NewDell> Message-ID: Wow, thanks for the quick response ... So, with the .link or .frame or .blah calls, what do they return if it can't find the item ? or if it finds multiple? j. On 8/2/05, Paul Rogers wrote: > 1. no - you must specify the frame, like > ie.frame(:index,2).link(:id,'blah').click > 2. yes, but you have to use the Autoit tool to help you, its not too > hard though. > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood > Sent: 02 August 2005 20:37 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] I have a couple of questions... > > > I haven't gotten a computer setup with WATiR yet, but I wanted to see if > I could get an answer before I got to it... > > #1 - If I do something like ie.link( :id, "blah" ) will it find the link > regardless of frame on the page? or do I have to add stuff to specify > the frame & then the link within it... > > #2 - If an auth dialog pops up, can I fill in the fields @ run time ... > > I know if the browser shows the login as part of a web page, I can set > the text and submit, but I want to know, if it's truly AUTH based HTTP, > will it let me fill in THOSE? > > I know I can do that with information in the URL, but I want to know > about the dialog option. > > j. > > -- > "So long, and thanks for all the fish" > > Jeff Wood > > _______________________________________________ > 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 > -- "So long, and thanks for all the fish" Jeff Wood From paul.rogers at shaw.ca Tue Aug 2 23:05:30 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 02 Aug 2005 21:05:30 -0600 Subject: [Wtr-general] I have a couple of questions... In-Reply-To: Message-ID: <009701c597d8$3498dad0$6400a8c0@NewDell> If it cant find it, it raises an ObjectNotFoundException. If there are multiple, it returns the first one. There have been suggestions we should raise an exception if there are multiple. Im not sure, as there is nothing preventing you from having the same name or id on html tags in the page. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood Sent: 02 August 2005 20:58 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] I have a couple of questions... Wow, thanks for the quick response ... So, with the .link or .frame or .blah calls, what do they return if it can't find the item ? or if it finds multiple? j. On 8/2/05, Paul Rogers wrote: > 1. no - you must specify the frame, like > ie.frame(:index,2).link(:id,'blah').click > 2. yes, but you have to use the Autoit tool to help you, its not too > hard though. > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood > Sent: 02 August 2005 20:37 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] I have a couple of questions... > > > I haven't gotten a computer setup with WATiR yet, but I wanted to see > if I could get an answer before I got to it... > > #1 - If I do something like ie.link( :id, "blah" ) will it find the > link regardless of frame on the page? or do I have to add stuff to > specify the frame & then the link within it... > > #2 - If an auth dialog pops up, can I fill in the fields @ run time > ... > > I know if the browser shows the login as part of a web page, I can set > the text and submit, but I want to know, if it's truly AUTH based > HTTP, will it let me fill in THOSE? > > I know I can do that with information in the URL, but I want to know > about the dialog option. > > j. > > -- > "So long, and thanks for all the fish" > > Jeff Wood > > _______________________________________________ > 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 > -- "So long, and thanks for all the fish" Jeff Wood _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From jeff.darklight at gmail.com Tue Aug 2 23:19:08 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Tue, 2 Aug 2005 20:19:08 -0700 Subject: [Wtr-general] I have a couple of questions... In-Reply-To: <009701c597d8$3498dad0$6400a8c0@NewDell> References: <009701c597d8$3498dad0$6400a8c0@NewDell> Message-ID: I don't mind the return the first one ... But, it really would be beneficial to be able to say, I don't know which frame this is in ... ( I've got situations where the dev team I support is moving things around a LOT ) ... so, If I can just say, I know it's called "BLAH" then find it whereever, but I'm sure I can code that up myself ( I just see it as useful ). Thanks for the blazing results... As soon as I get my testing dialed in, I'm going to show this to the company I work for ... I think I can get a pretty major following for this. ( we're a mid-large sized eComm company located in Seattle ). >From what I've seen so far, WATiR looks like it's going to solve a LOT of problems for me. Thank you for developing it. j. On 8/2/05, Paul Rogers wrote: > If it cant find it, it raises an ObjectNotFoundException. > If there are multiple, it returns the first one. There have been > suggestions we should raise an exception if there are multiple. Im not > sure, as there is nothing preventing you from having the same name or id > on html tags in the page. > > Paul > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood > Sent: 02 August 2005 20:58 > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] I have a couple of questions... > > > Wow, thanks for the quick response ... > > So, with the .link or .frame or .blah calls, what do they return if it > can't find the item ? or if it finds multiple? > > j. > > On 8/2/05, Paul Rogers wrote: > > 1. no - you must specify the frame, like > > ie.frame(:index,2).link(:id,'blah').click > > 2. yes, but you have to use the Autoit tool to help you, its not too > > hard though. > > > > Paul > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood > > Sent: 02 August 2005 20:37 > > To: wtr-general at rubyforge.org > > Subject: [Wtr-general] I have a couple of questions... > > > > > > I haven't gotten a computer setup with WATiR yet, but I wanted to see > > if I could get an answer before I got to it... > > > > #1 - If I do something like ie.link( :id, "blah" ) will it find the > > link regardless of frame on the page? or do I have to add stuff to > > specify the frame & then the link within it... > > > > #2 - If an auth dialog pops up, can I fill in the fields @ run time > > ... > > > > I know if the browser shows the login as part of a web page, I can set > > > the text and submit, but I want to know, if it's truly AUTH based > > HTTP, will it let me fill in THOSE? > > > > I know I can do that with information in the URL, but I want to know > > about the dialog option. > > > > j. > > > > -- > > "So long, and thanks for all the fish" > > > > Jeff Wood > > > > _______________________________________________ > > 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 > > > > > -- > "So long, and thanks for all the fish" > > Jeff Wood > > _______________________________________________ > 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 > -- "So long, and thanks for all the fish" Jeff Wood From Jan.Montano at thomson.com Tue Aug 2 23:20:37 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Wed, 3 Aug 2005 11:20:37 +0800 Subject: [Wtr-general] Accolades to the WaTiR Developers and Community !! Message-ID: Good luck! I agree with you. Watir, and this community ROCKS! -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Walter Mamed Sent: Wednesday, August 03, 2005 8:44 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Accolades to the WaTiR Developers and Community !! WaTiR Rocks! I started using Watir back in February as a "Skunkworks Project" in order to reduce the test time after a push to "Production". I added more test cases daily and started using the same scripts in our "Staging Env". The progress continued until I was using the same WaTiR scripts for a larger and larger portion of regression testing in the "Test Env". The only unfortunate part is that I have had to do this on nights and weekends due to staffing reductions (but it's getting less and less as more automation is added) About a month (or so) ago I downloaded version 1.3! Access to the Hidden fields allowed me to login to my Single Sign On (SSO) portals (up to that point I was logging in manually and using the ie.attach ability - which was still better than testing manually!) Now I can regression test end-to-end! With the AutoIT capability addon and community posts I was able to use the file upload capabilities and extrapolate how to accomplish file download functionality and subsequently compare "test" files using the Ruby FileUtils.cmp capability! Needless to say, WaTiR is a great Test Automation Framework, the Developers are very responsive, the Community is very helpful as well and I have learned quite a bit. I plan to make a test tools presentation that includes WaTiR in Dallas at the Metro-SQA meeting in October! Thanks All! Walt Mamed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050803/4186dcdf/attachment.html From paul.rogers at shaw.ca Tue Aug 2 23:33:20 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 02 Aug 2005 21:33:20 -0600 Subject: [Wtr-general] I have a couple of questions... In-Reply-To: Message-ID: <009d01c597dc$1899a950$6400a8c0@NewDell> I want to add a frame iterator object as soon as I get the chance: Ie.frames.each {|f| .... } When that's, there, it would be simple for you to add your 'click a link in any frame' method. It wont be this release though. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood Sent: 02 August 2005 21:19 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] I have a couple of questions... I don't mind the return the first one ... But, it really would be beneficial to be able to say, I don't know which frame this is in ... ( I've got situations where the dev team I support is moving things around a LOT ) ... so, If I can just say, I know it's called "BLAH" then find it whereever, but I'm sure I can code that up myself ( I just see it as useful ). Thanks for the blazing results... As soon as I get my testing dialed in, I'm going to show this to the company I work for ... I think I can get a pretty major following for this. ( we're a mid-large sized eComm company located in Seattle ). >From what I've seen so far, WATiR looks like it's going to solve a LOT of problems for me. Thank you for developing it. j. On 8/2/05, Paul Rogers wrote: > If it cant find it, it raises an ObjectNotFoundException. > If there are multiple, it returns the first one. There have been > suggestions we should raise an exception if there are multiple. Im not > sure, as there is nothing preventing you from having the same name or > id on html tags in the page. > > Paul > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood > Sent: 02 August 2005 20:58 > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] I have a couple of questions... > > > Wow, thanks for the quick response ... > > So, with the .link or .frame or .blah calls, what do they return if it > can't find the item ? or if it finds multiple? > > j. > > On 8/2/05, Paul Rogers wrote: > > 1. no - you must specify the frame, like > > ie.frame(:index,2).link(:id,'blah').click > > 2. yes, but you have to use the Autoit tool to help you, its not too > > hard though. > > > > Paul > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood > > Sent: 02 August 2005 20:37 > > To: wtr-general at rubyforge.org > > Subject: [Wtr-general] I have a couple of questions... > > > > > > I haven't gotten a computer setup with WATiR yet, but I wanted to > > see if I could get an answer before I got to it... > > > > #1 - If I do something like ie.link( :id, "blah" ) will it find the > > link regardless of frame on the page? or do I have to add stuff to > > specify the frame & then the link within it... > > > > #2 - If an auth dialog pops up, can I fill in the fields @ run time > > ... > > > > I know if the browser shows the login as part of a web page, I can > > set > > > the text and submit, but I want to know, if it's truly AUTH based > > HTTP, will it let me fill in THOSE? > > > > I know I can do that with information in the URL, but I want to know > > about the dialog option. > > > > j. > > > > -- > > "So long, and thanks for all the fish" > > > > Jeff Wood > > > > _______________________________________________ > > 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 > > > > > -- > "So long, and thanks for all the fish" > > Jeff Wood > > _______________________________________________ > 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 > -- "So long, and thanks for all the fish" Jeff Wood _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From christopher.mcmahon at gmail.com Tue Aug 2 23:35:25 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 2 Aug 2005 22:35:25 -0500 Subject: [Wtr-general] I have a couple of questions... In-Reply-To: References: <009701c597d8$3498dad0$6400a8c0@NewDell> Message-ID: <72799cd7050802203540b92355@mail.gmail.com> > But, it really would be beneficial to be able to say, I don't know > which frame this is in ... ( I've got situations where the dev team I > support is moving things around a LOT ) ... so, If I can just say, I > know it's called "BLAH" then find it whereever, but I'm sure I can > code that up myself ( I just see it as useful ). I've actually found that having to specify the frame in question turns out to be a blessing, not a curse. It's easy enough to do, and it is one of the features that really sets Watir apart from similar tools. -Chris From jeff.darklight at gmail.com Tue Aug 2 23:41:03 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Tue, 2 Aug 2005 20:41:03 -0700 Subject: [Wtr-general] I have a couple of questions... In-Reply-To: <72799cd7050802203540b92355@mail.gmail.com> References: <009701c597d8$3498dad0$6400a8c0@NewDell> <72799cd7050802203540b92355@mail.gmail.com> Message-ID: I'm not saying it's bad to be able to specify a frame ( I want x in y ) ... I'm saying, if you have more of a moving target, the ability to say I want x in whatever frame I can find it in ... I wouldn't want things that way, but I know of some dev teams that just can't leave anything alone, so you've go a large problem with supporting a moving target. j. On 8/2/05, Chris McMahon wrote: > > But, it really would be beneficial to be able to say, I don't know > > which frame this is in ... ( I've got situations where the dev team I > > support is moving things around a LOT ) ... so, If I can just say, I > > know it's called "BLAH" then find it whereever, but I'm sure I can > > code that up myself ( I just see it as useful ). > > I've actually found that having to specify the frame in question turns > out to be a blessing, not a curse. It's easy enough to do, and it is > one of the features that really sets Watir apart from similar tools. > -Chris > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "So long, and thanks for all the fish" Jeff Wood From jeff.darklight at gmail.com Tue Aug 2 23:42:46 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Tue, 2 Aug 2005 20:42:46 -0700 Subject: [Wtr-general] I have a couple of questions... In-Reply-To: <009d01c597dc$1899a950$6400a8c0@NewDell> References: <009d01c597dc$1899a950$6400a8c0@NewDell> Message-ID: That would be cool. Iterators on ALL of the browser objects would be good. (frames, buttons, text_input, images, etc. ). j. On 8/2/05, Paul Rogers wrote: > I want to add a frame iterator object as soon as I get the chance: > > Ie.frames.each {|f| .... } > > When that's, there, it would be simple for you to add your 'click a link > in any frame' method. It wont be this release though. > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood > Sent: 02 August 2005 21:19 > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] I have a couple of questions... > > > I don't mind the return the first one ... > > But, it really would be beneficial to be able to say, I don't know which > frame this is in ... ( I've got situations where the dev team I support > is moving things around a LOT ) ... so, If I can just say, I know it's > called "BLAH" then find it whereever, but I'm sure I can code that up > myself ( I just see it as useful ). > > Thanks for the blazing results... > > As soon as I get my testing dialed in, I'm going to show this to the > company I work for ... I think I can get a pretty major following for > this. ( we're a mid-large sized eComm company located in Seattle ). > > >From what I've seen so far, WATiR looks like it's going to solve a LOT > of problems for me. > > Thank you for developing it. > > j. > > > On 8/2/05, Paul Rogers wrote: > > If it cant find it, it raises an ObjectNotFoundException. > > If there are multiple, it returns the first one. There have been > > suggestions we should raise an exception if there are multiple. Im not > > > sure, as there is nothing preventing you from having the same name or > > id on html tags in the page. > > > > Paul > > > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood > > Sent: 02 August 2005 20:58 > > To: wtr-general at rubyforge.org > > Subject: Re: [Wtr-general] I have a couple of questions... > > > > > > Wow, thanks for the quick response ... > > > > So, with the .link or .frame or .blah calls, what do they return if it > > > can't find the item ? or if it finds multiple? > > > > j. > > > > On 8/2/05, Paul Rogers wrote: > > > 1. no - you must specify the frame, like > > > ie.frame(:index,2).link(:id,'blah').click > > > 2. yes, but you have to use the Autoit tool to help you, its not too > > > > hard though. > > > > > > Paul > > > > > > -----Original Message----- > > > From: wtr-general-bounces at rubyforge.org > > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood > > > Sent: 02 August 2005 20:37 > > > To: wtr-general at rubyforge.org > > > Subject: [Wtr-general] I have a couple of questions... > > > > > > > > > I haven't gotten a computer setup with WATiR yet, but I wanted to > > > see if I could get an answer before I got to it... > > > > > > #1 - If I do something like ie.link( :id, "blah" ) will it find the > > > link regardless of frame on the page? or do I have to add stuff to > > > specify the frame & then the link within it... > > > > > > #2 - If an auth dialog pops up, can I fill in the fields @ run time > > > ... > > > > > > I know if the browser shows the login as part of a web page, I can > > > set > > > > > the text and submit, but I want to know, if it's truly AUTH based > > > HTTP, will it let me fill in THOSE? > > > > > > I know I can do that with information in the URL, but I want to know > > > > about the dialog option. > > > > > > j. > > > > > > -- > > > "So long, and thanks for all the fish" > > > > > > Jeff Wood > > > > > > _______________________________________________ > > > 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 > > > > > > > > > -- > > "So long, and thanks for all the fish" > > > > Jeff Wood > > > > _______________________________________________ > > 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 > > > > > -- > "So long, and thanks for all the fish" > > Jeff Wood > > _______________________________________________ > 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 > -- "So long, and thanks for all the fish" Jeff Wood From paul.rogers at shaw.ca Tue Aug 2 23:56:46 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 02 Aug 2005 21:56:46 -0600 Subject: [Wtr-general] I have a couple of questions... In-Reply-To: Message-ID: <000001c597df$5ecf1ce0$6400a8c0@NewDell> Most of those are already there ;-) -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood Sent: 02 August 2005 21:43 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] I have a couple of questions... That would be cool. Iterators on ALL of the browser objects would be good. (frames, buttons, text_input, images, etc. ). j. On 8/2/05, Paul Rogers wrote: > I want to add a frame iterator object as soon as I get the chance: > > Ie.frames.each {|f| .... } > > When that's, there, it would be simple for you to add your 'click a > link in any frame' method. It wont be this release though. > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood > Sent: 02 August 2005 21:19 > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] I have a couple of questions... > > > I don't mind the return the first one ... > > But, it really would be beneficial to be able to say, I don't know > which frame this is in ... ( I've got situations where the dev team I > support is moving things around a LOT ) ... so, If I can just say, I > know it's called "BLAH" then find it whereever, but I'm sure I can > code that up myself ( I just see it as useful ). > > Thanks for the blazing results... > > As soon as I get my testing dialed in, I'm going to show this to the > company I work for ... I think I can get a pretty major following for > this. ( we're a mid-large sized eComm company located in Seattle ). > > >From what I've seen so far, WATiR looks like it's going to solve a > >LOT > of problems for me. > > Thank you for developing it. > > j. > > > On 8/2/05, Paul Rogers wrote: > > If it cant find it, it raises an ObjectNotFoundException. If there > > are multiple, it returns the first one. There have been suggestions > > we should raise an exception if there are multiple. Im not > > > sure, as there is nothing preventing you from having the same name > > or id on html tags in the page. > > > > Paul > > > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood > > Sent: 02 August 2005 20:58 > > To: wtr-general at rubyforge.org > > Subject: Re: [Wtr-general] I have a couple of questions... > > > > > > Wow, thanks for the quick response ... > > > > So, with the .link or .frame or .blah calls, what do they return if > > it > > > can't find the item ? or if it finds multiple? > > > > j. > > > > On 8/2/05, Paul Rogers wrote: > > > 1. no - you must specify the frame, like > > > ie.frame(:index,2).link(:id,'blah').click > > > 2. yes, but you have to use the Autoit tool to help you, its not > > > too > > > > hard though. > > > > > > Paul > > > > > > -----Original Message----- > > > From: wtr-general-bounces at rubyforge.org > > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood > > > Sent: 02 August 2005 20:37 > > > To: wtr-general at rubyforge.org > > > Subject: [Wtr-general] I have a couple of questions... > > > > > > > > > I haven't gotten a computer setup with WATiR yet, but I wanted to > > > see if I could get an answer before I got to it... > > > > > > #1 - If I do something like ie.link( :id, "blah" ) will it find > > > the link regardless of frame on the page? or do I have to add > > > stuff to specify the frame & then the link within it... > > > > > > #2 - If an auth dialog pops up, can I fill in the fields @ run > > > time ... > > > > > > I know if the browser shows the login as part of a web page, I can > > > set > > > > > the text and submit, but I want to know, if it's truly AUTH based > > > HTTP, will it let me fill in THOSE? > > > > > > I know I can do that with information in the URL, but I want to > > > know > > > > about the dialog option. > > > > > > j. > > > > > > -- > > > "So long, and thanks for all the fish" > > > > > > Jeff Wood > > > > > > _______________________________________________ > > > 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 > > > > > > > > > -- > > "So long, and thanks for all the fish" > > > > Jeff Wood > > > > _______________________________________________ > > 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 > > > > > -- > "So long, and thanks for all the fish" > > Jeff Wood > > _______________________________________________ > 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 > -- "So long, and thanks for all the fish" Jeff Wood _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From jeff.darklight at gmail.com Wed Aug 3 00:05:51 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Tue, 2 Aug 2005 21:05:51 -0700 Subject: [Wtr-general] I have a couple of questions... In-Reply-To: <000001c597df$5ecf1ce0$6400a8c0@NewDell> References: <000001c597df$5ecf1ce0$6400a8c0@NewDell> Message-ID: Excellent. I look forward to getting my test system up and running. AutoIT was mentioned, is that a free thing or a pay thing ... Not that I have a problem with paying for things, but it is a sizable investment for a company the size of which I work for. j. On 8/2/05, Paul Rogers wrote: > Most of those are already there ;-) > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood > Sent: 02 August 2005 21:43 > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] I have a couple of questions... > > > That would be cool. > > Iterators on ALL of the browser objects would be good. (frames, buttons, > text_input, images, etc. ). > > j. > > On 8/2/05, Paul Rogers wrote: > > I want to add a frame iterator object as soon as I get the chance: > > > > Ie.frames.each {|f| .... } > > > > When that's, there, it would be simple for you to add your 'click a > > link in any frame' method. It wont be this release though. > > > > Paul > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood > > Sent: 02 August 2005 21:19 > > To: wtr-general at rubyforge.org > > Subject: Re: [Wtr-general] I have a couple of questions... > > > > > > I don't mind the return the first one ... > > > > But, it really would be beneficial to be able to say, I don't know > > which frame this is in ... ( I've got situations where the dev team I > > support is moving things around a LOT ) ... so, If I can just say, I > > know it's called "BLAH" then find it whereever, but I'm sure I can > > code that up myself ( I just see it as useful ). > > > > Thanks for the blazing results... > > > > As soon as I get my testing dialed in, I'm going to show this to the > > company I work for ... I think I can get a pretty major following for > > this. ( we're a mid-large sized eComm company located in Seattle ). > > > > >From what I've seen so far, WATiR looks like it's going to solve a > > >LOT > > of problems for me. > > > > Thank you for developing it. > > > > j. > > > > > > On 8/2/05, Paul Rogers wrote: > > > If it cant find it, it raises an ObjectNotFoundException. If there > > > are multiple, it returns the first one. There have been suggestions > > > we should raise an exception if there are multiple. Im not > > > > > sure, as there is nothing preventing you from having the same name > > > or id on html tags in the page. > > > > > > Paul > > > > > > > > > -----Original Message----- > > > From: wtr-general-bounces at rubyforge.org > > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood > > > Sent: 02 August 2005 20:58 > > > To: wtr-general at rubyforge.org > > > Subject: Re: [Wtr-general] I have a couple of questions... > > > > > > > > > Wow, thanks for the quick response ... > > > > > > So, with the .link or .frame or .blah calls, what do they return if > > > it > > > > > can't find the item ? or if it finds multiple? > > > > > > j. > > > > > > On 8/2/05, Paul Rogers wrote: > > > > 1. no - you must specify the frame, like > > > > ie.frame(:index,2).link(:id,'blah').click > > > > 2. yes, but you have to use the Autoit tool to help you, its not > > > > too > > > > > > hard though. > > > > > > > > Paul > > > > > > > > -----Original Message----- > > > > From: wtr-general-bounces at rubyforge.org > > > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood > > > > Sent: 02 August 2005 20:37 > > > > To: wtr-general at rubyforge.org > > > > Subject: [Wtr-general] I have a couple of questions... > > > > > > > > > > > > I haven't gotten a computer setup with WATiR yet, but I wanted to > > > > see if I could get an answer before I got to it... > > > > > > > > #1 - If I do something like ie.link( :id, "blah" ) will it find > > > > the link regardless of frame on the page? or do I have to add > > > > stuff to specify the frame & then the link within it... > > > > > > > > #2 - If an auth dialog pops up, can I fill in the fields @ run > > > > time ... > > > > > > > > I know if the browser shows the login as part of a web page, I can > > > > > set > > > > > > > the text and submit, but I want to know, if it's truly AUTH based > > > > HTTP, will it let me fill in THOSE? > > > > > > > > I know I can do that with information in the URL, but I want to > > > > know > > > > > > about the dialog option. > > > > > > > > j. > > > > > > > > -- > > > > "So long, and thanks for all the fish" > > > > > > > > Jeff Wood > > > > > > > > _______________________________________________ > > > > 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 > > > > > > > > > > > > > -- > > > "So long, and thanks for all the fish" > > > > > > Jeff Wood > > > > > > _______________________________________________ > > > 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 > > > > > > > > > -- > > "So long, and thanks for all the fish" > > > > Jeff Wood > > > > _______________________________________________ > > 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 > > > > > -- > "So long, and thanks for all the fish" > > Jeff Wood > > _______________________________________________ > 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 > -- "So long, and thanks for all the fish" Jeff Wood From paul.rogers at shaw.ca Wed Aug 3 00:26:31 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 02 Aug 2005 22:26:31 -0600 Subject: [Wtr-general] I have a couple of questions... In-Reply-To: Message-ID: <000101c597e3$86636b40$6400a8c0@NewDell> Its free, and installed for you. You should check the terms of its license to make sure they are ok for what you are doing Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood Sent: 02 August 2005 22:06 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] I have a couple of questions... Excellent. I look forward to getting my test system up and running. AutoIT was mentioned, is that a free thing or a pay thing ... Not that I have a problem with paying for things, but it is a sizable investment for a company the size of which I work for. j. On 8/2/05, Paul Rogers wrote: > Most of those are already there ;-) > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood > Sent: 02 August 2005 21:43 > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] I have a couple of questions... > > > That would be cool. > > Iterators on ALL of the browser objects would be good. (frames, > buttons, text_input, images, etc. ). > > j. > > On 8/2/05, Paul Rogers wrote: > > I want to add a frame iterator object as soon as I get the chance: > > > > Ie.frames.each {|f| .... } > > > > When that's, there, it would be simple for you to add your 'click a > > link in any frame' method. It wont be this release though. > > > > Paul > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood > > Sent: 02 August 2005 21:19 > > To: wtr-general at rubyforge.org > > Subject: Re: [Wtr-general] I have a couple of questions... > > > > > > I don't mind the return the first one ... > > > > But, it really would be beneficial to be able to say, I don't know > > which frame this is in ... ( I've got situations where the dev team > > I support is moving things around a LOT ) ... so, If I can just say, > > I know it's called "BLAH" then find it whereever, but I'm sure I can > > code that up myself ( I just see it as useful ). > > > > Thanks for the blazing results... > > > > As soon as I get my testing dialed in, I'm going to show this to the > > company I work for ... I think I can get a pretty major following > > for this. ( we're a mid-large sized eComm company located in Seattle > > ). > > > > >From what I've seen so far, WATiR looks like it's going to solve a > > >LOT > > of problems for me. > > > > Thank you for developing it. > > > > j. > > > > > > On 8/2/05, Paul Rogers wrote: > > > If it cant find it, it raises an ObjectNotFoundException. If there > > > are multiple, it returns the first one. There have been > > > suggestions we should raise an exception if there are multiple. Im > > > not > > > > > sure, as there is nothing preventing you from having the same name > > > or id on html tags in the page. > > > > > > Paul > > > > > > > > > -----Original Message----- > > > From: wtr-general-bounces at rubyforge.org > > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood > > > Sent: 02 August 2005 20:58 > > > To: wtr-general at rubyforge.org > > > Subject: Re: [Wtr-general] I have a couple of questions... > > > > > > > > > Wow, thanks for the quick response ... > > > > > > So, with the .link or .frame or .blah calls, what do they return > > > if it > > > > > can't find the item ? or if it finds multiple? > > > > > > j. > > > > > > On 8/2/05, Paul Rogers wrote: > > > > 1. no - you must specify the frame, like > > > > ie.frame(:index,2).link(:id,'blah').click > > > > 2. yes, but you have to use the Autoit tool to help you, its not > > > > too > > > > > > hard though. > > > > > > > > Paul > > > > > > > > -----Original Message----- > > > > From: wtr-general-bounces at rubyforge.org > > > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff > > > > Wood > > > > Sent: 02 August 2005 20:37 > > > > To: wtr-general at rubyforge.org > > > > Subject: [Wtr-general] I have a couple of questions... > > > > > > > > > > > > I haven't gotten a computer setup with WATiR yet, but I wanted > > > > to see if I could get an answer before I got to it... > > > > > > > > #1 - If I do something like ie.link( :id, "blah" ) will it find > > > > the link regardless of frame on the page? or do I have to add > > > > stuff to specify the frame & then the link within it... > > > > > > > > #2 - If an auth dialog pops up, can I fill in the fields @ run > > > > time ... > > > > > > > > I know if the browser shows the login as part of a web page, I > > > > can > > > > > set > > > > > > > the text and submit, but I want to know, if it's truly AUTH > > > > based HTTP, will it let me fill in THOSE? > > > > > > > > I know I can do that with information in the URL, but I want to > > > > know > > > > > > about the dialog option. > > > > > > > > j. > > > > > > > > -- > > > > "So long, and thanks for all the fish" > > > > > > > > Jeff Wood > > > > > > > > _______________________________________________ > > > > 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 > > > > > > > > > > > > > -- > > > "So long, and thanks for all the fish" > > > > > > Jeff Wood > > > > > > _______________________________________________ > > > 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 > > > > > > > > > -- > > "So long, and thanks for all the fish" > > > > Jeff Wood > > > > _______________________________________________ > > 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 > > > > > -- > "So long, and thanks for all the fish" > > Jeff Wood > > _______________________________________________ > 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 > -- "So long, and thanks for all the fish" Jeff Wood _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From ashetty at velozglobal.com Wed Aug 3 00:57:44 2005 From: ashetty at velozglobal.com (Amita Shetty) Date: Tue, 2 Aug 2005 23:57:44 -0500 Subject: [Wtr-general] How to specify the order of execution of the tests? Message-ID: <48966054EF494649A988314F1C83077323B5C0@DC1Mail01> Hi, How to specify the order/sequence of execution of tests while running all tests in a folder at once? Right now the tests in the folder are executed in the order of their names alphabetically. Is there a way to specify the sequence of execution of tests? Thanks in advance Amitha From Neumann at encoway.de Wed Aug 3 03:34:03 2005 From: Neumann at encoway.de (Neumann, Carsten - ENCOWAY) Date: Wed, 3 Aug 2005 09:34:03 +0200 Subject: AW: [Wtr-general] space in link text Message-ID: <0E46E3619326224CB40CC30C2E36364E20BFE9@zde008.lenze.com> How can I click on a text-link in ruby, which contains a space between two words? The problem is, in the HTML source it says "one two", so .link(:text, "one two").click doesn't work. ________________________________ Von: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] Im Auftrag von Tom Gesendet: Dienstag, 2. August 2005 17:36 An: wtr-general at rubyforge.org Betreff: RE: [Wtr-general] space in link text Works for me, but if you're lazy: .link(:text, /Space/).click As long as the first link the regexp matches is the one you want clicked. ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Neumann, Carsten - ENCOWAY Sent: Tuesday, August 02, 2005 9:03 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] space in link text Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050803/66c735a8/attachment.html From zeljko.filipin at gmail.com Wed Aug 3 03:48:23 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 3 Aug 2005 09:48:23 +0200 Subject: [Wtr-general] space in link text In-Reply-To: <0E46E3619326224CB40CC30C2E36364E20BFE9@zde008.lenze.com> Message-ID: <42f0769a.74a7ec07.7432.2105@mx.gmail.com> Well, I can click one two with ie.link(:text,'one two').click Zeljko _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Neumann, Carsten - ENCOWAY Sent: Wednesday, August 03, 2005 9:34 AM To: wtr-general at rubyforge.org Subject: AW: [Wtr-general] space in link text How can I click on a text-link in ruby, which contains a space between two words? The problem is, in the HTML source it says "one two", so .link(:text, "one two").click doesn't work. _____ Von: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] Im Auftrag von Tom Gesendet: Dienstag, 2. August 2005 17:36 An: wtr-general at rubyforge.org Betreff: RE: [Wtr-general] space in link text Works for me, but if you're lazy: .link(:text, /Space/).click As long as the first link the regexp matches is the one you want clicked. _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Neumann, Carsten - ENCOWAY Sent: Tuesday, August 02, 2005 9:03 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] space in link text Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050803/279ae761/attachment.html From bret at pettichord.com Wed Aug 3 04:31:00 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 03 Aug 2005 03:31:00 -0500 Subject: [Wtr-general] Using Asserts In-Reply-To: <20050803024539.IVSY22059.priv-edtnes57.telusplanet.net@tin tin> References: <5.1.0.14.2.20050802173933.01c2a7f8@127.0.0.1> Message-ID: <5.1.0.14.2.20050803032712.02da2ba0@127.0.0.1> At 09:45 PM 8/2/2005, Jonathan Kohl wrote: >irb(main):008:0> begin >irb(main):009:1* assert(ie.contains_text("Programming Ruby") ) >irb(main):010:1> puts("TEST PASSED. Found test string 'Programming Ruby' >") >irb(main):011:1> rescue => e >irb(main):012:1> puts("TEST FAILED." + e.message + "\n" + >e.backtrace.join("\n")) >irb(main):013:1>end >TEST PASSED. Found test string 'Programming Ruby' Jonathan knows this, but for every one else, this does the same thing, more simply: >if ie.contains_text("Programming Ruby") > puts("TEST PASSED. Found test string 'Programming Ruby'") >else > puts("TEST FAILED.") >end This seems to trip a lot of people up. Jonathan, do our docs describe the simple way before talking about asserts? Bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Aug 3 04:33:27 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 03 Aug 2005 03:33:27 -0500 Subject: [Wtr-general] I have a couple of questions... In-Reply-To: <009701c597d8$3498dad0$6400a8c0@NewDell> References: Message-ID: <5.1.0.14.2.20050803033247.030e8a10@127.0.0.1> At 10:05 PM 8/2/2005, Paul Rogers wrote: >Im not >sure, as there is nothing preventing you from having the same name or id >on html tags in the page. It's non-conformant HTML if it has duplicate id's on a page (duplicate names are kosher). _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Aug 3 04:35:30 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 03 Aug 2005 03:35:30 -0500 Subject: [Wtr-general] I have a couple of questions... In-Reply-To: <009d01c597dc$1899a950$6400a8c0@NewDell> References: Message-ID: <5.1.0.14.2.20050803033418.030d4858@127.0.0.1> At 10:33 PM 8/2/2005, Paul Rogers wrote: >I want to add a frame iterator object as soon as I get the chance: > >Ie.frames.each {|f| .... } > >When that's, there, it would be simple for you to add your 'click a link >in any frame' method. It wont be this release though. > >Paul This will be harder than the other iterators because frame collections can be nested. If you only search document.frames[], you won't actually traverse all of the frames. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Aug 3 04:37:59 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 03 Aug 2005 03:37:59 -0500 Subject: [Wtr-general] I have a couple of questions... In-Reply-To: References: <009701c597d8$3498dad0$6400a8c0@NewDell> <009701c597d8$3498dad0$6400a8c0@NewDell> Message-ID: <5.1.0.14.2.20050803033640.030e2960@127.0.0.1> At 10:19 PM 8/2/2005, Jeff Wood wrote: >But, it really would be beneficial to be able to say, I don't know >which frame this is in ... ( I've got situations where the dev team I >support is moving things around a LOT ) ... so, If I can just say, I >know it's called "BLAH" then find it whereever, but I'm sure I can >code that up myself ( I just see it as useful ). You can write a function that does just this. You seem to have confused our open-source library with a closed-source tool that only lets you do what the vendor thinks you should want to do. Don't try to convince us this is a good idea -- just do it. Bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Aug 3 04:46:01 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 03 Aug 2005 03:46:01 -0500 Subject: [Wtr-general] Iterators In-Reply-To: References: <009d01c597dc$1899a950$6400a8c0@NewDell> <009d01c597dc$1899a950$6400a8c0@NewDell> Message-ID: <5.1.0.14.2.20050803033815.030e5720@127.0.0.1> At 10:42 PM 8/2/2005, Jeff Wood wrote: >Iterators on ALL of the browser objects would be good. (frames, >buttons, text_input, images, etc. ). Most of these are already in place. I have a question of my own. Would you like to see kind of thing work? target = nil ie.text_fields.each {| tf | target = tf if tf.name == "foo" and tf.title == "bar"} target.set("hooray") if target Bret _____________________ Bret Pettichord www.pettichord.com From Neumann at encoway.de Wed Aug 3 05:24:39 2005 From: Neumann at encoway.de (Neumann, Carsten - ENCOWAY) Date: Wed, 3 Aug 2005 11:24:39 +0200 Subject: [Wtr-general] identify image links by their url? Message-ID: <0E46E3619326224CB40CC30C2E36364E20BFEB@zde008.lenze.com> How can I click on an image-link using watir, if two images have the same "alt"-text? Can I use their url? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050803/7824e6cf/attachment.html From satti at qantom.com Wed Aug 3 05:39:29 2005 From: satti at qantom.com (Sathya Shankar) Date: Wed, 03 Aug 2005 15:09:29 +0530 Subject: [Wtr-general] identify image links by their url? In-Reply-To: <0E46E3619326224CB40CC30C2E36364E20BFEB@zde008.lenze.com> References: <0E46E3619326224CB40CC30C2E36364E20BFEB@zde008.lenze.com> Message-ID: <42F090D1.6090408@qantom.com> You can use the index of the image or the src of the image Sathya Shankar Neumann, Carsten - ENCOWAY wrote: > > > How can I click on an image-link using watir, if two images have the > same ?alt?-text? Can I use their url? > >------------------------------------------------------------------------ > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > From zeljko.filipin at gmail.com Wed Aug 3 05:36:05 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 3 Aug 2005 11:36:05 +0200 Subject: [Wtr-general] identify image links by their url? In-Reply-To: <0E46E3619326224CB40CC30C2E36364E20BFEB@zde008.lenze.com> Message-ID: <42f08fd6.77246f4a.69b1.fffffc66@mx.gmail.com> >From watir.rb: # The ways that are available to identify an html object depend upon the object type, but include # :id used for an object that has an ID attribute -- this is the best way! # :name used for an object that has a name attribute. # :value value of text fields, captions of buttons # :index finds the nth object of the specified type - eg button(:index , 2) finds the second button. This is 1 based.
# :beforeText finds the object immeditaley before the specified text. Doesnt work if the text is in a table cell # :afterText finds the object immeditaley after the specified text. Doesnt work if the text is in a table cell You can use src: ie.image(:src, 'image_src').click Zeljko ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Neumann, Carsten - ENCOWAY Sent: Wednesday, August 03, 2005 11:25 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] identify image links by their url? How can I click on an image-link using watir, if two images have the same "alt"-text? Can I use their url? From Neumann at encoway.de Wed Aug 3 07:49:44 2005 From: Neumann at encoway.de (Neumann, Carsten - ENCOWAY) Date: Wed, 3 Aug 2005 13:49:44 +0200 Subject: [Wtr-general] Javascript onClick Message-ID: <0E46E3619326224CB40CC30C2E36364E20BFEC@zde008.lenze.com> How can I tell Watir to click on a Javascript onClick? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050803/e4a95967/attachment.html From shaorobics at gmail.com Wed Aug 3 09:09:40 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Wed, 3 Aug 2005 09:09:40 -0400 Subject: [Wtr-general] Iterators In-Reply-To: <5.1.0.14.2.20050803033815.030e5720@127.0.0.1> References: <009d01c597dc$1899a950$6400a8c0@NewDell> <5.1.0.14.2.20050803033815.030e5720@127.0.0.1> Message-ID: <593b9ae80508030609411f69ad@mail.gmail.com> +1 :) I'd also put in a request for table cells...sometimes I work with tables that have more rows/columns than the row_count and column_count say they do. When I try a table[x][y].exists? I get an error On 8/3/05, Bret Pettichord wrote: > At 10:42 PM 8/2/2005, Jeff Wood wrote: > >Iterators on ALL of the browser objects would be good. (frames, > >buttons, text_input, images, etc. ). > > Most of these are already in place. > > I have a question of my own. Would you like to see kind of thing work? > > target = nil > ie.text_fields.each {| tf | target = tf if tf.name == "foo" and tf.title > == "bar"} > target.set("hooray") if target > > Bret > > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From zeljko.filipin at gmail.com Wed Aug 3 09:46:40 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 3 Aug 2005 15:46:40 +0200 Subject: [Wtr-general] Javascript onClick In-Reply-To: <0E46E3619326224CB40CC30C2E36364E20BFEC@zde008.lenze.com> Message-ID: <42f0ca92.59fa416b.322a.ffffce5d@mx.gmail.com> Try this: ie.text_field(:name, 'UserId").fire_event('onClick') Zeljko ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Neumann, Carsten - ENCOWAY Sent: Wednesday, August 03, 2005 1:50 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Javascript onClick How can I tell Watir to click on a Javascript onClick? From Mark_Cain at rl.gov Wed Aug 3 10:24:58 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Wed, 3 Aug 2005 07:24:58 -0700 Subject: [Wtr-general] How to specify the order of execution of the tests? Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D31A@EX5V.rl.gov> I ran into this in my test also. What I ended up doing is naming my tests: def test01_SomeMeaningfulTestName Code to test stuff end def test02_SomeMeaningfulTestName Code to test stuff end def test03_SomeMeaningfulTestName Code to test stuff End Etc. Note: 'alphabetical' appears to be ascii based meaning your results may be unexpected if you use numbers to try and force a specific order of execution. Which means 1 2 3 4 5 6 7 8 9 10 11 12...will actually be executed as 1 10 11 12 2 3 4 5 6 7 8 9. To get around this you would need to do this: 01 02 03 04 05 06 07 08 09 10 11 12... Forgive me if the seems overly obvious to you but it is usually the simple and obvious things that mess me up ;-). Hope this helps, --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Amita Shetty Sent: Tuesday, August 02, 2005 9:58 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] How to specify the order of execution of the tests? Hi, How to specify the order/sequence of execution of tests while running all tests in a folder at once? Right now the tests in the folder are executed in the order of their names alphabetically. Is there a way to specify the sequence of execution of tests? Thanks in advance Amitha _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Wed Aug 3 11:27:07 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 03 Aug 2005 09:27:07 -0600 Subject: [Wtr-general] I have a couple of questions... Message-ID: <24d005924d01e8.24d01e824d0059@shaw.ca> ah, good point. Should it perhaps only iterate the top level frames? and if you wanted lower level frames, you would apply an iterator to that frame. Seems like this way would save me work;-) But probably be less intuiitive. ----- Original Message ----- From: Bret Pettichord Date: Wednesday, August 3, 2005 2:35 am Subject: RE: [Wtr-general] I have a couple of questions... > At 10:33 PM 8/2/2005, Paul Rogers wrote: > >I want to add a frame iterator object as soon as I get the chance: > > > >Ie.frames.each {|f| .... } > > > >When that's, there, it would be simple for you to add your 'click > a link > >in any frame' method. It wont be this release though. > > > >Paul > > This will be harder than the other iterators because frame > collections can > be nested. If you only search document.frames[], you won't > actually > traverse all of the frames. > > > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From paul.rogers at shaw.ca Wed Aug 3 11:28:44 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 03 Aug 2005 09:28:44 -0600 Subject: [Wtr-general] identify image links by their url? Message-ID: <24d23be24d2d32.24d2d3224d23be@shaw.ca> yep, but its best to use a reg exp, otherwise you need the full path: ie.image(:src , /some_pic.gif/).click Content-class: urn:content-classes:message Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C5980C.CA4F3156" ------_=_NextPart_001_01C5980C.CA4F3156 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable How can I click on an image-link using watir, if two images have the same "alt"-text? Can I use their url? ------_=_NextPart_001_01C5980C.CA4F3156 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable identify image links by their url?

How = can I click on an image-link = using watir, = if two images have the same alt-text? Can I use their url?

------_=_NextPart_001_01C5980C.CA4F3156-- -------------- next part -------------- _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From dnjohannes at gmail.com Wed Aug 3 11:30:56 2005 From: dnjohannes at gmail.com (dnjohannes at gmail.com) Date: Wed, 3 Aug 2005 10:30:56 -0500 Subject: [Wtr-general] Question: Javascript/CSS onClick? Message-ID: <1684ad670508030830194398a9@mail.gmail.com> All, Forgive me if I am asking an obvious question, this is my second attempt to post this and get some sort of answer to my issue. Now I personally have a problem. I need to automate the login for further testing, but I cannot figure out how to access the 'Log In' button which has been defined in the Cascading Style Sheets. Any help would be appreciated. I have included HTML, CSS, and Javascript code. Dave -=-=- getHTML -=-=- irb(main):072:0> ie.frame("main").frame("frmLogin").getHTML => "\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
user:
password:
\r\n\r\n\r\n \r\n< /TBODY>
   
" -=-=- Form/Table for login data -=-=-
user:
password:
   
-=-=- Javascript -=-=- -=-=- CSS -=-=- td.loginOnOver{ background-image: url(../graphics/logindown.jpg); height: 22px; width: 60px; cursor: hand; } td.loginOnOut{ background-image: url(../graphics/loginup.jpg); height: 22px; width: 60px; } -=-=- Test code to login (minus clicking the 'Log In' button) -=-=- require 'test/unit' #variables testSite = "http://192.168.5.5/login/" #open the IE browser ie = IE.new ie.goto(testSite) puts "Entering user ID" ie.frame("main").frame("frmLogin").text_field(:name,"user").set("testeracct") puts "Entering user password" ie.frame("main").frame("frmLogin").text_field(:name,"pass").set("123456") puts "Clicking Log In button" From jeff.darklight at gmail.com Wed Aug 3 11:33:22 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 3 Aug 2005 08:33:22 -0700 Subject: [Wtr-general] I have a couple of questions... In-Reply-To: <24d005924d01e8.24d01e824d0059@shaw.ca> References: <24d005924d01e8.24d01e824d0059@shaw.ca> Message-ID: I think there should be 2 ... one for top level frames and one that is exhaustive. Not that both features are necessary out of the gate ... top level frames would be a good start . j. On 8/3/05, Paul Rogers wrote: > ah, good point. Should it perhaps only iterate the top level frames? > > and if you wanted lower level frames, you would apply an iterator to that frame. Seems like this way would save me work;-) But probably be less intuiitive. > > ----- Original Message ----- > From: Bret Pettichord > Date: Wednesday, August 3, 2005 2:35 am > Subject: RE: [Wtr-general] I have a couple of questions... > > > At 10:33 PM 8/2/2005, Paul Rogers wrote: > > >I want to add a frame iterator object as soon as I get the chance: > > > > > >Ie.frames.each {|f| .... } > > > > > >When that's, there, it would be simple for you to add your 'click > > a link > > >in any frame' method. It wont be this release though. > > > > > >Paul > > > > This will be harder than the other iterators because frame > > collections can > > be nested. If you only search document.frames[], you won't > > actually > > traverse all of the frames. > > > > > > > > _____________________ > > Bret Pettichord > > www.pettichord.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 > -- "So long, and thanks for all the fish" Jeff Wood From paul.rogers at shaw.ca Wed Aug 3 11:33:33 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 03 Aug 2005 09:33:33 -0600 Subject: [Wtr-general] Javascript onClick Message-ID: <24d35ac24d5539.24d553924d35ac@shaw.ca> most watir objects support a click method, so ie.image(:id, /pic/).click should do what you want ( replace image with what ever element you need, radio, text_field etc) Paul ----- Original Message ----- From: Zeljko Filipin Date: Wednesday, August 3, 2005 7:46 am Subject: RE: [Wtr-general] Javascript onClick > Try this: > > ie.text_field(:name, 'UserId").fire_event('onClick') > > Zeljko > ________________________________ > > From: wtr-general-bounces at rubyforge.org > [wtr-general-bounces at rubyforge.org] On Behalf Of Neumann, Carsten - > ENCOWAY > Sent: Wednesday, August 03, 2005 1:50 PM > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Javascript onClick > > > > How can I tell Watir to click on a Javascript onClick? > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From paul.rogers at shaw.ca Wed Aug 3 11:36:28 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 03 Aug 2005 09:36:28 -0600 Subject: [Wtr-general] Question: Javascript/CSS onClick? Message-ID: <24d4c7d24d3a17.24d3a1724d4c7d@shaw.ca> a should have a click method, so if you can figure out its index you can do ie.table(:index,t)[row][col].click You'll have to fixure out the row and col values and the value for t It would be better if you can get an id added to that cell Paul ----- Original Message ----- From: dnjohannes at gmail.com Date: Wednesday, August 3, 2005 9:30 am Subject: [Wtr-general] Question: Javascript/CSS onClick? > All, > > Forgive me if I am asking an obvious question, this is my second > attempt to post this and get some sort of answer to my issue. Now I > personally have a problem. I need to automate the login for further > testing, but I cannot figure out how to access the 'Log In' button > which has been defined in the Cascading Style Sheets. Any help would > be appreciated. I have included HTML, CSS, and Javascript code. > > Dave > > > -=-=- getHTML -=-=- > > irb(main):072:0> ie.frame("main").frame("frmLogin").getHTML > => "\r\n oncontextmenu=\"return false\" > bottomMargin=0 leftMargin=0 background=../../graphics/side_1.gif > topMargin=0 o > nload=isError(); rightMargin=0>
id=frmLogin name=f > rmLogin action=verifyLogin.asp method=post target=_self>\r\n cellSpacing=0 cellPadding=0 width=\"100%\" > border=0>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
o style=\"PADDING-RIGHT: 5px; PADDING-LEFT: 5px; PADDING-BOTTOM: > 5px; PADDING- > TOP: 5px\">user: LEFT: 2px; P > ADDING-BOTTOM: 2px; PADDING-TOP: 2px\"> size=12 name > =user width=\"100%\">
style=\"PADDING-RI > GHT: 5px; PADDING-LEFT: 5px; PADDING-BOTTOM: 5px; PADDING-TOP: > 5px\">password: LEFT: 2px; PADDING-BOTTOM: 2p > x; PADDING-TOP: 2px\"> size=12 value=\ > "\" name=pass width=\"100%\">
align=middle colSpan=2 > >\r\n border=0>\r\n\r\n\r\n< > /TBODY>
onmouseover=\"javascript:this.className='loginOnOver'\" > style=\"WIDTH: 60px; HEIGHT: 22px\" > onclick=javascript:verifyUser(); onmous > eout=\"javascript:this.className='loginOnOut'\">
" > > > > -=-=- Form/Table for login data -=-=- > > >
action="verifyLogin.asp" method="post" target="_self"> > > > > > > > > > > > > > > > >
> user: > > size="12" width="100%"> >
> password: > > value="" size="12" width="100%"> >
> > > > >
onmouseover="javascript:this.className='loginOnOver'" > onmouseout="javascript:this.className='loginOnOut'" > style="height:22px; width:60px;"> >
>
>
> > > > > -=-=- Javascript -=-=- > > > > > > -=-=- CSS -=-=- > > td.loginOnOver{ > background-image: url(../graphics/logindown.jpg); > height: 22px; > width: 60px; > cursor: hand; > } > > td.loginOnOut{ > background-image: url(../graphics/loginup.jpg); > height: 22px; > width: 60px; > } > > > > -=-=- Test code to login (minus clicking the 'Log In' button) -=-=- > > require 'test/unit' > #variables > testSite = "http://192.168.5.5/login/" > #open the IE browser > ie = IE.new > > ie.goto(testSite) > > puts "Entering user ID" > ie.frame("main").frame("frmLogin").text_field(:name,"user").set("testeracct") > puts "Entering user password" > ie.frame("main").frame("frmLogin").text_field(:name,"pass").set("123456") > puts "Clicking Log In button" > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From jeff.darklight at gmail.com Wed Aug 3 11:37:03 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 3 Aug 2005 08:37:03 -0700 Subject: [Wtr-general] identify image links by their url? In-Reply-To: <24d23be24d2d32.24d2d3224d23be@shaw.ca> References: <24d23be24d2d32.24d2d3224d23be@shaw.ca> Message-ID: I agree, assign unique ids for each image ... should make things quite a bit easier. j. On 8/3/05, Paul Rogers wrote: > yep, but its best to use a reg exp, otherwise you need the full path: > > ie.image(:src , /some_pic.gif/).click > Content-class: urn:content-classes:message > Content-Type: multipart/alternative; > boundary="----_=_NextPart_001_01C5980C.CA4F3156" > > > ------_=_NextPart_001_01C5980C.CA4F3156 > Content-Type: text/plain; > charset="us-ascii" > Content-Transfer-Encoding: quoted-printable > > > > How can I click on an image-link using watir, if two images have the > same "alt"-text? Can I use their url? > > ------_=_NextPart_001_01C5980C.CA4F3156 > Content-Type: text/html; > charset="us-ascii" > Content-Transfer-Encoding: quoted-printable > > > > > charset=3Dus-ascii"> > 6.5.7226.0"> > identify image links by their url? > > > >
>
> >

How = > can I click on an image-link LANG=3D"de"> = > using watir LANG=3D"de">, = > if two images have the same LANG=3D"de"> FACE=3D"Arial">„ LANG=3D"de"> FACE=3D"Arial">al LANG=3D"de"> FACE=3D"Arial">t LANG=3D"de"> FACE=3D"Arial">” LANG=3D"de"> FACE=3D"Arial">-text? Can I use their url? LANG=3D"de">

> > > > ------_=_NextPart_001_01C5980C.CA4F3156-- > > > _______________________________________________ > 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 > > > -- "So long, and thanks for all the fish" Jeff Wood From jeff.darklight at gmail.com Wed Aug 3 11:42:19 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 3 Aug 2005 08:42:19 -0700 Subject: [Wtr-general] Question: Javascript/CSS onClick? In-Reply-To: <24d4c7d24d3a17.24d3a1724d4c7d@shaw.ca> References: <24d4c7d24d3a17.24d3a1724d4c7d@shaw.ca> Message-ID: Can you give a quick example of calling specifically the cell with the ID ? j. On 8/3/05, Paul Rogers wrote: > a should have a click method, so if you can figure out its index you can do > > ie.table(:index,t)[row][col].click > > You'll have to fixure out the row and col values and the value for t > > It would be better if you can get an id added to that cell > > Paul > > ----- Original Message ----- > From: dnjohannes at gmail.com > Date: Wednesday, August 3, 2005 9:30 am > Subject: [Wtr-general] Question: Javascript/CSS onClick? > > > All, > > > > Forgive me if I am asking an obvious question, this is my second > > attempt to post this and get some sort of answer to my issue. Now I > > personally have a problem. I need to automate the login for further > > testing, but I cannot figure out how to access the 'Log In' button > > which has been defined in the Cascading Style Sheets. Any help would > > be appreciated. I have included HTML, CSS, and Javascript code. > > > > Dave > > > > > > -=-=- getHTML -=-=- > > > > irb(main):072:0> ie.frame("main").frame("frmLogin").getHTML > > => "\r\n > oncontextmenu=\"return false\" > > bottomMargin=0 leftMargin=0 background=../../graphics/side_1.gif > > topMargin=0 o > > nload=isError(); rightMargin=0>
> id=frmLogin name=f > > rmLogin action=verifyLogin.asp method=post target=_self>\r\n > cellSpacing=0 cellPadding=0 width=\"100%\" > > border=0>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
> o style=\"PADDING-RIGHT: 5px; PADDING-LEFT: 5px; PADDING-BOTTOM: > > 5px; PADDING- > > TOP: 5px\">user: > LEFT: 2px; P > > ADDING-BOTTOM: 2px; PADDING-TOP: 2px\"> > size=12 name > > =user width=\"100%\">
> style=\"PADDING-RI > > GHT: 5px; PADDING-LEFT: 5px; PADDING-BOTTOM: 5px; PADDING-TOP: > > 5px\">password: > LEFT: 2px; PADDING-BOTTOM: 2p > > x; PADDING-TOP: 2px\"> > size=12 value=\ > > "\" name=pass width=\"100%\">
> align=middle colSpan=2 > > >\r\n > border=0>\r\n\r\n\r\n< > > /TBODY>
> onmouseover=\"javascript:this.className='loginOnOver'\" > > style=\"WIDTH: 60px; HEIGHT: 22px\" > > onclick=javascript:verifyUser(); onmous > > eout=\"javascript:this.className='loginOnOut'\">
" > > > > > > > > -=-=- Form/Table for login data -=-=- > > > > > >
> action="verifyLogin.asp" method="post" target="_self"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
> > user: > > > > > size="12" width="100%"> > >
> > password: > > > > > value="" size="12" width="100%"> > >
> > > > > > > > > >
> onmouseover="javascript:this.className='loginOnOver'" > > onmouseout="javascript:this.className='loginOnOut'" > > style="height:22px; width:60px;"> > >
> >
> >
> > > > > > > > > > -=-=- Javascript -=-=- > > > > > > > > > > > > -=-=- CSS -=-=- > > > > td.loginOnOver{ > > background-image: url(../graphics/logindown.jpg); > > height: 22px; > > width: 60px; > > cursor: hand; > > } > > > > td.loginOnOut{ > > background-image: url(../graphics/loginup.jpg); > > height: 22px; > > width: 60px; > > } > > > > > > > > -=-=- Test code to login (minus clicking the 'Log In' button) -=-=- > > > > require 'test/unit' > > #variables > > testSite = "http://192.168.5.5/login/" > > #open the IE browser > > ie = IE.new > > > > ie.goto(testSite) > > > > puts "Entering user ID" > > ie.frame("main").frame("frmLogin").text_field(:name,"user").set("testeracct") > > puts "Entering user password" > > ie.frame("main").frame("frmLogin").text_field(:name,"pass").set("123456") > > puts "Clicking Log In button" > > > > _______________________________________________ > > 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 > -- "So long, and thanks for all the fish" Jeff Wood From bret at pettichord.com Wed Aug 3 11:48:19 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 03 Aug 2005 10:48:19 -0500 Subject: [Wtr-general] Iterators In-Reply-To: <593b9ae80508030609411f69ad@mail.gmail.com> References: <5.1.0.14.2.20050803033815.030e5720@127.0.0.1> <009d01c597dc$1899a950$6400a8c0@NewDell> <5.1.0.14.2.20050803033815.030e5720@127.0.0.1> Message-ID: <5.1.0.14.2.20050803104337.0318a648@127.0.0.1> OK, well that means reworking the iterators -- i suggest we do this before creating more. The problem with the current iterators is that they iterate over COM objects, rather than over, say Watir::TextField objects (which is implicitly what my example would require). This would require Wrapper objects, like those we already have for Form. Personally, i think we should not be exposing COM objects, except as a 'back door' to let people muck with the iternals -- we should not be inviting people to mess with them. (Another issue with Iterators is that they can only iterate over a static page. Thus the following code will fail > ie.buttons.each {| b | b.click if b.name == "foo" and b.title == "bar"} because a new page will load after clicking the button, making the buttons iteration lose context. Bet At 08:09 AM 8/3/2005, Shao Kang Tat wrote: >+1 :) > >I'd also put in a request for table cells...sometimes I work with >tables that have more rows/columns than the row_count and column_count >say they do. When I try a table[x][y].exists? I get an error > > >On 8/3/05, Bret Pettichord wrote: > > At 10:42 PM 8/2/2005, Jeff Wood wrote: > > >Iterators on ALL of the browser objects would be good. (frames, > > >buttons, text_input, images, etc. ). > > > > Most of these are already in place. > > > > I have a question of my own. Would you like to see kind of thing work? > > > > target = nil > > ie.text_fields.each {| tf | target = tf if tf.name == "foo" and tf.title > > == "bar"} > > target.set("hooray") if target > > > > Bret > > > > > > _____________________ > > Bret Pettichord > > www.pettichord.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 _____________________ Bret Pettichord www.pettichord.com From jeff.darklight at gmail.com Wed Aug 3 11:56:37 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 3 Aug 2005 08:56:37 -0700 Subject: [Wtr-general] Iterators In-Reply-To: <5.1.0.14.2.20050803104337.0318a648@127.0.0.1> References: <009d01c597dc$1899a950$6400a8c0@NewDell> <5.1.0.14.2.20050803033815.030e5720@127.0.0.1> <593b9ae80508030609411f69ad@mail.gmail.com> <5.1.0.14.2.20050803104337.0318a648@127.0.0.1> Message-ID: I agree, but what I would suggest for the handling of dynamic content is that, in the event that the block for an iterator causes a page (re)load, that an exception should be thrown kicking things OUT of the block ... PageContextChangedError or something like that... that way you can iterate happily as long as you don't cause a load, and if you do, you get kicked out of your iterator. ... makes sense to me. j. On 8/3/05, Bret Pettichord wrote: > OK, well that means reworking the iterators -- i suggest we do this before > creating more. > > The problem with the current iterators is that they iterate over COM > objects, rather than over, say Watir::TextField objects (which is > implicitly what my example would require). This would require Wrapper > objects, like those we already have for Form. > > Personally, i think we should not be exposing COM objects, except as a > 'back door' to let people muck with the iternals -- we should not be > inviting people to mess with them. > > (Another issue with Iterators is that they can only iterate over a static > page. Thus the following code will fail > > > ie.buttons.each {| b | b.click if b.name == "foo" and b.title == "bar"} > > because a new page will load after clicking the button, making the buttons > iteration lose context. > > Bet > > At 08:09 AM 8/3/2005, Shao Kang Tat wrote: > >+1 :) > > > >I'd also put in a request for table cells...sometimes I work with > >tables that have more rows/columns than the row_count and column_count > >say they do. When I try a table[x][y].exists? I get an error > > > > > >On 8/3/05, Bret Pettichord wrote: > > > At 10:42 PM 8/2/2005, Jeff Wood wrote: > > > >Iterators on ALL of the browser objects would be good. (frames, > > > >buttons, text_input, images, etc. ). > > > > > > Most of these are already in place. > > > > > > I have a question of my own. Would you like to see kind of thing work? > > > > > > target = nil > > > ie.text_fields.each {| tf | target = tf if tf.name == "foo" and tf.title > > > == "bar"} > > > target.set("hooray") if target > > > > > > Bret > > > > > > > > > _____________________ > > > Bret Pettichord > > > www.pettichord.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 > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "So long, and thanks for all the fish" Jeff Wood From jeff.darklight at gmail.com Wed Aug 3 11:57:21 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 3 Aug 2005 08:57:21 -0700 Subject: [Wtr-general] Iterators In-Reply-To: <5.1.0.14.2.20050803104337.0318a648@127.0.0.1> References: <009d01c597dc$1899a950$6400a8c0@NewDell> <5.1.0.14.2.20050803033815.030e5720@127.0.0.1> <593b9ae80508030609411f69ad@mail.gmail.com> <5.1.0.14.2.20050803104337.0318a648@127.0.0.1> Message-ID: Also, I agree, the underlying COM shouldn't be exposed. j. On 8/3/05, Bret Pettichord wrote: > OK, well that means reworking the iterators -- i suggest we do this before > creating more. > > The problem with the current iterators is that they iterate over COM > objects, rather than over, say Watir::TextField objects (which is > implicitly what my example would require). This would require Wrapper > objects, like those we already have for Form. > > Personally, i think we should not be exposing COM objects, except as a > 'back door' to let people muck with the iternals -- we should not be > inviting people to mess with them. > > (Another issue with Iterators is that they can only iterate over a static > page. Thus the following code will fail > > > ie.buttons.each {| b | b.click if b.name == "foo" and b.title == "bar"} > > because a new page will load after clicking the button, making the buttons > iteration lose context. > > Bet > > At 08:09 AM 8/3/2005, Shao Kang Tat wrote: > >+1 :) > > > >I'd also put in a request for table cells...sometimes I work with > >tables that have more rows/columns than the row_count and column_count > >say they do. When I try a table[x][y].exists? I get an error > > > > > >On 8/3/05, Bret Pettichord wrote: > > > At 10:42 PM 8/2/2005, Jeff Wood wrote: > > > >Iterators on ALL of the browser objects would be good. (frames, > > > >buttons, text_input, images, etc. ). > > > > > > Most of these are already in place. > > > > > > I have a question of my own. Would you like to see kind of thing work? > > > > > > target = nil > > > ie.text_fields.each {| tf | target = tf if tf.name == "foo" and tf.title > > > == "bar"} > > > target.set("hooray") if target > > > > > > Bret > > > > > > > > > _____________________ > > > Bret Pettichord > > > www.pettichord.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 > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "So long, and thanks for all the fish" Jeff Wood From bret at pettichord.com Wed Aug 3 11:57:14 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 03 Aug 2005 10:57:14 -0500 Subject: [Wtr-general] I have a couple of questions... In-Reply-To: <24d005924d01e8.24d01e824d0059@shaw.ca> Message-ID: <5.1.0.14.2.20050803105040.031a9db8@127.0.0.1> Another complication of this is that some frame properties are not accessible from the frame itself, but rather from its container. This is because, internally, there is a Frame element and a Window element referred to by the frame and contained in the Frames array. To see what i mean, look at what i recently had to do to allow Frames to be accessed by id instead of name -- kinda hairy. The design principle with Watir is that we try to make Watir be intuitive, even if that means our code isn't a simple mapping to the OLE objects. Ultimately, i think we need to start taking a more experimental approach. We need to be able to release an implementation and discuss it and modify it, *before* we commit to supporting it. Right now i am working on new dialog support code. I think everyone will like both the new API and the new functionality that will come with it. If so, we then face what to do with the old WinClicker and WindowHandler code, which i would like to deprecate. Bret At 10:27 AM 8/3/2005, Paul Rogers wrote: >ah, good point. Should it perhaps only iterate the top level frames? > >and if you wanted lower level frames, you would apply an iterator to that >frame. Seems like this way would save me work;-) But probably be less >intuiitive. > >----- Original Message ----- >From: Bret Pettichord >Date: Wednesday, August 3, 2005 2:35 am >Subject: RE: [Wtr-general] I have a couple of questions... > > > At 10:33 PM 8/2/2005, Paul Rogers wrote: > > >I want to add a frame iterator object as soon as I get the chance: > > > > > >Ie.frames.each {|f| .... } > > > > > >When that's, there, it would be simple for you to add your 'click > > a link > > >in any frame' method. It wont be this release though. > > > > > >Paul > > > > This will be harder than the other iterators because frame > > collections can > > be nested. If you only search document.frames[], you won't > > actually > > traverse all of the frames. > > > > > > > > _____________________ > > Bret Pettichord > > www.pettichord.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 _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Aug 3 11:57:44 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 03 Aug 2005 10:57:44 -0500 Subject: [Wtr-general] release 1.4? Message-ID: <5.1.0.14.2.20050803105727.031a4130@127.0.0.1> Any reason not to cut a new release today? _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Aug 3 12:18:12 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 03 Aug 2005 11:18:12 -0500 Subject: [Wtr-general] Question: Javascript/CSS onClick? In-Reply-To: <24d4c7d24d3a17.24d3a1724d4c7d@shaw.ca> Message-ID: <5.1.0.14.2.20050803111442.031d0ac0@127.0.0.1> At 10:36 AM 8/3/2005, Paul Rogers wrote: >It would be better if you can get an id added to that cell Or if we supported ie.cell(:class, 'loginOnOut').click. I recently ran into another case where it would have been convenient to use the class name to specify an element. Any other interest in this idea? Bret _____________________ Bret Pettichord www.pettichord.com From jkohl at telusplanet.net Wed Aug 3 12:30:31 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Wed, 3 Aug 2005 09:30:31 -0700 Subject: [Wtr-general] Question: Javascript/CSS onClick? In-Reply-To: <5.1.0.14.2.20050803111442.031d0ac0@127.0.0.1> References: <5.1.0.14.2.20050803111442.031d0ac0@127.0.0.1> Message-ID: <1123086631.42f0f1273fa55@webmail.telusplanet.net> > >It would be better if you can get an id added to that cell > > Or if we supported ie.cell(:class, 'loginOnOut').click. > > I recently ran into another case where it would have been convenient to use > the class name to specify an element. Any other interest in this idea? I think it's a great idea. I couldn't deal with CSS with other tools - this is a big strength of Watir. -Jonathan From jeff.darklight at gmail.com Wed Aug 3 12:38:43 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 3 Aug 2005 09:38:43 -0700 Subject: [Wtr-general] I have a couple of questions... In-Reply-To: <5.1.0.14.2.20050803105040.031a9db8@127.0.0.1> References: <24d005924d01e8.24d01e824d0059@shaw.ca> <5.1.0.14.2.20050803105040.031a9db8@127.0.0.1> Message-ID: ... will the new dialog functionality replace the AutoIT stuff as well ? On 8/3/05, Bret Pettichord wrote: > Another complication of this is that some frame properties are not > accessible from the frame itself, but rather from its container. This is > because, internally, there is a Frame element and a Window element referred > to by the frame and contained in the Frames array. To see what i mean, look > at what i recently had to do to allow Frames to be accessed by id instead > of name -- kinda hairy. > > The design principle with Watir is that we try to make Watir be intuitive, > even if that means our code isn't a simple mapping to the OLE objects. > I fully agree with that, if all I wanted was access to the COM stuff, I could do that without WATiR. > Ultimately, i think we need to start taking a more experimental approach. > We need to be able to release an implementation and discuss it and modify > it, *before* we commit to supporting it. So, where/how is the repository ( SCM ) run now? I mean, if this is an experimentation thing, we need to get setup to go and pull source to try the experimental version, and leave the "release" version for the people that don't want to play with new features that will most likely change before release. > Right now i am working on new dialog support code. I think everyone will > like both the new API and the new functionality that will come with it. If > so, we then face what to do with the old WinClicker and WindowHandler code, > which i would like to deprecate. So, does this new functionality replace the AutoIT stuff or does it wrap it ... or what ??? > Bret > > At 10:27 AM 8/3/2005, Paul Rogers wrote: > >ah, good point. Should it perhaps only iterate the top level frames? > > > >and if you wanted lower level frames, you would apply an iterator to that > >frame. Seems like this way would save me work;-) But probably be less > >intuiitive. > > > >----- Original Message ----- > >From: Bret Pettichord > >Date: Wednesday, August 3, 2005 2:35 am > >Subject: RE: [Wtr-general] I have a couple of questions... > > > > > At 10:33 PM 8/2/2005, Paul Rogers wrote: > > > >I want to add a frame iterator object as soon as I get the chance: > > > > > > > >Ie.frames.each {|f| .... } > > > > > > > >When that's, there, it would be simple for you to add your 'click > > > a link > > > >in any frame' method. It wont be this release though. > > > > > > > >Paul > > > > > > This will be harder than the other iterators because frame > > > collections can > > > be nested. If you only search document.frames[], you won't > > > actually > > > traverse all of the frames. > > > > > > > > > > > > _____________________ > > > Bret Pettichord > > > www.pettichord.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 > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > I'm MORE than happy to help with coding as well. I'm not familiar with how things normally work with RubyForge projects ( or at the general open source level either ) ... I've mostly worked in closed source environments... But, I'd be GLAD to help make the current Best-In-Class solution the Best Solution Possible. j. -- "So long, and thanks for all the fish" Jeff Wood From paul.rogers at shaw.ca Wed Aug 3 12:50:10 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 03 Aug 2005 10:50:10 -0600 Subject: [Wtr-general] Question: Javascript/CSS onClick? Message-ID: <24facac24fc731.24fc73124facac@shaw.ca> isnt this already supported for spans and divs? Paul ----- Original Message ----- From: jkohl at telusplanet.net Date: Wednesday, August 3, 2005 10:30 am Subject: Re: [Wtr-general] Question: Javascript/CSS onClick? > > > >It would be better if you can get an id added to that cell > > > > Or if we supported ie.cell(:class, 'loginOnOut').click. > > > > I recently ran into another case where it would have been > convenient to use > > the class name to specify an element. Any other interest in this > idea?I think it's a great idea. I couldn't deal with CSS with > other tools - this is a > big strength of Watir. > > -Jonathan > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From jkohl at telusplanet.net Wed Aug 3 13:10:43 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Wed, 3 Aug 2005 11:10:43 -0600 Subject: [Wtr-general] Question: Javascript/CSS onClick? In-Reply-To: <24facac24fc731.24fc73124facac@shaw.ca> Message-ID: <20050803171117.KIOE12869.priv-edtnes46.telusplanet.net@tintin> I think so, yes. > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: August 3, 2005 10:50 AM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] Question: Javascript/CSS onClick? > > isnt this already supported for spans and divs? > > Paul > > ----- Original Message ----- > From: jkohl at telusplanet.net > Date: Wednesday, August 3, 2005 10:30 am > Subject: Re: [Wtr-general] Question: Javascript/CSS onClick? > > > > > > >It would be better if you can get an id added to that cell > > > > > > Or if we supported ie.cell(:class, 'loginOnOut').click. > > > > > > I recently ran into another case where it would have been > > convenient to use > > > the class name to specify an element. Any other interest in this > > idea?I think it's a great idea. I couldn't deal with CSS with > > other tools - this is a > > big strength of Watir. > > > > -Jonathan > > > > _______________________________________________ > > 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 jkohl at telusplanet.net Wed Aug 3 13:18:30 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Wed, 3 Aug 2005 11:18:30 -0600 Subject: [Wtr-general] Using Asserts In-Reply-To: <5.1.0.14.2.20050803032712.02da2ba0@127.0.0.1> Message-ID: <20050803171905.MTTN10231.priv-edtnes56.telusplanet.net@tintin> > Jonathan knows this, but for every one else, this does the same thing, > more > simply: > > >if ie.contains_text("Programming Ruby") > > puts("TEST PASSED. Found test string 'Programming Ruby'") > >else > > puts("TEST FAILED.") > >end Thanks for pointing it out. I copied and pasted the rescue version into IRB from an example because I was too lazy to type it in. :) > This seems to trip a lot of people up. Jonathan, do our docs describe the > simple way before talking about asserts? No, I'll update the user guide today. I was also going to update the attach section before the next release. -Jonathan > > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From jkohl at telusplanet.net Wed Aug 3 13:21:30 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Wed, 3 Aug 2005 11:21:30 -0600 Subject: [Wtr-general] How to specify the order of execution of the tests? In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D31A@EX5V.rl.gov> Message-ID: <20050803172204.LFFE12869.priv-edtnes46.telusplanet.net@tintin> I do the same thing. I have a pet-peeve with the xUnit design that runs the tests in a pseudo-random order. I understand the motivation behind it, and I have proper setup and teardown in unit tests, but when doing functional tests I often need to chain tests. I'd rather that tools like JUnit etc. allowed me to specify running them in order or not instead of forcing me to do the "right thing". -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Cain, Mark > Sent: August 3, 2005 8:25 AM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] How to specify the order of execution of the > tests? > > I ran into this in my test also. What I ended up doing is naming my > tests: > def test01_SomeMeaningfulTestName > Code to test stuff > end > > def test02_SomeMeaningfulTestName > Code to test stuff > end > > def test03_SomeMeaningfulTestName > Code to test stuff > End > > Etc. > > Note: 'alphabetical' appears to be ascii based meaning your results may > be unexpected if you use numbers to try and force a specific order of > execution. Which means 1 2 3 4 5 6 7 8 9 10 11 12...will actually be > executed as 1 10 11 12 2 3 4 5 6 7 8 9. To get around this you would > need to do this: 01 02 03 04 05 06 07 08 09 10 11 12... > > Forgive me if the seems overly obvious to you but it is usually the > simple and obvious things that mess me up ;-). > > Hope this helps, > > --Mark > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Amita Shetty > Sent: Tuesday, August 02, 2005 9:58 PM > To: wtr-general at rubyforge.org > Subject: [Wtr-general] How to specify the order of execution of the > tests? > > Hi, > How to specify the order/sequence of execution of tests while running > all tests in a folder at once? Right now the tests in the folder are > executed in the order of their names alphabetically. > Is there a way to specify the sequence of execution of tests? > > > Thanks in advance > Amitha > > _______________________________________________ > 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 shaorobics at gmail.com Wed Aug 3 13:30:50 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Wed, 3 Aug 2005 13:30:50 -0400 Subject: [Wtr-general] require on the fly touble.. Message-ID: <593b9ae8050803103028629ffc@mail.gmail.com> I have a script that runs..somewhere in the middle I excute a function which creates a file with global variables. It creates it fine. I then require this file. No problems there, but when I try to use any of the global variables that are defined in this new file I get an error saying it is nil... Here's what I'm doing basically def someFunction() cls = someNewClass.new() cls.createMyFile() # writes global variables to it tempdir = Dir.pwd.match('.*Watir/CBT/').to_s # find the directory I just wrote to file = tempdir + "newlyCreatedFile.rb" require file puts $newlyDefinedGlobalVariable.to_s end error: C:/Watir/CBT/Tests/../../CBT/CBTCallLogObject.rb:91:in `+': cannot convert nil into String Also I note that it's changing my current directory by going up two folders then going back down two..although I don't tell it to since I'm using tempdir as in the code above... any ideas? Shao From bret at pettichord.com Wed Aug 3 14:38:33 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 03 Aug 2005 13:38:33 -0500 Subject: [Wtr-general] How to specify the order of execution of the tests? In-Reply-To: <20050803172204.LFFE12869.priv-edtnes46.telusplanet.net@tin tin> References: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D31A@EX5V.rl.gov> Message-ID: <5.1.0.14.2.20050803133706.0324e838@127.0.0.1> At 12:21 PM 8/3/2005, Jonathan Kohl wrote: >I have a pet-peeve with the xUnit design that runs the tests in a >pseudo-random order. I understand the motivation behind it, and I have >proper setup and teardown in unit tests, but when doing functional tests I >often need to chain tests. I'd rather that tools like JUnit etc. allowed me >to specify running them in order or not instead of forcing me to do the >"right thing". j They don't force you. You can subclass the Suite method and use your own algorithm for ordering the tests. That's what i'd do if it bothered me. Test::Unit is extremely customizable. Bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Aug 3 14:39:57 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 03 Aug 2005 13:39:57 -0500 Subject: [Wtr-general] I have a couple of questions... In-Reply-To: References: <5.1.0.14.2.20050803105040.031a9db8@127.0.0.1> <24d005924d01e8.24d01e824d0059@shaw.ca> <5.1.0.14.2.20050803105040.031a9db8@127.0.0.1> Message-ID: <5.1.0.14.2.20050803133919.0325a6b8@127.0.0.1> I haven't committed the new dialog code yet. You'll have to be a bit more patient. Bret At 11:38 AM 8/3/2005, Jeff Wood wrote: >... will the new dialog functionality replace the AutoIT stuff as well ? > >On 8/3/05, Bret Pettichord wrote: > > Another complication of this is that some frame properties are not > > accessible from the frame itself, but rather from its container. This is > > because, internally, there is a Frame element and a Window element referred > > to by the frame and contained in the Frames array. To see what i mean, look > > at what i recently had to do to allow Frames to be accessed by id instead > > of name -- kinda hairy. > > > > The design principle with Watir is that we try to make Watir be intuitive, > > even if that means our code isn't a simple mapping to the OLE objects. > > > >I fully agree with that, if all I wanted was access to the COM stuff, >I could do that without WATiR. > > > Ultimately, i think we need to start taking a more experimental approach. > > We need to be able to release an implementation and discuss it and modify > > it, *before* we commit to supporting it. > >So, where/how is the repository ( SCM ) run now? > >I mean, if this is an experimentation thing, we need to get setup to >go and pull source to try the experimental version, and leave the >"release" version for the people that don't want to play with new >features that will most likely change before release. > > > Right now i am working on new dialog support code. I think everyone will > > like both the new API and the new functionality that will come with it. If > > so, we then face what to do with the old WinClicker and WindowHandler code, > > which i would like to deprecate. > >So, does this new functionality replace the AutoIT stuff or does it >wrap it ... or what ??? > > > Bret > > > > At 10:27 AM 8/3/2005, Paul Rogers wrote: > > >ah, good point. Should it perhaps only iterate the top level frames? > > > > > >and if you wanted lower level frames, you would apply an iterator to that > > >frame. Seems like this way would save me work;-) But probably be less > > >intuiitive. > > > > > >----- Original Message ----- > > >From: Bret Pettichord > > >Date: Wednesday, August 3, 2005 2:35 am > > >Subject: RE: [Wtr-general] I have a couple of questions... > > > > > > > At 10:33 PM 8/2/2005, Paul Rogers wrote: > > > > >I want to add a frame iterator object as soon as I get the chance: > > > > > > > > > >Ie.frames.each {|f| .... } > > > > > > > > > >When that's, there, it would be simple for you to add your 'click > > > > a link > > > > >in any frame' method. It wont be this release though. > > > > > > > > > >Paul > > > > > > > > This will be harder than the other iterators because frame > > > > collections can > > > > be nested. If you only search document.frames[], you won't > > > > actually > > > > traverse all of the frames. > > > > > > > > > > > > > > > > _____________________ > > > > Bret Pettichord > > > > www.pettichord.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 > > > > _____________________ > > Bret Pettichord > > www.pettichord.com > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > >I'm MORE than happy to help with coding as well. I'm not familiar with >how things normally work with RubyForge projects ( or at the general >open source level either ) ... I've mostly worked in closed source >environments... > >But, I'd be GLAD to help make the current Best-In-Class solution the >Best Solution Possible. > >j. > >-- >"So long, and thanks for all the fish" > >Jeff Wood > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From jeff.darklight at gmail.com Wed Aug 3 14:47:05 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 3 Aug 2005 11:47:05 -0700 Subject: [Wtr-general] I have a couple of questions... In-Reply-To: <5.1.0.14.2.20050803133919.0325a6b8@127.0.0.1> References: <24d005924d01e8.24d01e824d0059@shaw.ca> <5.1.0.14.2.20050803105040.031a9db8@127.0.0.1> <5.1.0.14.2.20050803133919.0325a6b8@127.0.0.1> Message-ID: No, I'm just trying to get ANY version installed on my box. I wasn't worried about the new stuff yet. I've just got a freshly imaged laptop and I'm trying to get things running. So, I am/was looking for ideas to help figure out why watir won't install. j. On 8/3/05, Bret Pettichord wrote: > I haven't committed the new dialog code yet. You'll have to be a bit more > patient. > > Bret > > At 11:38 AM 8/3/2005, Jeff Wood wrote: > >... will the new dialog functionality replace the AutoIT stuff as well ? > > > >On 8/3/05, Bret Pettichord wrote: > > > Another complication of this is that some frame properties are not > > > accessible from the frame itself, but rather from its container. This is > > > because, internally, there is a Frame element and a Window element referred > > > to by the frame and contained in the Frames array. To see what i mean, look > > > at what i recently had to do to allow Frames to be accessed by id instead > > > of name -- kinda hairy. > > > > > > The design principle with Watir is that we try to make Watir be intuitive, > > > even if that means our code isn't a simple mapping to the OLE objects. > > > > > > >I fully agree with that, if all I wanted was access to the COM stuff, > >I could do that without WATiR. > > > > > Ultimately, i think we need to start taking a more experimental approach. > > > We need to be able to release an implementation and discuss it and modify > > > it, *before* we commit to supporting it. > > > >So, where/how is the repository ( SCM ) run now? > > > >I mean, if this is an experimentation thing, we need to get setup to > >go and pull source to try the experimental version, and leave the > >"release" version for the people that don't want to play with new > >features that will most likely change before release. > > > > > Right now i am working on new dialog support code. I think everyone will > > > like both the new API and the new functionality that will come with it. If > > > so, we then face what to do with the old WinClicker and WindowHandler code, > > > which i would like to deprecate. > > > >So, does this new functionality replace the AutoIT stuff or does it > >wrap it ... or what ??? > > > > > Bret > > > > > > At 10:27 AM 8/3/2005, Paul Rogers wrote: > > > >ah, good point. Should it perhaps only iterate the top level frames? > > > > > > > >and if you wanted lower level frames, you would apply an iterator to that > > > >frame. Seems like this way would save me work;-) But probably be less > > > >intuiitive. > > > > > > > >----- Original Message ----- > > > >From: Bret Pettichord > > > >Date: Wednesday, August 3, 2005 2:35 am > > > >Subject: RE: [Wtr-general] I have a couple of questions... > > > > > > > > > At 10:33 PM 8/2/2005, Paul Rogers wrote: > > > > > >I want to add a frame iterator object as soon as I get the chance: > > > > > > > > > > > >Ie.frames.each {|f| .... } > > > > > > > > > > > >When that's, there, it would be simple for you to add your 'click > > > > > a link > > > > > >in any frame' method. It wont be this release though. > > > > > > > > > > > >Paul > > > > > > > > > > This will be harder than the other iterators because frame > > > > > collections can > > > > > be nested. If you only search document.frames[], you won't > > > > > actually > > > > > traverse all of the frames. > > > > > > > > > > > > > > > > > > > > _____________________ > > > > > Bret Pettichord > > > > > www.pettichord.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 > > > > > > _____________________ > > > Bret Pettichord > > > www.pettichord.com > > > > > > _______________________________________________ > > > Wtr-general mailing list > > > Wtr-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > >I'm MORE than happy to help with coding as well. I'm not familiar with > >how things normally work with RubyForge projects ( or at the general > >open source level either ) ... I've mostly worked in closed source > >environments... > > > >But, I'd be GLAD to help make the current Best-In-Class solution the > >Best Solution Possible. > > > >j. > > > >-- > >"So long, and thanks for all the fish" > > > >Jeff Wood > > > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "So long, and thanks for all the fish" Jeff Wood From jkohl at telusplanet.net Wed Aug 3 14:50:05 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Wed, 3 Aug 2005 12:50:05 -0600 Subject: [Wtr-general] Using Asserts In-Reply-To: <20050803171905.MTTN10231.priv-edtnes56.telusplanet.net@tintin> Message-ID: <20050803185038.SAJZ10231.priv-edtnes56.telusplanet.net@tintin> I've updated the User Guide: -included the simple example of printing assertion results below -fixed the error in the attach section -added more information to the test::unit section -added information on accessing elements by index or before or after text -added an Online Resources section with a link to the FAQ and mailing list search instructions -added a section on popup windows A lot more could be done, but at least there's some fixes and more info for the next release. -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Jonathan Kohl > Sent: August 3, 2005 11:19 AM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Using Asserts > > > Jonathan knows this, but for every one else, this does the same thing, > > more > > simply: > > > > >if ie.contains_text("Programming Ruby") > > > puts("TEST PASSED. Found test string 'Programming Ruby'") > > >else > > > puts("TEST FAILED.") > > >end > Thanks for pointing it out. I copied and pasted the rescue version into > IRB > from an example because I was too lazy to type it in. :) > > > This seems to trip a lot of people up. Jonathan, do our docs describe > the > > simple way before talking about asserts? > No, I'll update the user guide today. I was also going to update the > attach > section before the next release. > > -Jonathan > > > > > > > _____________________ > > Bret Pettichord > > www.pettichord.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 From jeff.darklight at gmail.com Wed Aug 3 14:38:02 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 3 Aug 2005 11:38:02 -0700 Subject: [Wtr-general] I have a couple of questions... In-Reply-To: References: <24d005924d01e8.24d01e824d0059@shaw.ca> <5.1.0.14.2.20050803105040.031a9db8@127.0.0.1> Message-ID: Ok, I just ran the installer ( versions .15 & .14 ) and after I've gotten Ruby installed, when I run the watir installer ( install.rb ) it says it can't find Fox Any ideas? I'm running XP. j. On 8/3/05, Jeff Wood wrote: > ... will the new dialog functionality replace the AutoIT stuff as well ? > > On 8/3/05, Bret Pettichord wrote: > > Another complication of this is that some frame properties are not > > accessible from the frame itself, but rather from its container. This is > > because, internally, there is a Frame element and a Window element referred > > to by the frame and contained in the Frames array. To see what i mean, look > > at what i recently had to do to allow Frames to be accessed by id instead > > of name -- kinda hairy. > > > > The design principle with Watir is that we try to make Watir be intuitive, > > even if that means our code isn't a simple mapping to the OLE objects. > > > > I fully agree with that, if all I wanted was access to the COM stuff, > I could do that without WATiR. > > > Ultimately, i think we need to start taking a more experimental approach. > > We need to be able to release an implementation and discuss it and modify > > it, *before* we commit to supporting it. > > So, where/how is the repository ( SCM ) run now? > > I mean, if this is an experimentation thing, we need to get setup to > go and pull source to try the experimental version, and leave the > "release" version for the people that don't want to play with new > features that will most likely change before release. > > > Right now i am working on new dialog support code. I think everyone will > > like both the new API and the new functionality that will come with it. If > > so, we then face what to do with the old WinClicker and WindowHandler code, > > which i would like to deprecate. > > So, does this new functionality replace the AutoIT stuff or does it > wrap it ... or what ??? > > > Bret > > > > At 10:27 AM 8/3/2005, Paul Rogers wrote: > > >ah, good point. Should it perhaps only iterate the top level frames? > > > > > >and if you wanted lower level frames, you would apply an iterator to that > > >frame. Seems like this way would save me work;-) But probably be less > > >intuiitive. > > > > > >----- Original Message ----- > > >From: Bret Pettichord > > >Date: Wednesday, August 3, 2005 2:35 am > > >Subject: RE: [Wtr-general] I have a couple of questions... > > > > > > > At 10:33 PM 8/2/2005, Paul Rogers wrote: > > > > >I want to add a frame iterator object as soon as I get the chance: > > > > > > > > > >Ie.frames.each {|f| .... } > > > > > > > > > >When that's, there, it would be simple for you to add your 'click > > > > a link > > > > >in any frame' method. It wont be this release though. > > > > > > > > > >Paul > > > > > > > > This will be harder than the other iterators because frame > > > > collections can > > > > be nested. If you only search document.frames[], you won't > > > > actually > > > > traverse all of the frames. > > > > > > > > > > > > > > > > _____________________ > > > > Bret Pettichord > > > > www.pettichord.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 > > > > _____________________ > > Bret Pettichord > > www.pettichord.com > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > I'm MORE than happy to help with coding as well. I'm not familiar with > how things normally work with RubyForge projects ( or at the general > open source level either ) ... I've mostly worked in closed source > environments... > > But, I'd be GLAD to help make the current Best-In-Class solution the > Best Solution Possible. > > j. > > -- > "So long, and thanks for all the fish" > > Jeff Wood > -- "So long, and thanks for all the fish" Jeff Wood From jkohl at telusplanet.net Wed Aug 3 14:56:02 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Wed, 3 Aug 2005 12:56:02 -0600 Subject: [Wtr-general] How to specify the order of execution of the tests? In-Reply-To: <5.1.0.14.2.20050803133706.0324e838@127.0.0.1> Message-ID: <20050803185634.SODZ1870.priv-edtnes51.telusplanet.net@tintin> Thanks. I'll give that a try. > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Bret Pettichord > Sent: August 3, 2005 12:39 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] How to specify the order of execution of the > tests? > > At 12:21 PM 8/3/2005, Jonathan Kohl wrote: > >I have a pet-peeve with the xUnit design that runs the tests in a > >pseudo-random order. I understand the motivation behind it, and I have > >proper setup and teardown in unit tests, but when doing functional tests > I > >often need to chain tests. I'd rather that tools like JUnit etc. allowed > me > >to specify running them in order or not instead of forcing me to do the > >"right thing". j > > They don't force you. > > You can subclass the Suite method and use your own algorithm for ordering > the tests. That's what i'd do if it bothered me. Test::Unit is extremely > customizable. > > Bret > > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Wed Aug 3 15:00:05 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 03 Aug 2005 14:00:05 -0500 Subject: [Wtr-general] accessing elements by class In-Reply-To: <20050803171117.KIOE12869.priv-edtnes46.telusplanet.net@tin tin> References: <24facac24fc731.24fc73124facac@shaw.ca> Message-ID: <5.1.0.14.2.20050803135609.03255d48@127.0.0.1> Actually, no. There is no code in Watir for accessing elements by class. (P is a subclass of Span/Div). However, P and Span and Div all allow you to access the class of an element using the incorrectly named 'style' method. (I'll fix this shortly.) Bret irb(main):007:0> ie = Watir::IE.start('d:\workspace\watir\unittests\html\div.htm l') => #, @defaultSleepTime=0.1, @page HasReloaded=false, @error_checkers=[#], @logger=#>, @level=2, @datetime_format="%d-%b-%Y %H:%M:%S", @progname=nil>, @typ ingspeed=0.08, @activeObjectHighLightColor="yellow", @down_load_time=0.07, @enab le_spinner=false, @url_list=["file://D:\\workspace\\watir\\unittests\\html\\div. html"], @form=nil> irb(main):008:0> ie.p(:id, 'number1').text => "This text is in a p with an id of number1 and title of P_tag_1" irb(main):009:0> ie.p(:id, 'number1').style => "redText" irb(main):010:0> ie.p(:class, 'redText').text Watir::Exception::MissingWayOfFindingObjectException: unknown way of finding a P ( {what} ) from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1098:in `getNonControlObjec t' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2430:in `initialize' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2508:in `initialize' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:661:in `new' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:661:in `p' from (irb):10 from :0 irb(main):011:0> At 12:10 PM 8/3/2005, Jonathan Kohl wrote: >I think so, yes. > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > > bounces at rubyforge.org] On Behalf Of Paul Rogers > > Sent: August 3, 2005 10:50 AM > > To: wtr-general at rubyforge.org > > Subject: Re: [Wtr-general] Question: Javascript/CSS onClick? > > > > isnt this already supported for spans and divs? > > > > Paul > > > > ----- Original Message ----- > > From: jkohl at telusplanet.net > > Date: Wednesday, August 3, 2005 10:30 am > > Subject: Re: [Wtr-general] Question: Javascript/CSS onClick? > > > > > > > > > >It would be better if you can get an id added to that cell > > > > > > > > Or if we supported ie.cell(:class, 'loginOnOut').click. > > > > > > > > I recently ran into another case where it would have been > > > convenient to use > > > > the class name to specify an element. Any other interest in this > > > idea?I think it's a great idea. I couldn't deal with CSS with > > > other tools - this is a > > > big strength of Watir. > > > > > > -Jonathan > > > > > > _______________________________________________ > > > 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 _____________________ Bret Pettichord www.pettichord.com From jkohl at telusplanet.net Wed Aug 3 15:04:01 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Wed, 3 Aug 2005 13:04:01 -0600 Subject: [Wtr-general] accessing elements by class In-Reply-To: <5.1.0.14.2.20050803135609.03255d48@127.0.0.1> Message-ID: <20050803190434.KQZO11362.priv-edtnes27.telusplanet.net@tintin> I was talking about the methods in the "css_test.rb" unit test which was written for a real-world example. We couldn't handle those kind of error messages with SilkTest. The more CSS support we have, the better! -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Bret Pettichord > Sent: August 3, 2005 1:00 PM > To: wtr-general at rubyforge.org > Subject: [Wtr-general] accessing elements by class > > Actually, no. There is no code in Watir for accessing elements by class. > (P > is a subclass of Span/Div). > > However, P and Span and Div all allow you to access the class of an > element > using the incorrectly named 'style' method. (I'll fix this shortly.) > > Bret > > irb(main):007:0> ie = > Watir::IE.start('d:\workspace\watir\unittests\html\div.htm > l') > => #, @defaultSleepTime=0.1, > @page > HasReloaded=false, > @error_checkers=[# /1.8/watir.rb:1213>], @logger=# @logdev=# :LogDevice:0x2ac90b0 @shift_size=nil, @shift_age=nil, @filename=nil, > @dev=# x278e7d0>>, @level=2, @datetime_format="%d-%b-%Y %H:%M:%S", > @progname=nil>, > @typ > ingspeed=0.08, @activeObjectHighLightColor="yellow", @down_load_time=0.07, > @enab > le_spinner=false, > @url_list=["file://D:\\workspace\\watir\\unittests\\html\\div. > html"], @form=nil> > irb(main):008:0> ie.p(:id, 'number1').text > => "This text is in a p with an id of number1 and title of P_tag_1" > irb(main):009:0> ie.p(:id, 'number1').style > => "redText" > irb(main):010:0> ie.p(:class, 'redText').text > Watir::Exception::MissingWayOfFindingObjectException: unknown way of > finding a P > ( {what} ) > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1098:in > `getNonControlObjec > t' > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2430:in `initialize' > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2508:in `initialize' > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:661:in `new' > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:661:in `p' > from (irb):10 > from :0 > irb(main):011:0> > > At 12:10 PM 8/3/2005, Jonathan Kohl wrote: > >I think so, yes. > > > > > -----Original Message----- > > > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > > > bounces at rubyforge.org] On Behalf Of Paul Rogers > > > Sent: August 3, 2005 10:50 AM > > > To: wtr-general at rubyforge.org > > > Subject: Re: [Wtr-general] Question: Javascript/CSS onClick? > > > > > > isnt this already supported for spans and divs? > > > > > > Paul > > > > > > ----- Original Message ----- > > > From: jkohl at telusplanet.net > > > Date: Wednesday, August 3, 2005 10:30 am > > > Subject: Re: [Wtr-general] Question: Javascript/CSS onClick? > > > > > > > > > > > > >It would be better if you can get an id added to that cell > > > > > > > > > > Or if we supported ie.cell(:class, 'loginOnOut').click. > > > > > > > > > > I recently ran into another case where it would have been > > > > convenient to use > > > > > the class name to specify an element. Any other interest in this > > > > idea?I think it's a great idea. I couldn't deal with CSS with > > > > other tools - this is a > > > > big strength of Watir. > > > > > > > > -Jonathan > > > > > > > > _______________________________________________ > > > > 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 > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Wed Aug 3 15:03:42 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 03 Aug 2005 14:03:42 -0500 Subject: [Wtr-general] before and after text In-Reply-To: <20050803185038.SAJZ10231.priv-edtnes56.telusplanet.net@tin tin> References: <20050803171905.MTTN10231.priv-edtnes56.telusplanet.net@tintin> Message-ID: <5.1.0.14.2.20050803140130.0325b418@127.0.0.1> At 01:50 PM 8/3/2005, Jonathan Kohl wrote: >-added information on accessing elements by index or before or after text Is any one using the beforetext or aftertext attributes? I recently tried the before and after text and it didn't work in my particular case. I did a bit of investigation and saw that it did work in others. These attributes are part of the Microsoft DOM, but they are not part of the standard WC3 DOM. Consequently, there is not good documentation on how they are supposed to work. Bret _____________________ Bret Pettichord www.pettichord.com From jkohl at telusplanet.net Wed Aug 3 15:14:44 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Wed, 3 Aug 2005 13:14:44 -0600 Subject: [Wtr-general] before and after text In-Reply-To: <5.1.0.14.2.20050803140130.0325b418@127.0.0.1> Message-ID: <20050803191516.KXUU11362.priv-edtnes27.telusplanet.net@tintin> If it's hit and miss, I'll pull it. > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Bret Pettichord > Sent: August 3, 2005 1:04 PM > To: wtr-general at rubyforge.org; wtr-general at rubyforge.org > Subject: [Wtr-general] before and after text > > At 01:50 PM 8/3/2005, Jonathan Kohl wrote: > >-added information on accessing elements by index or before or after text > > Is any one using the beforetext or aftertext attributes? > > I recently tried the before and after text and it didn't work in my > particular case. I did a bit of investigation and saw that it did work in > others. > > These attributes are part of the Microsoft DOM, but they are not part of > the standard WC3 DOM. Consequently, there is not good documentation on how > they are supposed to work. > > Bret > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From jkohl at telusplanet.net Wed Aug 3 15:16:24 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Wed, 3 Aug 2005 13:16:24 -0600 Subject: [Wtr-general] before and after text In-Reply-To: <20050803191516.KXUU11362.priv-edtnes27.telusplanet.net@tintin> Message-ID: <20050803191657.KYWX2186.priv-edtnes28.telusplanet.net@tintin> I pulled it and checked it in. > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Jonathan Kohl > Sent: August 3, 2005 1:15 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] before and after text > > If it's hit and miss, I'll pull it. > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > > bounces at rubyforge.org] On Behalf Of Bret Pettichord > > Sent: August 3, 2005 1:04 PM > > To: wtr-general at rubyforge.org; wtr-general at rubyforge.org > > Subject: [Wtr-general] before and after text > > > > At 01:50 PM 8/3/2005, Jonathan Kohl wrote: > > >-added information on accessing elements by index or before or after > text > > > > Is any one using the beforetext or aftertext attributes? > > > > I recently tried the before and after text and it didn't work in my > > particular case. I did a bit of investigation and saw that it did work > in > > others. > > > > These attributes are part of the Microsoft DOM, but they are not part of > > the standard WC3 DOM. Consequently, there is not good documentation on > how > > they are supposed to work. > > > > Bret > > > > _____________________ > > Bret Pettichord > > www.pettichord.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 From paul.rogers at shaw.ca Wed Aug 3 15:17:28 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 03 Aug 2005 13:17:28 -0600 Subject: [Wtr-general] I have a couple of questions... Message-ID: <254a78c2549c69.2549c69254a78c@shaw.ca> the latest version of ruby installs 'fox12' I think the installer was written for 'fox' I cnat be certain as I dont have any code available right now. We would need to fix this for the next release though Paul ----- Original Message ----- From: Jeff Wood Date: Wednesday, August 3, 2005 12:38 pm Subject: Re: RE: [Wtr-general] I have a couple of questions... > Ok, I just ran the installer ( versions .15 & .14 ) and after I've > gotten Ruby installed, when I run the watir installer ( install.rb ) > it says it can't find Fox > > Any ideas? I'm running XP. > > j. > > > On 8/3/05, Jeff Wood wrote: > > ... will the new dialog functionality replace the AutoIT stuff > as well ? > > > > On 8/3/05, Bret Pettichord wrote: > > > Another complication of this is that some frame properties are not > > > accessible from the frame itself, but rather from its > container. This is > > > because, internally, there is a Frame element and a Window > element referred > > > to by the frame and contained in the Frames array. To see what > i mean, look > > > at what i recently had to do to allow Frames to be accessed by > id instead > > > of name -- kinda hairy. > > > > > > The design principle with Watir is that we try to make Watir > be intuitive, > > > even if that means our code isn't a simple mapping to the OLE > objects.> > > > > > I fully agree with that, if all I wanted was access to the COM > stuff,> I could do that without WATiR. > > > > > Ultimately, i think we need to start taking a more > experimental approach. > > > We need to be able to release an implementation and discuss it > and modify > > > it, *before* we commit to supporting it. > > > > So, where/how is the repository ( SCM ) run now? > > > > I mean, if this is an experimentation thing, we need to get > setup to > > go and pull source to try the experimental version, and leave the > > "release" version for the people that don't want to play with new > > features that will most likely change before release. > > > > > Right now i am working on new dialog support code. I think > everyone will > > > like both the new API and the new functionality that will come > with it. If > > > so, we then face what to do with the old WinClicker and > WindowHandler code, > > > which i would like to deprecate. > > > > So, does this new functionality replace the AutoIT stuff or does it > > wrap it ... or what ??? > > > > > Bret > > > > > > At 10:27 AM 8/3/2005, Paul Rogers wrote: > > > >ah, good point. Should it perhaps only iterate the top level > frames?> > > > > > >and if you wanted lower level frames, you would apply an > iterator to that > > > >frame. Seems like this way would save me work;-) But probably > be less > > > >intuiitive. > > > > > > > >----- Original Message ----- > > > >From: Bret Pettichord > > > >Date: Wednesday, August 3, 2005 2:35 am > > > >Subject: RE: [Wtr-general] I have a couple of questions... > > > > > > > > > At 10:33 PM 8/2/2005, Paul Rogers wrote: > > > > > >I want to add a frame iterator object as soon as I get > the chance: > > > > > > > > > > > >Ie.frames.each {|f| .... } > > > > > > > > > > > >When that's, there, it would be simple for you to add > your 'click > > > > > a link > > > > > >in any frame' method. It wont be this release though. > > > > > > > > > > > >Paul > > > > > > > > > > This will be harder than the other iterators because frame > > > > > collections can > > > > > be nested. If you only search document.frames[], you won't > > > > > actually > > > > > traverse all of the frames. > > > > > > > > > > > > > > > > > > > > _____________________ > > > > > Bret Pettichord > > > > > www.pettichord.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 > > > > > > _____________________ > > > Bret Pettichord > > > www.pettichord.com > > > > > > _______________________________________________ > > > Wtr-general mailing list > > > Wtr-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > I'm MORE than happy to help with coding as well. I'm not > familiar with > > how things normally work with RubyForge projects ( or at the general > > open source level either ) ... I've mostly worked in closed source > > environments... > > > > But, I'd be GLAD to help make the current Best-In-Class solution the > > Best Solution Possible. > > > > j. > > > > -- > > "So long, and thanks for all the fish" > > > > Jeff Wood > > > > > -- > "So long, and thanks for all the fish" > > Jeff Wood > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From jkohl at telusplanet.net Wed Aug 3 15:18:24 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Wed, 3 Aug 2005 13:18:24 -0600 Subject: [Wtr-general] XML Logging with Builder Message-ID: <20050803191857.TQMZ1870.priv-edtnes51.telusplanet.net@tintin> I've found Builder to work well for writing out XML files, and REXML for reading. To use Builder with Watir, first you need to install gems and Builder. The "Builder" project is here: http://rubyforge.org/projects/builder/ Installing it requires that RubyGems is installed: http://docs.rubygems.org/read/chapter/3 The parent tag is written with opening and closing tags, and then the child tags are written between them. I downloaded the Builder package (it has a ".gem" file extension), and saved it to a directory. I downloaded the latest RubyGems release (zip file), unzipped it to a temporary directory (ex. "gems_temp"), and then opened a DOS console. In the console, I changed to the temporary directory (ex. C:\gems_temp\rubygems-0.8.10\ ) and typed: "setup" at the command prompt and hit enter. This installed Ruby Gems. I installed Builder by then entering this: "gem install builder" at the command line. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050803/31ebde61/attachment.html From jeff.darklight at gmail.com Wed Aug 3 15:19:31 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 3 Aug 2005 12:19:31 -0700 Subject: [Wtr-general] I have a couple of questions... In-Reply-To: <254a78c2549c69.2549c69254a78c@shaw.ca> References: <254a78c2549c69.2549c69254a78c@shaw.ca> Message-ID: Actually the installer looks for both. j. On 8/3/05, Paul Rogers wrote: > the latest version of ruby installs 'fox12' > I think the installer was written for 'fox' > > I cnat be certain as I dont have any code available right now. We would need to fix this for the next release though > > Paul > > ----- Original Message ----- > From: Jeff Wood > Date: Wednesday, August 3, 2005 12:38 pm > Subject: Re: RE: [Wtr-general] I have a couple of questions... > > > Ok, I just ran the installer ( versions .15 & .14 ) and after I've > > gotten Ruby installed, when I run the watir installer ( install.rb ) > > it says it can't find Fox > > > > Any ideas? I'm running XP. > > > > j. > > > > > > On 8/3/05, Jeff Wood wrote: > > > ... will the new dialog functionality replace the AutoIT stuff > > as well ? > > > > > > On 8/3/05, Bret Pettichord wrote: > > > > Another complication of this is that some frame properties are not > > > > accessible from the frame itself, but rather from its > > container. This is > > > > because, internally, there is a Frame element and a Window > > element referred > > > > to by the frame and contained in the Frames array. To see what > > i mean, look > > > > at what i recently had to do to allow Frames to be accessed by > > id instead > > > > of name -- kinda hairy. > > > > > > > > The design principle with Watir is that we try to make Watir > > be intuitive, > > > > even if that means our code isn't a simple mapping to the OLE > > objects.> > > > > > > > I fully agree with that, if all I wanted was access to the COM > > stuff,> I could do that without WATiR. > > > > > > > Ultimately, i think we need to start taking a more > > experimental approach. > > > > We need to be able to release an implementation and discuss it > > and modify > > > > it, *before* we commit to supporting it. > > > > > > So, where/how is the repository ( SCM ) run now? > > > > > > I mean, if this is an experimentation thing, we need to get > > setup to > > > go and pull source to try the experimental version, and leave the > > > "release" version for the people that don't want to play with new > > > features that will most likely change before release. > > > > > > > Right now i am working on new dialog support code. I think > > everyone will > > > > like both the new API and the new functionality that will come > > with it. If > > > > so, we then face what to do with the old WinClicker and > > WindowHandler code, > > > > which i would like to deprecate. > > > > > > So, does this new functionality replace the AutoIT stuff or does it > > > wrap it ... or what ??? > > > > > > > Bret > > > > > > > > At 10:27 AM 8/3/2005, Paul Rogers wrote: > > > > >ah, good point. Should it perhaps only iterate the top level > > frames?> > > > > > > >and if you wanted lower level frames, you would apply an > > iterator to that > > > > >frame. Seems like this way would save me work;-) But probably > > be less > > > > >intuiitive. > > > > > > > > > >----- Original Message ----- > > > > >From: Bret Pettichord > > > > >Date: Wednesday, August 3, 2005 2:35 am > > > > >Subject: RE: [Wtr-general] I have a couple of questions... > > > > > > > > > > > At 10:33 PM 8/2/2005, Paul Rogers wrote: > > > > > > >I want to add a frame iterator object as soon as I get > > the chance: > > > > > > > > > > > > > >Ie.frames.each {|f| .... } > > > > > > > > > > > > > >When that's, there, it would be simple for you to add > > your 'click > > > > > > a link > > > > > > >in any frame' method. It wont be this release though. > > > > > > > > > > > > > >Paul > > > > > > > > > > > > This will be harder than the other iterators because frame > > > > > > collections can > > > > > > be nested. If you only search document.frames[], you won't > > > > > > actually > > > > > > traverse all of the frames. > > > > > > > > > > > > > > > > > > > > > > > > _____________________ > > > > > > Bret Pettichord > > > > > > www.pettichord.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 > > > > > > > > _____________________ > > > > Bret Pettichord > > > > www.pettichord.com > > > > > > > > _______________________________________________ > > > > Wtr-general mailing list > > > > Wtr-general at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > I'm MORE than happy to help with coding as well. I'm not > > familiar with > > > how things normally work with RubyForge projects ( or at the general > > > open source level either ) ... I've mostly worked in closed source > > > environments... > > > > > > But, I'd be GLAD to help make the current Best-In-Class solution the > > > Best Solution Possible. > > > > > > j. > > > > > > -- > > > "So long, and thanks for all the fish" > > > > > > Jeff Wood > > > > > > > > > -- > > "So long, and thanks for all the fish" > > > > Jeff Wood > > > > _______________________________________________ > > 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 > -- "So long, and thanks for all the fish" Jeff Wood From jeff.darklight at gmail.com Wed Aug 3 15:26:49 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 3 Aug 2005 12:26:49 -0700 Subject: [Wtr-general] I have a couple of questions... In-Reply-To: References: <254a78c2549c69.2549c69254a78c@shaw.ca> Message-ID: Found the problem ... it installed fxruby under gems. So, it won't find it until require 'rubygems' is included at the top. j. On 8/3/05, Jeff Wood wrote: > Actually the installer looks for both. > > j. > > On 8/3/05, Paul Rogers wrote: > > the latest version of ruby installs 'fox12' > > I think the installer was written for 'fox' > > > > I cnat be certain as I dont have any code available right now. We would need to fix this for the next release though > > > > Paul > > > > ----- Original Message ----- > > From: Jeff Wood > > Date: Wednesday, August 3, 2005 12:38 pm > > Subject: Re: RE: [Wtr-general] I have a couple of questions... > > > > > Ok, I just ran the installer ( versions .15 & .14 ) and after I've > > > gotten Ruby installed, when I run the watir installer ( install.rb ) > > > it says it can't find Fox > > > > > > Any ideas? I'm running XP. > > > > > > j. > > > > > > > > > On 8/3/05, Jeff Wood wrote: > > > > ... will the new dialog functionality replace the AutoIT stuff > > > as well ? > > > > > > > > On 8/3/05, Bret Pettichord wrote: > > > > > Another complication of this is that some frame properties are not > > > > > accessible from the frame itself, but rather from its > > > container. This is > > > > > because, internally, there is a Frame element and a Window > > > element referred > > > > > to by the frame and contained in the Frames array. To see what > > > i mean, look > > > > > at what i recently had to do to allow Frames to be accessed by > > > id instead > > > > > of name -- kinda hairy. > > > > > > > > > > The design principle with Watir is that we try to make Watir > > > be intuitive, > > > > > even if that means our code isn't a simple mapping to the OLE > > > objects.> > > > > > > > > > I fully agree with that, if all I wanted was access to the COM > > > stuff,> I could do that without WATiR. > > > > > > > > > Ultimately, i think we need to start taking a more > > > experimental approach. > > > > > We need to be able to release an implementation and discuss it > > > and modify > > > > > it, *before* we commit to supporting it. > > > > > > > > So, where/how is the repository ( SCM ) run now? > > > > > > > > I mean, if this is an experimentation thing, we need to get > > > setup to > > > > go and pull source to try the experimental version, and leave the > > > > "release" version for the people that don't want to play with new > > > > features that will most likely change before release. > > > > > > > > > Right now i am working on new dialog support code. I think > > > everyone will > > > > > like both the new API and the new functionality that will come > > > with it. If > > > > > so, we then face what to do with the old WinClicker and > > > WindowHandler code, > > > > > which i would like to deprecate. > > > > > > > > So, does this new functionality replace the AutoIT stuff or does it > > > > wrap it ... or what ??? > > > > > > > > > Bret > > > > > > > > > > At 10:27 AM 8/3/2005, Paul Rogers wrote: > > > > > >ah, good point. Should it perhaps only iterate the top level > > > frames?> > > > > > > > >and if you wanted lower level frames, you would apply an > > > iterator to that > > > > > >frame. Seems like this way would save me work;-) But probably > > > be less > > > > > >intuiitive. > > > > > > > > > > > >----- Original Message ----- > > > > > >From: Bret Pettichord > > > > > >Date: Wednesday, August 3, 2005 2:35 am > > > > > >Subject: RE: [Wtr-general] I have a couple of questions... > > > > > > > > > > > > > At 10:33 PM 8/2/2005, Paul Rogers wrote: > > > > > > > >I want to add a frame iterator object as soon as I get > > > the chance: > > > > > > > > > > > > > > > >Ie.frames.each {|f| .... } > > > > > > > > > > > > > > > >When that's, there, it would be simple for you to add > > > your 'click > > > > > > > a link > > > > > > > >in any frame' method. It wont be this release though. > > > > > > > > > > > > > > > >Paul > > > > > > > > > > > > > > This will be harder than the other iterators because frame > > > > > > > collections can > > > > > > > be nested. If you only search document.frames[], you won't > > > > > > > actually > > > > > > > traverse all of the frames. > > > > > > > > > > > > > > > > > > > > > > > > > > > > _____________________ > > > > > > > Bret Pettichord > > > > > > > www.pettichord.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 > > > > > > > > > > _____________________ > > > > > Bret Pettichord > > > > > www.pettichord.com > > > > > > > > > > _______________________________________________ > > > > > Wtr-general mailing list > > > > > Wtr-general at rubyforge.org > > > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > > > > I'm MORE than happy to help with coding as well. I'm not > > > familiar with > > > > how things normally work with RubyForge projects ( or at the general > > > > open source level either ) ... I've mostly worked in closed source > > > > environments... > > > > > > > > But, I'd be GLAD to help make the current Best-In-Class solution the > > > > Best Solution Possible. > > > > > > > > j. > > > > > > > > -- > > > > "So long, and thanks for all the fish" > > > > > > > > Jeff Wood > > > > > > > > > > > > > -- > > > "So long, and thanks for all the fish" > > > > > > Jeff Wood > > > > > > _______________________________________________ > > > 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 > > > > > -- > "So long, and thanks for all the fish" > > Jeff Wood > -- "So long, and thanks for all the fish" Jeff Wood From jeff.darklight at gmail.com Wed Aug 3 15:59:23 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 3 Aug 2005 12:59:23 -0700 Subject: [Wtr-general] I have a couple of questions... In-Reply-To: References: <254a78c2549c69.2549c69254a78c@shaw.ca> Message-ID: It's working wonderfully now. So, is there a good online tutorial for the AutoIT stuff? j. On 8/3/05, Jeff Wood wrote: > Found the problem ... it installed fxruby under gems. > > So, it won't find it until require 'rubygems' is included at the top. > > j. > > On 8/3/05, Jeff Wood wrote: > > Actually the installer looks for both. > > > > j. > > > > On 8/3/05, Paul Rogers wrote: > > > the latest version of ruby installs 'fox12' > > > I think the installer was written for 'fox' > > > > > > I cnat be certain as I dont have any code available right now. We would need to fix this for the next release though > > > > > > Paul > > > > > > ----- Original Message ----- > > > From: Jeff Wood > > > Date: Wednesday, August 3, 2005 12:38 pm > > > Subject: Re: RE: [Wtr-general] I have a couple of questions... > > > > > > > Ok, I just ran the installer ( versions .15 & .14 ) and after I've > > > > gotten Ruby installed, when I run the watir installer ( install.rb ) > > > > it says it can't find Fox > > > > > > > > Any ideas? I'm running XP. > > > > > > > > j. > > > > > > > > > > > > On 8/3/05, Jeff Wood wrote: > > > > > ... will the new dialog functionality replace the AutoIT stuff > > > > as well ? > > > > > > > > > > On 8/3/05, Bret Pettichord wrote: > > > > > > Another complication of this is that some frame properties are not > > > > > > accessible from the frame itself, but rather from its > > > > container. This is > > > > > > because, internally, there is a Frame element and a Window > > > > element referred > > > > > > to by the frame and contained in the Frames array. To see what > > > > i mean, look > > > > > > at what i recently had to do to allow Frames to be accessed by > > > > id instead > > > > > > of name -- kinda hairy. > > > > > > > > > > > > The design principle with Watir is that we try to make Watir > > > > be intuitive, > > > > > > even if that means our code isn't a simple mapping to the OLE > > > > objects.> > > > > > > > > > > > I fully agree with that, if all I wanted was access to the COM > > > > stuff,> I could do that without WATiR. > > > > > > > > > > > Ultimately, i think we need to start taking a more > > > > experimental approach. > > > > > > We need to be able to release an implementation and discuss it > > > > and modify > > > > > > it, *before* we commit to supporting it. > > > > > > > > > > So, where/how is the repository ( SCM ) run now? > > > > > > > > > > I mean, if this is an experimentation thing, we need to get > > > > setup to > > > > > go and pull source to try the experimental version, and leave the > > > > > "release" version for the people that don't want to play with new > > > > > features that will most likely change before release. > > > > > > > > > > > Right now i am working on new dialog support code. I think > > > > everyone will > > > > > > like both the new API and the new functionality that will come > > > > with it. If > > > > > > so, we then face what to do with the old WinClicker and > > > > WindowHandler code, > > > > > > which i would like to deprecate. > > > > > > > > > > So, does this new functionality replace the AutoIT stuff or does it > > > > > wrap it ... or what ??? > > > > > > > > > > > Bret > > > > > > > > > > > > At 10:27 AM 8/3/2005, Paul Rogers wrote: > > > > > > >ah, good point. Should it perhaps only iterate the top level > > > > frames?> > > > > > > > > >and if you wanted lower level frames, you would apply an > > > > iterator to that > > > > > > >frame. Seems like this way would save me work;-) But probably > > > > be less > > > > > > >intuiitive. > > > > > > > > > > > > > >----- Original Message ----- > > > > > > >From: Bret Pettichord > > > > > > >Date: Wednesday, August 3, 2005 2:35 am > > > > > > >Subject: RE: [Wtr-general] I have a couple of questions... > > > > > > > > > > > > > > > At 10:33 PM 8/2/2005, Paul Rogers wrote: > > > > > > > > >I want to add a frame iterator object as soon as I get > > > > the chance: > > > > > > > > > > > > > > > > > >Ie.frames.each {|f| .... } > > > > > > > > > > > > > > > > > >When that's, there, it would be simple for you to add > > > > your 'click > > > > > > > > a link > > > > > > > > >in any frame' method. It wont be this release though. > > > > > > > > > > > > > > > > > >Paul > > > > > > > > > > > > > > > > This will be harder than the other iterators because frame > > > > > > > > collections can > > > > > > > > be nested. If you only search document.frames[], you won't > > > > > > > > actually > > > > > > > > traverse all of the frames. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _____________________ > > > > > > > > Bret Pettichord > > > > > > > > www.pettichord.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 > > > > > > > > > > > > _____________________ > > > > > > Bret Pettichord > > > > > > www.pettichord.com > > > > > > > > > > > > _______________________________________________ > > > > > > Wtr-general mailing list > > > > > > Wtr-general at rubyforge.org > > > > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > > > > > > > I'm MORE than happy to help with coding as well. I'm not > > > > familiar with > > > > > how things normally work with RubyForge projects ( or at the general > > > > > open source level either ) ... I've mostly worked in closed source > > > > > environments... > > > > > > > > > > But, I'd be GLAD to help make the current Best-In-Class solution the > > > > > Best Solution Possible. > > > > > > > > > > j. > > > > > > > > > > -- > > > > > "So long, and thanks for all the fish" > > > > > > > > > > Jeff Wood > > > > > > > > > > > > > > > > > -- > > > > "So long, and thanks for all the fish" > > > > > > > > Jeff Wood > > > > > > > > _______________________________________________ > > > > 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 > > > > > > > > > -- > > "So long, and thanks for all the fish" > > > > Jeff Wood > > > > > -- > "So long, and thanks for all the fish" > > Jeff Wood > -- "So long, and thanks for all the fish" Jeff Wood From Mark_Cain at rl.gov Wed Aug 3 17:08:21 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Wed, 3 Aug 2005 14:08:21 -0700 Subject: [Wtr-general] XML Logging with Builder Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D322@EX5V.rl.gov> Do you have any good example on using Builder and REXML you could share? Thanks, --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jonathan Kohl Sent: Wednesday, August 03, 2005 12:18 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] XML Logging with Builder I've found Builder to work well for writing out XML files, and REXML for reading. To use Builder with Watir, first you need to install gems and Builder. The "Builder" project is here: http://rubyforge.org/projects/builder/ Installing it requires that RubyGems is installed: http://docs.rubygems.org/read/chapter/3 The parent tag is written with opening and closing tags, and then the child tags are written between them. I downloaded the Builder package (it has a ".gem" file extension), and saved it to a directory. I downloaded the latest RubyGems release (zip file), unzipped it to a temporary directory (ex. "gems_temp"), and then opened a DOS console. In the console, I changed to the temporary directory (ex. C:\gems_temp\rubygems-0.8.10\ ) and typed: "setup" at the command prompt and hit enter. This installed Ruby Gems. I installed Builder by then entering this: "gem install builder" at the command line. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050803/69990852/attachment.html From jkohl at telusplanet.net Wed Aug 3 17:13:20 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Wed, 3 Aug 2005 15:13:20 -0600 Subject: [Wtr-general] XML Logging with Builder In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D322@EX5V.rl.gov> Message-ID: <20050803211353.GBOP24065.priv-edmwes26.telusplanet.net@tintin> REXML logging is already in the examples directory. If there is sufficient interest and Bret and Paul don't object, I could include an example using Builder in the examples directory. -Jonathan _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: August 3, 2005 3:08 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] XML Logging with Builder Do you have any good example on using Builder and REXML you could share? Thanks, --Mark _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jonathan Kohl Sent: Wednesday, August 03, 2005 12:18 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] XML Logging with Builder I've found Builder to work well for writing out XML files, and REXML for reading. To use Builder with Watir, first you need to install gems and Builder. The "Builder" project is here: http://rubyforge.org/projects/builder/ Installing it requires that RubyGems is installed: http://docs.rubygems.org/read/chapter/3 The parent tag is written with opening and closing tags, and then the child tags are written between them. I downloaded the Builder package (it has a ".gem" file extension), and saved it to a directory. I downloaded the latest RubyGems release (zip file), unzipped it to a temporary directory (ex. "gems_temp"), and then opened a DOS console. In the console, I changed to the temporary directory (ex. C:\gems_temp\rubygems-0.8.10\ ) and typed: "setup" at the command prompt and hit enter. This installed Ruby Gems. I installed Builder by then entering this: "gem install builder" at the command line. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050803/7ccc8cac/attachment.html From dmirijan2 at sbcglobal.net Wed Aug 3 18:57:50 2005 From: dmirijan2 at sbcglobal.net (d cm) Date: Wed, 3 Aug 2005 15:57:50 -0700 (PDT) Subject: [Wtr-general] Printing of Test Case results Message-ID: <20050803225750.26192.qmail@web81705.mail.yahoo.com> I am testing assertions in the class Test::Unit::TestCase. I get output at the end that looks like this: Finished in 14.001 seconds. 1 tests, 3 assertions, 0 failures, 0 errors Does anyone know how to disable the automatic printing of the time, while still printing the results of how many tests passed? It is causing problems for me when I try to diff output files. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050803/4aeebcb2/attachment.html From jkohl at telusplanet.net Wed Aug 3 19:23:41 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Wed, 3 Aug 2005 17:23:41 -0600 Subject: [Wtr-general] XML Logging with Builder In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D322@EX5V.rl.gov> Message-ID: <20050803232412.BLAY17745.priv-edtnes57.telusplanet.net@tintin> Here is an example. When you have RubyGems and Builder installed, rename the "xml_logging.zi~" file to "xml_logging.zip", extract and run. Hope this helps. With REXML, I wasn't able to get a solution that printed out a suite results file and a test case results file using Suites in Test::Unit. One of the log files would be blank. I'll have to try again. -Jonathan _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: August 3, 2005 3:08 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] XML Logging with Builder Do you have any good example on using Builder and REXML you could share? Thanks, --Mark _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jonathan Kohl Sent: Wednesday, August 03, 2005 12:18 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] XML Logging with Builder I've found Builder to work well for writing out XML files, and REXML for reading. To use Builder with Watir, first you need to install gems and Builder. The "Builder" project is here: http://rubyforge.org/projects/builder/ Installing it requires that RubyGems is installed: http://docs.rubygems.org/read/chapter/3 The parent tag is written with opening and closing tags, and then the child tags are written between them. I downloaded the Builder package (it has a ".gem" file extension), and saved it to a directory. I downloaded the latest RubyGems release (zip file), unzipped it to a temporary directory (ex. "gems_temp"), and then opened a DOS console. In the console, I changed to the temporary directory (ex. C:\gems_temp\rubygems-0.8.10\ ) and typed: "setup" at the command prompt and hit enter. This installed Ruby Gems. I installed Builder by then entering this: "gem install builder" at the command line. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050803/dcdbd748/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: xml_logging.zi~ Type: application/octet-stream Size: 1289 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050803/dcdbd748/attachment.obj From Ben.Torres at rhi.com Wed Aug 3 20:07:26 2005 From: Ben.Torres at rhi.com (Torres, Ben (HQP)) Date: Wed, 3 Aug 2005 17:07:26 -0700 Subject: [Wtr-general] Security Alert pop up Message-ID: <1641BB0AA7287848817A63C3EE9677D50740CB0A@hqp-ex-mb05.na.msds.rhi.com> I tried running the code below and got the following error: Started thread for win helper ruby: No such file or directory -- winHelper_security.rb (LoadError) I uploaded both files attached and saved them into the said directory on my machine =\ ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tuyet Cong-Ton-Nu Sent: Tuesday, August 02, 2005 5:42 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Security Alert pop up You need these 2 attached files that will make it work; You need to put both in the C:\ruby\lib\ruby\site_ruby\1.8\watir directory I don't think they are in the 1.3 version (probably in tarball). Also add the code below, it works great for me. require 'watir' include Watir require 'watir/windowhelper' t = Thread.new(){ puts "Started thread for win helper" system('ruby winHelper_security.rb') } ie=IE.new() m = Thread.new(ie) { ie.goto("https://www.mysite.com") } m.join t.join -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050803/c4de59d6/attachment.html From fredckp at yahoo.com.sg Wed Aug 3 21:51:21 2005 From: fredckp at yahoo.com.sg (Fred) Date: Thu, 4 Aug 2005 09:51:21 +0800 Subject: [Wtr-general] Checkboxes with Similar Names Message-ID: Hi, I got a series of the "similarname" checkboxes with values that generate dynamically. Is there a way to capture such textbox based on the "Name 1", "Name 2", etc...

Name 1

Name 2

Regards, Fred Send instant messages to your online friends http://asia.messenger.yahoo.com From fredckp at yahoo.com.sg Wed Aug 3 21:51:52 2005 From: fredckp at yahoo.com.sg (Fred) Date: Thu, 4 Aug 2005 09:51:52 +0800 Subject: [Wtr-general] Cannot Identify "Cancel" Message-ID: Hi, I got an error when identifying all the "Cancel" button on a test web page, any advice? Thanks. reset name=reset id= value=Cancel alt= src= irb(main):034:0> ie.button(:value,"Cancel").flash Watir::Exception::UnknownObjectException: Unable to locate object, using value and Cancel from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1979:in `object_exist_check' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2106:in `flash' from (irb):34 from (null):0 Regards, Fred Chan Send instant messages to your online friends http://asia.messenger.yahoo.com From paul.rogers at shaw.ca Wed Aug 3 23:12:01 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 03 Aug 2005 21:12:01 -0600 Subject: [Wtr-general] Cannot Identify "Cancel" In-Reply-To: Message-ID: <005701c598a2$487bbd40$6400a8c0@NewDell> This is a reset button. In the current release you need to do Ie.reset(:value , 'Cancel').flash In the next release, the code you are using will work as we have combined reset objects in with button Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Fred Sent: 03 August 2005 19:52 To: wtr-general at rubyforge.org Subject: [Wtr-general] Cannot Identify "Cancel" Hi, I got an error when identifying all the "Cancel" button on a test web page, any advice? Thanks. reset name=reset id= value=Cancel alt= src= irb(main):034:0> ie.button(:value,"Cancel").flash Watir::Exception::UnknownObjectException: Unable to locate object, using value and Cancel from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1979:in `object_exist_check' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2106:in `flash' from (irb):34 from (null):0 Regards, Fred Chan Send instant messages to your online friends http://asia.messenger.yahoo.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Wed Aug 3 23:13:03 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 03 Aug 2005 21:13:03 -0600 Subject: [Wtr-general] Checkboxes with Similar Names In-Reply-To: Message-ID: <005801c598a2$6d2fcbe0$6400a8c0@NewDell> You can use :beforeText although Bret has said today this seems to be unreliable, so it may not work. Ie.checkbox(:beforeText, 'Name 1').flash Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Fred Sent: 03 August 2005 19:51 To: wtr-general at rubyforge.org Subject: [Wtr-general] Checkboxes with Similar Names Hi, I got a series of the "similarname" checkboxes with values that generate dynamically. Is there a way to capture such textbox based on the "Name 1", "Name 2", etc...

Name 1

Name 2

Regards, Fred Send instant messages to your online friends http://asia.messenger.yahoo.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Wed Aug 3 23:50:18 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 03 Aug 2005 22:50:18 -0500 Subject: [Wtr-general] Checkboxes with Similar Names In-Reply-To: <005801c598a2$6d2fcbe0$6400a8c0@NewDell> References: Message-ID: <5.1.0.14.2.20050803224922.0326c8a8@127.0.0.1> Paul, Haven't you recommended ie.checkbox(:name, 'similarname', 35).flash for this before? Bret At 10:13 PM 8/3/2005, Paul Rogers wrote: >You can use :beforeText although Bret has said today this seems to be >unreliable, so it may not work. > >Ie.checkbox(:beforeText, 'Name 1').flash > >Paul > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Fred >Sent: 03 August 2005 19:51 >To: wtr-general at rubyforge.org >Subject: [Wtr-general] Checkboxes with Similar Names > > >Hi, >I got a series of the "similarname" checkboxes with values that generate >dynamically. Is there a way to capture such textbox based on the "Name >1", "Name 2", etc...

> name="similarname" value="35"> >Name 1 >

>

> name="similarname" value="40"> >Name 2 >

> >Regards, >Fred > >Send instant messages to your online friends >http://asia.messenger.yahoo.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 _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Aug 4 02:33:50 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 04 Aug 2005 01:33:50 -0500 Subject: [Wtr-general] Watir 1.4 is released Message-ID: <5.1.0.14.2.20050804013300.033ad5d8@127.0.0.1> The Web Testing in Ruby group is pleased to announce the release of Watir 1.4. Watir is a Ruby Library for automating web applications using the Internet Explorer browser. http://rubyforge.org/frs/?group_id=104&release_id=2579 This release contains many bug fixes and new features. - fix method name for accessing class name of P/Span/Div (change from style to class_name) - fix for bug 2152 (frame index in show_frames off by 1) - added alt as a property to image - added file_fields - fixed TextArea#to_s - moved reset button to buttons class - add IE#send_keys - frames can now be referenced using regexps and ids - added IE#minimize, IE#maximize, IE#restore - onChange and onBlur events now triggered by TextField#set - added default option to set for checkbox - added colspan method to tablecell - fix for bug reported by Scott P, wrong objects are sometimes found - fixed bug with radio/checkboxes doing multiple fireevents - fix for table, id and reg exp - wait for page load before returning from IE.attach - update to select_list -- new interface still in progress - added .show method to iterators - fix for flashing objects in table cells - added flash for forms - flash returns nil instead of the curious '10' - removed ScreenCapture module from IE class _____________________ Bret Pettichord www.pettichord.com From jeff.darklight at gmail.com Thu Aug 4 02:49:12 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 3 Aug 2005 23:49:12 -0700 Subject: [Wtr-general] Watir 1.4 is released In-Reply-To: <5.1.0.14.2.20050804013300.033ad5d8@127.0.0.1> References: <5.1.0.14.2.20050804013300.033ad5d8@127.0.0.1> Message-ID: What is the normal process for upgrading from one version to the next ... just install the new one? or, what? j. On 8/3/05, Bret Pettichord wrote: > The Web Testing in Ruby group is pleased to announce the release of Watir > 1.4. Watir is a Ruby Library for automating web applications using the > Internet Explorer browser. > > http://rubyforge.org/frs/?group_id=104&release_id=2579 > > This release contains many bug fixes and new features. > > - fix method name for accessing class name of P/Span/Div (change from style > to class_name) > - fix for bug 2152 (frame index in show_frames off by 1) > - added alt as a property to image > - added file_fields > - fixed TextArea#to_s > - moved reset button to buttons class > - add IE#send_keys > - frames can now be referenced using regexps and ids > - added IE#minimize, IE#maximize, IE#restore > - onChange and onBlur events now triggered by TextField#set > - added default option to set for checkbox > - added colspan method to tablecell > - fix for bug reported by Scott P, wrong objects are sometimes found > - fixed bug with radio/checkboxes doing multiple fireevents > - fix for table, id and reg exp > - wait for page load before returning from IE.attach > - update to select_list -- new interface still in progress > - added .show method to iterators > - fix for flashing objects in table cells > - added flash for forms > - flash returns nil instead of the curious '10' > - removed ScreenCapture module from IE class > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "So long, and thanks for all the fish" Jeff Wood From zeljko.filipin at gmail.com Thu Aug 4 03:07:06 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Thu, 4 Aug 2005 09:07:06 +0200 Subject: [Wtr-general] Watir 1.4 is released In-Reply-To: <5.1.0.14.2.20050804013300.033ad5d8@127.0.0.1> Message-ID: <42f1be6d.259bd22d.59b1.6093@mx.gmail.com> I have installed 1.4 and ran unit tests. After core_tests.rb i get 1) Failure: test_http_errors(TC_Navigate) [unittests/../unittests/../unittests/navigate_test.rb:51]: exception expected but none was thrown. 2) Failure: test_button_frames(TC_show_frames) [unittests/../unittests/../unittests/frame_test.rb:113:in `capture_and_compare' unittests/../unittests/../unittests/frame_test.rb:125:in `test_button_frames']: <"there are 2 frames\nframe index: 0 name: buttonFrame\nframe index: 1 name: buttonFrame2\n"> expected but was <"there are 2 frames\nframe index: 1 name: buttonFrame\nframe index: 2 name: buttonFrame2\n">. 3) Failure: test_iframes(TC_show_frames) [unittests/../unittests/../unittests/frame_test.rb:113:in `capture_and_compare' unittests/../unittests/../unittests/frame_test.rb:133:in `test_iframes']: <"there are 2 frames\nframe index: 0 name: senderFrame\nframe index: 1 name: receiverFrame\n"> expected but was <"there are 2 frames\nframe index: 1 name: senderFrame\nframe index: 2 name: receiverFrame\n">. 4) Failure: test_show_nested_frames(TC_show_frames) [unittests/../unittests/../unittests/frame_test.rb:113:in `capture_and_compare' unittests/../unittests/../unittests/frame_test.rb:117:in `test_show_nested_frames']: <"there are 2 frames\nframe index: 0 name: nestedFrame\nframe index: 1 name: nestedFrame2\n"> expected but was <"there are 2 frames\nframe index: 1 name: nestedFrame\nframe index: 2 name: nestedFrame2\n">. 157 tests, 950 assertions, 4 failures, 0 errors After all_tests.rb (and one paint window stays open - with pop up with message C:\watir_bonus.bmp already exists. Do you want to replace it?): 1) Failure: test_bmp(TC_Capture) [C:/watir_bonus/unitTests/../unittests/screen_capture_test.rb:50]: is not true. 2) Error: test_image_click(TC_Images): Watir::Exception::UnknownObjectException: Unable to locate object, using name and disabler_test C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1939:in `assert_exists' (eval):2:in `disabled' C:/watir_bonus/unitTests/../unittests/images_test.rb:56:in `test_image_click' 3) Failure: test_http_errors(TC_Navigate) [C:/watir_bonus/unitTests/../unittests/navigate_test.rb:51]: exception expected but none was thrown. 4) Failure: test_button_frames(TC_show_frames) [C:/watir_bonus/unitTests/../unittests/frame_test.rb:113:in `capture_and_compare' C:/watir_bonus/unitTests/../unittests/frame_test.rb:125:in `test_button_frames']: <"there are 2 frames\nframe index: 0 name: buttonFrame\nframe index: 1 name: buttonFrame2\n"> expected but was <"there are 2 frames\nframe index: 1 name: buttonFrame\nframe index: 2 name: buttonFrame2\n">. 5) Failure: test_iframes(TC_show_frames) [C:/watir_bonus/unitTests/../unittests/frame_test.rb:113:in `capture_and_compare' C:/watir_bonus/unitTests/../unittests/frame_test.rb:133:in `test_iframes']: <"there are 2 frames\nframe index: 0 name: senderFrame\nframe index: 1 name: receiverFrame\n"> expected but was <"there are 2 frames\nframe index: 1 name: senderFrame\nframe index: 2 name: receiverFrame\n">. 6) Failure: test_show_nested_frames(TC_show_frames) [C:/watir_bonus/unitTests/../unittests/frame_test.rb:113:in `capture_and_compare' C:/watir_bonus/unitTests/../unittests/frame_test.rb:117:in `test_show_nested_frames']: <"there are 2 frames\nframe index: 0 name: nestedFrame\nframe index: 1 name: nestedFrame2\n"> expected but was <"there are 2 frames\nframe index: 1 name: nestedFrame\nframe index: 2 name: nestedFrame2\n">. 182 tests, 1059 assertions, 5 failures, 1 errors I just ran some of my scripts and they work fine. Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Thursday, August 04, 2005 8:34 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Watir 1.4 is released The Web Testing in Ruby group is pleased to announce the release of Watir 1.4. Watir is a Ruby Library for automating web applications using the Internet Explorer browser. http://rubyforge.org/frs/?group_id=104&release_id=2579 This release contains many bug fixes and new features. - fix method name for accessing class name of P/Span/Div (change from style to class_name) - fix for bug 2152 (frame index in show_frames off by 1) - added alt as a property to image - added file_fields - fixed TextArea#to_s - moved reset button to buttons class - add IE#send_keys - frames can now be referenced using regexps and ids - added IE#minimize, IE#maximize, IE#restore - onChange and onBlur events now triggered by TextField#set - added default option to set for checkbox - added colspan method to tablecell - fix for bug reported by Scott P, wrong objects are sometimes found - fixed bug with radio/checkboxes doing multiple fireevents - fix for table, id and reg exp - wait for page load before returning from IE.attach - update to select_list -- new interface still in progress - added .show method to iterators - fix for flashing objects in table cells - added flash for forms - flash returns nil instead of the curious '10' - removed ScreenCapture module from IE class _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From fredckp at yahoo.com.sg Thu Aug 4 04:04:14 2005 From: fredckp at yahoo.com.sg (Fred) Date: Thu, 4 Aug 2005 16:04:14 +0800 Subject: [Wtr-general] RE: Cannot Identify "Cancel" Message-ID: Hi Paul, thanks for the response. I have tried as recommended and it prompts, reset name=reset id= value=Cancel alt= src= irb(main):012:0> ie.reset(:value , 'Cancel').flash Watir::Exception::UnknownObjectException: Unable to locate object, using value and Cancel from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1979:in `object_exist_check' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2106:in `flash' from (irb):12 from ?:0 Regards, Fred ------------------------------------------------------------ Date: Wed, 03 Aug 2005 21:12:01 -0600 From: Paul Rogers Subject: RE: [Wtr-general] Cannot Identify "Cancel" To: wtr-general at rubyforge.org Message-ID: <005701c598a2$487bbd40$6400a8c0 at NewDell> Content-Type: text/plain; charset=US-ASCII This is a reset button. In the current release you need to do Ie.reset(:value , 'Cancel').flash In the next release, the code you are using will work as we have combined reset objects in with button Paul Send instant messages to your online friends http://asia.messenger.yahoo.com From Jan.Montano at thomson.com Thu Aug 4 04:54:14 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Thu, 4 Aug 2005 16:54:14 +0800 Subject: [Wtr-general] Watir and browser session contamination problems Message-ID: this is regarding watir and browser session contamination problems. please read. -> http://rubyforge.org/pipermail/wtr-general/2005-June/002240.html I used this code: this is to ensure it opens different html files w=WinClicker.new w.winsystem("start explorer #{thread_number}_#{i}.html ") sleep(thread_number) ie_array[i] = IE.attach(:title , "#{thread_number}_#{i}" ) ie_array[i].goto(site) I thought this would solve the session problems. I was wrong. Although I spawned different IEs, it still reflects same session IDs for all of them. how come? I understand it's the same as typing in the run command of windows "start explorer blahblah". I did it manually and it returned different sessions which I hope it would also return during the automation. Please advise. thanks. Jan M. Montano QA Lead / Developer Regional Application Development Thomson (Philippines) Corporation 18th Floor Ayala Life - FGU Center 6811 Ayala Ave., Makati City Philippines (632) 878-5890 From thomas.ohrbom at extend.no Thu Aug 4 05:04:07 2005 From: thomas.ohrbom at extend.no (=?ISO-8859-1?Q?Thomas_=D8hrbom?=) Date: Thu, 04 Aug 2005 11:04:07 +0200 Subject: [Wtr-general] Watir 1.4 is released In-Reply-To: <42f1be6d.259bd22d.59b1.6093@mx.gmail.com> References: <42f1be6d.259bd22d.59b1.6093@mx.gmail.com> Message-ID: <42F1DA07.3090809@extend.no> Hi, I just installed v1.4 as well, and ran the same tests as you. Got the same results with the following exceptions: Zeljko Filipin on 04.08.2005 09:07 wrote: > I have installed 1.4 and ran unit tests. > > After core_tests.rb i get > > 1) Failure: > test_http_errors(TC_Navigate) > [unittests/../unittests/../unittests/navigate_test.rb:51]: > exception expected but none was > thrown. Didn't get this one. > 157 tests, 950 assertions, 4 failures, 0 errors So I ended up with: 157 tests, 950 assertions, 3 failures, 0 errors. > After all_tests.rb (and one paint window stays open - with pop up with > message C:\watir_bonus.bmp already exists. Do you want to replace it?): At one point during the test run I had to manually click the OK and Cancel buttons off of the page 'unitTests/html/popups1.html', to get the test run to continue. > 3) Failure: > test_http_errors(TC_Navigate) > [C:/watir_bonus/unitTests/../unittests/navigate_test.rb:51]: > exception expected but none was > thrown. Didn't get this one. > 182 tests, 1059 assertions, 5 failures, 1 errors I got: 182 tests, 1059 assertions, 4 failures, 1 errors I'm using Ruby 1.82-15. Kind regards -- Thomas Ohrbom QA Manager, extend as thomas.ohrbom at extend.no | http://www.extend.no/ From fredckp at yahoo.com.sg Thu Aug 4 05:36:41 2005 From: fredckp at yahoo.com.sg (Fred) Date: Thu, 4 Aug 2005 17:36:41 +0800 Subject: [Wtr-general] RE: Checkboxes with Similar Names Message-ID: Hi Paul, Thanks, that helps. Ie.checkbox(:beforeText, 'Name 1').flash Regards, Fred -------------------------------------- Date: Wed, 03 Aug 2005 21:13:03 -0600 From: Paul Rogers Subject: RE: [Wtr-general] Checkboxes with Similar Names To: wtr-general at rubyforge.org Message-ID: <005801c598a2$6d2fcbe0$6400a8c0 at NewDell> Content-Type: text/plain; charset=US-ASCII You can use :beforeText although Bret has said today this seems to be unreliable, so it may not work Ie.checkbox(:beforeText, 'Name 1').flash Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Fred Sent: 03 August 2005 19:51 To: wtr-general at rubyforge.org Subject: [Wtr-general] Checkboxes with Similar Names Hi, I got a series of the "similarname" checkboxes with values that generate dynamically. Is there a way to capture such textbox based on the "Name 1", "Name 2", etc...

Name 1

Name 2

Regards, Fred Send instant messages to your online friends http://asia.messenger.yahoo.com From warren at meyer-pollans.net Thu Aug 4 11:20:24 2005 From: warren at meyer-pollans.net (Warren Pollans) Date: Thu, 4 Aug 2005 11:20:24 -0400 Subject: [Wtr-general] Watir 1.4 is released In-Reply-To: <5.1.0.14.2.20050804013300.033ad5d8@127.0.0.1> References: <5.1.0.14.2.20050804013300.033ad5d8@127.0.0.1> Message-ID: <20050804112024.6736e6e6@localhost.localdomain> I'm not sure if this is the correct place to post - others have, so "me too" :-) C:\watir_bonus>ruby --version ruby 1.8.2 (2004-12-25) [i386-mswin32] I just installed 1.4 on a win2k box and got the following when running the unittests: Finished in 233.967 seconds. 1) Error: test_newWindows(TC_Links): NoMethodError: undefined method `title' for nil:NilClass unittests/../unittests/../unittests/newWindow_test.rb:15:in `test_newWindows ' 2) Failure: test_button_frames(TC_show_frames) [unittests/../unittests/../unittests/frame_test.rb:113:in `capture_and_compa re' unittests/../unittests/../unittests/frame_test.rb:125:in `test_button_frame s']: <"there are 2 frames\nframe index: 0 name: buttonFrame\nframe index: 1 name: b uttonFrame2\n"> expected but was <"there are 2 frames\nframe index: 1 name: buttonFrame\nframe index: 2 name: b uttonFrame2\n">. 3) Failure: test_iframes(TC_show_frames) [unittests/../unittests/../unittests/frame_test.rb:113:in `capture_and_compa re' unittests/../unittests/../unittests/frame_test.rb:133:in `test_iframes']: <"there are 2 frames\nframe index: 0 name: senderFrame \nframe index: 1 name: r eceiverFrame\n"> expected but was <"there are 2 frames\nframe index: 1 name: senderFrame\nframe index: 2 name: r eceiverFrame\n">. 4) Failure: test_show_nested_frames(TC_show_frames) [unittests/../unittests/../unittests/frame_test.rb:113:in `capture_and_compa re' unittests/../unittests/../unittests/frame_test.rb:117:in `test_show_nested_ frames']: <"there are 2 frames\nframe index: 0 name: nestedFrame\nframe index: 1 name: n estedFrame2\n"> expected but was <"there are 2 frames\nframe index: 1 name: nestedFrame\nframe index: 2 name: n estedFrame2\n">. 157 tests, 949 assertions, 3 failures, 1 errors From Ben.Torres at rhi.com Thu Aug 4 12:24:57 2005 From: Ben.Torres at rhi.com (Torres, Ben (HQP)) Date: Thu, 4 Aug 2005 09:24:57 -0700 Subject: [Wtr-general] Commenting out a whole block Message-ID: <1641BB0AA7287848817A63C3EE9677D50740CC8A@hqp-ex-mb05.na.msds.rhi.com> Is there any way to comment out a whole block of code? From jkohl at telusplanet.net Thu Aug 4 12:29:12 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Thu, 4 Aug 2005 10:29:12 -0600 Subject: [Wtr-general] Commenting out a whole block In-Reply-To: <1641BB0AA7287848817A63C3EE9677D50740CC8A@hqp-ex-mb05.na.msds.rhi.com> Message-ID: <20050804162947.CBUW23529.priv-edmwes26.telusplanet.net@tintin> =begin #your Ruby block is here =end I have had this not work sometimes though, so I comment out a block using RDT in Eclipse, or Ctrl+Q in SciTE. -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Torres, Ben (HQP) > Sent: August 4, 2005 10:25 AM > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Commenting out a whole block > > Is there any way to comment out a whole block of code? > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Thu Aug 4 12:31:36 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 04 Aug 2005 11:31:36 -0500 Subject: [Wtr-general] Watir 1.4 is released In-Reply-To: <42f1be6d.259bd22d.59b1.6093@mx.gmail.com> References: <5.1.0.14.2.20050804013300.033ad5d8@127.0.0.1> Message-ID: <5.1.0.14.2.20050804112134.0344ba20@127.0.0.1> Thanks for all the reports about unit test failures. The failures in the frames tests listed below are test bugs, and can be ignored. The indexing in show_frames had been incorrect. And the tests for them had the wrong expected results (so they were passing, incorrectly). Paul fixed the show_frames code, but didn't fix the tests, so they started failing (because the corrected output did not match the incorrect expected results). I've just committed corrections to the tests to CVS, and they will be in the next release. The other failures being reported are more confusing. They seem to be intermittent, and if memory serves, we've been seeing them, intermittently, for a while -- or at least some of them. Please continue to report them until we get them sorted out. Bret At 02:07 AM 8/4/2005, Zeljko Filipin wrote: > 4) Failure: >test_button_frames(TC_show_frames) > [C:/watir_bonus/unitTests/../unittests/frame_test.rb:113:in >`capture_and_compare' > C:/watir_bonus/unitTests/../unittests/frame_test.rb:125:in >`test_button_frames']: ><"there are 2 frames\nframe index: 0 name: buttonFrame\nframe index: 1 >name: buttonFrame2\n"> expected but was ><"there are 2 frames\nframe index: 1 name: buttonFrame\nframe index: 2 >name: buttonFrame2\n">. > > 5) Failure: >test_iframes(TC_show_frames) > [C:/watir_bonus/unitTests/../unittests/frame_test.rb:113:in >`capture_and_compare' > C:/watir_bonus/unitTests/../unittests/frame_test.rb:133:in >`test_iframes']: ><"there are 2 frames\nframe index: 0 name: senderFrame\nframe index: 1 >name: receiverFrame\n"> expected but was ><"there are 2 frames\nframe index: 1 name: senderFrame\nframe index: 2 >name: receiverFrame\n">. > > 6) Failure: >test_show_nested_frames(TC_show_frames) > [C:/watir_bonus/unitTests/../unittests/frame_test.rb:113:in >`capture_and_compare' > C:/watir_bonus/unitTests/../unittests/frame_test.rb:117:in >`test_show_nested_frames']: ><"there are 2 frames\nframe index: 0 name: nestedFrame\nframe index: 1 >name: nestedFrame2\n"> expected but was ><"there are 2 frames\nframe index: 1 name: nestedFrame\nframe index: 2 >name: nestedFrame2\n">. _____________________ Bret Pettichord www.pettichord.com From paul.rogers at shaw.ca Thu Aug 4 12:41:01 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 04 Aug 2005 10:41:01 -0600 Subject: [Wtr-general] Watir 1.4 is released In-Reply-To: <5.1.0.14.2.20050804112134.0344ba20@127.0.0.1> Message-ID: <001101c59913$4c61e6c0$6400a8c0@NewDell> I didn't even realize there was a test for show_frames :-( -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: 04 August 2005 10:32 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Watir 1.4 is released Thanks for all the reports about unit test failures. The failures in the frames tests listed below are test bugs, and can be ignored. The indexing in show_frames had been incorrect. And the tests for them had the wrong expected results (so they were passing, incorrectly). Paul fixed the show_frames code, but didn't fix the tests, so they started failing (because the corrected output did not match the incorrect expected results). I've just committed corrections to the tests to CVS, and they will be in the next release. The other failures being reported are more confusing. They seem to be intermittent, and if memory serves, we've been seeing them, intermittently, for a while -- or at least some of them. Please continue to report them until we get them sorted out. Bret At 02:07 AM 8/4/2005, Zeljko Filipin wrote: > 4) Failure: >test_button_frames(TC_show_frames) > [C:/watir_bonus/unitTests/../unittests/frame_test.rb:113:in >`capture_and_compare' > C:/watir_bonus/unitTests/../unittests/frame_test.rb:125:in >`test_button_frames']: ><"there are 2 frames\nframe index: 0 name: buttonFrame\nframe index: >1 >name: buttonFrame2\n"> expected but was ><"there are 2 frames\nframe index: 1 name: buttonFrame\nframe index: 2 >name: buttonFrame2\n">. > > 5) Failure: >test_iframes(TC_show_frames) > [C:/watir_bonus/unitTests/../unittests/frame_test.rb:113:in >`capture_and_compare' > C:/watir_bonus/unitTests/../unittests/frame_test.rb:133:in >`test_iframes']: ><"there are 2 frames\nframe index: 0 name: senderFrame\nframe index: >1 >name: receiverFrame\n"> expected but was ><"there are 2 frames\nframe index: 1 name: senderFrame\nframe index: 2 >name: receiverFrame\n">. > > 6) Failure: >test_show_nested_frames(TC_show_frames) > [C:/watir_bonus/unitTests/../unittests/frame_test.rb:113:in >`capture_and_compare' > C:/watir_bonus/unitTests/../unittests/frame_test.rb:117:in >`test_show_nested_frames']: ><"there are 2 frames\nframe index: 0 name: nestedFrame\nframe index: >1 >name: nestedFrame2\n"> expected but was ><"there are 2 frames\nframe index: 1 name: nestedFrame\nframe index: 2 >name: nestedFrame2\n">. _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Ben.Torres at rhi.com Thu Aug 4 12:48:08 2005 From: Ben.Torres at rhi.com (Torres, Ben (HQP)) Date: Thu, 4 Aug 2005 09:48:08 -0700 Subject: [Wtr-general] Security Alert pop up Message-ID: <1641BB0AA7287848817A63C3EE9677D50740CCB2@hqp-ex-mb05.na.msds.rhi.com> is m.join and t.join the code that actually pushes the 'yes' button on the security warning or do i need to call a method to push the button? if m.join and t.join does the actual pushing of the 'yes' button on the security warning, do i put it right after the code that pushes the login button on IE? ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tuyet Cong-Ton-Nu Sent: Tuesday, August 02, 2005 5:42 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Security Alert pop up You need these 2 attached files that will make it work; You need to put both in the C:\ruby\lib\ruby\site_ruby\1.8\watir directory I don't think they are in the 1.3 version (probably in tarball). Also add the code below, it works great for me. require 'watir' include Watir require 'watir/windowhelper' t = Thread.new(){ puts "Started thread for win helper" system('ruby winHelper_security.rb') } ie=IE.new() m = Thread.new(ie) { ie.goto("https://www.mysite.com") } m.join t.join -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050804/51ed4b84/attachment.html From Ben.Torres at rhi.com Thu Aug 4 12:50:46 2005 From: Ben.Torres at rhi.com (Torres, Ben (HQP)) Date: Thu, 4 Aug 2005 09:50:46 -0700 Subject: [Wtr-general] click image problem Message-ID: <1641BB0AA7287848817A63C3EE9677D50740CCB7@hqp-ex-mb05.na.msds.rhi.com> Dev is going to add ids in the next release. In the meantime, I'm gonna have to use index... How do I know which index number goes to which button? There are actually several other buttons on the page ("Add", "Remove", "Cancel", "Continue"...) -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, August 02, 2005 4:18 PM To: wtr-general at rubyforge.org Subject: Re: RE: RE: [Wtr-general] click image problem looks like in this case you will have to use an :index ie.image(:index, 1 ).click # add from LIST1 ie.image(:index, 2 ).click # add from LIST1 :index is ugly, so maybe this is a place where your deelopers can add an id to either the image tag or the link tag, like this: this.document.frmSkills.skillProf,this.document.frmSkills.skillProf, false, masterProfSkillsList);"> ----- Original Message ----- From: "Torres, Ben (HQP)" Date: Tuesday, August 2, 2005 4:56 pm Subject: RE: RE: [Wtr-general] click image problem > Cool, that worked...thanks! > > What if I have two buttons that are the same, but pushing one button > adds from LIST1 and pushing the other button adds from LIST2? > Here is > the source below: > > this.document.frmSkills.skillProf,this.document.frmSkills.skillProf, > false, masterProfSkillsList);"> > src="/registrationbean/jsp/images/LOB/buttons/at-us/en/US/add.gif" > alt="" width="87" height="30" hspace="5" border="0"> > > > this.document.frmSkills.skillSoft,this.document.frmSkills.skillSoft, > false, masterSoftwareSkillsList);"> > src="/registrationbean/jsp/images/LOB/buttons/at-us/en/US/add.gif" > alt="" width="87" height="30" hspace="5" border="0"> > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Tuesday, August 02, 2005 3:12 PM > To: wtr-general at rubyforge.org > Subject: Re: RE: [Wtr-general] click image problem > > I think an input type=image is actually a button. I need to add > examplesof this to the docs, so try: > > ie.button(:src , /save_continue/).click > > I dont have the code here with me right now, so Im guessing a bit... > > ----- Original Message ----- > From: "Torres, Ben (HQP)" > Date: Tuesday, August 2, 2005 4:06 pm > Subject: RE: [Wtr-general] click image problem > > > I tried doing ie.image(:src, /save_continue/).click but got the > > following error: > > > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2162:in `assert_exists': > > Unableto locat > > e object, using src and (?-mix:save_continue) > > (Watir::Exception::UnknownObjectEx > > ception) > > > > Am I missing something? Source from the page under test is below: > > > > > > > > src="/portal/beans/candidateregistrationbean/jsp/images/LOB/buttons/at > > -u > > s/en/US/save_continue.gif" > > width="135" height="30" border="0" > > > > > onclick="document.frmCandidateInterview.Submit.value='Continue';return> monitor();" > > /> > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > > Sent: Wednesday, July 27, 2005 7:44 PM > > To: wtr-general at rubyforge.org > > Subject: RE: [Wtr-general] click image problem > > > > Give this a go: > > > > $ie.image(:src ,/FBK-and/).click > > > > You may have to change the reg-exp if there are other images > with the > > same ( or similar) name > > > > Paul > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [wtr-general-bounces at rubyforge.org] On Behalf Of > > Jan.Montano at thomson.com > > Sent: 27 July 2005 20:19 > > To: wtr-general at rubyforge.org > > Subject: [Wtr-general] click image problem > > > > > > Hi! > > > > I have this problem clicking this image... pls see attached htm > for > > added info. here's the line of the image I want to click... > > > SRC="../../images/RBJ_FBK-and.gif" WIDTH="48" HEIGHT="18" > > border="0"> > > > > I tried > > $ie.link(:url,"javascript:AddText(' AND ')").click > > $ie.button(:url,"javascript:AddText(' AND ')").click > > > > but it says unable to locate object. The only difference with > this > > object is that the link does not appear in the status bar during > > mouseover. Thanks. > > > > <> > > -Jan > > > > _______________________________________________ > > 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 From Ben.Torres at rhi.com Thu Aug 4 12:55:42 2005 From: Ben.Torres at rhi.com (Torres, Ben (HQP)) Date: Thu, 4 Aug 2005 09:55:42 -0700 Subject: [Wtr-general] click image problem Message-ID: <1641BB0AA7287848817A63C3EE9677D50740CCBE@hqp-ex-mb05.na.msds.rhi.com> Nevermind...good ol .flash helped me find it... -----Original Message----- From: Torres, Ben (HQP) Sent: Thursday, August 04, 2005 9:51 AM To: 'wtr-general at rubyforge.org' Subject: RE: RE: RE: [Wtr-general] click image problem Dev is going to add ids in the next release. In the meantime, I'm gonna have to use index... How do I know which index number goes to which button? There are actually several other buttons on the page ("Add", "Remove", "Cancel", "Continue"...) -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, August 02, 2005 4:18 PM To: wtr-general at rubyforge.org Subject: Re: RE: RE: [Wtr-general] click image problem looks like in this case you will have to use an :index ie.image(:index, 1 ).click # add from LIST1 ie.image(:index, 2 ).click # add from LIST1 :index is ugly, so maybe this is a place where your deelopers can add an id to either the image tag or the link tag, like this: this.document.frmSkills.skillProf,this.document.frmSkills.skillProf, false, masterProfSkillsList);"> ----- Original Message ----- From: "Torres, Ben (HQP)" Date: Tuesday, August 2, 2005 4:56 pm Subject: RE: RE: [Wtr-general] click image problem > Cool, that worked...thanks! > > What if I have two buttons that are the same, but pushing one button > adds from LIST1 and pushing the other button adds from LIST2? > Here is > the source below: > > this.document.frmSkills.skillProf,this.document.frmSkills.skillProf, > false, masterProfSkillsList);"> > src="/registrationbean/jsp/images/LOB/buttons/at-us/en/US/add.gif" > alt="" width="87" height="30" hspace="5" border="0"> > > > this.document.frmSkills.skillSoft,this.document.frmSkills.skillSoft, > false, masterSoftwareSkillsList);"> > src="/registrationbean/jsp/images/LOB/buttons/at-us/en/US/add.gif" > alt="" width="87" height="30" hspace="5" border="0"> > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Tuesday, August 02, 2005 3:12 PM > To: wtr-general at rubyforge.org > Subject: Re: RE: [Wtr-general] click image problem > > I think an input type=image is actually a button. I need to add > examplesof this to the docs, so try: > > ie.button(:src , /save_continue/).click > > I dont have the code here with me right now, so Im guessing a bit... > > ----- Original Message ----- > From: "Torres, Ben (HQP)" > Date: Tuesday, August 2, 2005 4:06 pm > Subject: RE: [Wtr-general] click image problem > > > I tried doing ie.image(:src, /save_continue/).click but got the > > following error: > > > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2162:in `assert_exists': > > Unableto locat > > e object, using src and (?-mix:save_continue) > > (Watir::Exception::UnknownObjectEx > > ception) > > > > Am I missing something? Source from the page under test is below: > > > > > > > > src="/portal/beans/candidateregistrationbean/jsp/images/LOB/buttons/at > > -u > > s/en/US/save_continue.gif" > > width="135" height="30" border="0" > > > > > onclick="document.frmCandidateInterview.Submit.value='Continue';return> monitor();" > > /> > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > > Sent: Wednesday, July 27, 2005 7:44 PM > > To: wtr-general at rubyforge.org > > Subject: RE: [Wtr-general] click image problem > > > > Give this a go: > > > > $ie.image(:src ,/FBK-and/).click > > > > You may have to change the reg-exp if there are other images > with the > > same ( or similar) name > > > > Paul > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [wtr-general-bounces at rubyforge.org] On Behalf Of > > Jan.Montano at thomson.com > > Sent: 27 July 2005 20:19 > > To: wtr-general at rubyforge.org > > Subject: [Wtr-general] click image problem > > > > > > Hi! > > > > I have this problem clicking this image... pls see attached htm > for > > added info. here's the line of the image I want to click... > > > SRC="../../images/RBJ_FBK-and.gif" WIDTH="48" HEIGHT="18" > > border="0"> > > > > I tried > > $ie.link(:url,"javascript:AddText(' AND ')").click > > $ie.button(:url,"javascript:AddText(' AND ')").click > > > > but it says unable to locate object. The only difference with > this > > object is that the link does not appear in the status bar during > > mouseover. Thanks. > > > > <> > > -Jan > > > > _______________________________________________ > > 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 From warren at meyer-pollans.net Thu Aug 4 13:38:43 2005 From: warren at meyer-pollans.net (Warren Pollans) Date: Thu, 4 Aug 2005 13:38:43 -0400 Subject: [Wtr-general] example/concurrent_search error Message-ID: <20050804133843.4fd6ee60@localhost.localdomain> Hello, Sorry, if this is obvious - I'm new to ruby, watir, and windows - I'm coming from perl on unix. What have I missed here? I ran the example concurrent_search test and got the following: C:\watir_bonus\examples>ruby concurrent_search.rb c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1939:in `assert_exists': Unable to locate object, using name and q (Watir::Exception::UnknownObjectException) from concurrent_search.rb:18:in `join' from concurrent_search.rb:18 from concurrent_search.rb:18:in `each' from concurrent_search.rb:18 C:\watir_bonus\examples>more concurrent_search.rb # demonstrate ability to run multiple tests concurrently require 'thread' require 'watir' def test_google ie = Watir::IE.start('http://www.google.com') ie.text_field(:name, "q").set("pickaxe") ie.button(:value, "Google Search").click ie.close end # run the same test three times concurrently in separate browsers threads = [] 3.times do threads << Thread.new {test_google} end threads.each {|x| x.join} From paul.rogers at shaw.ca Thu Aug 4 13:59:08 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 04 Aug 2005 11:59:08 -0600 Subject: [Wtr-general] RE: Cannot Identify "Cancel" In-Reply-To: Message-ID: <001a01c5991e$36762c30$6400a8c0@NewDell> Hmm. I don't know why that wouldn't work. Could you try using ie.reset(:name , 'reset').flash Or maybe install the 1.4 release and just use ie.button(:name , 'reset').flash -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Fred Sent: 04 August 2005 02:04 To: wtr-general at rubyforge.org Subject: [Wtr-general] RE: Cannot Identify "Cancel" Hi Paul, thanks for the response. I have tried as recommended and it prompts, reset name=reset id= value=Cancel alt= src= irb(main):012:0> ie.reset(:value , 'Cancel').flash Watir::Exception::UnknownObjectException: Unable to locate object, using value and Cancel from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1979:in `object_exist_check' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2106:in `flash' from (irb):12 from ?:0 Regards, Fred ------------------------------------------------------------ Date: Wed, 03 Aug 2005 21:12:01 -0600 From: Paul Rogers Subject: RE: [Wtr-general] Cannot Identify "Cancel" To: wtr-general at rubyforge.org Message-ID: <005701c598a2$487bbd40$6400a8c0 at NewDell> Content-Type: text/plain; charset=US-ASCII This is a reset button. In the current release you need to do Ie.reset(:value , 'Cancel').flash In the next release, the code you are using will work as we have combined reset objects in with button Paul Send instant messages to your online friends http://asia.messenger.yahoo.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Thu Aug 4 13:57:23 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 04 Aug 2005 11:57:23 -0600 Subject: [Wtr-general] Checkboxes with Similar Names In-Reply-To: <5.1.0.14.2.20050803224922.0326c8a8@127.0.0.1> Message-ID: <001901c5991d$f74f0720$6400a8c0@NewDell> Yep, that does work in most situations ( the 35 being the value for the checkbox) However in this situation Fred said that the values are generated dynamically, so I assumed they may not be the same between page loads. We've discussed before how the 35 appears meaningless, and the more I see it I thing I would prefer the syntax that has been proposed: ie.check_box(:name, 'foo', :value 35) note I didn't put a comma or anything in between value and 35, as Im not sure what would be best ie.check_box(:name, 'foo', :value , 35) or ie.check_box(:name, 'foo', :value => 35) Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: 03 August 2005 21:50 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Checkboxes with Similar Names Paul, Haven't you recommended ie.checkbox(:name, 'similarname', 35).flash for this before? Bret At 10:13 PM 8/3/2005, Paul Rogers wrote: >You can use :beforeText although Bret has said today this seems to be >unreliable, so it may not work. > >Ie.checkbox(:beforeText, 'Name 1').flash > >Paul > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Fred >Sent: 03 August 2005 19:51 >To: wtr-general at rubyforge.org >Subject: [Wtr-general] Checkboxes with Similar Names > > >Hi, >I got a series of the "similarname" checkboxes with values that >generate dynamically. Is there a way to capture such textbox based on >the "Name 1", "Name 2", etc...

> name="similarname" value="35"> >Name 1 >

>

> name="similarname" value="40"> >Name 2 >

> >Regards, >Fred > >Send instant messages to your online friends >http://asia.messenger.yahoo.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 _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Thu Aug 4 14:03:00 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 04 Aug 2005 12:03:00 -0600 Subject: [Wtr-general] example/concurrent_search error In-Reply-To: <20050804133843.4fd6ee60@localhost.localdomain> Message-ID: <001b01c5991e$c07726f0$6400a8c0@NewDell> Well, it works for me ;-) The error is that watir couldn't find the text field where you enter the search term. I live in canada, and I always get redirected to google.ca, so maybe something similar is happening for you and the search box has a different name... Other than that I cant really help... -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Warren Pollans Sent: 04 August 2005 11:39 To: wtr-general at rubyforge.org Subject: [Wtr-general] example/concurrent_search error Hello, Sorry, if this is obvious - I'm new to ruby, watir, and windows - I'm coming from perl on unix. What have I missed here? I ran the example concurrent_search test and got the following: C:\watir_bonus\examples>ruby concurrent_search.rb c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1939:in `assert_exists': Unable to locate object, using name and q (Watir::Exception::UnknownObjectException) from concurrent_search.rb:18:in `join' from concurrent_search.rb:18 from concurrent_search.rb:18:in `each' from concurrent_search.rb:18 C:\watir_bonus\examples>more concurrent_search.rb # demonstrate ability to run multiple tests concurrently require 'thread' require 'watir' def test_google ie = Watir::IE.start('http://www.google.com') ie.text_field(:name, "q").set("pickaxe") ie.button(:value, "Google Search").click ie.close end # run the same test three times concurrently in separate browsers threads = [] 3.times do threads << Thread.new {test_google} end threads.each {|x| x.join} _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From warren at meyer-pollans.net Thu Aug 4 14:35:36 2005 From: warren at meyer-pollans.net (Warren Pollans) Date: Thu, 4 Aug 2005 14:35:36 -0400 Subject: [Wtr-general] example/concurrent_search error In-Reply-To: <001b01c5991e$c07726f0$6400a8c0@NewDell> References: <20050804133843.4fd6ee60@localhost.localdomain> <001b01c5991e$c07726f0$6400a8c0@NewDell> Message-ID: <20050804143536.4e7ae902@localhost.localdomain> Hmmm, I get the error if there's no browser window open at the start. If a browser window is already open, it runs without error. Is this the expected behavior? On Thu, 04 Aug 2005 12:03:00 -0600 Paul Rogers wrote: > Well, it works for me ;-) > > The error is that watir couldn't find the text field where you enter > the search term. > I live in canada, and I always get redirected to google.ca, so maybe > something similar is happening for you and the search box has a > different name... > Other than that I cant really help... > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Warren Pollans > Sent: 04 August 2005 11:39 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] example/concurrent_search error > > > Hello, > > Sorry, if this is obvious - I'm new to ruby, watir, and windows - I'm > coming from perl on unix. > > What have I missed here? I ran the example concurrent_search test and > got the following: > > > C:\watir_bonus\examples>ruby concurrent_search.rb > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1939:in `assert_exists': > Unable to locate object, using name and q > (Watir::Exception::UnknownObjectException) from > concurrent_search.rb:18:in `join' from concurrent_search.rb:18 > from concurrent_search.rb:18:in `each' > from concurrent_search.rb:18 > > > C:\watir_bonus\examples>more concurrent_search.rb > # demonstrate ability to run multiple tests concurrently > > require 'thread' > require 'watir' > > def test_google > ie = Watir::IE.start('http://www.google.com') > ie.text_field(:name, "q").set("pickaxe") > ie.button(:value, "Google Search").click > ie.close > end > > # run the same test three times concurrently in separate browsers > threads = [] 3.times do > threads << Thread.new {test_google} > end > threads.each {|x| x.join} > _______________________________________________ > 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 paul.rogers at shaw.ca Thu Aug 4 14:40:26 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 04 Aug 2005 12:40:26 -0600 Subject: [Wtr-general] example/concurrent_search error In-Reply-To: <20050804143536.4e7ae902@localhost.localdomain> Message-ID: <003201c59923$fb286200$6400a8c0@NewDell> No, it should create the browser for you. What win/ruby versions? Does the regular googleSearch.rb work? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Warren Pollans Sent: 04 August 2005 12:36 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] example/concurrent_search error Hmmm, I get the error if there's no browser window open at the start. If a browser window is already open, it runs without error. Is this the expected behavior? On Thu, 04 Aug 2005 12:03:00 -0600 Paul Rogers wrote: > Well, it works for me ;-) > > The error is that watir couldn't find the text field where you enter > the search term. I live in canada, and I always get redirected to > google.ca, so maybe something similar is happening for you and the > search box has a different name... > Other than that I cant really help... > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Warren Pollans > Sent: 04 August 2005 11:39 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] example/concurrent_search error > > > Hello, > > Sorry, if this is obvious - I'm new to ruby, watir, and windows - I'm > coming from perl on unix. > > What have I missed here? I ran the example concurrent_search test and > got the following: > > > C:\watir_bonus\examples>ruby concurrent_search.rb > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1939:in `assert_exists': > Unable to locate object, using name and q > (Watir::Exception::UnknownObjectException) from > concurrent_search.rb:18:in `join' from concurrent_search.rb:18 > from concurrent_search.rb:18:in `each' > from concurrent_search.rb:18 > > > C:\watir_bonus\examples>more concurrent_search.rb > # demonstrate ability to run multiple tests concurrently > > require 'thread' > require 'watir' > > def test_google > ie = Watir::IE.start('http://www.google.com') > ie.text_field(:name, "q").set("pickaxe") > ie.button(:value, "Google Search").click > ie.close > end > > # run the same test three times concurrently in separate browsers > threads = [] 3.times do > threads << Thread.new {test_google} > end > threads.each {|x| x.join} > _______________________________________________ > 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 Ben.Torres at rhi.com Thu Aug 4 14:40:19 2005 From: Ben.Torres at rhi.com (Torres, Ben (HQP)) Date: Thu, 4 Aug 2005 11:40:19 -0700 Subject: [Wtr-general] Not waiting for browser to be ready Message-ID: <1641BB0AA7287848817A63C3EE9677D50740CD4D@hqp-ex-mb05.na.msds.rhi.com> Is there a way to override the built-in wait() after I click on a button from the browser? I tried putting ie.wait(2) after click but it didn't work. From warren at meyer-pollans.net Thu Aug 4 14:42:01 2005 From: warren at meyer-pollans.net (Warren Pollans) Date: Thu, 4 Aug 2005 14:42:01 -0400 Subject: [Wtr-general] example/concurrent_search error In-Reply-To: <20050804143536.4e7ae902@localhost.localdomain> References: <20050804133843.4fd6ee60@localhost.localdomain> <001b01c5991e$c07726f0$6400a8c0@NewDell> <20050804143536.4e7ae902@localhost.localdomain> Message-ID: <20050804144201.32581116@localhost.localdomain> OK, I was wrong, the behavior is intermittent. Sometimes it works and sometimes it doesn't :-( Any suggestions about how to track this down? On Thu, 4 Aug 2005 14:35:36 -0400 Warren Pollans wrote: > Hmmm, I get the error if there's no browser window open at the start. > If a browser window is already open, it runs without error. Is this > the expected behavior? > > > > On Thu, 04 Aug 2005 12:03:00 -0600 > Paul Rogers wrote: > > > Well, it works for me ;-) > > > > The error is that watir couldn't find the text field where you enter > > the search term. > > I live in canada, and I always get redirected to google.ca, so maybe > > something similar is happening for you and the search box has a > > different name... > > Other than that I cant really help... > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Warren > > Pollans Sent: 04 August 2005 11:39 > > To: wtr-general at rubyforge.org > > Subject: [Wtr-general] example/concurrent_search error > > > > > > Hello, > > > > Sorry, if this is obvious - I'm new to ruby, watir, and windows - > > I'm coming from perl on unix. > > > > What have I missed here? I ran the example concurrent_search test > > and got the following: > > > > > > C:\watir_bonus\examples>ruby concurrent_search.rb > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1939:in `assert_exists': > > Unable to locate object, using name and q > > (Watir::Exception::UnknownObjectException) from > > concurrent_search.rb:18:in `join' from concurrent_search.rb:18 > > from concurrent_search.rb:18:in `each' > > from concurrent_search.rb:18 > > > > > > C:\watir_bonus\examples>more concurrent_search.rb > > # demonstrate ability to run multiple tests concurrently > > > > require 'thread' > > require 'watir' > > > > def test_google > > ie = Watir::IE.start('http://www.google.com') > > ie.text_field(:name, "q").set("pickaxe") > > ie.button(:value, "Google Search").click > > ie.close > > end > > > > # run the same test three times concurrently in separate browsers > > threads = [] 3.times do > > threads << Thread.new {test_google} > > end > > threads.each {|x| x.join} > > _______________________________________________ > > 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 bret at pettichord.com Thu Aug 4 16:23:31 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 04 Aug 2005 15:23:31 -0500 Subject: [Wtr-general] Checkboxes with Similar Names In-Reply-To: <001901c5991d$f74f0720$6400a8c0@NewDell> References: <5.1.0.14.2.20050803224922.0326c8a8@127.0.0.1> Message-ID: <5.1.0.14.2.20050804151909.03460788@127.0.0.1> At 12:57 PM 8/4/2005, Paul Rogers wrote: > note I didn't put a comma or anything in between value and 35, as Im >not sure what would be best > ie.check_box(:name, 'foo', :value , 35) > or > ie.check_box(:name, 'foo', :value => 35) i would say it should either be ie.check_box(:name, 'foo', :value, 35) or ie.check_box({:name => 'foo', :value => 35}) (and either way, i'd make it work for all attributes and elements, not just check boxes.) Comments? I actually lean for the latter: it's a hash, which is a convenient data structure. It may be new to the typical Watir user, but there is a lot of Ruby support for it, and experienced Watir users should know about it anyway -- there are lots of places where it can be useful for testing. (Segue to Testimonial from McMahon...) _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Aug 4 16:24:57 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 04 Aug 2005 15:24:57 -0500 Subject: [Wtr-general] Not waiting for browser to be ready In-Reply-To: <1641BB0AA7287848817A63C3EE9677D50740CD4D@hqp-ex-mb05.na.ms ds.rhi.com> Message-ID: <5.1.0.14.2.20050804152435.03470b00@127.0.0.1> At 01:40 PM 8/4/2005, Torres, Ben (HQP) wrote: >Is there a way to override the built-in wait() after I click on a button >from the browser? I tried putting ie.wait(2) after click but it didn't >work. ie.button().getOLEObject.click _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Aug 4 18:08:36 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 04 Aug 2005 17:08:36 -0500 Subject: [Wtr-general] example/concurrent_search error In-Reply-To: <20050804144201.32581116@localhost.localdomain> References: <20050804143536.4e7ae902@localhost.localdomain> <20050804133843.4fd6ee60@localhost.localdomain> <001b01c5991e$c07726f0$6400a8c0@NewDell> <20050804143536.4e7ae902@localhost.localdomain> Message-ID: <5.1.0.14.2.20050804170618.0348af88@127.0.0.1> My guess is that this is a timing issue of some sort and ultimately a bug (race condition) in watir. One thing you can do is put small sleep statements in there. For example put a "sleep 0.1" right before the failing line and then see if you can reproduce the problem. If not, that proves it is a race condition. (We still would need to figure out exactly where the problem is, however.) Bret At 01:42 PM 8/4/2005, Warren Pollans wrote: >OK, I was wrong, the behavior is intermittent. Sometimes it works and >sometimes it doesn't :-( Any suggestions about how to track this down? > >On Thu, 4 Aug 2005 14:35:36 -0400 >Warren Pollans wrote: > > > Hmmm, I get the error if there's no browser window open at the start. > > If a browser window is already open, it runs without error. Is this > > the expected behavior? > > > > > > > > On Thu, 04 Aug 2005 12:03:00 -0600 > > Paul Rogers wrote: > > > > > Well, it works for me ;-) > > > > > > The error is that watir couldn't find the text field where you enter > > > the search term. > > > I live in canada, and I always get redirected to google.ca, so maybe > > > something similar is happening for you and the search box has a > > > different name... > > > Other than that I cant really help... > > > > > > -----Original Message----- > > > From: wtr-general-bounces at rubyforge.org > > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Warren > > > Pollans Sent: 04 August 2005 11:39 > > > To: wtr-general at rubyforge.org > > > Subject: [Wtr-general] example/concurrent_search error > > > > > > > > > Hello, > > > > > > Sorry, if this is obvious - I'm new to ruby, watir, and windows - > > > I'm coming from perl on unix. > > > > > > What have I missed here? I ran the example concurrent_search test > > > and got the following: > > > > > > > > > C:\watir_bonus\examples>ruby concurrent_search.rb > > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1939:in `assert_exists': > > > Unable to locate object, using name and q > > > (Watir::Exception::UnknownObjectException) from > > > concurrent_search.rb:18:in `join' from concurrent_search.rb:18 > > > from concurrent_search.rb:18:in `each' > > > from concurrent_search.rb:18 > > > > > > > > > C:\watir_bonus\examples>more concurrent_search.rb > > > # demonstrate ability to run multiple tests concurrently > > > > > > require 'thread' > > > require 'watir' > > > > > > def test_google > > > ie = Watir::IE.start('http://www.google.com') > > > ie.text_field(:name, "q").set("pickaxe") > > > ie.button(:value, "Google Search").click > > > ie.close > > > end > > > > > > # run the same test three times concurrently in separate browsers > > > threads = [] 3.times do > > > threads << Thread.new {test_google} > > > end > > > threads.each {|x| x.join} > > > _______________________________________________ > > > 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 _____________________ Bret Pettichord www.pettichord.com From fredckp at yahoo.com.sg Thu Aug 4 21:52:26 2005 From: fredckp at yahoo.com.sg (Fred) Date: Fri, 5 Aug 2005 09:52:26 +0800 Subject: [Wtr-general] Checkboxes with Similar Names In-Reply-To: <001901c5991d$f74f0720$6400a8c0@NewDell> Message-ID: Yep, in my situation, the checkbox are dynamically generated and re-indexed, so I need a unique identifier so as the to have repeatable case. Regards, Fred -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Paul Rogers Sent: Friday, August 05, 2005 1:57 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Checkboxes with Similar Names Yep, that does work in most situations ( the 35 being the value for the checkbox) However in this situation Fred said that the values are generated dynamically, so I assumed they may not be the same between page loads. We've discussed before how the 35 appears meaningless, and the more I see it I thing I would prefer the syntax that has been proposed: ie.check_box(:name, 'foo', :value 35) note I didn't put a comma or anything in between value and 35, as Im not sure what would be best ie.check_box(:name, 'foo', :value , 35) or ie.check_box(:name, 'foo', :value => 35) Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: 03 August 2005 21:50 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Checkboxes with Similar Names Paul, Haven't you recommended ie.checkbox(:name, 'similarname', 35).flash for this before? Bret At 10:13 PM 8/3/2005, Paul Rogers wrote: >You can use :beforeText although Bret has said today this seems to be >unreliable, so it may not work. > >Ie.checkbox(:beforeText, 'Name 1').flash > >Paul > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Fred >Sent: 03 August 2005 19:51 >To: wtr-general at rubyforge.org >Subject: [Wtr-general] Checkboxes with Similar Names > > >Hi, >I got a series of the "similarname" checkboxes with values that >generate dynamically. Is there a way to capture such textbox based on >the "Name 1", "Name 2", etc...

> name="similarname" value="35"> >Name 1 >

>

> name="similarname" value="40"> >Name 2 >

> >Regards, >Fred > >Send instant messages to your online friends >http://asia.messenger.yahoo.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 _____________________ Bret Pettichord www.pettichord.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 Send instant messages to your online friends http://asia.messenger.yahoo.com From fredckp at yahoo.com.sg Thu Aug 4 23:31:09 2005 From: fredckp at yahoo.com.sg (Fred) Date: Fri, 5 Aug 2005 11:31:09 +0800 Subject: [Wtr-general] RE: Cannot Identify "Cancel" In-Reply-To: <001a01c5991e$36762c30$6400a8c0@NewDell> Message-ID: Hi Paul, thanks, 1.4 addressed the issue. Regards, Fred -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Paul Rogers Sent: Friday, August 05, 2005 1:59 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] RE: Cannot Identify "Cancel" Hmm. I don't know why that wouldn't work. Could you try using ie.reset(:name , 'reset').flash Or maybe install the 1.4 release and just use ie.button(:name , 'reset').flash -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Fred Sent: 04 August 2005 02:04 To: wtr-general at rubyforge.org Subject: [Wtr-general] RE: Cannot Identify "Cancel" Hi Paul, thanks for the response. I have tried as recommended and it prompts, reset name=reset id= value=Cancel alt= src= irb(main):012:0> ie.reset(:value , 'Cancel').flash Watir::Exception::UnknownObjectException: Unable to locate object, using value and Cancel from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1979:in `object_exist_check' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2106:in `flash' from (irb):12 from ?:0 Regards, Fred ------------------------------------------------------------ Date: Wed, 03 Aug 2005 21:12:01 -0600 From: Paul Rogers Subject: RE: [Wtr-general] Cannot Identify "Cancel" To: wtr-general at rubyforge.org Message-ID: <005701c598a2$487bbd40$6400a8c0 at NewDell> Content-Type: text/plain; charset=US-ASCII This is a reset button. In the current release you need to do Ie.reset(:value , 'Cancel').flash In the next release, the code you are using will work as we have combined reset objects in with button Paul Send instant messages to your online friends http://asia.messenger.yahoo.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 Send instant messages to your online friends http://asia.messenger.yahoo.com From thomas.ohrbom at extend.no Fri Aug 5 04:10:53 2005 From: thomas.ohrbom at extend.no (=?ISO-8859-1?Q?Thomas_=D8hrbom?=) Date: Fri, 05 Aug 2005 10:10:53 +0200 Subject: [Wtr-general] Anyone using Watir with javascript HTML-editor (textarea)? Message-ID: <42F31F0D.6000509@extend.no> Hi, I'm new to Watir and Ruby, but from what I can see so far we could really benefit greatly from using Watir to automate testing of our web-based products. 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 QA Manager, extend as thomas.ohrbom at extend.no | http://www.extend.no/ From fredckp at yahoo.com.sg Fri Aug 5 05:41:19 2005 From: fredckp at yahoo.com.sg (Fred) Date: Fri, 5 Aug 2005 17:41:19 +0800 Subject: [Wtr-general] Accessing Pop up Dialog Controls Message-ID: Hi, I was following this thread to click on a JavaScript invoked Confirmation Dialog. JavaScript on Page, looks something like this. **************************************************************************** ************************************ **************************************************************************** ************************************ I have got a point where the Confirmation dialog was prompted, but no clicking action was performed. startClicker("OK") ie.button(:value,"buttonconfirmdelete").click I understand that 1.4 has this 'watir/WindowHelper', how does it applies in this case. Thanks. Regards, Fred ============================================================================ ============ When you say 'Popup Window' do you mean: 1) a JavaScript Alert, Confirm, or Prompt? Or 2) do you mean another browser window that has form information which gets posted back to the parent that has the 'Add" button on it? The following have worked for me in both situations. If it is #1 then this works for the JavaScript type popup: #define the popup method first (this is right out of unittests\popups_test.rb) 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 #then call it just before your button click startClicker("OK" , 3) $ie.button("Submit").click If it is #2 then this works for the browser window 'Popup' #parent window clicks the button $ie.button( "Add Causal Codes" ).click sleep 3 #child form window pops up and get posted pack to the parent cw = IE.attach( :title, /PER Causal Code Management/i ) #this could also be a URL cw.selectBox( :index, 1).select(/A1/ ) cw.selectBox( :index, 3).select(/B1/ ) cw.selectBox( :index, 11).select(/C01/ ) cw.button( "Add Causal Codes" ).click cw.button( "Close Window" ).click Hope this helps. --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Ramya Ramalinga, Moorthy (IE10) Sent: Monday, April 25, 2005 10:15 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Accessing Pop up Dialog Controls Hi All, I would like to know how to access the standard controls available in the Popup Window. I tried to get the Handle of the Popup window & tried accessing the controls(Eg:ComboBox) using Winclicker Class , but I am getting the error message as " undefined method `getWindowTitle' for WinClicker:Class (NoMethodError) " . $ie = Watir::IE.start('...') #On Click of this Add button, new popup window is opened $ie.button(:caption, "Add").click #Getting the Handle of the newly opened Popup window hTheActiveWindow = Win32API.new("user32", "GetActiveWindow", [], 'I') #Getting the Title of the Popup window wincaption=WinClicker.getWindowTitle(hTheActiveWindow) #Now using this Popup window handle, I can get all the child handles & then call setComboBoxText(hwnd , settext) Can anyone help me in this regard. Thanks for any of your suggesstions Regards, Ramya Send instant messages to your online friends http://asia.messenger.yahoo.com From Neumann at encoway.de Fri Aug 5 06:29:51 2005 From: Neumann at encoway.de (Neumann, Carsten - ENCOWAY) Date: Fri, 5 Aug 2005 12:29:51 +0200 Subject: [Wtr-general] open IE in the foreground Message-ID: <0E46E3619326224CB40CC30C2E36364E20BFF9@zde008.lenze.com> My Watir always opens the IE in the background, can I make him open the IE in front of all windows? Mit freundlichen Gr??en, Carsten Neumann Auszubildender encoway GmbH Universit?tsallee 21 - 23 D-28359 Bremen T +49 (0) 421 24677-0 F +49 (0) 421 24677-10 www.encoway.de neumann at encoway.de -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050805/0be74620/attachment.html From warren at meyer-pollans.net Fri Aug 5 10:25:08 2005 From: warren at meyer-pollans.net (Warren Pollans) Date: Fri, 5 Aug 2005 10:25:08 -0400 Subject: [Wtr-general] example/concurrent_search error In-Reply-To: <5.1.0.14.2.20050804170618.0348af88@127.0.0.1> References: <20050804143536.4e7ae902@localhost.localdomain> <20050804133843.4fd6ee60@localhost.localdomain> <001b01c5991e$c07726f0$6400a8c0@NewDell> <20050804143536.4e7ae902@localhost.localdomain> <5.1.0.14.2.20050804170618.0348af88@127.0.0.1> Message-ID: <20050805102508.7b0f1bb0@localhost.localdomain> I put the script in a loop to run 20 times - typically, there'll be 2 errors out of twenty. Could someone else try this: for %i in (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20) do ruby concurrent_search.rb I put in a "sleep 1" between the ie.start and the ie.test_field and still got failures. A few other things that didn't work (I'm just fishing): - putting ie.wait after the the ie.start - replace ie.start with ie = IE.new; ie.goto Changing the number of threads to 1 did work -->> no errors Changing the number of threads to 2 did NOT work I'm using the current stable version of ruby (1.8.2-14, I believe) and the watir 1.4. I'm running win2k (service pack 4) on an old 730 MHz Gateway with 256 Mb memory On Thu, 04 Aug 2005 17:08:36 -0500 Bret Pettichord wrote: > My guess is that this is a timing issue of some sort and ultimately a > bug (race condition) in watir. > > One thing you can do is put small sleep statements in there. > > For example put a "sleep 0.1" right before the failing line and then > see if you can reproduce the problem. If not, that proves it is a > race condition. (We still would need to figure out exactly where the > problem is, however.) > > Bret > > At 01:42 PM 8/4/2005, Warren Pollans wrote: > >OK, I was wrong, the behavior is intermittent. Sometimes it works and > >sometimes it doesn't :-( Any suggestions about how to track this > >down? > > > >On Thu, 4 Aug 2005 14:35:36 -0400 > >Warren Pollans wrote: > > > > > Hmmm, I get the error if there's no browser window open at the > > > start. If a browser window is already open, it runs without > > > error. Is this the expected behavior? > > > > > > > > > > > > On Thu, 04 Aug 2005 12:03:00 -0600 > > > Paul Rogers wrote: > > > > > > > Well, it works for me ;-) > > > > > > > > The error is that watir couldn't find the text field where you > > > > enter the search term. > > > > I live in canada, and I always get redirected to google.ca, so > > > > maybe something similar is happening for you and the search box > > > > has a different name... > > > > Other than that I cant really help... > > > > > > > > -----Original Message----- > > > > From: wtr-general-bounces at rubyforge.org > > > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Warren > > > > Pollans Sent: 04 August 2005 11:39 > > > > To: wtr-general at rubyforge.org > > > > Subject: [Wtr-general] example/concurrent_search error > > > > > > > > > > > > Hello, > > > > > > > > Sorry, if this is obvious - I'm new to ruby, watir, and windows > > > > - I'm coming from perl on unix. > > > > > > > > What have I missed here? I ran the example concurrent_search > > > > test and got the following: > > > > > > > > > > > > C:\watir_bonus\examples>ruby concurrent_search.rb > > > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1939:in `assert_exists': > > > > Unable to locate object, using name and q > > > > (Watir::Exception::UnknownObjectException) from > > > > concurrent_search.rb:18:in `join' from concurrent_search.rb:18 > > > > from concurrent_search.rb:18:in `each' > > > > from concurrent_search.rb:18 > > > > > > > > > > > > C:\watir_bonus\examples>more concurrent_search.rb > > > > # demonstrate ability to run multiple tests concurrently > > > > > > > > require 'thread' > > > > require 'watir' > > > > > > > > def test_google > > > > ie = Watir::IE.start('http://www.google.com') > > > > ie.text_field(:name, "q").set("pickaxe") > > > > ie.button(:value, "Google Search").click > > > > ie.close > > > > end > > > > > > > > # run the same test three times concurrently in separate > > > > browsers threads = [] 3.times do > > > > threads << Thread.new {test_google} > > > > end > > > > threads.each {|x| x.join} > > > > _______________________________________________ > > > > 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 > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Fri Aug 5 11:40:20 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 05 Aug 2005 10:40:20 -0500 Subject: [Wtr-general] example/concurrent_search error In-Reply-To: <20050805102508.7b0f1bb0@localhost.localdomain> References: <5.1.0.14.2.20050804170618.0348af88@127.0.0.1> <20050804143536.4e7ae902@localhost.localdomain> <20050804133843.4fd6ee60@localhost.localdomain> <001b01c5991e$c07726f0$6400a8c0@NewDell> <20050804143536.4e7ae902@localhost.localdomain> <5.1.0.14.2.20050804170618.0348af88@127.0.0.1> Message-ID: <5.1.0.14.2.20050805102335.03428dc0@127.0.0.1> I have now been able to reproduce this problem. When it occurs, there is blank IE window. It saws 'http://www.google.com/' in the address bar, but the page is blank, and it is not loading. A refresh corrects the problem. This is different from what i thought might be happening (adding waits and sleeps won't correct this). I'm guessing that this is a multithreading bug in IE itself, that shows up more often on machines with limited resources (like yours). I don't really see a way to change Watir itself to avoid this problem. To some degree it doesn't look like an automation bug. In other words -- if you manually ran several browsers this fast, i suspect you'd see the same problem. I could advise you how to workaround the problem in specific cases. In this situation ie.text == '', so you add a check to detect this situation and retry in your script (or trap the error and ignore it). Bret At 09:25 AM 8/5/2005, Warren Pollans wrote: >I put the script in a loop to run 20 times - typically, there'll be 2 >errors out of twenty. Could someone else try this: > >for %i in (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20) do ruby >concurrent_search.rb > >I put in a "sleep 1" between the ie.start and the ie.test_field and >still got failures. > >A few other things that didn't work (I'm just fishing): >- putting ie.wait after the the ie.start >- replace ie.start with ie = IE.new; ie.goto > >Changing the number of threads to 1 did work -->> no errors >Changing the number of threads to 2 did NOT work > >I'm using the current stable version of ruby (1.8.2-14, I believe) and >the watir 1.4. I'm running win2k (service pack 4) on an old 730 >MHz Gateway with 256 Mb memory > > >On Thu, 04 Aug 2005 17:08:36 -0500 >Bret Pettichord wrote: > > > My guess is that this is a timing issue of some sort and ultimately a > > bug (race condition) in watir. > > > > One thing you can do is put small sleep statements in there. > > > > For example put a "sleep 0.1" right before the failing line and then > > see if you can reproduce the problem. If not, that proves it is a > > race condition. (We still would need to figure out exactly where the > > problem is, however.) > > > > Bret > > > > At 01:42 PM 8/4/2005, Warren Pollans wrote: > > >OK, I was wrong, the behavior is intermittent. Sometimes it works and > > >sometimes it doesn't :-( Any suggestions about how to track this > > >down? > > > > > >On Thu, 4 Aug 2005 14:35:36 -0400 > > >Warren Pollans wrote: > > > > > > > Hmmm, I get the error if there's no browser window open at the > > > > start. If a browser window is already open, it runs without > > > > error. Is this the expected behavior? > > > > > > > > > > > > > > > > On Thu, 04 Aug 2005 12:03:00 -0600 > > > > Paul Rogers wrote: > > > > > > > > > Well, it works for me ;-) > > > > > > > > > > The error is that watir couldn't find the text field where you > > > > > enter the search term. > > > > > I live in canada, and I always get redirected to google.ca, so > > > > > maybe something similar is happening for you and the search box > > > > > has a different name... > > > > > Other than that I cant really help... > > > > > > > > > > -----Original Message----- > > > > > From: wtr-general-bounces at rubyforge.org > > > > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Warren > > > > > Pollans Sent: 04 August 2005 11:39 > > > > > To: wtr-general at rubyforge.org > > > > > Subject: [Wtr-general] example/concurrent_search error > > > > > > > > > > > > > > > Hello, > > > > > > > > > > Sorry, if this is obvious - I'm new to ruby, watir, and windows > > > > > - I'm coming from perl on unix. > > > > > > > > > > What have I missed here? I ran the example concurrent_search > > > > > test and got the following: > > > > > > > > > > > > > > > C:\watir_bonus\examples>ruby concurrent_search.rb > > > > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1939:in `assert_exists': > > > > > Unable to locate object, using name and q > > > > > (Watir::Exception::UnknownObjectException) from > > > > > concurrent_search.rb:18:in `join' from concurrent_search.rb:18 > > > > > from concurrent_search.rb:18:in `each' > > > > > from concurrent_search.rb:18 > > > > > > > > > > > > > > > C:\watir_bonus\examples>more concurrent_search.rb > > > > > # demonstrate ability to run multiple tests concurrently > > > > > > > > > > require 'thread' > > > > > require 'watir' > > > > > > > > > > def test_google > > > > > ie = Watir::IE.start('http://www.google.com') > > > > > ie.text_field(:name, "q").set("pickaxe") > > > > > ie.button(:value, "Google Search").click > > > > > ie.close > > > > > end > > > > > > > > > > # run the same test three times concurrently in separate > > > > > browsers threads = [] 3.times do > > > > > threads << Thread.new {test_google} > > > > > end > > > > > threads.each {|x| x.join} > > > > > _______________________________________________ > > > > > 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 > > > > _____________________ > > Bret Pettichord > > www.pettichord.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 _____________________ Bret Pettichord www.pettichord.com From warren at meyer-pollans.net Fri Aug 5 12:22:26 2005 From: warren at meyer-pollans.net (Warren Pollans) Date: Fri, 5 Aug 2005 12:22:26 -0400 Subject: [Wtr-general] example/concurrent_search error In-Reply-To: <5.1.0.14.2.20050805102335.03428dc0@127.0.0.1> References: <5.1.0.14.2.20050804170618.0348af88@127.0.0.1> <20050804143536.4e7ae902@localhost.localdomain> <20050804133843.4fd6ee60@localhost.localdomain> <001b01c5991e$c07726f0$6400a8c0@NewDell> <20050804143536.4e7ae902@localhost.localdomain> <5.1.0.14.2.20050804170618.0348af88@127.0.0.1> <5.1.0.14.2.20050805102335.03428dc0@127.0.0.1> Message-ID: <20050805122226.270456a9@localhost.localdomain> That did it. Both of your suggestions worked fine - either wrapping the ie.text_field and ie.button statements in "unless ie.test == '' then" or in "begin,rescue,end" bypassed this problem. Perhaps one of these could be included in the example - demonstrating the need to test for the existence of an object before trying to use it :-) Thank you - I appreciate your help - I'm new to ruby, watir, and windows (my native tongue is perl - my native land is unix) and don't yet have a feel for what's "normal" Also On Fri, 05 Aug 2005 10:40:20 -0500 Bret Pettichord wrote: > I have now been able to reproduce this problem. > > When it occurs, there is blank IE window. It saws > 'http://www.google.com/' in the address bar, but the page is blank, > and it is not loading. A refresh corrects the problem. This is > different from what i thought might be happening (adding waits and > sleeps won't correct this). > > I'm guessing that this is a multithreading bug in IE itself, that > shows up more often on machines with limited resources (like yours). > > I don't really see a way to change Watir itself to avoid this > problem. To some degree it doesn't look like an automation bug. In > other words -- if you manually ran several browsers this fast, i > suspect you'd see the same problem. > > I could advise you how to workaround the problem in specific cases. > In this situation ie.text == '', so you add a check to detect this > situation and retry in your script (or trap the error and ignore it). > > Bret > > At 09:25 AM 8/5/2005, Warren Pollans wrote: > >I put the script in a loop to run 20 times - typically, there'll be 2 > >errors out of twenty. Could someone else try this: > > > >for %i in (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20) do > >ruby concurrent_search.rb > > > >I put in a "sleep 1" between the ie.start and the ie.test_field and > >still got failures. > > > >A few other things that didn't work (I'm just fishing): > >- putting ie.wait after the the ie.start > >- replace ie.start with ie = IE.new; ie.goto > > > >Changing the number of threads to 1 did work -->> no errors > >Changing the number of threads to 2 did NOT work > > > >I'm using the current stable version of ruby (1.8.2-14, I believe) > >and the watir 1.4. I'm running win2k (service pack 4) on an old 730 > >MHz Gateway with 256 Mb memory > > > > > >On Thu, 04 Aug 2005 17:08:36 -0500 > >Bret Pettichord wrote: > > > > > My guess is that this is a timing issue of some sort and > > > ultimately a bug (race condition) in watir. > > > > > > One thing you can do is put small sleep statements in there. > > > > > > For example put a "sleep 0.1" right before the failing line and > > > then see if you can reproduce the problem. If not, that proves it > > > is a race condition. (We still would need to figure out exactly > > > where the problem is, however.) > > > > > > Bret > > > > > > At 01:42 PM 8/4/2005, Warren Pollans wrote: > > > >OK, I was wrong, the behavior is intermittent. Sometimes it > > > >works and sometimes it doesn't :-( Any suggestions about how > > > >to track this down? > > > > > > > >On Thu, 4 Aug 2005 14:35:36 -0400 > > > >Warren Pollans wrote: > > > > > > > > > Hmmm, I get the error if there's no browser window open at the > > > > > start. If a browser window is already open, it runs without > > > > > error. Is this the expected behavior? > > > > > > > > > > > > > > > > > > > > On Thu, 04 Aug 2005 12:03:00 -0600 > > > > > Paul Rogers wrote: > > > > > > > > > > > Well, it works for me ;-) > > > > > > > > > > > > The error is that watir couldn't find the text field where > > > > > > you enter the search term. > > > > > > I live in canada, and I always get redirected to google.ca, > > > > > > so maybe something similar is happening for you and the > > > > > > search box has a different name... > > > > > > Other than that I cant really help... > > > > > > > > > > > > -----Original Message----- > > > > > > From: wtr-general-bounces at rubyforge.org > > > > > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of > > > > > > Warren Pollans Sent: 04 August 2005 11:39 > > > > > > To: wtr-general at rubyforge.org > > > > > > Subject: [Wtr-general] example/concurrent_search error > > > > > > > > > > > > > > > > > > Hello, > > > > > > > > > > > > Sorry, if this is obvious - I'm new to ruby, watir, and > > > > > > windows > > > > > > - I'm coming from perl on unix. > > > > > > > > > > > > What have I missed here? I ran the example > > > > > > concurrent_search test and got the following: > > > > > > > > > > > > > > > > > > C:\watir_bonus\examples>ruby concurrent_search.rb > > > > > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1939:in > > > > > > `assert_exists': Unable to locate object, using name and q > > > > > > (Watir::Exception::UnknownObjectException) from > > > > > > concurrent_search.rb:18:in `join' from > > > > > > concurrent_search.rb:18 from concurrent_search.rb:18:in > > > > > > `each' from concurrent_search.rb:18 > > > > > > > > > > > > > > > > > > C:\watir_bonus\examples>more concurrent_search.rb > > > > > > # demonstrate ability to run multiple tests concurrently > > > > > > > > > > > > require 'thread' > > > > > > require 'watir' > > > > > > > > > > > > def test_google > > > > > > ie = Watir::IE.start('http://www.google.com') > > > > > > ie.text_field(:name, "q").set("pickaxe") > > > > > > ie.button(:value, "Google Search").click > > > > > > ie.close > > > > > > end > > > > > > > > > > > > # run the same test three times concurrently in separate > > > > > > browsers threads = [] 3.times do > > > > > > threads << Thread.new {test_google} > > > > > > end > > > > > > threads.each {|x| x.join} > > > > > > _______________________________________________ > > > > > > 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 > > > > > > _____________________ > > > Bret Pettichord > > > www.pettichord.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 > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From iain.rose at responsetek.com Fri Aug 5 18:01:47 2005 From: iain.rose at responsetek.com (Iain) Date: Fri, 5 Aug 2005 15:01:47 -0700 Subject: [Wtr-general] Problem with WindowLogonExample.rb In-Reply-To: <004f01c555cb$ee1fca30$72d39044@NewDell> Message-ID: Hello again, I've been trying and trying to get this to work but am still having no joy. I've been working around this problem for the last few months but it's really limiting what I can achieve with the tool. Can anyone one please help with an idiot proof guide to getting this to work? I see this question has been added to the faq so I assume it's is common problem. I'm positive that autoit is installed because around half the unit tests in the jscript_test.rb unit test seem to work and that test is not throwing an error. All that happens is that the security dialog appears and the test hangs indefinately. Can anyone please explain how to do this and what each step in the process is doing? Thanks Iain -----Original Message----- From: Paul Rogers [mailto:paul.rogers at shaw.ca] Sent: Tuesday, May 10, 2005 6:51 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Problem with WindowLogonExample.rb Here it is. I think I used a program called 7za to zip it, but it obviously didn't work quite right! The new release will have the windowshelper that you need Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Iain Sent: 10 May 2005 19:15 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Problem with WindowLogonExample.rb Paul, This zip file apears to be corrupt. Would you mind reposting? Also, I notice that version 1.3.1 was released today. Does this release include the updated WindowHelper.rb file you refered to below? Thanks Iain -----Original Message----- From: Paul Rogers [mailto:paul.rogers at shaw.ca] Sent: Saturday, May 07, 2005 5:15 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Problem with WindowLogonExample.rb Iain, Here is a zip that contains some ruby files that will clear the security alert for you. You'll also need to get the latest code from cvs, especially the WindowHelper.rb file In future versions of watir we hope to have this code a bit clearer and easier to use Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Iain Sent: 06 May 2005 15:54 To: wtr-general at rubyforge.org Subject: [Wtr-general] Problem with WindowLogonExample.rb Hi Guys, Firstly, let me say thanks for the tool and the new release. I've been eagerly waiting for the new functionality and can't wait to get started with it. I've never programmed before but in the last month, through using your tool, I've learnt the basics of Ruby and am amazed by the results I've been getting. Up until now there's only been a few things I've wanted to do with Watir but haven't yet been able to. 1. Enter the network login information when accessing my test site. 2. Accepting Security Certificate warnings in Security Alert popups. I understand that both these issues have been addressed by the new build. I'm trying to figure out how to do this so have gone to the Watir API and the sample unit tests to try and find some similar code but I'm having some problems getting them to work. 1.) Unfortunately the WindowLogonExample.rb unit test isn't working for me. The clio.lyris.com login prompt appears but nothing else happens. Is anyone else having this problem? 2.) I couldn't find any working examples for Security Alerts but in the API I can see the clearSecurityAlertBox method in the WinClicker class. I've tried to following $ie = IE.new $ie.goto($Z_Login) w = WinClicker.new w.clearSecurityAlertBox() The security alert appears immediately after I navigate to Login URL of my test site but like before nothing happens. If I abort the test I get the following output: getWindowHandle - looking for: Security Alert Found window: CiceroUIWndFrame Caption =TF_FloatingLangBar_WndTitle Found window: CiceroUIWndFrame Caption =CiceroUIWndFrame Found window: tooltips_class32 Caption = Found window: WorkerW Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: Shell_TrayWnd Caption = Found window: Auto-Suggest Dropdown Caption = Found window: Caption = Found window: tooltips_class32 Caption = Found window: UltraMon Taskbar Caption = Found window: tooltips_class32 Caption = Found window: OfficeTooltip Caption =Align Left Found window: tooltips_class32 Caption = Found window: Auto-Suggest Dropdown Caption = Found window: Auto-Suggest Dropdown Caption = Found window: tooltips_class32 Caption = Found window: Auto-Suggest Dropdown Caption = Found window: SysFader Caption =SysFader Found window: MozillaDropShadowWindowClass Caption = Found window: MozillaDropShadowWindowClass Caption = Found window: MozillaDropShadowWindowClass Caption = Found window: MozillaDropShadowWindowClass Caption = Found window: MozillaDropShadowWindowClass Caption = Found window: MozillaDropShadowWindowClass Caption = Found window: MozillaDropShadowWindowClass Caption = Found window: Trillian: List Tooltip Entry Caption =Trillian: List Tooltip Entry Found window: BaseBar Caption = Found window: tooltips_class32 Caption = Found window: BaseBar Caption = >Exit code: -1073741510 >ruby login.rb >Exit code: -1073741510 Can anyone help? Many thanks Iain _______________________________________________ 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 iain.rose at responsetek.com Fri Aug 5 18:41:33 2005 From: iain.rose at responsetek.com (Iain) Date: Fri, 5 Aug 2005 15:41:33 -0700 Subject: [Wtr-general] Security Alert pop up In-Reply-To: Message-ID: I'm having the same problem. I've verified the 2 files are in the location you refered to. I recently installed Watir 1.4 and WindowHelper.rb is already there but I've copied winHelper_security.rb The error message is : Started thread for win helper ruby: No such file or directory -- winHelper_security.rb (LoadError) Any ideas? _____ From: Tuyet Cong-Ton-Nu [mailto:tuyet.ctn at mscibarra.com] Sent: Tuesday, August 02, 2005 5:42 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Security Alert pop up You need these 2 attached files that will make it work; You need to put both in the C:\ruby\lib\ruby\site_ruby\1.8\watir directory I don't think they are in the 1.3 version (probably in tarball). Also add the code below, it works great for me. require 'watir' include Watir require 'watir/windowhelper' t = Thread.new(){ puts "Started thread for win helper" system('ruby winHelper_security.rb') } ie=IE.new() m = Thread.new(ie) { ie.goto("https://www.mysite.com") } m.join t.join -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050805/353cd366/attachment.html From huemach at Cybersoft-VN.com Sat Aug 6 05:51:44 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Sat, 6 Aug 2005 16:51:44 +0700 Subject: [Wtr-general] Help Define Test data Path? Message-ID: <99DF6C0285C2CE4C99F02D78385719660181ABC4@hue.cybersoft-vn.com> Hi All Currently, I define the fix path of test data. But in this way is not so good when we run test script in other computer with difference folder. Currently, The structure of my test script like this --testScript -- TC1 -- TC1.rb -- TC2 -- TC2.rb -- .. -- Util -- config.rb -- Testdata.xls In config.rb, I define like this $input_test_data_path = 'D:\TestScript\testdata.xls' And use $input_test_data_path in TC1, TC2,... Does have anyway to define the test data location more suitable Thank you for help Hue From raghu at qantom.com Sat Aug 6 06:33:38 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Sat, 06 Aug 2005 16:03:38 +0530 Subject: [Wtr-general] Help Define Test data Path? In-Reply-To: <99DF6C0285C2CE4C99F02D78385719660181ABC4@hue.cybersoft-vn.com> References: <99DF6C0285C2CE4C99F02D78385719660181ABC4@hue.cybersoft-vn.com> Message-ID: <42F49202.5020308@qantom.com> I typically use relative path folders. (.\testdata.xls) Hue Mach Dieu wrote: >Hi All > >Currently, I define the fix path of test data. But in this way is not so >good when we run test script in other computer with difference folder. > >Currently, The structure of my test script like this > >--testScript > -- TC1 > -- TC1.rb > -- TC2 > -- TC2.rb > -- .. > -- Util > -- config.rb > -- Testdata.xls > >In config.rb, I define like this > >$input_test_data_path = 'D:\TestScript\testdata.xls' > >And use $input_test_data_path in TC1, TC2,... > >Does have anyway to define the test data location more suitable > >Thank you for help > >Hue > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > From huemach at Cybersoft-VN.com Sun Aug 7 04:55:46 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Sun, 7 Aug 2005 15:55:46 +0700 Subject: [Wtr-general] Small question about split String? Message-ID: <99DF6C0285C2CE4C99F02D78385719660181ABE1@hue.cybersoft-vn.com> Dear All, I need split Character & Numeric from string to 2 elements. My string in some case as like this: Case1: A13 -> The result must be in array: [A, 13] Case2: ACB12334 -> The result must be in array: [ABC, 12334] ... Thank you for help Hue From huemach at Cybersoft-VN.com Sun Aug 7 05:00:53 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Sun, 7 Aug 2005 16:00:53 +0700 Subject: [Wtr-general] Re: Help Define Test data Path? Message-ID: <99DF6C0285C2CE4C99F02D78385719660181ABE2@hue.cybersoft-vn.com> Hi Raghu Venkataramana, You mean define $input_test_data_path = '.\testdata.xls' in config.rb file & use this variable in TC1, TC2 I have define it as $input_test_data_path = '.\testdata.xls', but I got the exception Thank you for help Hue From christopher.mcmahon at gmail.com Sun Aug 7 12:55:21 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Sun, 7 Aug 2005 11:55:21 -0500 Subject: [Wtr-general] Small question about split String? In-Reply-To: <99DF6C0285C2CE4C99F02D78385719660181ABE1@hue.cybersoft-vn.com> References: <99DF6C0285C2CE4C99F02D78385719660181ABE1@hue.cybersoft-vn.com> Message-ID: <72799cd7050807095533930ee8@mail.gmail.com> > My string in some case as like this: > Case1: A13 -> The result must be in array: [A, 13] > Case2: ACB12334 -> The result must be in array: [ABC, 12334] Here's one way: string = "ACB12334" string =~ /[A-Z]/ alphas = $& string = "ACB12334" string =~ /[0-9]/ numerics = $& From huemach at Cybersoft-VN.com Sun Aug 7 22:11:28 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Mon, 8 Aug 2005 09:11:28 +0700 Subject: [Wtr-general] Re: Small question about split String? Message-ID: <99DF6C0285C2CE4C99F02D78385719660181AC17@hue.cybersoft-vn.com> Hi I follow your ways, but it seem don't work Here my script string = "ACB12334" puts string string =~ /[A-Z]/ puts string alphas = $& puts alphas string = "ACB12334" puts string string =~ /[0-9]/ puts string numerics = $& puts numerics And I got the result: ACB12334 ACB12334 A ACB12334 ACB12334 1 Regards, Hue From Neumann at encoway.de Mon Aug 8 05:36:15 2005 From: Neumann at encoway.de (Neumann, Carsten - ENCOWAY) Date: Mon, 8 Aug 2005 11:36:15 +0200 Subject: [Wtr-general] open file with file_field Message-ID: <0E46E3619326224CB40CC30C2E36364E20C000@zde008.lenze.com> How can I open a file by using a file_field? If I use: ie.file_field(:name, fieldname).set(complete path) I get the normal Windows- "Open file"-dialog. How can I now select a file, or type the name using watir? Or must I use something different? Thanks! Carsten Neumann -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050808/d19c9af3/attachment.html From zeljko.filipin at gmail.com Mon Aug 8 05:56:30 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Mon, 8 Aug 2005 11:56:30 +0200 Subject: [Wtr-general] open file with file_field In-Reply-To: <0E46E3619326224CB40CC30C2E36364E20C000@zde008.lenze.com> Message-ID: <42f72c21.512cdcfd.2fbb.459c@mx.gmail.com> Try this (make sure you have 'file.txt' in 'C:\'): require 'watir' ie = Watir::IE.start('http://validator.w3.org/') ie.file_field(:id,'uploaded_file').set('C:\file.txt') There seems to be a bug when path contains spaces: 1) this works just fine ie.file_field(:id,'uploaded_file').set('C:\Temp\file.txt') 2) this returns error (in pop up window with title 'Choose file') - C:\Documents File not found. Please verify the correct file name was given. ie.file_field(:id,'uploaded_file').set('C:\Documents and Settings\file.txt') So, for now, until bug is removed, just make sure your files for upload do not have spaces in path. Zeljko _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Neumann, Carsten - ENCOWAY Sent: Monday, August 08, 2005 11:36 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] open file with file_field How can I open a file by using a file_field? If I use: ie.file_field(:name, fieldname).set(complete path) I get the normal Windows- "Open file"-dialog. How can I now select a file, or type the name using watir? Or must I use something different? Thanks! Carsten Neumann -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050808/ef70c723/attachment.html From shaorobics at gmail.com Mon Aug 8 08:00:42 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Mon, 8 Aug 2005 08:00:42 -0400 Subject: [Wtr-general] Re: Small question about split String? In-Reply-To: <99DF6C0285C2CE4C99F02D78385719660181AC17@hue.cybersoft-vn.com> References: <99DF6C0285C2CE4C99F02D78385719660181AC17@hue.cybersoft-vn.com> Message-ID: <593b9ae8050808050054a15766@mail.gmail.com> Here's what I did..seems to work: irb(main):069:0> a = "ABC123" => "ABC123" irb(main):070:0> b = a.split(/\d/) => ["ABC"] irb(main):071:0> b.push(a.sub(b[0],"")) => ["ABC", "123"] which gives you the two entries in the array "b". Not sure how else to do it :) Shao From jp at mattenet.com Mon Aug 8 08:31:06 2005 From: jp at mattenet.com (=?iso-8859-1?Q?Juan=20Pablo=20Mattenet?=) Date: Mon, 08 Aug 2005 13:31:06 +0100 Subject: [Wtr-general] IE Security Dialog box (HTTP basic Authentification/Watir) Message-ID: <20050808123107.20588.qmail@hosting334.com> Hi, I'm new to watir and ruby, and I'm having the following issue: The application under test uses HTTP basic authetification for the login. This causes IE to put up a dialog box requesting the user and password. And I don't know how to manipulate this particular window from Watir a search in the maillist has returned this post: http://rubyforge.org/pipermail/wtr-general/2005-March/001081.html Is this the current way (using WinClicker)? Where I can download the WinClicker? Regards, JP -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050808/0e87e6e9/attachment.html From Neumann at encoway.de Mon Aug 8 09:59:41 2005 From: Neumann at encoway.de (Neumann, Carsten - ENCOWAY) Date: Mon, 8 Aug 2005 15:59:41 +0200 Subject: AW: [Wtr-general] open file with file_field Message-ID: <0E46E3619326224CB40CC30C2E36364E20C002@zde008.lenze.com> What do you mean with: (:id, "uploaded_file")? If I use (:index, 2) (I can't use the name here) I get the "Choose file"-dialog box and a DOS-cmd-box showing all windows he finds (?). Thats all, I have to select a file by myself. There are no spaces in path, as far as I see. Carsten N. ________________________________ Von: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] Im Auftrag von Zeljko Filipin Gesendet: Montag, 8. August 2005 11:57 An: wtr-general at rubyforge.org Betreff: RE: [Wtr-general] open file with file_field Try this (make sure you have 'file.txt' in 'C:\'): require 'watir' ie = Watir::IE.start('http://validator.w3.org/') ie.file_field(:id,'uploaded_file').set('C:\file.txt') There seems to be a bug when path contains spaces: 1) this works just fine ie.file_field(:id,'uploaded_file').set('C:\Temp\file.txt') 2) this returns error (in pop up window with title 'Choose file') - C:\Documents File not found. Please verify the correct file name was given. ie.file_field(:id,'uploaded_file').set('C:\Documents and Settings\file.txt') So, for now, until bug is removed, just make sure your files for upload do not have spaces in path. Zeljko ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Neumann, Carsten - ENCOWAY Sent: Monday, August 08, 2005 11:36 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] open file with file_field How can I open a file by using a file_field? If I use: ie.file_field(:name, fieldname).set(complete path) I get the normal Windows- "Open file"-dialog. How can I now select a file, or type the name using watir? Or must I use something different? Thanks! Carsten Neumann -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050808/5ce8a57c/attachment.html From zeljko.filipin at gmail.com Mon Aug 8 10:15:45 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Mon, 8 Aug 2005 16:15:45 +0200 Subject: [Wtr-general] open file with file_field In-Reply-To: <0E46E3619326224CB40CC30C2E36364E20C002@zde008.lenze.com> Message-ID: <42f768e9.0df975b1.0e4c.ffffaf79@mx.gmail.com> (:id, "uploaded_file") is how you can access file field at http://validator.w3.org/, it is just an example. That cmd window showing all windows should be there for a few seconds, and then it dissapears, and the file is selected. Try example from my previous post and wait for cmd window to close (about 10 seconds at my box). Zeljko ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Neumann, Carsten - ENCOWAY Sent: Monday, August 08, 2005 4:00 PM To: wtr-general at rubyforge.org Subject: AW: [Wtr-general] open file with file_field What do you mean with: (:id, "uploaded_file")? If I use (:index, 2) (I can't use the name here) I get the "Choose file"-dialog box and a DOS-cmd-box showing all windows he finds (?). Thats all, I have to select a file by myself. There are no spaces in path, as far as I see. Carsten N. ________________________________ Von: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] Im Auftrag von Zeljko Filipin Gesendet: Montag, 8. August 2005 11:57 An: wtr-general at rubyforge.org Betreff: RE: [Wtr-general] open file with file_field Try this (make sure you have 'file.txt' in 'C:\'): require 'watir' ie = Watir::IE.start('http://validator.w3.org/') ie.file_field(:id,'uploaded_file').set('C:\file.txt') There seems to be a bug when path contains spaces: 1) this works just fine ie.file_field(:id,'uploaded_file').set('C:\Temp\file.txt') 2) this returns error (in pop up window with title 'Choose file') - C:\Documents File not found. Please verify the correct file name was given. ie.file_field(:id,'uploaded_file').set('C:\Documents and Settings\file.txt') So, for now, until bug is removed, just make sure your files for upload do not have spaces in path. Zeljko ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Neumann, Carsten - ENCOWAY Sent: Monday, August 08, 2005 11:36 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] open file with file_field How can I open a file by using a file_field? If I use: ie.file_field(:name, fieldname).set(complete path) I get the normal Windows- "Open file"-dialog. How can I now select a file, or type the name using watir? Or must I use something different? Thanks! Carsten Neumann From christopher.mcmahon at gmail.com Mon Aug 8 10:17:28 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 8 Aug 2005 09:17:28 -0500 Subject: [Wtr-general] Re: Small question about split String? In-Reply-To: <99DF6C0285C2CE4C99F02D78385719660181AC17@hue.cybersoft-vn.com> References: <99DF6C0285C2CE4C99F02D78385719660181AC17@hue.cybersoft-vn.com> Message-ID: <72799cd7050808071716212975@mail.gmail.com> On 8/7/05, Hue Mach Dieu wrote: > Hi > I follow your ways, but it seem don't work Oops. irb(main):012:0> string = "ACB12334" => "ACB12334" irb(main):013:0> string =~ /([A-Z])*/ => 0 irb(main):014:0> puts $& ACB Forgot the "*". See pp 68-77 of Programming Ruby. -Chris From raghu at qantom.com Mon Aug 8 10:40:38 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Mon, 08 Aug 2005 20:10:38 +0530 Subject: [Wtr-general] Object repository, Popups and other enhancements Message-ID: <42F76EE6.8030105@qantom.com> Hi all, We started evaluating Watir for porting a large subset of our automated tests from Quicktest. In the process, we had to build supporting classes on top of Watir to suit our needs. We are sure that these additions will be beneficial to all in the community. (In fact there were a lot of other people who have run into similar issues). Therefore, we decided to release this enhancement as an opensource work. The framework is available for download at http://www.wet.qantom.org WET, as it is called, is a great compliment to Watir. WET has the following features in a nutshell: 1) Object identification using multiple parameters 2) Object repository to store objects 3) Better popup handling 4) Easy manipulation of checkpoints 5) Results presented as HTML 6) Datatables 7) Test exeuction is controlled by a single test definition file. We have found this framework very helpful and hope this is going to be a great add-on and help all the users in the community. Thanks Raghu Venkataramana -- Qantom Software http://www.qantom.com Ph : 91-80-26799269 Xtn. 125 sip : raghu at sip411.com -- From christopher.mcmahon at gmail.com Mon Aug 8 10:46:08 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 8 Aug 2005 09:46:08 -0500 Subject: [Wtr-general] Object repository, Popups and other enhancements In-Reply-To: <42F76EE6.8030105@qantom.com> References: <42F76EE6.8030105@qantom.com> Message-ID: <72799cd705080807467e9d4588@mail.gmail.com> Therefore, we decided to release this enhancement as > an opensource work. The framework is available for download at > > http://www.wet.qantom.org > > WET, as it is called, is a great compliment to Watir. This looks really neat, I'm looking forward to using it! -Chris From jeff.darklight at gmail.com Mon Aug 8 16:27:27 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Mon, 8 Aug 2005 13:27:27 -0700 Subject: [Wtr-general] IE Security Dialog box (HTTP basic Authentification/Watir) In-Reply-To: <20050808123107.20588.qmail@hosting334.com> References: <20050808123107.20588.qmail@hosting334.com> Message-ID: Within the WATiR distribution there are a number of examples as well as an extensive unit test directory. If you look in the unit tests for WinHelper ... it will show you what you are after. Basically, you need to create a Thread that runs WinHelper and use it's logon method ( which provides it with the title of the window to watch and the username & password to use in the dialog )... Then in a separate thread actuall cause your IE object to go to the URL . It's pretty simple and as I said there is an example of this within the WATiR unit tests. The code isn't hard to follow. j. On 8/8/05, Juan Pablo Mattenet wrote: > > > Hi, > > I'm new to watir and ruby, and I'm having the following issue: > > The application under test uses HTTP basic authetification for the login. > > This causes IE to put up a dialog box requesting the user and password. > > And I don't know how to manipulate this particular window from Watir > > > a search in the maillist has returned this post: > > http://rubyforge.org/pipermail/wtr-general/2005-March/001081.html > > Is this the current way (using WinClicker)? > > Where I can download the WinClicker? > > Regards, > > JP > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > -- "So long, and thanks for all the fish" Jeff Wood From Ben.Torres at rhi.com Mon Aug 8 17:49:31 2005 From: Ben.Torres at rhi.com (Torres, Ben (HQP)) Date: Mon, 8 Aug 2005 14:49:31 -0700 Subject: [Wtr-general] IE Security Dialog box (HTTP basicAuthentification/Watir) Message-ID: <1641BB0AA7287848817A63C3EE9677D50740D35A@hqp-ex-mb05.na.msds.rhi.com> Where can I find the unit tests for WinHelper? I can't seem to find it in the examples directory that was installed on my machine. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood Sent: Monday, August 08, 2005 1:27 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] IE Security Dialog box (HTTP basicAuthentification/Watir) Within the WATiR distribution there are a number of examples as well as an extensive unit test directory. If you look in the unit tests for WinHelper ... it will show you what you are after. Basically, you need to create a Thread that runs WinHelper and use it's logon method ( which provides it with the title of the window to watch and the username & password to use in the dialog )... Then in a separate thread actuall cause your IE object to go to the URL . It's pretty simple and as I said there is an example of this within the WATiR unit tests. The code isn't hard to follow. j. On 8/8/05, Juan Pablo Mattenet wrote: > > > Hi, > > I'm new to watir and ruby, and I'm having the following issue: > > The application under test uses HTTP basic authetification for the login. > > This causes IE to put up a dialog box requesting the user and password. > > And I don't know how to manipulate this particular window from Watir > > > a search in the maillist has returned this post: > > http://rubyforge.org/pipermail/wtr-general/2005-March/001081.html > > Is this the current way (using WinClicker)? > > Where I can download the WinClicker? > > Regards, > > JP > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > -- "So long, and thanks for all the fish" Jeff Wood _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From ruby at roblally.plus.com Mon Aug 8 18:17:53 2005 From: ruby at roblally.plus.com (Rob Lally) Date: Mon, 08 Aug 2005 23:17:53 +0100 Subject: [Wtr-general] class_name attribute of Div elements Message-ID: <42F7DA11.4050604@roblally.plus.com> Hi, I notice that in the last release the style attribute was converted to class_name for div elements. I'm trying to use it to get the css class of a div, but I can't seem to get it to work - it doesn't return anything. Is it just me or is it broken? R. From Ben.Torres at rhi.com Mon Aug 8 18:48:25 2005 From: Ben.Torres at rhi.com (Torres, Ben (HQP)) Date: Mon, 8 Aug 2005 15:48:25 -0700 Subject: [Wtr-general] fileField problems Message-ID: <1641BB0AA7287848817A63C3EE9677D50740D37F@hqp-ex-mb05.na.msds.rhi.com> Hi, I just ran the filefield_test.rb in the unittests folder. When the file executed, another command window opened and started to print out a bunch of text while the "choose file" window was opening. The "choose file" window remained open for about 10 seconds, and at this time the command window just kept on printing some stuff out. I don't know if the file was finally selected because after 10 seconds, the windows closed. Has anyone else encountered this problem? Here's a snippet of the printout: c:/ruby/lib/ruby/site_ruby/1.8 c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt c:/ruby/lib/ruby/site_ruby c:/ruby/lib/ruby/1.8 c:/ruby/lib/ruby/1.8/i386-mswin32 . c:/ruby/lib/ruby/site_ruby/1.8 getWindowHandle - looking for: Choose file Found window: Auto-Suggest Dropdown Caption = Found window: SysFader Caption =SysFader Found window: tooltips_class32 Caption = Found window: WorkerW Caption = Found window: tooltips_class32 Caption = Found window: DV2ControlHost Caption =Start Menu Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: Shell_TrayWnd Caption = Found window: TdxBarHintWindow Caption = Found window: THintWindow Caption =Add Defect Found window: Auto-Suggest Dropdown Caption = Found window: SysFader Caption =SysFader Found window: TTraceAllForm Caption =Trace All Changes Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: BaseBar Caption = Found window: BaseBar Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050808/2fc46037/attachment.html From jkohl at telusplanet.net Mon Aug 8 19:00:47 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Mon, 8 Aug 2005 17:00:47 -0600 Subject: [Wtr-general] fileField problems In-Reply-To: <1641BB0AA7287848817A63C3EE9677D50740D37F@hqp-ex-mb05.na.msds.rhi.com> Message-ID: <20050808230120.FWTN24062.priv-edtnes56.telusplanet.net@tintin> That's how the WinClickers code works that is being called. That's one of the many reasons it will be nice to have a better solution for dealing with windows. -Jonathan _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Torres, Ben (HQP) Sent: August 8, 2005 4:48 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] fileField problems Hi, I just ran the filefield_test.rb in the unittests folder. When the file executed, another command window opened and started to print out a bunch of text while the "choose file" window was opening. The "choose file" window remained open for about 10 seconds, and at this time the command window just kept on printing some stuff out. I don't know if the file was finally selected because after 10 seconds, the windows closed. Has anyone else encountered this problem? Here's a snippet of the printout: c:/ruby/lib/ruby/site_ruby/1.8 c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt c:/ruby/lib/ruby/site_ruby c:/ruby/lib/ruby/1.8 c:/ruby/lib/ruby/1.8/i386-mswin32 . c:/ruby/lib/ruby/site_ruby/1.8 getWindowHandle - looking for: Choose file Found window: Auto-Suggest Dropdown Caption = Found window: SysFader Caption =SysFader Found window: tooltips_class32 Caption = Found window: WorkerW Caption = Found window: tooltips_class32 Caption = Found window: DV2ControlHost Caption =Start Menu Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: Shell_TrayWnd Caption = Found window: TdxBarHintWindow Caption = Found window: THintWindow Caption =Add Defect Found window: Auto-Suggest Dropdown Caption = Found window: SysFader Caption =SysFader Found window: TTraceAllForm Caption =Trace All Changes Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: BaseBar Caption = Found window: BaseBar Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050808/93e05287/attachment.html From paul.rogers at shaw.ca Mon Aug 8 19:19:45 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 08 Aug 2005 17:19:45 -0600 Subject: [Wtr-general] fileField problems Message-ID: <2b409f12b3f64c.2b3f64c2b409f1@shaw.ca> we shold probably rewrite the fileField test using the winHelper/autoit rather than the old winClicer Paul Content-Type: multipart/alternative; boundary="----=_NextPart_000_001E_01C59C3A.B936F4F0" ------=_NextPart_000_001E_01C59C3A.B936F4F0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit That's how the WinClickers code works that is being called. That's one of the many reasons it will be nice to have a better solution for dealing with windows. -Jonathan _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Torres, Ben (HQP) Sent: August 8, 2005 4:48 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] fileField problems Hi, I just ran the filefield_test.rb in the unittests folder. When the file executed, another command window opened and started to print out a bunch of text while the "choose file" window was opening. The "choose file" window remained open for about 10 seconds, and at this time the command window just kept on printing some stuff out. I don't know if the file was finally selected because after 10 seconds, the windows closed. Has anyone else encountered this problem? Here's a snippet of the printout: c:/ruby/lib/ruby/site_ruby/1.8 c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt c:/ruby/lib/ruby/site_ruby c:/ruby/lib/ruby/1.8 c:/ruby/lib/ruby/1.8/i386-mswin32 . c:/ruby/lib/ruby/site_ruby/1.8 getWindowHandle - looking for: Choose file Found window: Auto-Suggest Dropdown Caption = Found window: SysFader Caption =SysFader Found window: tooltips_class32 Caption = Found window: WorkerW Caption = Found window: tooltips_class32 Caption = Found window: DV2ControlHost Caption =Start Menu Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: Shell_TrayWnd Caption = Found window: TdxBarHintWindow Caption = Found window: THintWindow Caption =Add Defect Found window: Auto-Suggest Dropdown Caption = Found window: SysFader Caption =SysFader Found window: TTraceAllForm Caption =Trace All Changes Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: BaseBar Caption = Found window: BaseBar Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = ------=_NextPart_000_001E_01C59C3A.B936F4F0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
That's how the WinClickers code works that is = being called.=20 That's one of the many reasons it will be nice to have a better solution = for=20 dealing with windows.
 
-Jonathan


From: = wtr-general-bounces at rubyforge.org=20 [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Torres, = Ben=20 (HQP)
Sent: August 8, 2005 4:48 PM
To:=20 wtr-general at rubyforge.org
Subject: [Wtr-general] fileField=20 problems

Hi,
 
I just=20 ran the filefield_test.rb in the unittests folder.  When the file = executed, another command window opened and started to print out a = bunch of=20 text while the "choose file" window was opening.   The = "choose file"=20 window remained open for about 10 seconds, and at this time the = command window=20 just kept on printing some stuff out.  I don't know if the file = was=20 finally selected because after 10 seconds, the windows closed.  = Has=20 anyone else encountered this problem?
 
Here's=20 a snippet of the printout:
c:/ruby/lib/ruby/site_ruby/1.8
c:/ruby/lib/ruby/site_ruby/1.8= /i386-msvcrt
c:/ruby/lib/ruby/site_ruby
c:/ruby/lib/ruby/1.8
c:/= ruby/lib/ruby/1.8/i386-mswin32
.
c:/ruby/lib/ruby/site_ruby/1.8
= getWindowHandle=20 - looking for: Choose file
Found window: Auto-Suggest = Dropdown
Caption=20 =3D
Found window: SysFader
Caption =3DSysFader
Found window:=20 tooltips_class32
Caption =3D
Found window: WorkerW
Caption = =3D
Found=20 window: tooltips_class32
Caption =3D
Found window:=20 DV2ControlHost
Caption =3DStart Menu
Found window:=20 tooltips_class32
Caption =3D
Found window: = tooltips_class32
Caption=20 =3D
Found window: tooltips_class32
Caption =3D
Found window:=20 tooltips_class32
Caption =3D
Found window: = tooltips_class32
Caption=20 =3D
Found window: Shell_TrayWnd
Caption =3D
Found window:=20 TdxBarHintWindow
Caption =3D
Found window: = THintWindow
Caption =3DAdd=20 Defect
Found window: Auto-Suggest Dropdown
Caption =3D
Found = window:=20 SysFader
Caption =3DSysFader
Found window: = TTraceAllForm
Caption =3DTrace=20 All Changes
Found window: tooltips_class32
Caption =3D
Found = window:=20 tooltips_class32
Caption =3D
Found window: BaseBar
Caption = =3D
Found=20 window: BaseBar
Caption =3D
Found window: = tooltips_class32
Caption=20 =3D
Found window: tooltips_class32
Caption =3D
Found window:=20 tooltips_class32
Caption =3D
Found window: = tooltips_class32
Caption=20 =3D
Found window: tooltips_class32
Caption =3D
Found window:=20 tooltips_class32
Caption =3D
Found window: = tooltips_class32
Caption=20 =3D
------=_NextPart_000_001E_01C59C3A.B936F4F0-- -------------- next part -------------- _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From huemach at Cybersoft-VN.com Mon Aug 8 20:48:06 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Tue, 9 Aug 2005 07:48:06 +0700 Subject: [Wtr-general] Re: Small question about split String? Message-ID: <99DF6C0285C2CE4C99F02D78385719660181AF29@hue.cybersoft-vn.com> Hi, I solve my problem as like this, It work with my cases string = "ABC12345" numPos = string =~ /\d/ alpha = string.slice(0,numPos) number = string.slice(numPos, string.length - numPos).to_i Regards, Hue Mach From huemach at Cybersoft-VN.com Mon Aug 8 20:51:19 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Tue, 9 Aug 2005 07:51:19 +0700 Subject: [Wtr-general] Re: Object repository, Popups and other enhancements Message-ID: <99DF6C0285C2CE4C99F02D78385719660181AF2A@hue.cybersoft-vn.com> Hi, I read the tutorial about WET framework (http://www.wet.qantom.org), It seem good. Now I'm starting try it with my current project Regards, Hue From bret at pettichord.com Mon Aug 8 22:48:19 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 08 Aug 2005 21:48:19 -0500 Subject: [Wtr-general] class_name attribute of Div elements In-Reply-To: <42F7DA11.4050604@roblally.plus.com> Message-ID: <5.1.0.14.2.20050808214726.03105340@127.0.0.1> take a look at div_test.rb. At 05:17 PM 8/8/2005, Rob Lally wrote: >Hi, > >I notice that in the last release the style attribute was converted to >class_name for div elements. > >I'm trying to use it to get the css class of a div, but I can't seem to >get it to work - it doesn't return anything. Is it just me or is it broken? > > >R. >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Mon Aug 8 22:42:39 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 08 Aug 2005 21:42:39 -0500 Subject: [Wtr-general] New, improved support for popup dialogs Message-ID: <5.1.0.14.2.20050808213355.03110fd8@127.0.0.1> I've committed the initial version of new code for supporting popup dialogs. Using this code: - You don't have to use separate 'mini-scripts.' - You don't have to spawn a process. - You don't have to spawn a thread. This is all done for you behind the scenes. You use it like this: require 'watir/dialog' $ie.remote_eval <<-END button(:value, 'whatever').click END dialog.button('OK').click Note that remote_eval takes a string argument. This is the same: ie.remote_eval "button(:value, 'whatever').click" The code in the string is evaluated in the context of an equivalent IE object in an independent process. See dialog_tests.rb for more examples. I am very interested in getting feedback on the names of the interface for this functionality: "remote_eval", "dialog", etc Get the development tarball: http://rubyforge.org/cgi-bin/viewcvs.cgi/watir/watir.tar.gz?tarball=1&cvsroot=wtr This code currently supports simple dialogs. Next is to add support for the authorization dialogs -- a frequently requested thing. I really would like to have unit tests for this, which means i need a quick server that does authorization. Anyone know how to roll one with webrick? _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Mon Aug 8 22:53:05 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 08 Aug 2005 21:53:05 -0500 Subject: [Wtr-general] fileField problems In-Reply-To: <2b409f12b3f64c.2b3f64c2b409f1@shaw.ca> Message-ID: <5.1.0.14.2.20050808215244.036cf470@127.0.0.1> I'm working on it. Bret At 06:19 PM 8/8/2005, Paul Rogers wrote: >we shold probably rewrite the fileField test using the winHelper/autoit >rather than the old winClicer > >Paul >Content-Type: multipart/alternative; > boundary="----=_NextPart_000_001E_01C59C3A.B936F4F0" > > >------=_NextPart_000_001E_01C59C3A.B936F4F0 >Content-Type: text/plain; > charset="us-ascii" >Content-Transfer-Encoding: 7bit > >That's how the WinClickers code works that is being called. That's one of >the many reasons it will be nice to have a better solution for dealing with >windows. > >-Jonathan > > > _____ > >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Torres, Ben (HQP) >Sent: August 8, 2005 4:48 PM >To: wtr-general at rubyforge.org >Subject: [Wtr-general] fileField problems > > >Hi, > >I just ran the filefield_test.rb in the unittests folder. When the file >executed, another command window opened and started to print out a bunch of >text while the "choose file" window was opening. The "choose file" window >remained open for about 10 seconds, and at this time the command window just >kept on printing some stuff out. I don't know if the file was finally >selected because after 10 seconds, the windows closed. Has anyone else >encountered this problem? > >Here's a snippet of the printout: >c:/ruby/lib/ruby/site_ruby/1.8 >c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt >c:/ruby/lib/ruby/site_ruby >c:/ruby/lib/ruby/1.8 >c:/ruby/lib/ruby/1.8/i386-mswin32 >. >c:/ruby/lib/ruby/site_ruby/1.8 >getWindowHandle - looking for: Choose file >Found window: Auto-Suggest Dropdown >Caption = >Found window: SysFader >Caption =SysFader >Found window: tooltips_class32 >Caption = >Found window: WorkerW >Caption = >Found window: tooltips_class32 >Caption = >Found window: DV2ControlHost >Caption =Start Menu >Found window: tooltips_class32 >Caption = >Found window: tooltips_class32 >Caption = >Found window: tooltips_class32 >Caption = >Found window: tooltips_class32 >Caption = >Found window: tooltips_class32 >Caption = >Found window: Shell_TrayWnd >Caption = >Found window: TdxBarHintWindow >Caption = >Found window: THintWindow >Caption =Add Defect >Found window: Auto-Suggest Dropdown >Caption = >Found window: SysFader >Caption =SysFader >Found window: TTraceAllForm >Caption =Trace All Changes >Found window: tooltips_class32 >Caption = >Found window: tooltips_class32 >Caption = >Found window: BaseBar >Caption = >Found window: BaseBar >Caption = >Found window: tooltips_class32 >Caption = >Found window: tooltips_class32 >Caption = >Found window: tooltips_class32 >Caption = >Found window: tooltips_class32 >Caption = >Found window: tooltips_class32 >Caption = >Found window: tooltips_class32 >Caption = >Found window: tooltips_class32 >Caption = > > >------=_NextPart_000_001E_01C59C3A.B936F4F0 >Content-Type: text/html; > charset="us-ascii" >Content-Transfer-Encoding: quoted-printable > > >"urn:schemas-microsoft-com:office:office" xmlns:w =3D=20 >"urn:schemas-microsoft-com:office:word"> >That's how the WinClickers code works that is = being called.=20 That's >one of the many reasons it will be nice to have a better solution = for=20 >dealing with windows. > >-Jonathan > >---------- >From: = wtr-general-bounces at rubyforge.org=20 >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Torres, = Ben=20 (HQP) >Sent: August 8, 2005 4:48 PM >To:=20 wtr-general at rubyforge.org >Subject: [Wtr-general] fileField=20 problems > >Hi, > >I just=20 ran the filefield_test.rb in the unittests folder. When the >file = executed, another command window opened and started to print out a >= bunch of=20 text while the "choose file" window was opening. The = >"choose file"=20 window remained open for about 10 seconds, and at this >time the = command window=20 just kept on printing some stuff out. I >don't know if the file = was=20 finally selected because after 10 seconds, >the windows closed. = Has=20 anyone else encountered this problem? > >Here's=20 a snippet of the printout: >c:/ruby/lib/ruby/site_ruby/1.8 >c:/ruby/lib/ruby/site_ruby/1.8= /i386-msvcrt >c:/ruby/lib/ruby/site_ruby >c:/ruby/lib/ruby/1.8 >c:/= ruby/lib/ruby/1.8/i386-mswin32 >. >c:/ruby/lib/ruby/site_ruby/1.8 >= getWindowHandle=20 - looking for: Choose file >Found window: Auto-Suggest = Dropdown >Caption=20 =3D >Found window: SysFader >Caption =3DSysFader >Found window:=20 tooltips_class32 >Caption =3D >Found window: WorkerW >Caption = =3D >Found=20 window: tooltips_class32 >Caption =3D >Found window:=20 DV2ControlHost >Caption =3DStart Menu >Found window:=20 tooltips_class32 >Caption =3D >Found window: = tooltips_class32 >Caption=20 =3D >Found window: tooltips_class32 >Caption =3D >Found window:=20 tooltips_class32 >Caption =3D >Found window: = tooltips_class32 >Caption=20 =3D >Found window: Shell_TrayWnd >Caption =3D >Found window:=20 TdxBarHintWindow >Caption =3D >Found window: = THintWindow >Caption =3DAdd=20 Defect >Found window: Auto-Suggest Dropdown >Caption =3D >Found = window:=20 SysFader >Caption =3DSysFader >Found window: = TTraceAllForm >Caption =3DTrace=20 All Changes >Found window: tooltips_class32 >Caption =3D >Found = window:=20 tooltips_class32 >Caption =3D >Found window: BaseBar >Caption = =3D >Found=20 window: BaseBar >Caption =3D >Found window: = tooltips_class32 >Caption=20 =3D >Found window: tooltips_class32 >Caption =3D >Found window:=20 tooltips_class32 >Caption =3D >Found window: = tooltips_class32 >Caption=20 =3D >Found window: tooltips_class32 >Caption =3D >Found window:=20 tooltips_class32 >Caption =3D >Found window: = tooltips_class32 >Caption=20 =3D > > >------=_NextPart_000_001E_01C59C3A.B936F4F0-- >_______________________________________________ >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 _____________________ Bret Pettichord www.pettichord.com From jkohl at telusplanet.net Mon Aug 8 23:13:07 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Mon, 8 Aug 2005 21:13:07 -0600 Subject: [Wtr-general] New, improved support for popup dialogs In-Reply-To: <5.1.0.14.2.20050808213355.03110fd8@127.0.0.1> Message-ID: <20050809031338.PYUA24062.priv-edtnes56.telusplanet.net@tintin> Great news! I'll give this a try. -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret > Pettichord > Sent: August 8, 2005 8:43 PM > To: wtr-general at rubyforge.org > Subject: [Wtr-general] New, improved support for popup dialogs > > I've committed the initial version of new code for supporting > popup dialogs. > > Using this code: > - You don't have to use separate 'mini-scripts.' > - You don't have to spawn a process. > - You don't have to spawn a thread. > > This is all done for you behind the scenes. > > You use it like this: > > require 'watir/dialog' > $ie.remote_eval <<-END > button(:value, 'whatever').click > END > dialog.button('OK').click > > Note that remote_eval takes a string argument. This is the same: > > ie.remote_eval "button(:value, 'whatever').click" > > The code in the string is evaluated in the context of an > equivalent IE object in an independent process. > > See dialog_tests.rb for more examples. > > I am very interested in getting feedback on the names of the > interface for this functionality: "remote_eval", "dialog", etc > > Get the development tarball: > http://rubyforge.org/cgi-bin/viewcvs.cgi/watir/watir.tar.gz?ta > rball=1&cvsroot=wtr > > This code currently supports simple dialogs. Next is to add > support for the authorization dialogs -- a frequently > requested thing. I really would like to have unit tests for > this, which means i need a quick server that does > authorization. Anyone know how to roll one with webrick? > > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From zeljko.filipin at gmail.com Tue Aug 9 02:54:35 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 9 Aug 2005 08:54:35 +0200 Subject: [Wtr-general] IE Security Dialog box (HTTPbasicAuthentification/Watir) In-Reply-To: <1641BB0AA7287848817A63C3EE9677D50740D35A@hqp-ex-mb05.na.msds.rhi.com> Message-ID: <42f852fe.468818b9.3ea9.7acc@mx.gmail.com> All unit tests are in unitTests folder inside watir_bonus folder. Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Torres, Ben (HQP) Sent: Monday, August 08, 2005 11:50 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] IE Security Dialog box (HTTPbasicAuthentification/Watir) Where can I find the unit tests for WinHelper? I can't seem to find it in the examples directory that was installed on my machine. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood Sent: Monday, August 08, 2005 1:27 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] IE Security Dialog box (HTTP basicAuthentification/Watir) Within the WATiR distribution there are a number of examples as well as an extensive unit test directory. If you look in the unit tests for WinHelper ... it will show you what you are after. Basically, you need to create a Thread that runs WinHelper and use it's logon method ( which provides it with the title of the window to watch and the username & password to use in the dialog )... Then in a separate thread actuall cause your IE object to go to the URL . It's pretty simple and as I said there is an example of this within the WATiR unit tests. The code isn't hard to follow. j. On 8/8/05, Juan Pablo Mattenet wrote: > > > Hi, > > I'm new to watir and ruby, and I'm having the following issue: > > The application under test uses HTTP basic authetification for the login. > > This causes IE to put up a dialog box requesting the user and password. > > And I don't know how to manipulate this particular window from Watir > > > a search in the maillist has returned this post: > > http://rubyforge.org/pipermail/wtr-general/2005-March/001081.html > > Is this the current way (using WinClicker)? > > Where I can download the WinClicker? > > Regards, > > JP > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > -- "So long, and thanks for all the fish" Jeff Wood _______________________________________________ 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 zeljko.filipin at gmail.com Tue Aug 9 03:52:17 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 9 Aug 2005 09:52:17 +0200 Subject: [Wtr-general] New, improved support for popup dialogs In-Reply-To: <5.1.0.14.2.20050808213355.03110fd8@127.0.0.1> Message-ID: <42f86084.7484fc46.4861.ffffe4dc@mx.gmail.com> It is just what I need. But... This is my script: require 'watir/dialog' ie = Watir::IE.attach(:title, //) ie.remote_eval "ie.link(:text, 'Delete this list').click" dialog.button('OK').click Error appears after running it: undefined local variable or method `dialog' for main:Object (NameError) When I add: include Watir to my script (as in dialog_tests.rb) it works fine. Am I doing something wrong, or should I just add 'include Watir' to my scripts? Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Tuesday, August 09, 2005 4:43 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] New, improved support for popup dialogs I've committed the initial version of new code for supporting popup dialogs. Using this code: - You don't have to use separate 'mini-scripts.' - You don't have to spawn a process. - You don't have to spawn a thread. This is all done for you behind the scenes. You use it like this: require 'watir/dialog' $ie.remote_eval <<-END button(:value, 'whatever').click END dialog.button('OK').click Note that remote_eval takes a string argument. This is the same: ie.remote_eval "button(:value, 'whatever').click" The code in the string is evaluated in the context of an equivalent IE object in an independent process. See dialog_tests.rb for more examples. I am very interested in getting feedback on the names of the interface for this functionality: "remote_eval", "dialog", etc Get the development tarball: http://rubyforge.org/cgi-bin/viewcvs.cgi/watir/watir.tar.gz?tarball=1&cvsroo t=wtr This code currently supports simple dialogs. Next is to add support for the authorization dialogs -- a frequently requested thing. I really would like to have unit tests for this, which means i need a quick server that does authorization. Anyone know how to roll one with webrick? _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Neumann at encoway.de Tue Aug 9 04:26:47 2005 From: Neumann at encoway.de (Neumann, Carsten - ENCOWAY) Date: Tue, 9 Aug 2005 10:26:47 +0200 Subject: WG: [Wtr-general] fileField problems Message-ID: <0E46E3619326224CB40CC30C2E36364E20C005@zde008.lenze.com> It's not the same, what I get, my "choose file"-window stays open after the command box closed. It waits for me, to choose a file and click "open" or whatever the button is called) , after that it continues normally, by submitting the file_field content. That doesn't work as well, I get an error from the web page. Why doesn't he choose a file by himself? Thanks! Carsten Neumann ________________________________ Von: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] Im Auftrag von Torres, Ben (HQP) Gesendet: Dienstag, 9. August 2005 00:48 An: wtr-general at rubyforge.org Betreff: [Wtr-general] fileField problems Hi, I just ran the filefield_test.rb in the unittests folder. When the file executed, another command window opened and started to print out a bunch of text while the "choose file" window was opening. The "choose file" window remained open for about 10 seconds, and at this time the command window just kept on printing some stuff out. I don't know if the file was finally selected because after 10 seconds, the windows closed. Has anyone else encountered this problem? Here's a snippet of the printout: c:/ruby/lib/ruby/site_ruby/1.8 c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt c:/ruby/lib/ruby/site_ruby c:/ruby/lib/ruby/1.8 c:/ruby/lib/ruby/1.8/i386-mswin32 . c:/ruby/lib/ruby/site_ruby/1.8 getWindowHandle - looking for: Choose file Found window: Auto-Suggest Dropdown Caption = Found window: SysFader Caption =SysFader Found window: tooltips_class32 Caption = Found window: WorkerW Caption = Found window: tooltips_class32 Caption = Found window: DV2ControlHost Caption =Start Menu Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: Shell_TrayWnd Caption = Found window: TdxBarHintWindow Caption = Found window: THintWindow Caption =Add Defect Found window: Auto-Suggest Dropdown Caption = Found window: SysFader Caption =SysFader Found window: TTraceAllForm Caption =Trace All Changes Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: BaseBar Caption = Found window: BaseBar Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050809/25b8b902/attachment.html -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ATT907678.txt Url: http://rubyforge.org/pipermail/wtr-general/attachments/20050809/25b8b902/attachment.txt From zeljko.filipin at gmail.com Tue Aug 9 04:31:26 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 9 Aug 2005 10:31:26 +0200 Subject: [Wtr-general] fileField problems In-Reply-To: <0E46E3619326224CB40CC30C2E36364E20C005@zde008.lenze.com> Message-ID: <42f869b4.22e1f67b.0796.0109@mx.gmail.com> What error do you get? If file path contains spaces (C:\Documents and Settings\file.txt) I get error (in pop up window with title 'Choose file') - C:\Documents File not found. Please verify the correct file name was given. But it works fine if file path does not contain spaces. Zeljko _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Neumann, Carsten - ENCOWAY Sent: Tuesday, August 09, 2005 10:27 AM To: wtr-general at rubyforge.org Subject: WG: [Wtr-general] fileField problems It's not the same, what I get, my "choose file"-window stays open after the command box closed. It waits for me, to choose a file and click "open" or whatever the button is called) , after that it continues normally, by submitting the file_field content. That doesn't work as well, I get an error from the web page. Why doesn't he choose a file by himself? Thanks! Carsten Neumann _____ Von: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] Im Auftrag von Torres, Ben (HQP) Gesendet: Dienstag, 9. August 2005 00:48 An: wtr-general at rubyforge.org Betreff: [Wtr-general] fileField problems Hi, I just ran the filefield_test.rb in the unittests folder. When the file executed, another command window opened and started to print out a bunch of text while the "choose file" window was opening. The "choose file" window remained open for about 10 seconds, and at this time the command window just kept on printing some stuff out. I don't know if the file was finally selected because after 10 seconds, the windows closed. Has anyone else encountered this problem? Here's a snippet of the printout: c:/ruby/lib/ruby/site_ruby/1.8 c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt c:/ruby/lib/ruby/site_ruby c:/ruby/lib/ruby/1.8 c:/ruby/lib/ruby/1.8/i386-mswin32 . c:/ruby/lib/ruby/site_ruby/1.8 getWindowHandle - looking for: Choose file Found window: Auto-Suggest Dropdown Caption = Found window: SysFader Caption =SysFader Found window: tooltips_class32 Caption = Found window: WorkerW Caption = Found window: tooltips_class32 Caption = Found window: DV2ControlHost Caption =Start Menu Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: Shell_TrayWnd Caption = Found window: TdxBarHintWindow Caption = Found window: THintWindow Caption =Add Defect Found window: Auto-Suggest Dropdown Caption = Found window: SysFader Caption =SysFader Found window: TTraceAllForm Caption =Trace All Changes Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: BaseBar Caption = Found window: BaseBar Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050809/35a0313d/attachment.html From Neumann at encoway.de Tue Aug 9 04:44:06 2005 From: Neumann at encoway.de (Neumann, Carsten - ENCOWAY) Date: Tue, 9 Aug 2005 10:44:06 +0200 Subject: AW: [Wtr-general] fileField problems Message-ID: <0E46E3619326224CB40CC30C2E36364E20C006@zde008.lenze.com> It's not a nomal Windows error, ist says: "file can't be saved (1120)" I don't think that helps, there are no spaces in the file path, or is there a problem using file names like "one_two.xls"? Carsten ________________________________ Von: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] Im Auftrag von Zeljko Filipin Gesendet: Dienstag, 9. August 2005 10:31 An: wtr-general at rubyforge.org Betreff: RE: [Wtr-general] fileField problems What error do you get? If file path contains spaces (C:\Documents and Settings\file.txt) I get error (in pop up window with title 'Choose file') - C:\Documents File not found. Please verify the correct file name was given. But it works fine if file path does not contain spaces. Zeljko ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Neumann, Carsten - ENCOWAY Sent: Tuesday, August 09, 2005 10:27 AM To: wtr-general at rubyforge.org Subject: WG: [Wtr-general] fileField problems It's not the same, what I get, my "choose file"-window stays open after the command box closed. It waits for me, to choose a file and click "open" or whatever the button is called) , after that it continues normally, by submitting the file_field content. That doesn't work as well, I get an error from the web page. Why doesn't he choose a file by himself? Thanks! Carsten Neumann ________________________________ Von: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] Im Auftrag von Torres, Ben (HQP) Gesendet: Dienstag, 9. August 2005 00:48 An: wtr-general at rubyforge.org Betreff: [Wtr-general] fileField problems Hi, I just ran the filefield_test.rb in the unittests folder. When the file executed, another command window opened and started to print out a bunch of text while the "choose file" window was opening. The "choose file" window remained open for about 10 seconds, and at this time the command window just kept on printing some stuff out. I don't know if the file was finally selected because after 10 seconds, the windows closed. Has anyone else encountered this problem? Here's a snippet of the printout: c:/ruby/lib/ruby/site_ruby/1.8 c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt c:/ruby/lib/ruby/site_ruby c:/ruby/lib/ruby/1.8 c:/ruby/lib/ruby/1.8/i386-mswin32 . c:/ruby/lib/ruby/site_ruby/1.8 getWindowHandle - looking for: Choose file Found window: Auto-Suggest Dropdown Caption = Found window: SysFader Caption =SysFader Found window: tooltips_class32 Caption = Found window: WorkerW Caption = Found window: tooltips_class32 Caption = Found window: DV2ControlHost Caption =Start Menu Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: Shell_TrayWnd Caption = Found window: TdxBarHintWindow Caption = Found window: THintWindow Caption =Add Defect Found window: Auto-Suggest Dropdown Caption = Found window: SysFader Caption =SysFader Found window: TTraceAllForm Caption =Trace All Changes Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: BaseBar Caption = Found window: BaseBar Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = Found window: tooltips_class32 Caption = -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050809/f86d721b/attachment.html From raghu at qantom.com Tue Aug 9 06:26:41 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Tue, 09 Aug 2005 15:56:41 +0530 Subject: AW: [Wtr-general] fileField problems In-Reply-To: <0E46E3619326224CB40CC30C2E36364E20C006@zde008.lenze.com> References: <0E46E3619326224CB40CC30C2E36364E20C006@zde008.lenze.com> Message-ID: <42F884E1.5010205@qantom.com> Nuemann, Zelko, I have been able to set all the file fields in the fileupload.html unittest sample without any problems.Could it be a file permissions issue that you are running into (I saw you mentioned - file can?t be saved (1120)) In fact I just dont have any issue with any kind of POPUPS I tried all variants of file names like, one_two.xls dir with spaces\test.txt I dont have any problems at all. Could it be a permission issue: Here's the sample I tried for the file_fields: ----------------------- require 'WET' include WET Browser("title:=Test page for File Fields").File("index:=1" ).set("c:\\dir with spaces\\dir 5\\one_two.xls") my_dir="c:\\dir with spaces\\" all_dirs = [ "dir1", "dir2", "dir 3", "dir 4", "dir 5"] file_name = "test.txt" count = 1 all_dirs.each do |d| f = my_dir + d + "\\" + file_name puts f Browser("title:=Test page for File Fields").File("index:=" + count.to_s()).set f count = count + 1 if count == 3 count = 4 end end -------------------- My directory listing is c:\dir with spaces c:\dir with spaces\dir1\test.txt c:\dir with spaces\dir2\test.txt c:\dir with spaces\dir 3\test.txt c:\dir with spaces\dir 4\test.txt c:\dir with spaces\dir 5\test.txt c:\dir with spaces\dir 5\one_two.xls --------------------- Raghu Neumann, Carsten - ENCOWAY wrote: > It?s not a nomal Windows error, ist says: ?file can?t be saved (1120)? > > I don?t think that helps, there are no spaces in the file path, or is > there a problem using file names like ?one_two.xls?? > > Carsten > > ------------------------------------------------------------------------ > > *Von:* wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] *Im Auftrag von *Zeljko Filipin > *Gesendet:* Dienstag, 9. August 2005 10:31 > *An:* wtr-general at rubyforge.org > *Betreff:* RE: [Wtr-general] fileField problems > > What error do you get? > > If file path contains spaces (C:\Documents and Settings\file.txt) I > get error (in pop up window with title 'Choose file') - C:\Documents > File not found. Please verify the correct file name was given. > > But it works fine if file path does not contain spaces. > > Zeljko > > ------------------------------------------------------------------------ > > *From:* wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] *On Behalf Of *Neumann, > Carsten - ENCOWAY > *Sent:* Tuesday, August 09, 2005 10:27 AM > *To:* wtr-general at rubyforge.org > *Subject:* WG: [Wtr-general] fileField problems > > It?s not the same, what I get, my ?choose file?-window stays open > after the command box closed. It waits for me, to choose a file and > click ?open? or whatever the button is called) , after that it > continues normally, by submitting the file_field content. That doesn?t > work as well, I get an error from the web page. Why doesn?t he choose > a file by himself? > > Thanks! > Carsten Neumann > > ------------------------------------------------------------------------ > > *Von:* wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] *Im Auftrag von *Torres, > Ben (HQP) > *Gesendet:* Dienstag, 9. August 2005 00:48 > *An:* wtr-general at rubyforge.org > *Betreff:* [Wtr-general] fileField problems > > Hi, > > I just ran the filefield_test.rb in the unittests folder. When the > file executed, another command window opened and started to print out > a bunch of text while the "choose file" window was opening. The > "choose file" window remained open for about 10 seconds, and at this > time the command window just kept on printing some stuff out. I don't > know if the file was finally selected because after 10 seconds, the > windows closed. Has anyone else encountered this problem? > > Here's a snippet of the printout: > > c:/ruby/lib/ruby/site_ruby/1.8 > c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt > c:/ruby/lib/ruby/site_ruby > c:/ruby/lib/ruby/1.8 > c:/ruby/lib/ruby/1.8/i386-mswin32 > . > c:/ruby/lib/ruby/site_ruby/1.8 > getWindowHandle - looking for: Choose file > Found window: Auto-Suggest Dropdown > Caption = > Found window: SysFader > Caption =SysFader > Found window: tooltips_class32 > Caption = > Found window: WorkerW > Caption = > Found window: tooltips_class32 > Caption = > Found window: DV2ControlHost > Caption =Start Menu > Found window: tooltips_class32 > Caption = > Found window: tooltips_class32 > Caption = > Found window: tooltips_class32 > Caption = > Found window: tooltips_class32 > Caption = > Found window: tooltips_class32 > Caption = > Found window: Shell_TrayWnd > Caption = > Found window: TdxBarHintWindow > Caption = > Found window: THintWindow > Caption =Add Defect > Found window: Auto-Suggest Dropdown > Caption = > Found window: SysFader > Caption =SysFader > Found window: TTraceAllForm > Caption =Trace All Changes > Found window: tooltips_class32 > Caption = > Found window: tooltips_class32 > Caption = > Found window: BaseBar > Caption = > Found window: BaseBar > Caption = > Found window: tooltips_class32 > Caption = > Found window: tooltips_class32 > Caption = > Found window: tooltips_class32 > Caption = > Found window: tooltips_class32 > Caption = > Found window: tooltips_class32 > Caption = > Found window: tooltips_class32 > Caption = > Found window: tooltips_class32 > Caption = > >------------------------------------------------------------------------ > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > -- Qantom Software http://www.qantom.com Ph : 26799269 Xtn. 125 sip : raghu at sip411.com -- From huemach at Cybersoft-VN.com Tue Aug 9 08:27:49 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Tue, 9 Aug 2005 19:27:49 +0700 Subject: [Wtr-general] Define methods within test case? Message-ID: <99DF6C0285C2CE4C99F02D78385719660181B209@hue.cybersoft-vn.com> Dear All, I define the method within test case as like this ... # call method1 method1 ... # call method2 method2 Def method1 .... End Def method2 .... End But I got the error about the method1, method2 undefined How's solve this problem? Thank you for help Regards, Hue From zeljko.filipin at gmail.com Tue Aug 9 08:34:14 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 9 Aug 2005 14:34:14 +0200 Subject: [Wtr-general] Define methods within test case? In-Reply-To: <99DF6C0285C2CE4C99F02D78385719660181B209@hue.cybersoft-vn.com> Message-ID: <42f8a2a3.307ba55e.52c3.ffffba5e@mx.gmail.com> You have to define method BEFORE you can use it: # define method first def method1 end # then you can use it method1 Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Hue Mach Dieu Sent: Tuesday, August 09, 2005 2:28 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Define methods within test case? Dear All, I define the method within test case as like this ... # call method1 method1 ... # call method2 method2 Def method1 .... End Def method2 .... End But I got the error about the method1, method2 undefined How's solve this problem? Thank you for help Regards, Hue _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From huemach at Cybersoft-VN.com Tue Aug 9 08:40:01 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Tue, 9 Aug 2005 19:40:01 +0700 Subject: [Wtr-general] Re: Object repository, Popups and other enhancements Message-ID: <99DF6C0285C2CE4C99F02D78385719660181B216@hue.cybersoft-vn.com> Hi, I add the QWT_HOME as install guide, and Write script use WET as like this require 'WET' include WET Browser.new().goto "http://localhost:8082" When I run it, I got this error D:/Applications/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:1 8:in `re quire__': No such file to load -- WET (LoadError) from D:/Applications/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require .rb:18:in `require' from D:/Project/Elpida EES Fab2/Automation/MyScript/sample/sample.rb:1 Is I wrong anything? Thank you fro help Hue From satti at qantom.com Tue Aug 9 09:11:38 2005 From: satti at qantom.com (Sathya Shankar) Date: Tue, 09 Aug 2005 18:41:38 +0530 Subject: [Wtr-general] Re: Object repository, Popups and other enhancements In-Reply-To: <99DF6C0285C2CE4C99F02D78385719660181B216@hue.cybersoft-vn.com> References: <99DF6C0285C2CE4C99F02D78385719660181B216@hue.cybersoft-vn.com> Message-ID: <42F8AB8A.5040006@qantom.com> Hi Hue, Have you also set the RUBYLIB environment variable? QWT_HOME always points to your WET installation directory. If your system does not already have RUBYLIB environment variable set, then RUBYLIB will point to the same directory as QWT_HOME. On my machine, when I do a set command, I see the following: QWT_HOME=D:\Wet\ruby RUBYLIB=D:\WET\RUBY Let me know if this works for you. Satti Hue Mach Dieu wrote: >Hi, >I add the QWT_HOME as install guide, and >Write script use WET as like this > >require 'WET' >include WET > >Browser.new().goto "http://localhost:8082" > >When I run it, I got this error > >D:/Applications/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:1 >8:in `re >quire__': No such file to load -- WET (LoadError) > from >D:/Applications/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require >.rb:18:in `require' > from D:/Project/Elpida EES >Fab2/Automation/MyScript/sample/sample.rb:1 > >Is I wrong anything? > >Thank you fro help > >Hue > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > From huemach at Cybersoft-VN.com Tue Aug 9 09:30:59 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Tue, 9 Aug 2005 20:30:59 +0700 Subject: [Wtr-general] Re: Object repository, Popups and other enhancements Message-ID: <99DF6C0285C2CE4C99F02D78385719660181B223@hue.cybersoft-vn.com> Hi Satti, Follow your hint, I got the WET ran. I use this method for show all objects Browser("title:= Client").show_all_objects() I got the result -----------Objects in page ------------- HTML Document name=leftframe id= src=mainmenu HTML Document name=rightframe id= src=blank.html So I define the script like this ... Browser("title:=Elpida EES Client").Frame("leftframe").show_all_objects() When I run it, I got the error DEBUG: OLE= -----------Objects in page ------------- D:/Applications/ruby/lib/ruby/site_ruby/1.8/watir.rb:1844:in `getDocument': unde fined method `document' for nil:NilClass (NoMethodError) from D:/Applications/ruby/lib/ruby/site_ruby/1.8/watir.rb:1667:in `show_ all_objects' from D:/Project/Elpida EES Fab2/Automation/MyScript/sample/sample.rb:5 Actually, when use only watir, I develop the script as like this, It work ie.frame("leftframe").show_all_object Does have any incorrect at here? Thank you for help Hue From huemach at Cybersoft-VN.com Tue Aug 9 09:42:10 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Tue, 9 Aug 2005 20:42:10 +0700 Subject: [Wtr-general] Re: Object repository, Popups and other enhancements Message-ID: <99DF6C0285C2CE4C99F02D78385719660181B226@hue.cybersoft-vn.com> Hi, I click on this object have exception .. Browser("title:=Client").Frame("name:=leftframe").show_all_objects() Browser("title:=Client").Frame("name:=leftframe").Image("index:=1").clic k DEBUG: OLE=# -----------Objects in page ------------- text/css id= text/css id= id= src= name= id= name= id= name= id= ..... DEBUG: OLE=# D:/Applications/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait': stack level too deep (SystemStackError) from D:/Applications/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' from D:/Applications/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' ... ... 1522 levels... from D:/Applications/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' from D:/Applications/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `waitF orIE' from D:\Applications\wet/qantom/webobjects/WebObject.rb:46:in `click' from D:/Project/Elpida EES Fab2/Automation/MyScript/sample/sample.rb:6 Thank you for help Hue From satti at qantom.com Tue Aug 9 09:54:05 2005 From: satti at qantom.com (Sathya Shankar) Date: Tue, 09 Aug 2005 19:24:05 +0530 Subject: [Wtr-general] Re: Object repository, Popups and other enhancements In-Reply-To: <99DF6C0285C2CE4C99F02D78385719660181B223@hue.cybersoft-vn.com> References: <99DF6C0285C2CE4C99F02D78385719660181B223@hue.cybersoft-vn.com> Message-ID: <42F8B57D.5000200@qantom.com> Hi Hue, Thats great that u got that working. For all the objects you have to specify ("name:=value") pair. So in that way even your frame would be like Browser("title:=Elpida EES Client").Frame("name:=leftframe").show_all_objects() We have not done extensive testing on frames but the way that the code has written you should be able to use frame with the id , index, name and any html tag. Try that out and let us know how it goez Thanks Satti Hue Mach Dieu wrote: >Hi Satti, >Follow your hint, I got the WET ran. I use this method for show all >objects > >Browser("title:= Client").show_all_objects() > >I got the result >-----------Objects in page ------------- >HTML Document name=leftframe id= src=mainmenu >HTML Document name=rightframe id= src=blank.html > > >So I define the script like this > >... >Browser("title:=Elpida EES >Client").Frame("leftframe").show_all_objects() > >When I run it, I got the error > >DEBUG: OLE= >-----------Objects in page ------------- >D:/Applications/ruby/lib/ruby/site_ruby/1.8/watir.rb:1844:in >`getDocument': unde >fined method `document' for nil:NilClass (NoMethodError) > from >D:/Applications/ruby/lib/ruby/site_ruby/1.8/watir.rb:1667:in `show_ >all_objects' > from D:/Project/Elpida EES >Fab2/Automation/MyScript/sample/sample.rb:5 > >Actually, when use only watir, I develop the script as like this, It >work > >ie.frame("leftframe").show_all_object > > >Does have any incorrect at here? > >Thank you for help > >Hue > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > From jkohl at telusplanet.net Tue Aug 9 10:00:11 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Tue, 9 Aug 2005 08:00:11 -0600 Subject: [Wtr-general] Problem with WindowLogonExample.rb In-Reply-To: Message-ID: <20050809140046.BZTN13117.priv-edtnes51.telusplanet.net@tintin> Iain; I think this is what you are talking about, and it sounds like something I've seen. This isn't much consolation for now (hopefully something better will appear for this with Bret's work on popups), but I have also had problems in the past with the Security Window when testing an app without a security certificate installed. It would work on Win2K, but not XP. To workaround it (and since end users don't see that window because a production system has proper security certificates), I installed a certificate on my test machine. Now that Bret has commited some new changes, I'd recommend trying those out to see if they work. If you've been having problems in the past, you'd be an excellent test candidate. :) -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Iain > Sent: August 5, 2005 4:02 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Problem with WindowLogonExample.rb > > Hello again, > > I've been trying and trying to get this to work but am still > having no joy. > > I've been working around this problem for the last few months > but it's really limiting what I can achieve with the tool. > > Can anyone one please help with an idiot proof guide to > getting this to work? I see this question has been added to > the faq so I assume it's is common problem. > > I'm positive that autoit is installed because around half the > unit tests in the jscript_test.rb unit test seem to work and > that test is not throwing an error. > > All that happens is that the security dialog appears and the > test hangs indefinately. > > Can anyone please explain how to do this and what each step > in the process is doing? > > Thanks > > Iain > > > > -----Original Message----- > From: Paul Rogers [mailto:paul.rogers at shaw.ca] > Sent: Tuesday, May 10, 2005 6:51 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Problem with WindowLogonExample.rb > > > > Here it is. I think I used a program called 7za to zip it, > but it obviously > didn't work quite right! > The new release will have the windowshelper that you need > > Paul > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Iain > Sent: 10 May 2005 19:15 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Problem with WindowLogonExample.rb > > > Paul, > > This zip file apears to be corrupt. Would you mind reposting? > > Also, I notice that version 1.3.1 was released today. Does > this release > include the updated WindowHelper.rb file you refered to below? > > Thanks > > Iain > > -----Original Message----- > From: Paul Rogers [mailto:paul.rogers at shaw.ca] > Sent: Saturday, May 07, 2005 5:15 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Problem with WindowLogonExample.rb > > Iain, > > Here is a zip that contains some ruby files that will clear > the security > alert for you. You'll also need to get the latest code from > cvs, especially > the WindowHelper.rb file > > In future versions of watir we hope to have this code a bit > clearer and > easier to use > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Iain > Sent: 06 May 2005 15:54 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Problem with WindowLogonExample.rb > > > > Hi Guys, > > Firstly, let me say thanks for the tool and the new release. I've been > eagerly waiting for the new functionality and can't wait to > get started with > it. I've never programmed before but in the last month, > through using your > tool, I've learnt the basics of Ruby and am amazed by the > results I've been > getting. > > Up until now there's only been a few things I've wanted to do > with Watir but > haven't yet been able to. > > 1. Enter the network login information when accessing my test site. > > 2. Accepting Security Certificate warnings in Security Alert popups. > > > I understand that both these issues have been addressed by > the new build. > I'm trying to figure out how to do this so have gone to the > Watir API and > the sample unit tests to try and find some similar code but > I'm having some > problems getting them to work. > > 1.) Unfortunately the WindowLogonExample.rb unit test isn't > working for me. > The clio.lyris.com login prompt appears but nothing else > happens. Is anyone > else having this problem? > > > 2.) I couldn't find any working examples for Security Alerts > but in the API > I can see the clearSecurityAlertBox method in the WinClicker class. > I've tried to following > > $ie = IE.new > $ie.goto($Z_Login) > > w = WinClicker.new > w.clearSecurityAlertBox() > > The security alert appears immediately after I navigate to > Login URL of my > test site but like before nothing happens. If I abort the > test I get the > following output: > > getWindowHandle - looking for: Security Alert Found window: > CiceroUIWndFrame Caption =TF_FloatingLangBar_WndTitle Found window: > CiceroUIWndFrame Caption =CiceroUIWndFrame Found window: > tooltips_class32 Caption = Found window: WorkerW Caption = > Found window: > tooltips_class32 Caption = Found window: tooltips_class32 > Caption = Found > window: Shell_TrayWnd Caption = Found > window: Auto-Suggest Dropdown Caption = > Found window: > Caption = > Found window: tooltips_class32 > Caption = > Found window: UltraMon Taskbar > Caption = > Found window: tooltips_class32 > Caption = > Found window: OfficeTooltip > Caption =Align Left > Found window: tooltips_class32 > Caption = > Found window: Auto-Suggest Dropdown > Caption = > Found window: Auto-Suggest Dropdown > Caption = > Found window: tooltips_class32 > Caption = > Found window: Auto-Suggest Dropdown > Caption = > Found window: SysFader > Caption =SysFader > Found window: MozillaDropShadowWindowClass Caption = Found window: > MozillaDropShadowWindowClass Caption = Found window: > MozillaDropShadowWindowClass Caption = Found window: > MozillaDropShadowWindowClass Caption = Found window: > MozillaDropShadowWindowClass Caption = Found window: > MozillaDropShadowWindowClass Caption = Found window: > MozillaDropShadowWindowClass Caption = Found window: > Trillian: List Tooltip > Entry Caption =Trillian: List Tooltip Entry Found window: > BaseBar Caption = Found window: tooltips_class32 Caption = > Found window: > BaseBar Caption = > >Exit code: -1073741510 > >ruby login.rb > >Exit code: -1073741510 > > > Can anyone help? > > Many thanks > > Iain > > _______________________________________________ > 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 zeljko.filipin at gmail.com Tue Aug 9 10:03:03 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 9 Aug 2005 16:03:03 +0200 Subject: [Wtr-general] New, improved support for popup dialogs Message-ID: <42f8b771.01ed3121.3ded.0b31@mx.gmail.com> I looked at dialog.rb and changed dialog.button('OK').click to Watir::Dialog.new.button('OK').click and now it works even without include Watir Zeljko -----Original Message----- From: Zeljko Filipin [mailto:zeljko.filipin at gmail.com] Sent: Tuesday, August 09, 2005 9:52 AM To: 'wtr-general at rubyforge.org' Subject: RE: [Wtr-general] New, improved support for popup dialogs It is just what I need. But... This is my script: require 'watir/dialog' ie = Watir::IE.attach(:title, //) ie.remote_eval "ie.link(:text, 'Delete this list').click" dialog.button('OK').click Error appears after running it: undefined local variable or method `dialog' for main:Object (NameError) When I add: include Watir to my script (as in dialog_tests.rb) it works fine. Am I doing something wrong, or should I just add 'include Watir' to my scripts? Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Tuesday, August 09, 2005 4:43 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] New, improved support for popup dialogs I've committed the initial version of new code for supporting popup dialogs. Using this code: - You don't have to use separate 'mini-scripts.' - You don't have to spawn a process. - You don't have to spawn a thread. This is all done for you behind the scenes. You use it like this: require 'watir/dialog' $ie.remote_eval <<-END button(:value, 'whatever').click END dialog.button('OK').click Note that remote_eval takes a string argument. This is the same: ie.remote_eval "button(:value, 'whatever').click" The code in the string is evaluated in the context of an equivalent IE object in an independent process. See dialog_tests.rb for more examples. I am very interested in getting feedback on the names of the interface for this functionality: "remote_eval", "dialog", etc Get the development tarball: http://rubyforge.org/cgi-bin/viewcvs.cgi/watir/watir.tar.gz?tarball=1&cvsroo t=wtr This code currently supports simple dialogs. Next is to add support for the authorization dialogs -- a frequently requested thing. I really would like to have unit tests for this, which means i need a quick server that does authorization. Anyone know how to roll one with webrick? _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Neumann at encoway.de Tue Aug 9 10:31:53 2005 From: Neumann at encoway.de (Neumann, Carsten - ENCOWAY) Date: Tue, 9 Aug 2005 16:31:53 +0200 Subject: AW: AW: [Wtr-general] fileField problems Message-ID: <0E46E3619326224CB40CC30C2E36364E20C00B@zde008.lenze.com> The problem with the file upload is solved, it was my mistake. But still I have to select the file by myself in the "Choose file" window. After I clicked "open" it continues. The same problem occurs when running filefield_test.rb from the unittests folder, I still have to select the file (or even select the right folder before) by myself, before he continues uploading the file. If it is because of permissions, what permissions do I need to use this? Carsten Neumann -----Urspr?ngliche Nachricht----- Von: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] Im Auftrag von Raghu Venkataramana Gesendet: Dienstag, 9. August 2005 12:27 An: wtr-general at rubyforge.org Betreff: Re: AW: [Wtr-general] fileField problems Nuemann, Zelko, I have been able to set all the file fields in the fileupload.html unittest sample without any problems.Could it be a file permissions issue that you are running into (I saw you mentioned - file can't be saved (1120)) In fact I just dont have any issue with any kind of POPUPS I tried all variants of file names like, one_two.xls dir with spaces\test.txt I dont have any problems at all. Could it be a permission issue: Here's the sample I tried for the file_fields: ----------------------- require 'WET' include WET Browser("title:=Test page for File Fields").File("index:=1" ).set("c:\\dir with spaces\\dir 5\\one_two.xls") my_dir="c:\\dir with spaces\\" all_dirs = [ "dir1", "dir2", "dir 3", "dir 4", "dir 5"] file_name = "test.txt" count = 1 all_dirs.each do |d| f = my_dir + d + "\\" + file_name puts f Browser("title:=Test page for File Fields").File("index:=" + count.to_s()).set f count = count + 1 if count == 3 count = 4 end end -------------------- My directory listing is c:\dir with spaces c:\dir with spaces\dir1\test.txt c:\dir with spaces\dir2\test.txt c:\dir with spaces\dir 3\test.txt c:\dir with spaces\dir 4\test.txt c:\dir with spaces\dir 5\test.txt c:\dir with spaces\dir 5\one_two.xls --------------------- Raghu Neumann, Carsten - ENCOWAY wrote: > It's not a nomal Windows error, ist says: "file can't be saved (1120)" > > I don't think that helps, there are no spaces in the file path, or is > there a problem using file names like "one_two.xls"? > > Carsten > > ------------------------------------------------------------------------ > > *Von:* wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] *Im Auftrag von *Zeljko Filipin > *Gesendet:* Dienstag, 9. August 2005 10:31 > *An:* wtr-general at rubyforge.org > *Betreff:* RE: [Wtr-general] fileField problems > > What error do you get? > > If file path contains spaces (C:\Documents and Settings\file.txt) I > get error (in pop up window with title 'Choose file') - C:\Documents > File not found. Please verify the correct file name was given. > > But it works fine if file path does not contain spaces. > > Zeljko > > ------------------------------------------------------------------------ > > *From:* wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] *On Behalf Of *Neumann, > Carsten - ENCOWAY > *Sent:* Tuesday, August 09, 2005 10:27 AM > *To:* wtr-general at rubyforge.org > *Subject:* WG: [Wtr-general] fileField problems > > It's not the same, what I get, my "choose file"-window stays open > after the command box closed. It waits for me, to choose a file and > click "open" or whatever the button is called) , after that it > continues normally, by submitting the file_field content. That doesn't > work as well, I get an error from the web page. Why doesn't he choose > a file by himself? > > Thanks! > Carsten Neumann > > ------------------------------------------------------------------------ > > *Von:* wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] *Im Auftrag von *Torres, > Ben (HQP) > *Gesendet:* Dienstag, 9. August 2005 00:48 > *An:* wtr-general at rubyforge.org > *Betreff:* [Wtr-general] fileField problems > > Hi, > > I just ran the filefield_test.rb in the unittests folder. When the > file executed, another command window opened and started to print out > a bunch of text while the "choose file" window was opening. The > "choose file" window remained open for about 10 seconds, and at this > time the command window just kept on printing some stuff out. I don't > know if the file was finally selected because after 10 seconds, the > windows closed. Has anyone else encountered this problem? > > Here's a snippet of the printout: > > c:/ruby/lib/ruby/site_ruby/1.8 > c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt > c:/ruby/lib/ruby/site_ruby > c:/ruby/lib/ruby/1.8 > c:/ruby/lib/ruby/1.8/i386-mswin32 > . > c:/ruby/lib/ruby/site_ruby/1.8 > getWindowHandle - looking for: Choose file > Found window: Auto-Suggest Dropdown > Caption = > Found window: SysFader > Caption =SysFader > Found window: tooltips_class32 > Caption = > Found window: WorkerW > Caption = > Found window: tooltips_class32 > Caption = > Found window: DV2ControlHost > Caption =Start Menu > Found window: tooltips_class32 > Caption = > Found window: tooltips_class32 > Caption = > Found window: tooltips_class32 > Caption = > Found window: tooltips_class32 > Caption = > Found window: tooltips_class32 > Caption = > Found window: Shell_TrayWnd > Caption = > Found window: TdxBarHintWindow > Caption = > Found window: THintWindow > Caption =Add Defect > Found window: Auto-Suggest Dropdown > Caption = > Found window: SysFader > Caption =SysFader > Found window: TTraceAllForm > Caption =Trace All Changes > Found window: tooltips_class32 > Caption = > Found window: tooltips_class32 > Caption = > Found window: BaseBar > Caption = > Found window: BaseBar > Caption = > Found window: tooltips_class32 > Caption = > Found window: tooltips_class32 > Caption = > Found window: tooltips_class32 > Caption = > Found window: tooltips_class32 > Caption = > Found window: tooltips_class32 > Caption = > Found window: tooltips_class32 > Caption = > Found window: tooltips_class32 > Caption = > >------------------------------------------------------------------------ > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > -- Qantom Software http://www.qantom.com Ph : 26799269 Xtn. 125 sip : raghu at sip411.com -- _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From joshm at intruguarddevices.com Tue Aug 9 12:12:34 2005 From: joshm at intruguarddevices.com (Josh Miller) Date: Tue, 9 Aug 2005 09:12:34 -0700 Subject: [Wtr-general] Very slow speeds Message-ID: I am having a problem with slow speeds using watir (both 1.3 and 1.4). I have a page with about 2000 text fields 1000 of those have ID tags the other do not. Navigating to this page is very fast however when the script is entering data into the fields via ID tags it is very slow, about one text field per 15 seconds. Is this just too much for watir to handle quickly or should I be seeing faster speeds? Thanks, Josh From bret at pettichord.com Tue Aug 9 12:11:29 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 09 Aug 2005 11:11:29 -0500 Subject: [Wtr-general] New, improved support for popup dialogs In-Reply-To: <42f8b771.01ed3121.3ded.0b31@mx.gmail.com> Message-ID: <5.1.0.14.2.20050809111040.036c9160@127.0.0.1> This also works: Watir::dialog.button('OK').click At 09:03 AM 8/9/2005, Zeljko Filipin wrote: >I looked at dialog.rb and changed > > dialog.button('OK').click > >to > > Watir::Dialog.new.button('OK').click > >and now it works even without > > include Watir > >Zeljko > >-----Original Message----- >From: Zeljko Filipin [mailto:zeljko.filipin at gmail.com] >Sent: Tuesday, August 09, 2005 9:52 AM >To: 'wtr-general at rubyforge.org' >Subject: RE: [Wtr-general] New, improved support for popup dialogs > >It is just what I need. >But... > >This is my script: > >require 'watir/dialog' >ie = Watir::IE.attach(:title, //) >ie.remote_eval "ie.link(:text, 'Delete this list').click" >dialog.button('OK').click > >Error appears after running it: undefined local variable or method `dialog' >for main:Object (NameError) > >When I add: > >include Watir > >to my script (as in dialog_tests.rb) it works fine. >Am I doing something wrong, or should I just add 'include Watir' to my >scripts? > >Zeljko > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord >Sent: Tuesday, August 09, 2005 4:43 AM >To: wtr-general at rubyforge.org >Subject: [Wtr-general] New, improved support for popup dialogs > >I've committed the initial version of new code for supporting popup dialogs. > >Using this code: >- You don't have to use separate 'mini-scripts.' >- You don't have to spawn a process. >- You don't have to spawn a thread. > >This is all done for you behind the scenes. > >You use it like this: > > require 'watir/dialog' > $ie.remote_eval <<-END > button(:value, 'whatever').click > END > dialog.button('OK').click > >Note that remote_eval takes a string argument. This is the same: > > ie.remote_eval "button(:value, 'whatever').click" > >The code in the string is evaluated in the context of an equivalent IE >object in an independent process. > >See dialog_tests.rb for more examples. > >I am very interested in getting feedback on the names of the interface for >this functionality: "remote_eval", "dialog", etc > >Get the development tarball: >http://rubyforge.org/cgi-bin/viewcvs.cgi/watir/watir.tar.gz?tarball=1&cvsroo >t=wtr > >This code currently supports simple dialogs. Next is to add support for the >authorization dialogs -- a frequently requested thing. I really would like >to have unit tests for this, which means i need a quick server that does >authorization. Anyone know how to roll one with webrick? > > >_____________________ > Bret Pettichord > www.pettichord.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 _____________________ Bret Pettichord www.pettichord.com From paul.rogers at shaw.ca Tue Aug 9 12:14:51 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 09 Aug 2005 10:14:51 -0600 Subject: [Wtr-general] Very slow speeds Message-ID: <2bffe612c003f1.2c003f12bffe61@shaw.ca> I suspect its too big for watir. We need to go through each field to examine its id. There is potentially something we can do, but Id have to look to see how we would manage it. In some instances, we are able to use the getElementById method of IE, but this only works on top level items - ie It wouldnt work for ie.table().text_field(:id..) Paul ----- Original Message ----- From: Josh Miller Date: Tuesday, August 9, 2005 10:12 am Subject: [Wtr-general] Very slow speeds > I am having a problem with slow speeds using watir (both 1.3 and > 1.4). I have a page with about 2000 text fields 1000 of those have > ID tags the other do not. Navigating to this page is very fast > however when the script is entering data into the fields via ID > tags it is very slow, about one text field per 15 seconds. Is > this just too much for watir to handle quickly or should I be > seeing faster speeds? > > Thanks, > Josh > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From zeljko.filipin at gmail.com Tue Aug 9 12:23:25 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 9 Aug 2005 18:23:25 +0200 Subject: [Wtr-general] New, improved support for popup dialogs In-Reply-To: <5.1.0.14.2.20050809111040.036c9160@127.0.0.1> Message-ID: <42f8d856.2c5caac2.0796.ffff8099@mx.gmail.com> If I use Watir::dialog.button('OK').click I get error undefined method `dialog' for Watir:Module (NoMethodError) Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Tuesday, August 09, 2005 6:11 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] New, improved support for popup dialogs This also works: Watir::dialog.button('OK').click At 09:03 AM 8/9/2005, Zeljko Filipin wrote: >I looked at dialog.rb and changed > > dialog.button('OK').click > >to > > Watir::Dialog.new.button('OK').click > >and now it works even without > > include Watir > >Zeljko > >-----Original Message----- >From: Zeljko Filipin [mailto:zeljko.filipin at gmail.com] >Sent: Tuesday, August 09, 2005 9:52 AM >To: 'wtr-general at rubyforge.org' >Subject: RE: [Wtr-general] New, improved support for popup dialogs > >It is just what I need. >But... > >This is my script: > >require 'watir/dialog' >ie = Watir::IE.attach(:title, //) >ie.remote_eval "ie.link(:text, 'Delete this list').click" >dialog.button('OK').click > >Error appears after running it: undefined local variable or method `dialog' >for main:Object (NameError) > >When I add: > >include Watir > >to my script (as in dialog_tests.rb) it works fine. >Am I doing something wrong, or should I just add 'include Watir' to my >scripts? > >Zeljko > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord >Sent: Tuesday, August 09, 2005 4:43 AM >To: wtr-general at rubyforge.org >Subject: [Wtr-general] New, improved support for popup dialogs > >I've committed the initial version of new code for supporting popup dialogs. > >Using this code: >- You don't have to use separate 'mini-scripts.' >- You don't have to spawn a process. >- You don't have to spawn a thread. > >This is all done for you behind the scenes. > >You use it like this: > > require 'watir/dialog' > $ie.remote_eval <<-END > button(:value, 'whatever').click > END > dialog.button('OK').click > >Note that remote_eval takes a string argument. This is the same: > > ie.remote_eval "button(:value, 'whatever').click" > >The code in the string is evaluated in the context of an equivalent IE >object in an independent process. > >See dialog_tests.rb for more examples. > >I am very interested in getting feedback on the names of the interface for >this functionality: "remote_eval", "dialog", etc > >Get the development tarball: >http://rubyforge.org/cgi-bin/viewcvs.cgi/watir/watir.tar.gz?tarball=1&cvsro o >t=wtr > >This code currently supports simple dialogs. Next is to add support for the >authorization dialogs -- a frequently requested thing. I really would like >to have unit tests for this, which means i need a quick server that does >authorization. Anyone know how to roll one with webrick? > > >_____________________ > Bret Pettichord > www.pettichord.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 _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From iain.rose at responsetek.com Tue Aug 9 12:26:50 2005 From: iain.rose at responsetek.com (Iain) Date: Tue, 9 Aug 2005 09:26:50 -0700 Subject: [Wtr-general] New, improved support for popup dialogs In-Reply-To: <5.1.0.14.2.20050808213355.03110fd8@127.0.0.1> Message-ID: I'm getting an error whenever I add require 'watir/dialog' to any script c:/ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in `require__': No such file to load -- watir/dialog (LoadError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in `require' from V2_Setup.rb:8 I'm guesing that it's due to the way I installed it. I've never installed Watir from the development tarball before, I always use the installer. Can you please let me know where I should be extracting the files to? Thanks Iain -----Original Message----- From: Bret Pettichord [mailto:bret at pettichord.com] Sent: Monday, August 08, 2005 7:43 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] New, improved support for popup dialogs I've committed the initial version of new code for supporting popup dialogs. Using this code: - You don't have to use separate 'mini-scripts.' - You don't have to spawn a process. - You don't have to spawn a thread. This is all done for you behind the scenes. You use it like this: require 'watir/dialog' $ie.remote_eval <<-END button(:value, 'whatever').click END dialog.button('OK').click Note that remote_eval takes a string argument. This is the same: ie.remote_eval "button(:value, 'whatever').click" The code in the string is evaluated in the context of an equivalent IE object in an independent process. See dialog_tests.rb for more examples. I am very interested in getting feedback on the names of the interface for this functionality: "remote_eval", "dialog", etc Get the development tarball: http://rubyforge.org/cgi-bin/viewcvs.cgi/watir/watir.tar.gz?tarball=1&cvsroo t=wtr This code currently supports simple dialogs. Next is to add support for the authorization dialogs -- a frequently requested thing. I really would like to have unit tests for this, which means i need a quick server that does authorization. Anyone know how to roll one with webrick? _____________________ Bret Pettichord www.pettichord.com From Kim.Alexander at ElPaso.com Tue Aug 9 12:28:56 2005 From: Kim.Alexander at ElPaso.com (Alexander, Kim (Kim)) Date: Tue, 9 Aug 2005 11:28:56 -0500 Subject: [Wtr-general] WET -- Stack overvlow, Helo Message-ID: <51A0D9881DD5F1498CA1AAC9D30AFD2C1DBAE3@corhouexs08m.corp.epec.com> Hello, I've just started working with WET and am impressed. It is a great accomplishment and contribution to the WATIR testing community. The HTML based results and DataTables are high on my list of 'features' I'll use immediatley the XML object repository is next, but takes a bit more to setup to play with. Though I am reluctant to say so I'm having a problem with the resplendid toolkit. Seems when I run my test.qwt file everything worksz...particulary like the html results file. Cool! However, I have one problem and a question. I'm getting stack overflow errors after clicking a button and its waiting for the page to refresh. The refresh takes about 3 seconds. The overflow message appears to be caused by wait. Helow I've included: 1.) Text from the html log; 2.) Stack overflow message from the console 3.) Test.QWT script 1.) Text from the html log; =========================== Creating new browser window Navigating to http://localhost/WebUI/Portal/ Clicking WebLink(text:=Vendor: Maintenance) Setting WebEdit(name:=txtMasterId) to 350 Clicking WebButton(value:=Retrieve) stack level too deep => Error 2.) Stack overflow message from the console =========================================== stack level too deep e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' this keeps repeating this until the page refreshes...and then prints... e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `waitForIE' E:\TAG\ep000120\_INSTALL\WATIR\WET/qantom/webobjects/WebObject.rb:46:in `click' E:\TAG\ep000120\TESTS\FRAMES\WET\scripts\test.qws:13E:/TAG/ep000120/_INS TALL/WATIR/WET/qantom/WetRunner.rb:48:in `load' E:/TAG/ep000120/_INSTALL/WATIR/WET/qantom/WetRunner.rb:48E:/TAG/ep000120 /_INSTALL/WATIR/WET/qantom/WetRunner.rb:39:in `each' E:/TAG/ep000120/_INSTALL/WATIR/WET/qantom/WetRunner.rb:39 3.) Test.QWT script =================== Browser.new().goto("http://localhost/WebUI/Portal/") Browser("title:=//").Link("text:=/Vendor: Maint.+/").click Browser("title:=//").Frame("index:=3").TextField("name:=/txtMasterI.+/") set("350") Browser("title:=//").Frame("index:=3").Button("value:=Retrieve").click Sorry, I'm not very versed in Ruby so I couldn't diagnose what's going on here...but could use some help Again, Thanks for your generosity to the community with this exceptional tool. Kim ****************************************************************** This email and any files transmitted with it from the ElPaso Corporation are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. ****************************************************************** From bret at pettichord.com Tue Aug 9 12:32:33 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 09 Aug 2005 11:32:33 -0500 Subject: [Wtr-general] New, improved support for popup dialogs In-Reply-To: References: <5.1.0.14.2.20050808213355.03110fd8@127.0.0.1> Message-ID: <5.1.0.14.2.20050809113217.03700670@127.0.0.1> You need to run the install.rb script. At 11:26 AM 8/9/2005, Iain wrote: >I'm getting an error whenever I add require 'watir/dialog' to any script > >c:/ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in >`require__': No such file to load -- watir/dialog (LoadError) > from >c:/ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in `require' > from V2_Setup.rb:8 > >I'm guesing that it's due to the way I installed it. I've never installed >Watir from the development tarball before, I always use the installer. > >Can you please let me know where I should be extracting the files to? > >Thanks > >Iain > > > > >-----Original Message----- >From: Bret Pettichord [mailto:bret at pettichord.com] >Sent: Monday, August 08, 2005 7:43 PM >To: wtr-general at rubyforge.org >Subject: [Wtr-general] New, improved support for popup dialogs > >I've committed the initial version of new code for supporting popup dialogs. > >Using this code: >- You don't have to use separate 'mini-scripts.' >- You don't have to spawn a process. >- You don't have to spawn a thread. > >This is all done for you behind the scenes. > >You use it like this: > > require 'watir/dialog' > $ie.remote_eval <<-END > button(:value, 'whatever').click > END > dialog.button('OK').click > >Note that remote_eval takes a string argument. This is the same: > > ie.remote_eval "button(:value, 'whatever').click" > >The code in the string is evaluated in the context of an equivalent IE >object in an independent process. > >See dialog_tests.rb for more examples. > >I am very interested in getting feedback on the names of the interface for >this functionality: "remote_eval", "dialog", etc > >Get the development tarball: >http://rubyforge.org/cgi-bin/viewcvs.cgi/watir/watir.tar.gz?tarball=1&cvsroo >t=wtr > >This code currently supports simple dialogs. Next is to add support for the >authorization dialogs -- a frequently requested thing. I really would like >to have unit tests for this, which means i need a quick server that does >authorization. Anyone know how to roll one with webrick? > > >_____________________ > Bret Pettichord > www.pettichord.com > > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From shaorobics at gmail.com Tue Aug 9 12:39:26 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Tue, 9 Aug 2005 12:39:26 -0400 Subject: [Wtr-general] Define methods within test case? In-Reply-To: <42f8a2a3.307ba55e.52c3.ffffba5e@mx.gmail.com> References: <99DF6C0285C2CE4C99F02D78385719660181B209@hue.cybersoft-vn.com> <42f8a2a3.307ba55e.52c3.ffffba5e@mx.gmail.com> Message-ID: <593b9ae8050809093979f298e3@mail.gmail.com> I have my test cases set up the same way and it doesn't matter if you define the method before or after. I"ve seen that error before and it's as simple as changing: method1 to method1() Shao From satti at qantom.com Tue Aug 9 12:46:24 2005 From: satti at qantom.com (Sathya Shankar) Date: Tue, 09 Aug 2005 22:16:24 +0530 Subject: [Wtr-general] WET -- Stack overvlow, Helo In-Reply-To: <51A0D9881DD5F1498CA1AAC9D30AFD2C1DBAE3@corhouexs08m.corp.epec.com> References: <51A0D9881DD5F1498CA1AAC9D30AFD2C1DBAE3@corhouexs08m.corp.epec.com> Message-ID: <42F8DDE0.8020009@qantom.com> Hi Kim, Thanks for Your good words. Actually Hue found the same problem and we just fixed it. We posted the Latest Zip files in WET's download area. Download the new files and then install it. That should work fine. And keep them comming. Thanks Satti Alexander, Kim (Kim) wrote: >Hello, > >I've just started working with WET and am impressed. It is a great >accomplishment and contribution to the WATIR testing community. > >The HTML based results and DataTables are high on my list of 'features' >I'll use immediatley the XML object repository is next, but takes a bit >more to setup to play with. > >Though I am reluctant to say so I'm having a problem with the resplendid >toolkit. Seems when I run my test.qwt file everything >worksz...particulary like the html results file. Cool! However, I have >one problem and a question. I'm getting stack overflow errors after >clicking a button and its waiting for the page to refresh. The refresh >takes about 3 seconds. The overflow message appears to be caused by >wait. > >Helow I've included: > >1.) Text from the html log; >2.) Stack overflow message from the console >3.) Test.QWT script > > >1.) Text from the html log; >=========================== >Creating new browser window >Navigating to http://localhost/WebUI/Portal/ >Clicking WebLink(text:=Vendor: Maintenance) >Setting WebEdit(name:=txtMasterId) to 350 >Clicking WebButton(value:=Retrieve) >stack level too deep => Error > > > >2.) Stack overflow message from the console >=========================================== >stack level too deep >e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' >e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' >e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' >e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' >e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' >e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' >e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' >e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' >e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' >e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' >e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' >e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' >e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' >e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' >e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' > > >this keeps repeating this until the page refreshes...and then prints... > > > >e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in >`waitForIE' >E:\TAG\ep000120\_INSTALL\WATIR\WET/qantom/webobjects/WebObject.rb:46:in >`click' >E:\TAG\ep000120\TESTS\FRAMES\WET\scripts\test.qws:13E:/TAG/ep000120/_INS >TALL/WATIR/WET/qantom/WetRunner.rb:48:in `load' >E:/TAG/ep000120/_INSTALL/WATIR/WET/qantom/WetRunner.rb:48E:/TAG/ep000120 >/_INSTALL/WATIR/WET/qantom/WetRunner.rb:39:in `each' >E:/TAG/ep000120/_INSTALL/WATIR/WET/qantom/WetRunner.rb:39 > > >3.) Test.QWT script >=================== >Browser.new().goto("http://localhost/WebUI/Portal/") >Browser("title:=//").Link("text:=/Vendor: Maint.+/").click >Browser("title:=//").Frame("index:=3").TextField("name:=/txtMasterI.+/") >set("350") >Browser("title:=//").Frame("index:=3").Button("value:=Retrieve").click > > > >Sorry, I'm not very versed in Ruby so I couldn't diagnose what's going >on here...but could use some help > >Again, Thanks for your generosity to the community with this exceptional >tool. > >Kim >****************************************************************** >This email and any files transmitted with it from the ElPaso >Corporation are confidential and intended solely for the >use of the individual or entity to whom they are addressed. >If you have received this email in error please notify the >sender. >****************************************************************** >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > From iain.rose at responsetek.com Tue Aug 9 13:14:11 2005 From: iain.rose at responsetek.com (Iain) Date: Tue, 9 Aug 2005 10:14:11 -0700 Subject: [Wtr-general] New, improved support for popup dialogs In-Reply-To: <5.1.0.14.2.20050809113217.03700670@127.0.0.1> Message-ID: Thanks, hindsight is a wonderful thing ... I can get dialog_tests.rb to run without issues now although the installer gave an error message. Is this anything to be concerned about? Going to install to C:\Program Files\WATIR with startMenu=1 and desktop=0 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:\Program Files\WATIR cp -r unitTests C:\Program Files\WATIR cp -r doc C:\Program Files\WATIR cp -r rdoc C:\Program Files\WATIR c:/ruby/lib/ruby/1.8/FileUtils.rb:525:in `stat': No such file or directory - rdoc (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 install.rb:120:in `install' from install.rb:202 from install.rb:201:in `call' from c:/ruby/lib/ruby/gems/1.8/gems/fxruby-1.2.2-mswin32/lib/fox12/responder2.rb: 57:in `onHandleMsg' from install.rb:211:in `run' from install.rb:211 -----Original Message----- From: Bret Pettichord [mailto:bret at pettichord.com] Sent: Tuesday, August 09, 2005 9:33 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] New, improved support for popup dialogs You need to run the install.rb script. At 11:26 AM 8/9/2005, Iain wrote: >I'm getting an error whenever I add require 'watir/dialog' to any >script > >c:/ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in >`require__': No such file to load -- watir/dialog (LoadError) > from >c:/ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in `require' > from V2_Setup.rb:8 > >I'm guesing that it's due to the way I installed it. I've never >installed Watir from the development tarball before, I always use the installer. > >Can you please let me know where I should be extracting the files to? > >Thanks > >Iain > > > > >-----Original Message----- >From: Bret Pettichord [mailto:bret at pettichord.com] >Sent: Monday, August 08, 2005 7:43 PM >To: wtr-general at rubyforge.org >Subject: [Wtr-general] New, improved support for popup dialogs > >I've committed the initial version of new code for supporting popup dialogs. > >Using this code: >- You don't have to use separate 'mini-scripts.' >- You don't have to spawn a process. >- You don't have to spawn a thread. > >This is all done for you behind the scenes. > >You use it like this: > > require 'watir/dialog' > $ie.remote_eval <<-END > button(:value, 'whatever').click > END > dialog.button('OK').click > >Note that remote_eval takes a string argument. This is the same: > > ie.remote_eval "button(:value, 'whatever').click" > >The code in the string is evaluated in the context of an equivalent IE >object in an independent process. > >See dialog_tests.rb for more examples. > >I am very interested in getting feedback on the names of the interface >for this functionality: "remote_eval", "dialog", etc > >Get the development tarball: >http://rubyforge.org/cgi-bin/viewcvs.cgi/watir/watir.tar.gz?tarball=1&c >vsroo >t=wtr > >This code currently supports simple dialogs. Next is to add support for >the authorization dialogs -- a frequently requested thing. I really >would like to have unit tests for this, which means i need a quick >server that does authorization. Anyone know how to roll one with webrick? > > >_____________________ > Bret Pettichord > www.pettichord.com > > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From Kim.Alexander at ElPaso.com Tue Aug 9 13:14:13 2005 From: Kim.Alexander at ElPaso.com (Alexander, Kim (Kim)) Date: Tue, 9 Aug 2005 12:14:13 -0500 Subject: [Wtr-general] WET -- Stack overvlow, Helo Message-ID: <51A0D9881DD5F1498CA1AAC9D30AFD2C1DBB03@corhouexs08m.corp.epec.com> Satti, Just Ran. Whoa!...Awesome. Great work Hue. Thanks. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Sathya Shankar Sent: Tuesday, August 09, 2005 11:46 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] WET -- Stack overvlow, Helo Hi Kim, Thanks for Your good words. Actually Hue found the same problem and we just fixed it. We posted the Latest Zip files in WET's download area. Download the new files and then install it. That should work fine. And keep them comming. Thanks Satti Alexander, Kim (Kim) wrote: >Hello, > >I've just started working with WET and am impressed. It is a great >accomplishment and contribution to the WATIR testing community. > >The HTML based results and DataTables are high on my list of 'features' >I'll use immediatley the XML object repository is next, but takes a bit >more to setup to play with. > >Though I am reluctant to say so I'm having a problem with the resplendid >toolkit. Seems when I run my test.qwt file everything >worksz...particulary like the html results file. Cool! However, I have >one problem and a question. I'm getting stack overflow errors after >clicking a button and its waiting for the page to refresh. The refresh >takes about 3 seconds. The overflow message appears to be caused by >wait. > >Helow I've included: > >1.) Text from the html log; >2.) Stack overflow message from the console >3.) Test.QWT script > > >1.) Text from the html log; >=========================== >Creating new browser window >Navigating to http://localhost/WebUI/Portal/ >Clicking WebLink(text:=Vendor: Maintenance) >Setting WebEdit(name:=txtMasterId) to 350 >Clicking WebButton(value:=Retrieve) >stack level too deep => Error > > > >2.) Stack overflow message from the console >=========================================== >stack level too deep >e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' >e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' >e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' >e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' >e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' >e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' >e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' >e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' >e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' >e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' >e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' >e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' >e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' >e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' >e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' > > >this keeps repeating this until the page refreshes...and then prints... > > > >e:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in >`waitForIE' >E:\TAG\ep000120\_INSTALL\WATIR\WET/qantom/webobjects/WebObject.rb:46:in >`click' >E:\TAG\ep000120\TESTS\FRAMES\WET\scripts\test.qws:13E:/TAG/ep000120/_IN S >TALL/WATIR/WET/qantom/WetRunner.rb:48:in `load' >E:/TAG/ep000120/_INSTALL/WATIR/WET/qantom/WetRunner.rb:48E:/TAG/ep00012 0 >/_INSTALL/WATIR/WET/qantom/WetRunner.rb:39:in `each' >E:/TAG/ep000120/_INSTALL/WATIR/WET/qantom/WetRunner.rb:39 > > >3.) Test.QWT script >=================== >Browser.new().goto("http://localhost/WebUI/Portal/") >Browser("title:=//").Link("text:=/Vendor: Maint.+/").click >Browser("title:=//").Frame("index:=3").TextField("name:=/txtMasterI.+/" ) >set("350") >Browser("title:=//").Frame("index:=3").Button("value:=Retrieve").click > > > >Sorry, I'm not very versed in Ruby so I couldn't diagnose what's going >on here...but could use some help > >Again, Thanks for your generosity to the community with this exceptional >tool. > >Kim >****************************************************************** >This email and any files transmitted with it from the ElPaso >Corporation are confidential and intended solely for the >use of the individual or entity to whom they are addressed. >If you have received this email in error please notify the >sender. >****************************************************************** >_______________________________________________ >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 ****************************************************************** This email and any files transmitted with it from the ElPaso Corporation are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. ****************************************************************** From chrismo at clabs.org Tue Aug 9 14:07:00 2005 From: chrismo at clabs.org (Chris Morris) Date: Tue, 09 Aug 2005 13:07:00 -0500 Subject: [Wtr-general] WET -- Stack overvlow, Helo In-Reply-To: <42F8DDE0.8020009@qantom.com> References: <51A0D9881DD5F1498CA1AAC9D30AFD2C1DBAE3@corhouexs08m.corp.epec.com> <42F8DDE0.8020009@qantom.com> Message-ID: <42F8F0C4.1020504@clabs.org> Sathya Shankar wrote: > Actually Hue found the same problem and we just fixed it. We posted > the Latest Zip files in WET's download area. Can you post a link? I seem to have missed the previous posts about WET. -- Chris http://clabs.org/blogki From ruby at roblally.plus.com Tue Aug 9 14:06:34 2005 From: ruby at roblally.plus.com (Rob Lally) Date: Tue, 09 Aug 2005 19:06:34 +0100 Subject: [Wtr-general] class_name attribute of Div elements In-Reply-To: <5.1.0.14.2.20050808214726.03105340@127.0.0.1> References: <5.1.0.14.2.20050808214726.03105340@127.0.0.1> Message-ID: <42F8F0AA.8010407@roblally.plus.com> Thanks Bret, it was me and not Watir. I was setting the elements class in javascript using setAttribute("class", "the value") rather than "className". So of course it didn't work. I do think there is something hokey with div's though because trying to print out a div throws NoMethodError: undefined method `style' for # c:/tools/ruby/lib/ruby/site_ruby/1.8/watir.rb:2211:in `span_div_string_creator' c:/tools/ruby/lib/ruby/site_ruby/1.8/watir.rb:2222:in `to_s' It seems that you missed a reference to style when you were changing it to className. Thanks for a great tool. R. Bret Pettichord wrote: > take a look at div_test.rb. > > At 05:17 PM 8/8/2005, Rob Lally wrote: > >> Hi, >> >> I notice that in the last release the style attribute was converted to >> class_name for div elements. >> >> I'm trying to use it to get the css class of a div, but I can't seem >> to get it to work - it doesn't return anything. Is it just me or is it >> broken? From bret at pettichord.com Tue Aug 9 14:13:01 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 09 Aug 2005 13:13:01 -0500 Subject: [Wtr-general] New, improved support for popup dialogs In-Reply-To: References: <5.1.0.14.2.20050809113217.03700670@127.0.0.1> Message-ID: <5.1.0.14.2.20050809131207.0369ad00@127.0.0.1> You should be fine. I've committed a fix to the installer to avoid this problem in the future. The problem is due to the fact that the rdocs aren't in the tar ball. Bret At 12:14 PM 8/9/2005, Iain wrote: >Thanks, hindsight is a wonderful thing ... > >I can get dialog_tests.rb to run without issues now although the installer >gave an error message. > >Is this anything to be concerned about? > > >Going to install to C:\Program Files\WATIR with startMenu=1 and desktop=0 >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:\Program Files\WATIR >cp -r unitTests C:\Program Files\WATIR >cp -r doc C:\Program Files\WATIR >cp -r rdoc C:\Program Files\WATIR >c:/ruby/lib/ruby/1.8/FileUtils.rb:525:in `stat': No such file or directory - >rdoc (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 install.rb:120:in `install' > from install.rb:202 > from install.rb:201:in `call' > from >c:/ruby/lib/ruby/gems/1.8/gems/fxruby-1.2.2-mswin32/lib/fox12/responder2.rb: >57:in `onHandleMsg' > from install.rb:211:in `run' > from install.rb:211 > >-----Original Message----- >From: Bret Pettichord [mailto:bret at pettichord.com] >Sent: Tuesday, August 09, 2005 9:33 AM >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] New, improved support for popup dialogs > >You need to run the install.rb script. > >At 11:26 AM 8/9/2005, Iain wrote: > >I'm getting an error whenever I add require 'watir/dialog' to any > >script > > > >c:/ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in > >`require__': No such file to load -- watir/dialog (LoadError) > > from > >c:/ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in `require' > > from V2_Setup.rb:8 > > > >I'm guesing that it's due to the way I installed it. I've never > >installed Watir from the development tarball before, I always use the >installer. > > > >Can you please let me know where I should be extracting the files to? > > > >Thanks > > > >Iain > > > > > > > > > >-----Original Message----- > >From: Bret Pettichord [mailto:bret at pettichord.com] > >Sent: Monday, August 08, 2005 7:43 PM > >To: wtr-general at rubyforge.org > >Subject: [Wtr-general] New, improved support for popup dialogs > > > >I've committed the initial version of new code for supporting popup >dialogs. > > > >Using this code: > >- You don't have to use separate 'mini-scripts.' > >- You don't have to spawn a process. > >- You don't have to spawn a thread. > > > >This is all done for you behind the scenes. > > > >You use it like this: > > > > require 'watir/dialog' > > $ie.remote_eval <<-END > > button(:value, 'whatever').click > > END > > dialog.button('OK').click > > > >Note that remote_eval takes a string argument. This is the same: > > > > ie.remote_eval "button(:value, 'whatever').click" > > > >The code in the string is evaluated in the context of an equivalent IE > >object in an independent process. > > > >See dialog_tests.rb for more examples. > > > >I am very interested in getting feedback on the names of the interface > >for this functionality: "remote_eval", "dialog", etc > > > >Get the development tarball: > >http://rubyforge.org/cgi-bin/viewcvs.cgi/watir/watir.tar.gz?tarball=1&c > >vsroo > >t=wtr > > > >This code currently supports simple dialogs. Next is to add support for > >the authorization dialogs -- a frequently requested thing. I really > >would like to have unit tests for this, which means i need a quick > >server that does authorization. Anyone know how to roll one with webrick? > > > > > >_____________________ > > Bret Pettichord > > www.pettichord.com > > > > > > > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > >_____________________ > Bret Pettichord > www.pettichord.com > > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From zeljko.filipin at gmail.com Tue Aug 9 14:19:07 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 9 Aug 2005 20:19:07 +0200 Subject: [Wtr-general] WET -- Stack overvlow, Helo In-Reply-To: <42F8F0C4.1020504@clabs.org> Message-ID: <42f8f373.2ca8845a.2a5a.595a@mx.gmail.com> http://www.wet.qantom.org Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris Morris Sent: Tuesday, August 09, 2005 8:07 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] WET -- Stack overvlow, Helo Sathya Shankar wrote: > Actually Hue found the same problem and we just fixed it. We posted > the Latest Zip files in WET's download area. Can you post a link? I seem to have missed the previous posts about WET. -- Chris http://clabs.org/blogki _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Tue Aug 9 14:21:14 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 09 Aug 2005 13:21:14 -0500 Subject: [Wtr-general] class_name attribute of Div elements In-Reply-To: <42F8F0AA.8010407@roblally.plus.com> References: <5.1.0.14.2.20050808214726.03105340@127.0.0.1> <5.1.0.14.2.20050808214726.03105340@127.0.0.1> Message-ID: <5.1.0.14.2.20050809132100.0369eee8@127.0.0.1> I've committed a fix for this. At 01:06 PM 8/9/2005, you wrote: >I do think there is something hokey with div's though because trying to >print out a div throws > >NoMethodError: undefined method `style' for # > c:/tools/ruby/lib/ruby/site_ruby/1.8/watir.rb:2211:in > `span_div_string_creator' > c:/tools/ruby/lib/ruby/site_ruby/1.8/watir.rb:2222:in `to_s' > >It seems that you missed a reference to style when you were changing it to >className. _____________________ Bret Pettichord www.pettichord.com From warren at meyer-pollans.net Tue Aug 9 15:13:50 2005 From: warren at meyer-pollans.net (Warren Pollans) Date: Tue, 9 Aug 2005 15:13:50 -0400 Subject: [Wtr-general] Watir::Form questions Message-ID: <20050809151350.7ca251b8@localhost.localdomain> I would like to be able to use form objects in my tests, but have become confused - as the questions below will no doubt illustrate. I have some tests that I've written in perl using www::mechanize that I would like to port to ruby. The Watir api docs (rdoc) show the following for Class Watir::Form: Form Factory object * ieController - an instance of an IEController * how - symbol - how we access the form (:name, :id, :index, :action, :method) * what - what we use to access the form 1. what is "IEController"? is this a part of the watir distribution? 2. the first argument passed to initialize is "container" - what is this? 3. the watir unittests don't use Watir::Form, the formtest calls ie.form. what's the connection between the two? how are a Watir::Form object and the object returned by ie.form related? A simple example of the use of Watir::Form would be appreciated. Thanks, Warren From paul.rogers at shaw.ca Tue Aug 9 15:51:04 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 09 Aug 2005 13:51:04 -0600 Subject: [Wtr-general] Watir::Form questions Message-ID: <2c73bba2c73e12.2c73e122c73bba@shaw.ca> If your html looks like this:
you would use a form like this: ie.form(:name , 'abc1').text_field(:name , 'the_text_field').set('567') There are more examples in the form_test.rb unit tests what happens is the form method of ie creates the form object you are talking about, so you dont really need to worry about creating it yourself Paul ----- Original Message ----- From: Warren Pollans Date: Tuesday, August 9, 2005 1:13 pm Subject: [Wtr-general] Watir::Form questions > I would like to be able to use form objects in my tests, but have > become confused - as the questions below will no doubt illustrate. > I have some tests that I've written in perl using www::mechanize > that I > would like to port to ruby. > > The Watir api docs (rdoc) show the following for Class Watir::Form: > > Form Factory object > > * ieController - an instance of an IEController > * how - symbol - how we access the form > (:name, :id, :index, :action, :method) > * what - what we use to access the form > > 1. what is "IEController"? is this a part of the watir distribution? > 2. the first argument passed to initialize is "container" - what is > this? > 3. the watir unittests don't use Watir::Form, the formtest calls > ie.form. what's the connection between the two? how are a > Watir::Formobject and the object returned by ie.form related? > > A simple example of the use of Watir::Form would be appreciated. > > Thanks, > > Warren > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From tuyet.ctn at mscibarra.com Tue Aug 9 15:58:44 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Tue, 9 Aug 2005 12:58:44 -0700 Subject: [Wtr-general] Access is denied and Exception Errors Message-ID: Back again with this issue. One of our engineers did some testing and here are his comments: "The error occurs in the watir.rb file in the wait() method, around line 1470. The wait() method is called after the goto method has been issued and is waiting for all the frames in IE to show that they are ready. It is walking the list of frameset com objects when it reaches one object that does not understand the document call. This generates the error. It does not happen when I attempt to use watir to localhost. All the frameset objects provide a document." Bret, I am not sure how to go about "debugging" this further? We are still struggling with this and cannot use WATIR unless we resolve this issue. Your suggestion of using 'goto' the frame's url and then go from there cannot be implemented in our application since the same frame URL is used for different tabs and therefore cannot be differentiated enough for the "goto" statement to work. I hope this makes sense. Also launching many IEs is kind of messy and slows down the automation script which defeats the purpose of using WATIR. Your help is appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050809/d5d4eb7f/attachment.html From warren at meyer-pollans.net Tue Aug 9 17:47:24 2005 From: warren at meyer-pollans.net (Warren Pollans) Date: Tue, 9 Aug 2005 17:47:24 -0400 Subject: [Wtr-general] Watir::Form questions In-Reply-To: <2c73bba2c73e12.2c73e122c73bba@shaw.ca> References: <2c73bba2c73e12.2c73e122c73bba@shaw.ca> Message-ID: <20050809174724.6a6cdab1@localhost.localdomain> I saw the form method being used in the form_test.rb unittest, but didn't see how Watir::Form fit in. I see the light! :-) Thanks, I appreciate your help On Tue, 09 Aug 2005 13:51:04 -0600 Paul Rogers wrote: > > > If your html looks like this: >
> >
> > you would use a form like this: > > ie.form(:name , 'abc1').text_field(:name , 'the_text_field').set > ('567') > > There are more examples in the form_test.rb unit tests > > > what happens is the form method of ie creates the form object you are > talking about, so you dont really need to worry about creating it > yourself > > Paul > > > ----- Original Message ----- > From: Warren Pollans > Date: Tuesday, August 9, 2005 1:13 pm > Subject: [Wtr-general] Watir::Form questions > > > I would like to be able to use form objects in my tests, but have > > become confused - as the questions below will no doubt illustrate. > > I have some tests that I've written in perl using www::mechanize > > that I > > would like to port to ruby. > > > > The Watir api docs (rdoc) show the following for Class Watir::Form: > > > > Form Factory object > > > > * ieController - an instance of an IEController > > * how - symbol - how we access the form > > (:name, :id, :index, :action, :method) > > * what - what we use to access the form > > > > 1. what is "IEController"? is this a part of the watir > > distribution? 2. the first argument passed to initialize is > > "container" - what is this? > > 3. the watir unittests don't use Watir::Form, the formtest calls > > ie.form. what's the connection between the two? how are a > > Watir::Formobject and the object returned by ie.form related? > > > > A simple example of the use of Watir::Form would be appreciated. > > > > Thanks, > > > > Warren > > _______________________________________________ > > 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 iain.rose at responsetek.com Tue Aug 9 18:21:05 2005 From: iain.rose at responsetek.com (Iain) Date: Tue, 9 Aug 2005 15:21:05 -0700 Subject: [Wtr-general] New, improved support for popup dialogs In-Reply-To: <5.1.0.14.2.20050809131207.0369ad00@127.0.0.1> Message-ID: Thanks, One more question, does this only work with buttons that trigger dialog boxes? I've ran dialog_test.rb to completion without any issues and also created my tests that clear dialogs after clicking a button. However, in the application I'm testing there's a link which triggers the dialog box. I've finally found a way to successfully clear this using the older method i.e. controls = ie2.frame(:name, "Controls") Thread.new { system("rubyw \"#{$mydir}\\jscriptExtraConfirmOk.rb\"") } controls.link(:index, 2).click() I've tried to replace this with the newer method i.e. controls = ie2.frame(:name, "Controls") controls.remote_eval "link(:index, 2).click()" dialog.button('OK').click but get an error NoMethodError: undefined method `document' for nil:NilClass c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1237:in `title' c:/ruby/lib/ruby/site_ruby/1.8/Watir/Dialog.rb:43:in `remote_eval' LMDC_Invites.rb:292:in `test_LMDC_submit' LMDC_Invites.rb:136:in `each' LMDC_Invites.rb:136:in `test_LMDC_submit' Are the any special rules for this scenario? Or for clearing security alerts / submitting network logons? cheers Iain -----Original Message----- From: Bret Pettichord [mailto:bret at pettichord.com] Sent: Tuesday, August 09, 2005 11:13 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] New, improved support for popup dialogs You should be fine. I've committed a fix to the installer to avoid this problem in the future. The problem is due to the fact that the rdocs aren't in the tar ball. Bret At 12:14 PM 8/9/2005, Iain wrote: >Thanks, hindsight is a wonderful thing ... > >I can get dialog_tests.rb to run without issues now although the >installer gave an error message. > >Is this anything to be concerned about? > > >Going to install to C:\Program Files\WATIR with startMenu=1 and >desktop=0 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:\Program >Files\WATIR cp -r unitTests C:\Program Files\WATIR cp -r doc C:\Program >Files\WATIR cp -r rdoc C:\Program Files\WATIR >c:/ruby/lib/ruby/1.8/FileUtils.rb:525:in `stat': No such file or >directory - rdoc (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 install.rb:120:in `install' > from install.rb:202 > from install.rb:201:in `call' > from >c:/ruby/lib/ruby/gems/1.8/gems/fxruby-1.2.2-mswin32/lib/fox12/responder2.rb : >57:in `onHandleMsg' > from install.rb:211:in `run' > from install.rb:211 > >-----Original Message----- >From: Bret Pettichord [mailto:bret at pettichord.com] >Sent: Tuesday, August 09, 2005 9:33 AM >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] New, improved support for popup dialogs > >You need to run the install.rb script. > >At 11:26 AM 8/9/2005, Iain wrote: > >I'm getting an error whenever I add require 'watir/dialog' to any > >script > > > >c:/ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in > >`require__': No such file to load -- watir/dialog (LoadError) > > from > >c:/ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in `require' > > from V2_Setup.rb:8 > > > >I'm guesing that it's due to the way I installed it. I've never > >installed Watir from the development tarball before, I always use the >installer. > > > >Can you please let me know where I should be extracting the files to? > > > >Thanks > > > >Iain > > > > > > > > > >-----Original Message----- > >From: Bret Pettichord [mailto:bret at pettichord.com] > >Sent: Monday, August 08, 2005 7:43 PM > >To: wtr-general at rubyforge.org > >Subject: [Wtr-general] New, improved support for popup dialogs > > > >I've committed the initial version of new code for supporting popup >dialogs. > > > >Using this code: > >- You don't have to use separate 'mini-scripts.' > >- You don't have to spawn a process. > >- You don't have to spawn a thread. > > > >This is all done for you behind the scenes. > > > >You use it like this: > > > > require 'watir/dialog' > > $ie.remote_eval <<-END > > button(:value, 'whatever').click > > END > > dialog.button('OK').click > > > >Note that remote_eval takes a string argument. This is the same: > > > > ie.remote_eval "button(:value, 'whatever').click" > > > >The code in the string is evaluated in the context of an equivalent > >IE object in an independent process. > > > >See dialog_tests.rb for more examples. > > > >I am very interested in getting feedback on the names of the > >interface for this functionality: "remote_eval", "dialog", etc > > > >Get the development tarball: > >http://rubyforge.org/cgi-bin/viewcvs.cgi/watir/watir.tar.gz?tarball=1 > >&c > >vsroo > >t=wtr > > > >This code currently supports simple dialogs. Next is to add support > >for the authorization dialogs -- a frequently requested thing. I > >really would like to have unit tests for this, which means i need a > >quick server that does authorization. Anyone know how to roll one with webrick? > > > > > >_____________________ > > Bret Pettichord > > www.pettichord.com > > > > > > > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > >_____________________ > Bret Pettichord > www.pettichord.com > > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Tue Aug 9 18:40:44 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 09 Aug 2005 17:40:44 -0500 Subject: [Wtr-general] New, improved support for popup dialogs In-Reply-To: References: <5.1.0.14.2.20050809131207.0369ad00@127.0.0.1> Message-ID: <5.1.0.14.2.20050809173705.03725ba8@127.0.0.1> Any object is supported, buttons, links, whatever. At 05:21 PM 8/9/2005, Iain wrote: > controls = ie2.frame(:name, "Controls") > controls.remote_eval "link(:index, 2).click()" > dialog.button('OK').click Instead try this: ie2.remote_eval "frame(:name, 'controls').link(:index, 2).click()" dialog.button('OK').click The key point is that remote_eval is a method of IE, and not of any other class. _____________________ Bret Pettichord www.pettichord.com From iain.rose at responsetek.com Tue Aug 9 19:03:58 2005 From: iain.rose at responsetek.com (Iain) Date: Tue, 9 Aug 2005 16:03:58 -0700 Subject: [Wtr-general] New, improved support for popup dialogs In-Reply-To: <5.1.0.14.2.20050809131207.0369ad00@127.0.0.1> Message-ID: I get it now, thanks for correcting me. I think I'm getting closer to success, the code you provded below now clicks on the link that triggers the popup but instead of clearing it, I get a different error... ie2.remote_eval "frame(:name, 'Controls').link(:index, 2).click()" dialog.button('OK').click gives Watir::Exception::UnknownObjectException: c:/ruby/lib/ruby/site_ruby/1.8/Watir/Dialog.rb:33:in `click' LMDC_Invites.rb:293:in `test_LMDC_submit' LMDC_Invites.rb:136:in `each' LMDC_Invites.rb:136:in `test_LMDC_submit' -----Original Message----- From: Bret Pettichord [mailto:bret at pettichord.com] To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] New, improved support for popup dialogs Any object is supported, buttons, links, whatever. At 05:21 PM 8/9/2005, Iain wrote: > controls = ie2.frame(:name, "Controls") > controls.remote_eval "link(:index, 2).click()" > dialog.button('OK').click Instead try this: ie2.remote_eval "frame(:name, 'controls').link(:index, 2).click()" dialog.button('OK').click The key point is that remote_eval is a method of IE, and not of any other class. _____________________ Bret Pettichord www.pettichord.com From paul.rogers at shaw.ca Tue Aug 9 19:32:55 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 09 Aug 2005 17:32:55 -0600 Subject: [Wtr-general] New, improved support for popup dialogs Message-ID: <2cd83312cd8abf.2cd8abf2cd8331@shaw.ca> Bret, Im assuming you've named remote_eval that based on what it is doing. I dont find it a very intuitive name. Maybe something like one of these: ie.execute_command( ) ie.run_command() ie.delayed_execution() # is it actually delayed?? THis does look really good, thanks for doing it. This had always ben the weakest part of watir, an now we have a nice solution Paul ----- Original Message ----- From: Bret Pettichord Date: Tuesday, August 9, 2005 4:40 pm Subject: RE: [Wtr-general] New, improved support for popup dialogs > Any object is supported, buttons, links, whatever. > > At 05:21 PM 8/9/2005, Iain wrote: > > controls = ie2.frame(:name, "Controls") > > controls.remote_eval "link(:index, 2).click()" > > dialog.button('OK').click > > Instead try this: > > ie2.remote_eval "frame(:name, 'controls').link(:index, > 2).click()" dialog.button('OK').click > > The key point is that remote_eval is a method of IE, and not of > any other > class. > > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From huemach at Cybersoft-VN.com Tue Aug 9 21:14:45 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Wed, 10 Aug 2005 08:14:45 +0700 Subject: [Wtr-general] [WET] No Method Error? Message-ID: <99DF6C0285C2CE4C99F02D78385719660181B257@hue.cybersoft-vn.com> Hi ALL My script as like this Browser("title:=Client").Frame("name:=leftframe").Image("index:=1").clic k Browser("title:=Client").Frame("name:=leftframe").Link("index:=1").click Browser("title:=Client").Frame("name:=leftframe").Frame("name:=search"). TextField("name:=time2").set "2005/08/012" I got the error as like this DEBUG: OLE=# DEBUG: OLE=# DEBUG: OLE=# DEBUG: OLE= D:/Applications/ruby/lib/ruby/site_ruby/1.8/watir.rb:1844:in `getDocument': undefined method `document' for nil:NilClass (NoMethodError) from D:\Applications\wet/qantom/webobjects/WebEdit.rb:40:in `initialize' from D:\Applications\wet/qantom/webobjects/WebContainer.rb:81:in `new' from D:\Applications\wet/qantom/webobjects/WebContainer.rb:81:in `TextField' .. Thank you for help Hue From bret at pettichord.com Tue Aug 9 21:57:55 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 09 Aug 2005 20:57:55 -0500 Subject: [Wtr-general] New, improved support for popup dialogs In-Reply-To: <2cd83312cd8abf.2cd8abf2cd8331@shaw.ca> Message-ID: <5.1.0.14.2.20050809203700.036a7010@127.0.0.1> There is a method in Ruby which is called 'eval'. It takes a string and evaluates it as Ruby code. IE#remote_eval is based on this, hence the name. Python and Perl and Lisp all have eval methods that do the same thing, so the name is pretty well established and understood by anyone who has used any of these languages. Eval is short for evaluate, which is the name for what you do when you run code in an interpreted language. The equivalent with a compiled language would be "compile, link and execute." This varient of eval does two things in addition: 1. It evaluates in a separate process spawned by a separate thread. 2. It evaluates in the context of an IE object that is the equivalent to the one that invoked the method. It actually uses Ruby's instance_eval to do this. People who want to learn more about what this method does would do well to learn more about eval and instance_eval, so it might be good to base the name on these methods. Here are some other possible names: remote_instance_eval sub_process_eval process_eval parallel_instance_eval In a way, Watir shouldn't force users to even have to understand this concept (and i have ideas for how to eventually get there), but since it does now, i'm reluctant to sugar coat it too much. At 06:32 PM 8/9/2005, Paul Rogers wrote: >Bret, >Im assuming you've named remote_eval that based on what it is doing. I >dont find it a very intuitive name. Maybe something like one of these: > >ie.execute_command( ) >ie.run_command() I'm not sure what a 'command' is in Ruby. It's a not part of the Watir or Ruby lexicon. IE#remote_eval can actually take any ruby code as its argument (in string form), including multiple method calls separated by semicolons or conditional logic or what have you. (You can embed 'puts' statements in the string to debug errors.) >ie.delayed_execution() # is it actually delayed?? No. Actually the argument code and the subsequent code are running in parallel and either might actually be the next to be executed. Neither is delayed. From raghu at qantom.com Tue Aug 9 22:16:26 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Wed, 10 Aug 2005 07:46:26 +0530 Subject: [Wtr-general] [WET] No Method Error? In-Reply-To: <99DF6C0285C2CE4C99F02D78385719660181B257@hue.cybersoft-vn.com> References: <99DF6C0285C2CE4C99F02D78385719660181B257@hue.cybersoft-vn.com> Message-ID: <42F9637A.6080807@qantom.com> Hi Hue, The error that you get indicates that the second level frame (name:=search) could not be identified. Could you try a Browser("title:=Client").Frame("name:=leftframe").show_frames() and see if the name is not misspelt or duplicate? If it is a duplicate, then you could try to add the second index identifier, eg.:- Frame("name:-search", "index:=1"). Let us know if it works. Thanks Raghu Hue Mach Dieu wrote: >Hi ALL >My script as like this >Browser("title:=Client").Frame("name:=leftframe").Image("index:=1").clic >k >Browser("title:=Client").Frame("name:=leftframe").Link("index:=1").click >Browser("title:=Client").Frame("name:=leftframe").Frame("name:=search"). >TextField("name:=time2").set "2005/08/012" > >I got the error as like this > >DEBUG: OLE=# >DEBUG: OLE=# >DEBUG: OLE=# >DEBUG: OLE= >D:/Applications/ruby/lib/ruby/site_ruby/1.8/watir.rb:1844:in >`getDocument': undefined method `document' for nil:NilClass >(NoMethodError) > from D:\Applications\wet/qantom/webobjects/WebEdit.rb:40:in >`initialize' > > from D:\Applications\wet/qantom/webobjects/WebContainer.rb:81:in >`new' > from D:\Applications\wet/qantom/webobjects/WebContainer.rb:81:in >`TextField' >.. > >Thank you for help > >Hue > > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > From huemach at Cybersoft-VN.com Tue Aug 9 23:14:29 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Wed, 10 Aug 2005 10:14:29 +0700 Subject: [Wtr-general] Re: [WET] No Method Error? Message-ID: <99DF6C0285C2CE4C99F02D78385719660181B308@hue.cybersoft-vn.com> Hi Raghu, I got it run now, actually. The previous script with something wrong bc I put the wrong frame name. Sorry & Thank you very much. Hue From scott at hanselman.com Wed Aug 10 01:19:47 2005 From: scott at hanselman.com (Scott Hanselman) Date: Tue, 9 Aug 2005 22:19:47 -0700 Subject: [Wtr-general] New, improved support for popup dialogs In-Reply-To: <5.1.0.14.2.20050809203700.036a7010@127.0.0.1> Message-ID: Ya, I really don't like the name either, as it (deeply) exposes the implementation, IMHO. That said, here's my hypocritical votes: * spawn_eval * forked_eval * eval_newthread * newthread_eval * run_on_new_thread That said, why not just lie to us (as object models are wont to do) and have the API match my intent: ie.alert.dismiss_when_shown(:value, "OK") ie.button(:name,"btnfoo").click Scott -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Tuesday, August 09, 2005 6:58 PM To: wtr-general at rubyforge.org Subject: Re: RE: [Wtr-general] New, improved support for popup dialogs There is a method in Ruby which is called 'eval'. It takes a string and evaluates it as Ruby code. IE#remote_eval is based on this, hence the name. Python and Perl and Lisp all have eval methods that do the same thing, so the name is pretty well established and understood by anyone who has used any of these languages. Eval is short for evaluate, which is the name for what you do when you run code in an interpreted language. The equivalent with a compiled language would be "compile, link and execute." This varient of eval does two things in addition: 1. It evaluates in a separate process spawned by a separate thread. 2. It evaluates in the context of an IE object that is the equivalent to the one that invoked the method. It actually uses Ruby's instance_eval to do this. People who want to learn more about what this method does would do well to learn more about eval and instance_eval, so it might be good to base the name on these methods. Here are some other possible names: remote_instance_eval sub_process_eval process_eval parallel_instance_eval In a way, Watir shouldn't force users to even have to understand this concept (and i have ideas for how to eventually get there), but since it does now, i'm reluctant to sugar coat it too much. At 06:32 PM 8/9/2005, Paul Rogers wrote: >Bret, >Im assuming you've named remote_eval that based on what it is doing. I >dont find it a very intuitive name. Maybe something like one of these: > >ie.execute_command( ) >ie.run_command() I'm not sure what a 'command' is in Ruby. It's a not part of the Watir or Ruby lexicon. IE#remote_eval can actually take any ruby code as its argument (in string form), including multiple method calls separated by semicolons or conditional logic or what have you. (You can embed 'puts' statements in the string to debug errors.) >ie.delayed_execution() # is it actually delayed?? No. Actually the argument code and the subsequent code are running in parallel and either might actually be the next to be executed. Neither is delayed. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Wed Aug 10 01:05:08 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 10 Aug 2005 00:05:08 -0500 Subject: [Wtr-general] How to get bugs fixed Message-ID: <5.1.0.14.2.20050809235631.03763380@127.0.0.1> If you have a bug that you really want to see fixed, here's what you should do: 1. Send email to this list (wtr-general). Sometimes we can fix it fast, or we can give a workaround, or someone will tell you that you made a mistake. Sometimes we'll just say "yeah that's a bug." 2. File a bug report on Rubyforge. You can just paste your email report there (esp. if we said it was a bug). You can also send an email to this list with a link to the bug if you want. (Like this: http://rubyforge.org/tracker/index.php?func=detail&aid=2219&group_id=104&atid=487) It's not annoying or whiny to do both. It's helpful. Bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Aug 10 01:22:14 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 10 Aug 2005 00:22:14 -0500 Subject: [Wtr-general] IE#capture_events Message-ID: <5.1.0.14.2.20050810002042.03763d78@127.0.0.1> I propose we remove IE#capture_events and related code. I understand that IE.attach is always a better method -- easier to use; more likely to work. Objections? _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Aug 10 01:47:34 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 10 Aug 2005 00:47:34 -0500 Subject: [Wtr-general] New, improved support for popup dialogs In-Reply-To: References: <5.1.0.14.2.20050809203700.036a7010@127.0.0.1> Message-ID: <5.1.0.14.2.20050810004240.037520c0@127.0.0.1> At 12:19 AM 8/10/2005, Scott Hanselman wrote: >Ya, I really don't like the name either, as it (deeply) exposes the >implementation, IMHO. That said, here's my hypocritical votes: > >* spawn_eval >* forked_eval >* eval_newthread >* newthread_eval >* run_on_new_thread of these, i liked forked_eval the best... >That said, why not just lie to us (as object models are wont to do) and have >the API match my intent: > >ie.alert.dismiss_when_shown(:value, "OK") >ie.button(:name,"btnfoo").click This is an interesting idea. It does require the inverted sequencing that i was trying to avoid, but the result is, overall, probably easier to understand. Is "ie.alert" more intuitive than "ie.dialog"? What about "ie.popup"? One principle that i've tried to following in naming Watir methods is to use the HTML or JavaScript names for things. The JavaScript name is in fact "alert" (and "confirm"). Bret _____________________ Bret Pettichord www.pettichord.com From Tim.Feltham at orionhealth.com Wed Aug 10 01:51:55 2005 From: Tim.Feltham at orionhealth.com (Tim Feltham) Date: Wed, 10 Aug 2005 17:51:55 +1200 Subject: [Wtr-general] New, improved support for popup dialogs Message-ID: <0FDF67DB50EC904AAEA1B2A83A281050013A8B74@mail.orion.internal> ie.alert sounds good to me. I haven't had a chance to use this new code yet...can I do a show_all_objects on the popup? Can it select items in drop down lists yet? Cheers, Tim ________________________________ From: wtr-general-bounces at rubyforge.org on behalf of Bret Pettichord Sent: Wed 10/08/2005 5:47 p.m. To: wtr-general at rubyforge.org Subject: RE: RE: [Wtr-general] New, improved support for popup dialogs At 12:19 AM 8/10/2005, Scott Hanselman wrote: >Ya, I really don't like the name either, as it (deeply) exposes the >implementation, IMHO. That said, here's my hypocritical votes: > >* spawn_eval >* forked_eval >* eval_newthread >* newthread_eval >* run_on_new_thread of these, i liked forked_eval the best... >That said, why not just lie to us (as object models are wont to do) and have >the API match my intent: > >ie.alert.dismiss_when_shown(:value, "OK") >ie.button(:name,"btnfoo").click This is an interesting idea. It does require the inverted sequencing that i was trying to avoid, but the result is, overall, probably easier to understand. Is "ie.alert" more intuitive than "ie.dialog"? What about "ie.popup"? One principle that i've tried to following in naming Watir methods is to use the HTML or JavaScript names for things. The JavaScript name is in fact "alert" (and "confirm"). Bret _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 4962 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050810/1b8ed4cf/attachment.bin From bret at pettichord.com Wed Aug 10 01:57:02 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 10 Aug 2005 00:57:02 -0500 Subject: [Wtr-general] Very slow speeds In-Reply-To: Message-ID: <5.1.0.14.2.20050810005154.03774808@127.0.0.1> Have you tried using the -f command line switch? This speeds up our unit tests by a factor of 2, but the optimizations focus on text fields, so you may see an even better improvement. At 11:12 AM 8/9/2005, Josh Miller wrote: >I am having a problem with slow speeds using watir (both 1.3 and 1.4). I >have a page with about 2000 text fields 1000 of those have ID tags the >other do not. Navigating to this page is very fast however when the >script is entering data into the fields via ID tags it is very slow, about >one text field per 15 seconds. Is this just too much for watir to handle >quickly or should I be seeing faster speeds? > >Thanks, >Josh > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Aug 10 02:00:26 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 10 Aug 2005 01:00:26 -0500 Subject: [Wtr-general] New, improved support for popup dialogs In-Reply-To: <0FDF67DB50EC904AAEA1B2A83A281050013A8B74@mail.orion.intern al> Message-ID: <5.1.0.14.2.20050810010017.035a9e30@127.0.0.1> At 12:51 AM 8/10/2005, Tim Feltham wrote: >I haven't had a chance to use this new code yet...can I do a >show_all_objects on the popup? >Can it select items in drop down lists yet? No. No. _____________________ Bret Pettichord www.pettichord.com From Tim.Feltham at orionhealth.com Wed Aug 10 02:16:10 2005 From: Tim.Feltham at orionhealth.com (Tim Feltham) Date: Wed, 10 Aug 2005 18:16:10 +1200 Subject: [Wtr-general] New, improved support for popup dialogs Message-ID: <0FDF67DB50EC904AAEA1B2A83A281050013A8B75@mail.orion.internal> Are you planning on putting this in at some stage? ________________________________ From: wtr-general-bounces at rubyforge.org on behalf of Bret Pettichord Sent: Wed 10/08/2005 6:00 p.m. To: wtr-general at rubyforge.org Subject: RE: RE: [Wtr-general] New, improved support for popup dialogs At 12:51 AM 8/10/2005, Tim Feltham wrote: >I haven't had a chance to use this new code yet...can I do a >show_all_objects on the popup? >Can it select items in drop down lists yet? No. No. _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 3786 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050810/e5784658/attachment.bin From bret at pettichord.com Wed Aug 10 02:38:07 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 10 Aug 2005 01:38:07 -0500 Subject: [Wtr-general] New, improved support for popup dialogs In-Reply-To: <0FDF67DB50EC904AAEA1B2A83A281050013A8B75@mail.orion.intern al> Message-ID: <5.1.0.14.2.20050810012807.037d2e98@127.0.0.1> You are talking about Modal Web Dialogs. These include HTML. The only way i know of for handling them is to, first, use ie.remote_eval to click the link or button that posts the modal (so it doesn't hang your script), and then use ie.send_keys to send key events to the window to make it go away. I don't know of any way to access the data on these kinds of dialogs. The only idea i have for a really good solution would be to make sense of this code: http://support.microsoft.com/kb/q249232/ But i fear that this can't be converted to Ruby directly and therefore would require a C library for Watir -- and i'm too dumb for that. Volunteers? Bret At 01:16 AM 8/10/2005, Tim Feltham wrote: >Are you planning on putting this in at some stage? > >________________________________ > >From: wtr-general-bounces at rubyforge.org on behalf of Bret Pettichord >Sent: Wed 10/08/2005 6:00 p.m. >To: wtr-general at rubyforge.org >Subject: RE: RE: [Wtr-general] New, improved support for popup dialogs > > > >At 12:51 AM 8/10/2005, Tim Feltham wrote: > >I haven't had a chance to use this new code yet...can I do a > >show_all_objects on the popup? > >Can it select items in drop down lists yet? > >No. No. > > >_____________________ > Bret Pettichord > www.pettichord.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 _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Aug 10 02:42:28 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 10 Aug 2005 01:42:28 -0500 Subject: [Wtr-general] open IE in the foreground In-Reply-To: <0E46E3619326224CB40CC30C2E36364E20BFF9@zde008.lenze.com> Message-ID: <5.1.0.14.2.20050810014147.037d2a00@127.0.0.1> try ie.maximize At 05:29 AM 8/5/2005, Neumann, Carsten - ENCOWAY wrote: >Content-class: urn:content-classes:message >Content-Type: multipart/alternative; > boundary="----_=_NextPart_001_01C599A8.39913AAE" > >My Watir always opens the IE in the background, can I make him open the IE >in front of all windows? > >Mit freundlichen Gr??en, > > > >Carsten Neumann > >Auszubildender > > > >encoway GmbH > >Universit?tsallee 21 - 23 > >D-28359 Bremen > > > >T +49 (0) 421 24677-0 > >F +49 (0) 421 24677-10 > > > >www.encoway.de > >neumann at encoway.de > > > > > > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From scott at hanselman.com Wed Aug 10 04:52:40 2005 From: scott at hanselman.com (Scott Hanselman) Date: Wed, 10 Aug 2005 01:52:40 -0700 Subject: [Wtr-general] New, improved support for popup dialogs In-Reply-To: <5.1.0.14.2.20050810004240.037520c0@127.0.0.1> Message-ID: I say, as popups are very different from alerts, that they should be treated very differently. Other thoughts: ie.upcoming_alert(...).click ie.handle_upcoming_alert(...) ie.dismiss_upcoming_alert(...) If you're really trying to avoid the inverted sequencing, the holy grail is simply ie.button(:id,"foo").click #html button causes alert() ie.alert(:value,"OK).click Scott -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Tuesday, August 09, 2005 10:48 PM To: wtr-general at rubyforge.org Subject: RE: RE: [Wtr-general] New, improved support for popup dialogs At 12:19 AM 8/10/2005, Scott Hanselman wrote: >Ya, I really don't like the name either, as it (deeply) exposes the >implementation, IMHO. That said, here's my hypocritical votes: > >* spawn_eval >* forked_eval >* eval_newthread >* newthread_eval >* run_on_new_thread of these, i liked forked_eval the best... >That said, why not just lie to us (as object models are wont to do) and have >the API match my intent: > >ie.alert.dismiss_when_shown(:value, "OK") >ie.button(:name,"btnfoo").click This is an interesting idea. It does require the inverted sequencing that i was trying to avoid, but the result is, overall, probably easier to understand. Is "ie.alert" more intuitive than "ie.dialog"? What about "ie.popup"? One principle that i've tried to following in naming Watir methods is to use the HTML or JavaScript names for things. The JavaScript name is in fact "alert" (and "confirm"). Bret _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Wed Aug 10 11:18:10 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 10 Aug 2005 09:18:10 -0600 Subject: [Wtr-general] IE#capture_events Message-ID: <2d75fdb2d7083e.2d7083e2d75fdb@shaw.ca> none from me. capture_events causes problems in irb, and I dont think it adds anything to watir. ----- Original Message ----- From: Bret Pettichord Date: Tuesday, August 9, 2005 11:22 pm Subject: [Wtr-general] IE#capture_events > I propose we remove IE#capture_events and related code. I > understand that > IE.attach is always a better method -- easier to use; more likely > to work. > Objections? > > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From paul.rogers at shaw.ca Wed Aug 10 11:39:19 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 10 Aug 2005 09:39:19 -0600 Subject: [Wtr-general] onBlur Message-ID: <2d806522d7ed09.2d7ed092d80652@shaw.ca> Bret, your recent addition of the onBlur event to text boxes got me thinking. Does IE fire the onBlur event already with out us adding it, if you explicitly set focus to another item. Eg, using the code BEFORE the addition ( I havent tried this ) ie.text_field(:index,1).set('hi') # does the blur on text_field get fired by the next line? ie.button(:index,1).focus It seems, that this should work, but because of the way we access IE maybe it didnt happen. Id like to make sure so we dont end up firing multiple events. Paul From scott at hanselman.com Wed Aug 10 11:51:35 2005 From: scott at hanselman.com (Scott Hanselman) Date: Wed, 10 Aug 2005 08:51:35 -0700 Subject: [Wtr-general] onBlur In-Reply-To: <2d806522d7ed09.2d7ed092d80652@shaw.ca> Message-ID: Isn't "onlostfocus" fired? -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Wednesday, August 10, 2005 8:39 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] onBlur Bret, your recent addition of the onBlur event to text boxes got me thinking. Does IE fire the onBlur event already with out us adding it, if you explicitly set focus to another item. Eg, using the code BEFORE the addition ( I havent tried this ) ie.text_field(:index,1).set('hi') # does the blur on text_field get fired by the next line? ie.button(:index,1).focus It seems, that this should work, but because of the way we access IE maybe it didnt happen. Id like to make sure so we dont end up firing multiple events. Paul _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From zaidizaki at yahoo.com Wed Aug 10 12:23:41 2005 From: zaidizaki at yahoo.com (zaki zaidi) Date: Wed, 10 Aug 2005 09:23:41 -0700 (PDT) Subject: [Wtr-general] JavaScript Popup Message-ID: <20050810162341.73712.qmail@web31806.mail.mud.yahoo.com> Hi, I am in a process of automating a website. I can't seem to figure out a way to click the OK button of JavaScript popup. Thanks in Advance. Zaki __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050810/fd1a029c/attachment.html From bret at pettichord.com Wed Aug 10 12:18:52 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 10 Aug 2005 11:18:52 -0500 Subject: [Wtr-general] onBlur In-Reply-To: <2d806522d7ed09.2d7ed092d80652@shaw.ca> Message-ID: <5.1.0.14.2.20050810110947.0349fe98@127.0.0.1> I don't know for sure whether IE (meaning Microsoft IE, not Watir::IE) would automatically fire the onBlur event. But I was under the impression that it never sends extra events when accessed via COM as we do. That's why we have to explicitly fire events. True? I also don't understand how multiple onBlur events would lead to trouble. This would be like clicking into and then out of a text field right? Usually harmless. The thing to do is to attach some code to the event in question and then observe when it is fired. Right? Bret At 10:39 AM 8/10/2005, Paul Rogers wrote: >Bret, >your recent addition of the onBlur event to text boxes got me thinking. > >Does IE fire the onBlur event already with out us adding it, if you >explicitly set focus to another item. Eg, using the code BEFORE the >addition ( I havent tried this ) > >ie.text_field(:index,1).set('hi') ># does the blur on text_field get fired by the next line? >ie.button(:index,1).focus > >It seems, that this should work, but because of the way we access IE maybe >it didnt happen. Id like to make sure so we dont end up firing multiple events. > >Paul >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From paul.rogers at shaw.ca Wed Aug 10 12:52:27 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 10 Aug 2005 10:52:27 -0600 Subject: [Wtr-general] onBlur Message-ID: <2da86312da6231.2da62312da8631@shaw.ca> its certainly easy for us to verify this, I was just hoping you'd already done the work :-) Firing these extra events can have some unexpected results, Id seen one which led me change the radio/checkbox events a few weeks back. Paul ----- Original Message ----- From: Bret Pettichord Date: Wednesday, August 10, 2005 10:18 am Subject: Re: [Wtr-general] onBlur > I don't know for sure whether IE (meaning Microsoft IE, not > Watir::IE) > would automatically fire the onBlur event. But I was under the > impression > that it never sends extra events when accessed via COM as we do. > That's why > we have to explicitly fire events. True? > > I also don't understand how multiple onBlur events would lead to > trouble. > This would be like clicking into and then out of a text field > right? > Usually harmless. > > The thing to do is to attach some code to the event in question > and then > observe when it is fired. Right? > > Bret > > At 10:39 AM 8/10/2005, Paul Rogers wrote: > >Bret, > >your recent addition of the onBlur event to text boxes got me > thinking.> > >Does IE fire the onBlur event already with out us adding it, if > you > >explicitly set focus to another item. Eg, using the code BEFORE > the > >addition ( I havent tried this ) > > > >ie.text_field(:index,1).set('hi') > ># does the blur on text_field get fired by the next line? > >ie.button(:index,1).focus > > > >It seems, that this should work, but because of the way we access > IE maybe > >it didnt happen. Id like to make sure so we dont end up firing > multiple events. > > > >Paul > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From iain.rose at responsetek.com Wed Aug 10 13:03:40 2005 From: iain.rose at responsetek.com (Iain) Date: Wed, 10 Aug 2005 10:03:40 -0700 Subject: [Wtr-general] Re: Object repository, Popups and other enhancements In-Reply-To: <42F8AB8A.5040006@qantom.com> Message-ID: I'm having a similar problem ... I have set the environment variables QWT_HOME=C:\Program Files\WATIR\wet RUBYLIB=C:\Program Files\WATIR\wet But when I try and run Install_test.rb I get the following error C:\Program Files\WATIR\wet/qantom/webobjects/WebTableCell.rb:30: uninitialized constant Watir::ObjectActions (NameError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in `require__' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in `require' from C:\Program Files\WATIR\wet/WET.rb:43 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in `require__' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in `require' from Install_test.rb:1 Can you help? -----Original Message----- From: Sathya Shankar [mailto:satti at qantom.com] Sent: Tuesday, August 09, 2005 6:12 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Re: Object repository, Popups and other enhancements Hi Hue, Have you also set the RUBYLIB environment variable? QWT_HOME always points to your WET installation directory. If your system does not already have RUBYLIB environment variable set, then RUBYLIB will point to the same directory as QWT_HOME. On my machine, when I do a set command, I see the following: QWT_HOME=D:\Wet\ruby RUBYLIB=D:\WET\RUBY Let me know if this works for you. Satti Hue Mach Dieu wrote: >Hi, >I add the QWT_HOME as install guide, and Write script use WET as like >this > >require 'WET' >include WET > >Browser.new().goto "http://localhost:8082" > >When I run it, I got this error > >D:/Applications/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: >1 >8:in `re >quire__': No such file to load -- WET (LoadError) > from >D:/Applications/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require >.rb:18:in `require' > from D:/Project/Elpida EES >Fab2/Automation/MyScript/sample/sample.rb:1 > >Is I wrong anything? > >Thank you fro help > >Hue > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > From jkohl at telusplanet.net Wed Aug 10 13:03:29 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Wed, 10 Aug 2005 11:03:29 -0600 Subject: [Wtr-general] onBlur In-Reply-To: <2da86312da6231.2da62312da8631@shaw.ca> Message-ID: <20050810170405.CUXB28866.priv-edmwes25.telusplanet.net@tintin> I've had unintended results as well, especially when developers use a lot of JavaScript to trigger different results. I've seen problems where an "onClick" and "onFocus" event was trap and handle a double-click. The extra fire_events caused all clicks to be trapped as double clicks. In another case, one has fired before another in a way unintended by the script which caused a race condition error in the JavaScript handling. These are somewhat rare, but underline why I prefer doing fire_events by hand in some cases. Most of the time I'm happy with them kicking off without having to worry about it, but there are some cases where they produce unintended results. -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: August 10, 2005 10:52 AM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] onBlur > > its certainly easy for us to verify this, I was just hoping > you'd already done the work :-) > > Firing these extra events can have some unexpected results, > Id seen one which led me change the radio/checkbox events a > few weeks back. > > Paul > > ----- Original Message ----- > From: Bret Pettichord > Date: Wednesday, August 10, 2005 10:18 am > Subject: Re: [Wtr-general] onBlur > > > I don't know for sure whether IE (meaning Microsoft IE, not > > Watir::IE) > > would automatically fire the onBlur event. But I was under the > > impression that it never sends extra events when accessed > via COM as > > we do. > > That's why > > we have to explicitly fire events. True? > > > > I also don't understand how multiple onBlur events would lead to > > trouble. > > This would be like clicking into and then out of a text field right? > > Usually harmless. > > > > The thing to do is to attach some code to the event in question and > > then observe when it is fired. Right? > > > > Bret > > > > At 10:39 AM 8/10/2005, Paul Rogers wrote: > > >Bret, > > >your recent addition of the onBlur event to text boxes got me > > thinking.> > > >Does IE fire the onBlur event already with out us adding it, if > > you > > >explicitly set focus to another item. Eg, using the code BEFORE > > the > > >addition ( I havent tried this ) > > > > > >ie.text_field(:index,1).set('hi') > > ># does the blur on text_field get fired by the next line? > > >ie.button(:index,1).focus > > > > > >It seems, that this should work, but because of the way we access > > IE maybe > > >it didnt happen. Id like to make sure so we dont end up firing > > multiple events. > > > > > >Paul > > >_______________________________________________ > > >Wtr-general mailing list > > >Wtr-general at rubyforge.org > > >http://rubyforge.org/mailman/listinfo/wtr-general > > > > _____________________ > > Bret Pettichord > > www.pettichord.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 > From jeff.darklight at gmail.com Wed Aug 10 13:59:03 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 10 Aug 2005 10:59:03 -0700 Subject: [Wtr-general] problems with 1.3.1 Message-ID: I've got a situation where I'm doing the whole dual-thread thing for WinHelper ... but, sometimes it doesn't like it if there is already a window open ... If I close all of my IE windows then run the script it seems to be happier. Also, sometimes, in the login fields from the auth dialog, sometimes the text is garbled... Is this stuff that's fixed in 1.4 ? and, I haven't seen any documentation on how to upgrade between versions... Should I simple blow out my lib/ruby/1.8/watir directory and do another install? Let me know... Thanks. -- "So long, and thanks for all the fish" Jeff Wood From noreply at rubyforge.org Wed Aug 10 13:53:40 2005 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 10 Aug 2005 12:53:40 -0500 Subject: [Wtr-general] [ wtr-Bugs-2225 ] just a test of the bug tracker Message-ID: <200508101753.j7AHreWS024890@rubyforge.org> Bugs item #2225, was opened at 2005-08-10 12:53 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=487&aid=2225&group_id=104 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Bret Pettichord (bret) Assigned to: Nobody (None) Summary: just a test of the bug tracker Initial Comment: not a bug ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=487&aid=2225&group_id=104 From bret at pettichord.com Wed Aug 10 14:08:38 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 10 Aug 2005 13:08:38 -0500 Subject: [Wtr-general] [ wtr-Bugs-2225 ] just a test of the bug tracker In-Reply-To: <200508101753.j7AHreWS024890@rubyforge.org> Message-ID: <5.1.0.14.2.20050810130718.03561ca8@127.0.0.1> For a while, new bug reports were automatically being sent to this list. This stopped when we tightened security on the list to block spam. Now it is working again. This is important, because recently people have been posting bug reports to the tracker, but neither Paul nor i new they were there. Bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Aug 10 14:16:59 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 10 Aug 2005 13:16:59 -0500 Subject: [Wtr-general] problems with 1.3.1 In-Reply-To: Message-ID: <5.1.0.14.2.20050810131640.03561938@127.0.0.1> At 12:59 PM 8/10/2005, Jeff Wood wrote: >Is this stuff that's fixed in 1.4 ? No. >and, I haven't seen any documentation on how to upgrade between versions... > >Should I simple blow out my lib/ruby/1.8/watir directory and do another >install? Yes. _____________________ Bret Pettichord www.pettichord.com From jeff.darklight at gmail.com Wed Aug 10 14:24:23 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 10 Aug 2005 11:24:23 -0700 Subject: [Wtr-general] problems with 1.3.1 In-Reply-To: <5.1.0.14.2.20050810131640.03561938@127.0.0.1> References: <5.1.0.14.2.20050810131640.03561938@127.0.0.1> Message-ID: So, Is there a clean way to deal with some of the things I'm running into ? Is there anything I can do to help with any of these kinds of things? j. On 8/10/05, Bret Pettichord wrote: > At 12:59 PM 8/10/2005, Jeff Wood wrote: > >Is this stuff that's fixed in 1.4 ? > > No. > > >and, I haven't seen any documentation on how to upgrade between versions... > > > >Should I simple blow out my lib/ruby/1.8/watir directory and do another > >install? > > Yes. > > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "So long, and thanks for all the fish" Jeff Wood From bret at pettichord.com Wed Aug 10 15:22:49 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 10 Aug 2005 14:22:49 -0500 Subject: [Wtr-general] problems with 1.3.1 In-Reply-To: References: <5.1.0.14.2.20050810131640.03561938@127.0.0.1> <5.1.0.14.2.20050810131640.03561938@127.0.0.1> Message-ID: <5.1.0.14.2.20050810142134.0355ff28@127.0.0.1> A clean way to deal with this is under development. You can look at what we have so far, which is the development tarball, but not 1.4. Or you can stick with the WinHelper approach, which works, even if it is awkward. Bret At 01:24 PM 8/10/2005, Jeff Wood wrote: >So, > >Is there a clean way to deal with some of the things I'm running into ? > >Is there anything I can do to help with any of these kinds of things? > >j. > >On 8/10/05, Bret Pettichord wrote: > > At 12:59 PM 8/10/2005, Jeff Wood wrote: > > >Is this stuff that's fixed in 1.4 ? > > > > No. > > > > >and, I haven't seen any documentation on how to upgrade between > versions... > > > > > >Should I simple blow out my lib/ruby/1.8/watir directory and do another > > >install? > > > > Yes. > > > > > > _____________________ > > Bret Pettichord > > www.pettichord.com > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > >-- >"So long, and thanks for all the fish" > >Jeff Wood > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Aug 10 19:17:17 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 10 Aug 2005 18:17:17 -0500 Subject: [Wtr-general] remote_eval Message-ID: <5.1.0.14.2.20050810181559.0357b050@127.0.0.1> Comment By: Anna T (annchen) Date: 2005-08-10 21:26 Message: Brett, I have read the thread, and found there what I needed. Now there's another question. I'm using remote_eval from within a frame, and an object I need clicked is not clicked. No error returned: ie1 = ie.frame(:name, "MyFrame") require 'watir/dialog' ie.remote_eval <<-END ie1.image(:id, "ImageID").click END ie is attached to a frame window, not to the frame source; ie1 is a frame. What's wrong? I tried attaching ie to the frame source URL, but it does not work. Thanks for your help. Anna. ---- Try ie.remote_eval "frame(:name, 'MyFrame').image(:id, 'ImageID').click" _____________________ Bret Pettichord www.pettichord.com From atuisheva at gmail.com Wed Aug 10 20:31:22 2005 From: atuisheva at gmail.com (Anna Tuisheva) Date: Wed, 10 Aug 2005 17:31:22 -0700 Subject: [Wtr-general] remote_eval In-Reply-To: <5.1.0.14.2.20050810181559.0357b050@127.0.0.1> References: <5.1.0.14.2.20050810181559.0357b050@127.0.0.1> Message-ID: <4b3ccea505081017313b734ef@mail.gmail.com> I tried that already, and there's no error but the image is not clicked - or at least there's no result of it being clicked: it does not open a new window it's supposed to open. On 8/10/05, Bret Pettichord wrote: > Comment By: Anna T (annchen) > Date: 2005-08-10 21:26 > > Message: > Brett, I have read the thread, and found there what I needed. > Now there's another question. I'm using remote_eval from within a frame, > and an object I need clicked is not clicked. No error returned: > > ie1 = ie.frame(:name, "MyFrame") > require 'watir/dialog' > ie.remote_eval <<-END > ie1.image(:id, "ImageID").click > END > > ie is attached to a frame window, not to the frame source; ie1 is a frame. > What's wrong? > > I tried attaching ie to the frame source URL, but it does not work. > > Thanks for your help. > Anna. > > ---- > > Try > > ie.remote_eval "frame(:name, 'MyFrame').image(:id, 'ImageID').click" > > > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From atuisheva at gmail.com Wed Aug 10 20:38:49 2005 From: atuisheva at gmail.com (Anna Tuisheva) Date: Wed, 10 Aug 2005 17:38:49 -0700 Subject: [Wtr-general] remote_eval In-Reply-To: <5.1.0.14.2.20050810181559.0357b050@127.0.0.1> References: <5.1.0.14.2.20050810181559.0357b050@127.0.0.1> Message-ID: <4b3ccea505081017385288400@mail.gmail.com> It worked. I've got IDs wrong. Thank you very much, Brett! On 8/10/05, Bret Pettichord wrote: > Comment By: Anna T (annchen) > Date: 2005-08-10 21:26 > > Message: > Brett, I have read the thread, and found there what I needed. > Now there's another question. I'm using remote_eval from within a frame, > and an object I need clicked is not clicked. No error returned: > > ie1 = ie.frame(:name, "MyFrame") > require 'watir/dialog' > ie.remote_eval <<-END > ie1.image(:id, "ImageID").click > END > > ie is attached to a frame window, not to the frame source; ie1 is a frame. > What's wrong? > > I tried attaching ie to the frame source URL, but it does not work. > > Thanks for your help. > Anna. > > ---- > > Try > > ie.remote_eval "frame(:name, 'MyFrame').image(:id, 'ImageID').click" > > > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From huemach at Cybersoft-VN.com Wed Aug 10 21:47:03 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Thu, 11 Aug 2005 08:47:03 +0700 Subject: [Wtr-general] Help read data in table with Row Span Message-ID: <99DF6C0285C2CE4C99F02D78385719660181B650@hue.cybersoft-vn.com> Dear All, My application table display data as like this ----------------------------------------------- | Col 1 | Col 2 | Col 3 | ... ----------------------------------------------- | V1 | V2 .. | Row 1 | ------------------------------------- | V3 | V4 .. ----------------------------------------------- | Row 3 | V5 | V6... ----------------------------------------------- ... When I use method: table(..).to_a I got this result: => [["Col 1", "Col 2", "Col 3",..], ["Row 1", "V1", "V2",..], ["V3", "V4",..],"Row 3", "V5", "V5",..] ] Looking this result, I found this value ["V3", "V4",..] missing 1 column. So any solution for this table, that mean I would like the value get from table always don't missing any column and row in case have row span or column span Ex: With the case above, I would like the value I got from table as like this: [["Col 1", "Col 2", "Col 3",..], ["Row 1", "V1", "V2",..], ["nil", "V3", "V4",..],"Row 3", "V5", "V5",..] ] Or [["Col 1", "Col 2", "Col 3",..], ["Row 1", "V1", "V2",..], ["Row 1", "V3", "V4",..],"Row 3", "V5", "V5",..] ] Thank you for help. Hue From paul.rogers at shaw.ca Wed Aug 10 22:40:50 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 10 Aug 2005 20:40:50 -0600 Subject: [Wtr-general] Help read data in table with Row Span In-Reply-To: <99DF6C0285C2CE4C99F02D78385719660181B650@hue.cybersoft-vn.com> Message-ID: <001d01c59e1e$16017950$6600a8c0@NewDell> I took a quick look at this, and I don't know how we would do it. Using my example table below, The table itself only has 2 cells on the row after the rowspan. Even other methods like the one below only show it has having 2 cells, I guess cos in reality it does only have 2 cells. irb(main):011:0> puts ie.table(:index,1).row_values(3) c2 c3 Sorry I couldn't help more Paul
c1c2c3
2 rowsc2c3
c2c3
Normalc2c3
-----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Hue Mach Dieu Sent: 10 August 2005 19:47 To: wtr-general at rubyforge.org Subject: [Wtr-general] Help read data in table with Row Span Dear All, My application table display data as like this ----------------------------------------------- | Col 1 | Col 2 | Col 3 | ... ----------------------------------------------- | V1 | V2 .. | Row 1 | ------------------------------------- | V3 | V4 .. ----------------------------------------------- | Row 3 | V5 | V6... ----------------------------------------------- ... When I use method: table(..).to_a I got this result: => [["Col 1", "Col 2", "Col 3",..], ["Row 1", "V1", "V2",..], ["V3", "V4",..],"Row 3", "V5", "V5",..] ] Looking this result, I found this value ["V3", "V4",..] missing 1 column. So any solution for this table, that mean I would like the value get from table always don't missing any column and row in case have row span or column span Ex: With the case above, I would like the value I got from table as like this: [["Col 1", "Col 2", "Col 3",..], ["Row 1", "V1", "V2",..], ["nil", "V3", "V4",..],"Row 3", "V5", "V5",..] ] Or [["Col 1", "Col 2", "Col 3",..], ["Row 1", "V1", "V2",..], ["Row 1", "V3", "V4",..],"Row 3", "V5", "V5",..] ] Thank you for help. Hue _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From huemach at Cybersoft-VN.com Thu Aug 11 02:39:42 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Thu, 11 Aug 2005 13:39:42 +0700 Subject: [Wtr-general] Help truncate 2D array? Message-ID: <99DF6C0285C2CE4C99F02D78385719660181B7D8@hue.cybersoft-vn.com> Hi All, I have 2D array like this A1: [[1,2,3],[4,5,6],[7,8,9]] Now, I would like truncate the any column in array A1 For ex: A1: [[1,2,3],[4,5,6],[7,8,9]] I truncate the column 1 of A1 The expected 2D array as like this A2: [[2,3],[5,6],[8,9]] Thank you for help Hue From jared at kilmore.info Thu Aug 11 03:27:31 2005 From: jared at kilmore.info (Jared Quinert) Date: Thu, 11 Aug 2005 17:27:31 +1000 Subject: [Wtr-general] Help truncate 2D array? In-Reply-To: <99DF6C0285C2CE4C99F02D78385719660181B7D8@hue.cybersoft-vn.com> References: <99DF6C0285C2CE4C99F02D78385719660181B7D8@hue.cybersoft-vn.com> Message-ID: <42FAFDE3.8090806@kilmore.info> a=[[1,2,3],[4,5,6],[7,8,9]] a2=a.collect {|b| b[0..-2]} Jared Hue Mach Dieu wrote: >Hi All, >I have 2D array like this > >A1: [[1,2,3],[4,5,6],[7,8,9]] > >Now, I would like truncate the any column in array A1 > >For ex: A1: [[1,2,3],[4,5,6],[7,8,9]] > >I truncate the column 1 of A1 > >The expected 2D array as like this > >A2: [[2,3],[5,6],[8,9]] > >Thank you for help > >Hue > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > From Neumann at encoway.de Thu Aug 11 04:41:34 2005 From: Neumann at encoway.de (Neumann, Carsten - ENCOWAY) Date: Thu, 11 Aug 2005 10:41:34 +0200 Subject: [Wtr-general] choose file window Message-ID: <0E46E3619326224CB40CC30C2E36364E362BB6@zde008.lenze.com> The file upload using a file field still doesn't work, it's stopped by the "choose file" window. In the command box that appears it says i.e. "getWindowHandle - looking for: Choose file" May be he doesn't find it because in my German Windows version this window is called: "Datei ausw?hlen" Can that be the reason? Thanks! Carsten Neumann -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050811/a92fd0ff/attachment.html From pascal.serodes at ortec.fr Thu Aug 11 05:01:38 2005 From: pascal.serodes at ortec.fr (Pascal SERODES) Date: Thu, 11 Aug 2005 11:01:38 +0200 Subject: [Wtr-general] RuntimeError: failed to get IEnum Interface HRESULT error code:0x80004002 Message-ID: i want to use watir but i'v got these troubleshooting: d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:805:in `each': Failed to get IEnum Interface (RuntimeError) HRESULT error code:0x80004002 Cette interface n'est pas prise en charge 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:3236: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 D:/watir-v1_4/sioux/scripts/t1.rb:24 This error raised everytime watir try to set something in IE like setting a value in a textfield, Reading value from ie looks like OK. im using window XP SP1 IE 6.0 watir 1.4.2 ruby 1.8.2-15 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050811/bd6e9b5e/attachment.html From bret at pettichord.com Thu Aug 11 11:55:59 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 11 Aug 2005 10:55:59 -0500 Subject: [Wtr-general] RuntimeError: failed to get IEnum Interface HRESULT error code:0x80004002 In-Reply-To: Message-ID: <5.1.0.14.2.20050811105511.035ad6d8@127.0.0.1> The error comes from this line of your script D:/watir-v1_4/sioux/scripts/t1.rb:24 Please show us your script. At 04:01 AM 8/11/2005, Pascal SERODES wrote: >Content-class: urn:content-classes:message >Content-Type: multipart/alternative; > boundary="----_=_NextPart_001_01C59E53.4882DE5C" > >i want to use watir but i'v got these troubleshooting: > > >d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:805:in `each': Failed to get > > IEnum Interface (RuntimeError) HRESULT error code:0x80004002 > >Cette interface n'est pas prise en charge 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:3236: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 > D:/watir-v1_4/sioux/scripts/t1.rb:24 > > >This error raised everytime watir try to set something in IE like > > setting a value in a textfield, Reading value from ie looks like OK. > > im using window XP SP1 > > IE 6.0 > > watir 1.4.2 > >ruby 1.8.2-15 > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Aug 11 12:15:56 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 11 Aug 2005 11:15:56 -0500 Subject: [Wtr-general] choose file window In-Reply-To: <0E46E3619326224CB40CC30C2E36364E362BB6@zde008.lenze.com> Message-ID: <5.1.0.14.2.20050811111250.035b73f8@127.0.0.1> At 03:41 AM 8/11/2005, Neumann, Carsten - ENCOWAY wrote: >May be he doesn t find it because in my German Windows version this window >is called: Datei ausw?hlen > >Can that be the reason? I think this is it. We have another report from a french speaker: http://rubyforge.org/tracker/index.php?func=detail&aid=1713&group_id=104&atid=487 Can you tell me how to create a string that contains an a-umlaut if i don't have a german keyboard? _____________________ Bret Pettichord www.pettichord.com From jeff.darklight at gmail.com Thu Aug 11 12:20:14 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Thu, 11 Aug 2005 09:20:14 -0700 Subject: [Wtr-general] choose file window In-Reply-To: <5.1.0.14.2.20050811111250.035b73f8@127.0.0.1> References: <0E46E3619326224CB40CC30C2E36364E362BB6@zde008.lenze.com> <5.1.0.14.2.20050811111250.035b73f8@127.0.0.1> Message-ID: using alt codes ... like hold alt and type 0254 ( and release alt )... that's how you type extended characters. j. On 8/11/05, Bret Pettichord wrote: > At 03:41 AM 8/11/2005, Neumann, Carsten - ENCOWAY wrote: > >May be he doesn t find it because in my German Windows version this window > >is called: Datei ausw?hlen > > > >Can that be the reason? > > I think this is it. We have another report from a french speaker: > > http://rubyforge.org/tracker/index.php?func=detail&aid=1713&group_id=104&atid=487 > > Can you tell me how to create a string that contains an a-umlaut if i don't > have a german keyboard? > > > > _____________________ > Bret Pettichord > www.pettichord.com > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "So long, and thanks for all the fish" Jeff Wood From saudaziz at gmail.com Thu Aug 11 13:12:04 2005 From: saudaziz at gmail.com (saud aziz) Date: Thu, 11 Aug 2005 10:12:04 -0700 Subject: [Wtr-general] Checking for correct URl Message-ID: <24d0cb3805081110127f003d1f@mail.gmail.com> Is there any way i could check whether i am on correct URL or not? -- What is written without effort is in general read without pleasure. - Samuel Johnson -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050811/0b339c7a/attachment.html From shaorobics at gmail.com Thu Aug 11 15:00:47 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Thu, 11 Aug 2005 15:00:47 -0400 Subject: [Wtr-general] Checking for correct URl In-Reply-To: <24d0cb3805081110127f003d1f@mail.gmail.com> References: <24d0cb3805081110127f003d1f@mail.gmail.com> Message-ID: <593b9ae8050811120049bc2a8a@mail.gmail.com> ie.url() will give you the current url in the browser Shao From saudaziz at gmail.com Thu Aug 11 16:08:37 2005 From: saudaziz at gmail.com (saud aziz) Date: Thu, 11 Aug 2005 13:08:37 -0700 Subject: [Wtr-general] clearSecurityAlertBox() doesn't work? Message-ID: <24d0cb38050811130841164bb1@mail.gmail.com> Ok guys help me out.. I am trying to set up a login script to learn to use Watir as i plan on switching from SAMIE/Perl to Watir/Ruby. Here i have simple script made just to test how it would react and work with simple login to any site. Expected: The script should emulate user and login to the mentioned site. After successful login, it should either detect and log whether it was on correct URl or not. Also, it should check for string "today!" in the text on that URL. But according to this script, it always fails. 1) It doesn't take care of SSL popup. Should it be working, if so, what do i need to add/remove/edit in following script to make it work? 2) How can i set it to check whether it is on expected URL or not? I have assert ie.url in my script but that didn't seem to work and always gave a fail. require 'watir' include Watir require 'test/unit' require 'test/unit/ui/console/testrunner' #logger includes require 'example_logger1' class TC_SSO_example < Test::Unit::TestCase def start #open the IE browser $ie = IE.new filePrefix = "test_logger1" #create a logger $logger = LoggerFactory.start_xml_logger(filePrefix) $ie.set_logger($logger) end def test_Login start test_site = 'http://www.SeattleSymphony.com' test_success_URL = ' http://www.seattlesymphony.org/symphony/index.aspx?month=9&year=2005&tries=1 ' $logger.log("") #ie = IE.new $ie.goto(test_site) $ie.link(:text, "Login").click $ie.text_field(:name, "template:tx_LoginName").set("mytestlogin") $ie.text_field(:name, "template:tx_Password").set("mytestlogin") $ie.button(:name, "template:btn_Login").click #wc = WinClicker.new #wc.clearSecurityAlertBox() <---- on enabling this and above, it starts dumping lots of irrelavent stuff. #clearSecurityAlertBox() <---- obviously doesn't work as it. begin assert($ie.contains_text("today!")) assert($ie.url(test_success_URL)) $logger.log("Passed. User has sucessfully logged in") $logger.log_results("test_Login", "mytestlogin", "test_URL", "TEST PASSED.") rescue => e $logger.log("*FAILED*." + e.message + "\n" + e.backtrace.join("\n")) $logger.log_results("test_Login", "mytestlogin", "test_URL", "TEST FAILED.") #logs to both the XML file and corelogger end $logger.log '## End of test Login' $logger.end_log #close XML log file end end -- What is written without effort is in general read without pleasure. - Samuel Johnson -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050811/b328b626/attachment.html From lbolef at yahoo.com Thu Aug 11 17:00:17 2005 From: lbolef at yahoo.com (Larry Bolef) Date: Thu, 11 Aug 2005 14:00:17 -0700 (PDT) Subject: [Wtr-general] Dismiss Security Alert Window Message-ID: <20050811210017.31690.qmail@web80901.mail.scd.yahoo.com> Apologies in advance for a rank newbie question. I've skimmed the mailing list and noticed various references to this problem, but nothing that helped me. I'm using Ruby 1.8.2-15 and Watir v1.4 on Windows XP. I'm testing a website that triggers a "Security Alert" window. I'd like to dismiss (automatically click on the Yes button) this window. I've tried the code below, but hang on IE.start, so the clickWindowsButton never gets a chance to dismiss the window. Is there another way to dismiss the Windows security alert window? require 'watir' require 'watir\winClicker.rb' include Watir w = WinClicker.new ie=Watir::IE.start('http://xxxx') w.clickWindowsButton("Security Alert" , "&Yes" ) ie.text_field(:name, "username").set("username") ie.text_field(:name, "password").set("password") ie.button(:name, "Action").click ie.close ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs From huemach at Cybersoft-VN.com Thu Aug 11 21:36:13 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Fri, 12 Aug 2005 08:36:13 +0700 Subject: [Wtr-general] Help Lib Path incorrect? Message-ID: <99DF6C0285C2CE4C99F02D78385719660181B9A8@hue.cybersoft-vn.com> Hi ALL, My structure folder as like this My Script -- config -- configLoad.xml -- Util -- report.rb -- testcases -- tc1.rb I define the report.rb as like this $LOAD_PATH << '..' if $0 == __FILE__ ... Configurator.load_xml_file('../config/configLoad.xml') .. In tc1.rb I use some method in report.rb When I run it from console, don't have any problem But when I run it within rbt (one plugin for Eclipse) I got this error D:/ruby/lib/ruby/site_ruby/1.8/log4r/configurator.rb:56:in `initialize': No such file or directory - D:\MyScript/Util/config/configLoad.xml (Errno::ENOENT) from D:/ruby/lib/ruby/site_ruby/1.8/log4r/configurator.rb:56:in `new' from D:/ruby/lib/ruby/site_ruby/1.8/log4r/configurator.rb:56:in `load_xml_file' from D:/MyScript/Util/report.rb:25 from D:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__' from D:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require' from D:/MyScript/testcases/tc1.rb:18 Is any incorrect with my script? Thank you for help Hue From shaorobics at gmail.com Thu Aug 11 22:04:03 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Thu, 11 Aug 2005 22:04:03 -0400 Subject: [Wtr-general] Help Lib Path incorrect? In-Reply-To: <99DF6C0285C2CE4C99F02D78385719660181B9A8@hue.cybersoft-vn.com> References: <99DF6C0285C2CE4C99F02D78385719660181B9A8@hue.cybersoft-vn.com> Message-ID: <593b9ae80508111904c2a78f8@mail.gmail.com> Well this line stands out to me: D:\MyScript/Util/config/configLoad.xml ^ this slash is different than the rest..that's my guess :) Shao From shubharag at yahoo.com Thu Aug 11 23:01:08 2005 From: shubharag at yahoo.com (Shubha R) Date: Thu, 11 Aug 2005 20:01:08 -0700 (PDT) Subject: [Wtr-general] clearSecurityAlertBox() doesn't work? In-Reply-To: <24d0cb38050811130841164bb1@mail.gmail.com> Message-ID: <20050812030108.42667.qmail@web40429.mail.yahoo.com> Have you tried the WET addon? I have just start to use it and it seems to do a very good job in handling all popups. S saud aziz wrote: Ok guys help me out.. I am trying to set up a login script to learn to use Watir as i plan on switching from SAMIE/Perl to Watir/Ruby. Here i have simple script made just to test how it would react and work with simple login to any site. Expected: The script should emulate user and login to the mentioned site. After successful login, it should either detect and log whether it was on correct URl or not. Also, it should check for string "today!" in the text on that URL. But according to this script, it always fails. 1) It doesn't take care of SSL popup. Should it be working, if so, what do i need to add/remove/edit in following script to make it work? 2) How can i set it to check whether it is on expected URL or not? I have assert ie.url in my script but that didn't seem to work and always gave a fail. require 'watir' include Watir require 'test/unit' require 'test/unit/ui/console/testrunner' #logger includes require 'example_logger1' class TC_SSO_example < Test::Unit::TestCase def start #open the IE browser $ie = IE.new filePrefix = "test_logger1" #create a logger $logger = LoggerFactory.start_xml_logger(filePrefix) $ie.set_logger($logger) end def test_Login start test_site = 'http://www.SeattleSymphony.com' test_success_URL = 'http://www.seattlesymphony.org/symphony/index.aspx?month=9&year=2005&tries=1' $logger.log("") #ie = IE.new $ie.goto(test_site) $ie.link(:text, "Login").click $ie.text_field(:name, "template:tx_LoginName").set("mytestlogin") $ie.text_field(:name, "template:tx_Password").set("mytestlogin") $ie.button(:name, "template:btn_Login").click #wc = WinClicker.new #wc.clearSecurityAlertBox() <---- on enabling this and above, it starts dumping lots of irrelavent stuff. #clearSecurityAlertBox() <---- obviously doesn't work as it. begin assert($ie.contains_text("today!")) assert($ie.url(test_success_URL)) $logger.log("Passed. User has sucessfully logged in") $logger.log_results("test_Login", "mytestlogin", "test_URL", "TEST PASSED.") rescue => e $logger.log("*FAILED*." + e.message + "\n" + e.backtrace.join("\n")) $logger.log_results("test_Login", "mytestlogin", "test_URL", "TEST FAILED.") #logs to both the XML file and corelogger end $logger.log '## End of test Login' $logger.end_log #close XML log file end end -- What is written without effort is in general read without pleasure. - Samuel Johnson _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050811/3f00fb1d/attachment.html From jkohl at telusplanet.net Thu Aug 11 23:01:11 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Thu, 11 Aug 2005 21:01:11 -0600 Subject: [Wtr-general] Help Lib Path incorrect? In-Reply-To: <593b9ae80508111904c2a78f8@mail.gmail.com> Message-ID: <20050812030148.QVYL5980.priv-edtnes51.telusplanet.net@tintin> That would be my guess as well. I haven't used RDT in about a month, but I remember having path problems once in a while. -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Shao Kang Tat > Sent: August 11, 2005 8:04 PM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] Help Lib Path incorrect? > > Well this line stands out to me: > > D:\MyScript/Util/config/configLoad.xml > ^ > this slash is different than the rest..that's my guess :) > > Shao > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From shubharag at yahoo.com Thu Aug 11 23:02:19 2005 From: shubharag at yahoo.com (Shubha R) Date: Thu, 11 Aug 2005 20:02:19 -0700 (PDT) Subject: [Wtr-general] clearSecurityAlertBox() doesn't work? In-Reply-To: <24d0cb38050811130841164bb1@mail.gmail.com> Message-ID: <20050812030219.14825.qmail@web40423.mail.yahoo.com> Have you tried the WET addon? I have just start to use it and it seems to do a very good job in handling all popups. S saud aziz wrote: Ok guys help me out.. I am trying to set up a login script to learn to use Watir as i plan on switching from SAMIE/Perl to Watir/Ruby. Here i have simple script made just to test how it would react and work with simple login to any site. Expected: The script should emulate user and login to the mentioned site. After successful login, it should either detect and log whether it was on correct URl or not. Also, it should check for string "today!" in the text on that URL. But according to this script, it always fails. 1) It doesn't take care of SSL popup. Should it be working, if so, what do i need to add/remove/edit in following script to make it work? 2) How can i set it to check whether it is on expected URL or not? I have assert ie.url in my script but that didn't seem to work and always gave a fail. require 'watir' include Watir require 'test/unit' require 'test/unit/ui/console/testrunner' #logger includes require 'example_logger1' class TC_SSO_example < Test::Unit::TestCase def start #open the IE browser $ie = IE.new filePrefix = "test_logger1" #create a logger $logger = LoggerFactory.start_xml_logger(filePrefix) $ie.set_logger($logger) end def test_Login start test_site = 'http://www.SeattleSymphony.com' test_success_URL = 'http://www.seattlesymphony.org/symphony/index.aspx?month=9&year=2005&tries=1' $logger.log("") #ie = IE.new $ie.goto(test_site) $ie.link(:text, "Login").click $ie.text_field(:name, "template:tx_LoginName").set("mytestlogin") $ie.text_field(:name, "template:tx_Password").set("mytestlogin") $ie.button(:name, "template:btn_Login").click #wc = WinClicker.new #wc.clearSecurityAlertBox() <---- on enabling this and above, it starts dumping lots of irrelavent stuff. #clearSecurityAlertBox() <---- obviously doesn't work as it. begin assert($ie.contains_text("today!")) assert($ie.url(test_success_URL)) $logger.log("Passed. User has sucessfully logged in") $logger.log_results("test_Login", "mytestlogin", "test_URL", "TEST PASSED.") rescue => e $logger.log("*FAILED*." + e.message + "\n" + e.backtrace.join("\n")) $logger.log_results("test_Login", "mytestlogin", "test_URL", "TEST FAILED.") #logs to both the XML file and corelogger end $logger.log '## End of test Login' $logger.end_log #close XML log file end end -- What is written without effort is in general read without pleasure. - Samuel Johnson _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050811/f8b7177d/attachment.html From shubharag at yahoo.com Thu Aug 11 23:06:16 2005 From: shubharag at yahoo.com (Shubha R) Date: Thu, 11 Aug 2005 20:06:16 -0700 (PDT) Subject: [Wtr-general] Dismiss Security Alert Window In-Reply-To: <20050811210017.31690.qmail@web80901.mail.scd.yahoo.com> Message-ID: <20050812030616.11696.qmail@web40426.mail.yahoo.com> I use the WET addon and that has been able to handle almost any window Larry Bolef wrote: Apologies in advance for a rank newbie question. I've skimmed the mailing list and noticed various references to this problem, but nothing that helped me. I'm using Ruby 1.8.2-15 and Watir v1.4 on Windows XP. I'm testing a website that triggers a "Security Alert" window. I'd like to dismiss (automatically click on the Yes button) this window. I've tried the code below, but hang on IE.start, so the clickWindowsButton never gets a chance to dismiss the window. Is there another way to dismiss the Windows security alert window? require 'watir' require 'watir\winClicker.rb' include Watir w = WinClicker.new ie=Watir::IE.start('http://xxxx') w.clickWindowsButton("Security Alert" , "&Yes" ) ie.text_field(:name, "username").set("username") ie.text_field(:name, "password").set("password") ie.button(:name, "Action").click ie.close ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general --------------------------------- Yahoo! Mail for Mobile Take Yahoo! Mail with you! Check email on your mobile phone. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050811/0b1df376/attachment.html From huemach at Cybersoft-VN.com Thu Aug 11 23:39:19 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Fri, 12 Aug 2005 10:39:19 +0700 Subject: [Wtr-general] Re: Help Lib Path incorrect? Message-ID: <99DF6C0285C2CE4C99F02D78385719660181BA98@hue.cybersoft-vn.com> Hi Shao I don't think the problem in the slash D:\MyScript/Util/config/configLoad.xml Bc When I run in console, this problem don't occur Thank for help Hue From raghu at qantom.com Thu Aug 11 23:59:54 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Fri, 12 Aug 2005 09:29:54 +0530 Subject: [Wtr-general] Re: Help Lib Path incorrect? In-Reply-To: <99DF6C0285C2CE4C99F02D78385719660181BA98@hue.cybersoft-vn.com> References: <99DF6C0285C2CE4C99F02D78385719660181BA98@hue.cybersoft-vn.com> Message-ID: <42FC1EBA.7080505@qantom.com> I think Hue is right. D:\MyScript/Util/config/configLoad.xml I have seen this output many a time and seems like the way Ruby interprets the path. In the cases when I hit the problem, it was simply that the file _was_ missing. Raghu Hue Mach Dieu wrote: >Hi Shao >I don't think the problem in the slash > D:\MyScript/Util/config/configLoad.xml > >Bc When I run in console, this problem don't occur > >Thank for help >Hue > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > -- Qantom Software http://www.qantom.com Ph : 26799269 Xtn. 125 sip : raghu at sip411.com -- From saudaziz at gmail.com Thu Aug 11 23:59:18 2005 From: saudaziz at gmail.com (saud aziz) Date: Thu, 11 Aug 2005 20:59:18 -0700 Subject: [Wtr-general] clearSecurityAlertBox() doesn't work? In-Reply-To: <20050812030219.14825.qmail@web40423.mail.yahoo.com> References: <24d0cb38050811130841164bb1@mail.gmail.com> <20050812030219.14825.qmail@web40423.mail.yahoo.com> Message-ID: <24d0cb3805081120592778d32f@mail.gmail.com> WET addon? whats that? Where can i get it from? On 8/11/05, Shubha R wrote: > > Have you tried the WET addon? I have just start to use it and > it seems to do a very good job in handling all popups. > S > > *saud aziz * wrote: > > Ok guys help me out.. > > I am trying to set up a login script to learn to use Watir as i plan on > switching from SAMIE/Perl to Watir/Ruby. Here i have simple script made just > to test how it would react and work with simple login to any site. > > Expected: > > The script should emulate user and login to the mentioned site. After > successful login, it should either detect and log whether it was on correct > URl or not. Also, it should check for string "today!" in the text on that > URL. But according to this script, it always fails. > > 1) It doesn't take care of SSL popup. Should it be working, if so, what do > i need to add/remove/edit in following script to make it work? > 2) How can i set it to check whether it is on expected URL or not? I have > assert ie.url in my script but that didn't seem to work and always gave a > fail. > > require 'watir' > include Watir > re! quire 'test/unit' > require 'test/unit/ui/console/testrunner' > > #logger includes > require 'example_logger1' > > class TC_SSO_example < Test::Unit::TestCase > > def start > #open the IE browser > $ie = IE.new > filePrefix = "test_logger1" > #create a logger > $logger = LoggerFactory.start_xml_logger(filePrefix) > $ie.set_logger($logger) > end > > > def test_Login > > start > test_site = 'http://www.SeattleSymphony.com > ' > test_success_URL = ' > http://www.seattlesymphony.org/symphony/index.aspx?month=9&year=2005&tries=1 > ' > $logger.log("") > > #i! e = IE.new > $ie.goto(test_site) > $ie.link(:text, "Login").click > $ie.text_field(:name, "template:tx_LoginName").set("mytestlogin") > $ie.text_field(:name, "template:tx_Password").set("mytestlogin") > $ie.button(:name, "template:btn_Login").click > #wc = WinClicker.new > #wc.clearSecurityAlertBox() <---- on enabling this and above, it starts > dumping lots of irrelavent stuff. > #clearSecurityAlertBox() <---- obviously doesn't work as it. > > begin > assert($ie.contains_text("today!")) > assert($ie.url(test_success_URL)) > $logger.log("Passed. User has sucessfully logged in") > $logger.log_results("test_Login", "mytestlogin", "test_URL", "TEST > PASSED.") > res! cue => e > $logger.log("*FAILED*." + e.message + "\n" + e.backtrace.join("\n")) > $logger.log_results("test_Login", "mytestlogin", "test_URL", "TEST > FAILED.") #logs to both the XML file and corelogger > > end > > $logger.log '## End of test Login' > $logger.end_log #close XML log file > end > > > end > > -- > What is written without effort is in general read without pleasure. > - Samuel Johnson > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > ------------------------------ > Start your day with Yahoo! - make it your home page > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > -- What is written without effort is in general read without pleasure. - Samuel Johnson -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050811/ba877992/attachment.html From huemach at Cybersoft-VN.com Fri Aug 12 00:36:39 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Fri, 12 Aug 2005 11:36:39 +0700 Subject: [Wtr-general] RE: Help Lib Path incorrect? Message-ID: <99DF6C0285C2CE4C99F02D78385719660181BB0A@hue.cybersoft-vn.com> Hi, I think the problem cause with D:/Applications/ruby/lib/ruby/site_ruby/1.8/log4r/configurator.rb don't know the base directory. When I run the TC.rb from console the ruby interpreter get the current directory as base path. So it executed without problem. And in case I run it within Eclipse IDE. I think Ruby interpreter or Eclipse Plug-in got the wrong base path so this problem occurs as like this D:/Applications/ruby/lib/ruby/site_ruby/1.8/log4r/configurator.rb:56:in `initialize': No such file or directory - ../config/configLoad.xml (Errno::ENOENT) Thank you for help Hue From satti at qantom.com Fri Aug 12 00:38:18 2005 From: satti at qantom.com (Sathya Shankar) Date: Fri, 12 Aug 2005 10:08:18 +0530 Subject: [Wtr-general] clearSecurityAlertBox() doesn't work? In-Reply-To: <24d0cb3805081120592778d32f@mail.gmail.com> References: <24d0cb38050811130841164bb1@mail.gmail.com> <20050812030219.14825.qmail@web40423.mail.yahoo.com> <24d0cb3805081120592778d32f@mail.gmail.com> Message-ID: <42FC27BA.1000902@qantom.com> You can get WET from http://www.wet.qantom.org Thanks Satti saud aziz wrote: > WET addon? whats that? Where can i get it from? > > On 8/11/05, *Shubha R* > wrote: > > Have you tried the WET addon? I have just start to use it and > it seems to do a very good job in handling all popups. > > S > > */saud aziz >/* wrote: > > Ok guys help me out.. > > I am trying to set up a login script to learn to use Watir as > i plan on switching from SAMIE/Perl to Watir/Ruby. Here i have > simple script made just to test how it would react and work > with simple login to any site. > > Expected: > > The script should emulate user and login to the mentioned > site. After successful login, it should either detect and log > whether it was on correct URl or not. Also, it should check > for string "today!" in the text on that URL. But according to > this script, it always fails. > > 1) It doesn't take care of SSL popup. Should it be working, if > so, what do i need to add/remove/edit in following script to > make it work? > 2) How can i set it to check whether it is on expected URL or > not? I have assert ie.url in my script but that didn't seem to > work and always gave a fail. > > require 'watir' > include Watir > re! quire 'test/unit' > require 'test/unit/ui/console/testrunner' > > #logger includes > require 'example_logger1' > > class TC_SSO_example < Test::Unit::TestCase > > def start > #open the IE browser > $ie = IE.new > filePrefix = "test_logger1" > #create a logger > $logger = LoggerFactory.start_xml_logger(filePrefix) > $ie.set_logger($logger) > end > > > def test_Login > > start > test_site = 'http://www.SeattleSymphony.com > ' > test_success_URL = ' > http://www.seattlesymphony.org/symphony/index.aspx?month=9&year=2005&tries=1 > ' > $logger.log("") > > #i! e = IE.new > $ie.goto(test_site) > $ie.link(:text, "Login").click > $ie.text_field(:name, > "template:tx_LoginName").set("mytestlogin") > $ie.text_field(:name, > "template:tx_Password").set("mytestlogin") > $ie.button(:name, "template:btn_Login").click > #wc = WinClicker.new > #wc.clearSecurityAlertBox() <---- on enabling this and > above, it starts dumping lots of irrelavent stuff. > #clearSecurityAlertBox() <---- obviously doesn't work as it. > > begin > assert($ie.contains_text("today!")) > assert($ie.url(test_success_URL)) > $logger.log("Passed. User has sucessfully logged in") > $logger.log_results("test_Login", "mytestlogin", > "test_URL", "TEST PASSED.") > res! cue => e > $logger.log("*FAILED*." + e.message + "\n" + > e.backtrace.join("\n")) > $logger.log_results("test_Login", "mytestlogin", > "test_URL", "TEST FAILED.") #logs to both the XML file and > corelogger > > end > > $logger.log '## End of test Login' > $logger.end_log #close XML log file > end > > > end > > -- > What is written without effort is in general read without > pleasure. > - Samuel Johnson > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > ------------------------------------------------------------------------ > Start your day with Yahoo! - make it your home page > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > -- > What is written without effort is in general read without pleasure. > - Samuel Johnson > >------------------------------------------------------------------------ > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > From pascal.serodes at ortec.fr Fri Aug 12 04:31:54 2005 From: pascal.serodes at ortec.fr (Pascal SERODES) Date: Fri, 12 Aug 2005 10:31:54 +0200 Subject: [Wtr-general] RuntimeError: failed to get IEnum InterfaceHRESULT error code:0x80004002 Message-ID: My script is very simple, The error is as soon i try to set a value in a text field (line number 24) -------------------------------------------------------------------------------------------------------------# # test watir pour sioux # #------------------------------------------------------------------------------------------------------------# require 'watir' # the watir controller # set a variable siouxHome = 'http://localhost:8080/moa' # open the IE browser ie = Watir::IE.new # print some comments puts "## Debut test: Sioux Test" puts " " puts "Step 1: connexion a sioux: " ie.goto(siouxHome) puts "Step 2: loggin " ie.text_field(:name, 'j_username').set('xxx') --> line number 24; ie.text_field(:name, 'j_password').set('xxx') ie.button(:name, 'Connexion').click if ie.contains_text("noErrorsOnPage") puts "connexion effectu?e" else puts "no good" end puts " " puts "## Fin du test" -----Message d'origine----- De : wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] De la part de Bret Pettichord Envoy? : jeudi 11 ao?t 2005 17:56 ? : wtr-general at rubyforge.org Objet : Re: [Wtr-general] RuntimeError: failed to get IEnum InterfaceHRESULT error code:0x80004002 The error comes from this line of your script D:/watir-v1_4/sioux/scripts/t1.rb:24 Please show us your script. At 04:01 AM 8/11/2005, Pascal SERODES wrote: >Content-class: urn:content-classes:message >Content-Type: multipart/alternative; > boundary="----_=_NextPart_001_01C59E53.4882DE5C" > >i want to use watir but i'v got these troubleshooting: > > >d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:805:in `each': Failed to get > > IEnum Interface (RuntimeError) HRESULT error code:0x80004002 > >Cette interface n'est pas prise en charge 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:3236: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 > D:/watir-v1_4/sioux/scripts/t1.rb:24 > > >This error raised everytime watir try to set something in IE like > > setting a value in a textfield, Reading value from ie looks like OK. > > im using window XP SP1 > > IE 6.0 > > watir 1.4.2 > >ruby 1.8.2-15 > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Fri Aug 12 10:08:52 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 12 Aug 2005 08:08:52 -0600 Subject: [Wtr-general] RuntimeError: failed to get IEnum InterfaceHRESULTerror code:0x80004002 In-Reply-To: Message-ID: <000901c59f47$5ec0df80$6600a8c0@NewDell> Do the unit tests work for you? -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Pascal SERODES Sent: 12 August 2005 02:32 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] RuntimeError: failed to get IEnum InterfaceHRESULTerror code:0x80004002 My script is very simple, The error is as soon i try to set a value in a text field (line number 24) ------------------------------------------------------------------------ -------------------------------------# # test watir pour sioux # #----------------------------------------------------------------------- -------------------------------------# require 'watir' # the watir controller # set a variable siouxHome = 'http://localhost:8080/moa' # open the IE browser ie = Watir::IE.new # print some comments puts "## Debut test: Sioux Test" puts " " puts "Step 1: connexion a sioux: " ie.goto(siouxHome) puts "Step 2: loggin " ie.text_field(:name, 'j_username').set('xxx') --> line number 24; ie.text_field(:name, 'j_password').set('xxx') ie.button(:name, 'Connexion').click if ie.contains_text("noErrorsOnPage") puts "connexion effectu?e" else puts "no good" end puts " " puts "## Fin du test" -----Message d'origine----- De : wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] De la part de Bret Pettichord Envoy? : jeudi 11 ao?t 2005 17:56 ? : wtr-general at rubyforge.org Objet : Re: [Wtr-general] RuntimeError: failed to get IEnum InterfaceHRESULT error code:0x80004002 The error comes from this line of your script D:/watir-v1_4/sioux/scripts/t1.rb:24 Please show us your script. At 04:01 AM 8/11/2005, Pascal SERODES wrote: >Content-class: urn:content-classes:message >Content-Type: multipart/alternative; > boundary="----_=_NextPart_001_01C59E53.4882DE5C" > >i want to use watir but i'v got these troubleshooting: > > >d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:805:in `each': Failed to get > > IEnum Interface (RuntimeError) HRESULT error code:0x80004002 > >Cette interface n'est pas prise en charge 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:3236: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 > D:/watir-v1_4/sioux/scripts/t1.rb:24 > > >This error raised everytime watir try to set something in IE like > > setting a value in a textfield, Reading value from ie looks like OK. > > im using window XP SP1 > > IE 6.0 > > watir 1.4.2 > >ruby 1.8.2-15 > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.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 From pascal.serodes at ortec.fr Fri Aug 12 10:23:12 2005 From: pascal.serodes at ortec.fr (Pascal SERODES) Date: Fri, 12 Aug 2005 16:23:12 +0200 Subject: [Wtr-general] RuntimeError: failed to get IEnumInterfaceHRESULTerror code:0x80004002 Message-ID: No the unittests raise the same error -----Message d'origine----- De : wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] De la part de Paul Rogers Envoy? : vendredi 12 ao?t 2005 16:09 ? : wtr-general at rubyforge.org Objet : RE: [Wtr-general] RuntimeError: failed to get IEnumInterfaceHRESULTerror code:0x80004002 Do the unit tests work for you? -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Pascal SERODES Sent: 12 August 2005 02:32 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] RuntimeError: failed to get IEnum InterfaceHRESULTerror code:0x80004002 My script is very simple, The error is as soon i try to set a value in a text field (line number 24) ------------------------------------------------------------------------ -------------------------------------# # test watir pour sioux # #----------------------------------------------------------------------- -------------------------------------# require 'watir' # the watir controller # set a variable siouxHome = 'http://localhost:8080/moa' # open the IE browser ie = Watir::IE.new # print some comments puts "## Debut test: Sioux Test" puts " " puts "Step 1: connexion a sioux: " ie.goto(siouxHome) puts "Step 2: loggin " ie.text_field(:name, 'j_username').set('xxx') --> line number 24; ie.text_field(:name, 'j_password').set('xxx') ie.button(:name, 'Connexion').click if ie.contains_text("noErrorsOnPage") puts "connexion effectu?e" else puts "no good" end puts " " puts "## Fin du test" -----Message d'origine----- De : wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] De la part de Bret Pettichord Envoy? : jeudi 11 ao?t 2005 17:56 ? : wtr-general at rubyforge.org Objet : Re: [Wtr-general] RuntimeError: failed to get IEnum InterfaceHRESULT error code:0x80004002 The error comes from this line of your script D:/watir-v1_4/sioux/scripts/t1.rb:24 Please show us your script. At 04:01 AM 8/11/2005, Pascal SERODES wrote: >Content-class: urn:content-classes:message >Content-Type: multipart/alternative; > boundary="----_=_NextPart_001_01C59E53.4882DE5C" > >i want to use watir but i'v got these troubleshooting: > > >d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:805:in `each': Failed to get > > IEnum Interface (RuntimeError) HRESULT error code:0x80004002 > >Cette interface n'est pas prise en charge 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:3236: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 > D:/watir-v1_4/sioux/scripts/t1.rb:24 > > >This error raised everytime watir try to set something in IE like > > setting a value in a textfield, Reading value from ie looks like OK. > > im using window XP SP1 > > IE 6.0 > > watir 1.4.2 > >ruby 1.8.2-15 > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.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 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Fri Aug 12 10:45:37 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 12 Aug 2005 08:45:37 -0600 Subject: [Wtr-general] RuntimeError: failed to getIEnumInterfaceHRESULTerror code:0x80004002 In-Reply-To: Message-ID: <001101c59f4c$80b7fec0$6600a8c0@NewDell> It does the navigation ok, just doesn?t do the set on a text field - is that right? What about other controls? Can you read values from a text field? What OS are you using? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Pascal SERODES Sent: 12 August 2005 08:23 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] RuntimeError: failed to getIEnumInterfaceHRESULTerror code:0x80004002 No the unittests raise the same error -----Message d'origine----- De : wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] De la part de Paul Rogers Envoy? : vendredi 12 ao?t 2005 16:09 ? : wtr-general at rubyforge.org Objet : RE: [Wtr-general] RuntimeError: failed to get IEnumInterfaceHRESULTerror code:0x80004002 Do the unit tests work for you? -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Pascal SERODES Sent: 12 August 2005 02:32 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] RuntimeError: failed to get IEnum InterfaceHRESULTerror code:0x80004002 My script is very simple, The error is as soon i try to set a value in a text field (line number 24) ------------------------------------------------------------------------ -------------------------------------# # test watir pour sioux # #----------------------------------------------------------------------- -------------------------------------# require 'watir' # the watir controller # set a variable siouxHome = 'http://localhost:8080/moa' # open the IE browser ie = Watir::IE.new # print some comments puts "## Debut test: Sioux Test" puts " " puts "Step 1: connexion a sioux: " ie.goto(siouxHome) puts "Step 2: loggin " ie.text_field(:name, 'j_username').set('xxx') --> line number 24; ie.text_field(:name, 'j_password').set('xxx') ie.button(:name, 'Connexion').click if ie.contains_text("noErrorsOnPage") puts "connexion effectu?e" else puts "no good" end puts " " puts "## Fin du test" -----Message d'origine----- De : wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] De la part de Bret Pettichord Envoy? : jeudi 11 ao?t 2005 17:56 ? : wtr-general at rubyforge.org Objet : Re: [Wtr-general] RuntimeError: failed to get IEnum InterfaceHRESULT error code:0x80004002 The error comes from this line of your script D:/watir-v1_4/sioux/scripts/t1.rb:24 Please show us your script. At 04:01 AM 8/11/2005, Pascal SERODES wrote: >Content-class: urn:content-classes:message >Content-Type: multipart/alternative; > boundary="----_=_NextPart_001_01C59E53.4882DE5C" > >i want to use watir but i'v got these troubleshooting: > > >d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:805:in `each': Failed to get > > IEnum Interface (RuntimeError) HRESULT error code:0x80004002 > >Cette interface n'est pas prise en charge 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:3236: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 D:/watir-v1_4/sioux/scripts/t1.rb:24 > > >This error raised everytime watir try to set something in IE like > > setting a value in a textfield, Reading value from ie looks like OK. > > im using window XP SP1 > > IE 6.0 > > watir 1.4.2 > >ruby 1.8.2-15 > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.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 _______________________________________________ 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 lisa.crispin at gmail.com Fri Aug 12 11:19:09 2005 From: lisa.crispin at gmail.com (Lisa Crispin) Date: Fri, 12 Aug 2005 09:19:09 -0600 Subject: [Wtr-general] test::unit question Message-ID: <63915d6a05081208192e57f9af@mail.gmail.com> This may have been covered in the mailing list before, I searched all the messages I have and didn't find anything (is there a reason there isn't a searchable archive for this mailing list?) I am a Watir newbie, and also, not an OO programmer. I apologize up front for what is likely to be poor terminology. My first script was straightforward, I included everything in one script, and I used the test::unit assertions to good effect. I had to have a class to do this. My coworker who is more script savvy (he's a Perl programmer) came up with what seems to me to be a good way to organize our scripts, with modules in a lib directory that we can use from our scripts. These have no classes. I can't get test::unit to work in them, even if I add classes to both the modules and the main scripts. I am confused on when to use modules vs. classes or if there is some way to use them concurrently. I have looked at all the examples that came with Watir, but they all appear to be self-contained scripts. Are there any examples that might help us with knowing the best way to organize our tests to maximize reuse and maintainability? thanks Lisa From pascal.serodes at ortec.fr Fri Aug 12 11:28:42 2005 From: pascal.serodes at ortec.fr (Pascal SERODES) Date: Fri, 12 Aug 2005 17:28:42 +0200 Subject: [Wtr-general] RuntimeError: failed togetIEnumInterfaceHRESULTerror code:0x80004002 Message-ID: Yes the navigatio seems OK, the error raised even if i try to get the content of a text field, Ie.text_field(:name, 'name').getContents() Again here the stack trace: Microsoft Windows XP [version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. D:\siouxWatir\scripts>t2.rb ## Debut test: Sioux Test Step 1: connexion a sioux: Step 2: loggin d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:805:in `each': Failed to get IEnum Interface (RuntimeError) HRESULT error code:0x80004002 Cette interface n'est pas prise en charge 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:3236: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 D:/siouxWatir/scripts/t2.rb:24 At line 24 of file t2.rb i have: ie.text_field(:name, 'j_username').getContents() Nota: the error raised even if i try to simulate a click on a button with the line: ie.button(:name, 'Connexion').click The initial error is on line 805 of watir.rb, looks like watir can't get the DOM tree? About the OS is Windows XP, SP1, french version. Ruby version 1.8.1.2-15 Watir 1.4.2 I just did what's is tell in the "User Guide" step1 to Step4 except that the problem arrived since step3 (dont pass the unittests step) Is the problem link with services on windows XP?? The use of the COM interface may be need some extra Setup, by the way i am the administrator of the machine. -----Message d'origine----- De : wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] De la part de Paul Rogers Envoy? : vendredi 12 ao?t 2005 16:46 ? : wtr-general at rubyforge.org Objet : RE: [Wtr-general] RuntimeError: failed togetIEnumInterfaceHRESULTerror code:0x80004002 It does the navigation ok, just doesn't do the set on a text field - is that right? What about other controls? Can you read values from a text field? What OS are you using? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Pascal SERODES Sent: 12 August 2005 08:23 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] RuntimeError: failed to getIEnumInterfaceHRESULTerror code:0x80004002 No the unittests raise the same error -----Message d'origine----- De : wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] De la part de Paul Rogers Envoy? : vendredi 12 ao?t 2005 16:09 ? : wtr-general at rubyforge.org Objet : RE: [Wtr-general] RuntimeError: failed to get IEnumInterfaceHRESULTerror code:0x80004002 Do the unit tests work for you? -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Pascal SERODES Sent: 12 August 2005 02:32 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] RuntimeError: failed to get IEnum InterfaceHRESULTerror code:0x80004002 My script is very simple, The error is as soon i try to set a value in a text field (line number 24) ------------------------------------------------------------------------ -------------------------------------# # test watir pour sioux # #----------------------------------------------------------------------- -------------------------------------# require 'watir' # the watir controller # set a variable siouxHome = 'http://localhost:8080/moa' # open the IE browser ie = Watir::IE.new # print some comments puts "## Debut test: Sioux Test" puts " " puts "Step 1: connexion a sioux: " ie.goto(siouxHome) puts "Step 2: loggin " ie.text_field(:name, 'j_username').set('xxx') --> line number 24; ie.text_field(:name, 'j_password').set('xxx') ie.button(:name, 'Connexion').click if ie.contains_text("noErrorsOnPage") puts "connexion effectu?e" else puts "no good" end puts " " puts "## Fin du test" -----Message d'origine----- De : wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] De la part de Bret Pettichord Envoy? : jeudi 11 ao?t 2005 17:56 ? : wtr-general at rubyforge.org Objet : Re: [Wtr-general] RuntimeError: failed to get IEnum InterfaceHRESULT error code:0x80004002 The error comes from this line of your script D:/watir-v1_4/sioux/scripts/t1.rb:24 Please show us your script. At 04:01 AM 8/11/2005, Pascal SERODES wrote: >Content-class: urn:content-classes:message >Content-Type: multipart/alternative; > boundary="----_=_NextPart_001_01C59E53.4882DE5C" > >i want to use watir but i'v got these troubleshooting: > > >d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:805:in `each': Failed to get > > IEnum Interface (RuntimeError) HRESULT error code:0x80004002 > >Cette interface n'est pas prise en charge 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:3236: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 D:/watir-v1_4/sioux/scripts/t1.rb:24 > > >This error raised everytime watir try to set something in IE like > > setting a value in a textfield, Reading value from ie looks like OK. > > im using window XP SP1 > > IE 6.0 > > watir 1.4.2 > >ruby 1.8.2-15 > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.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 _______________________________________________ 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 bret at pettichord.com Fri Aug 12 11:51:56 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 12 Aug 2005 10:51:56 -0500 Subject: [Wtr-general] Help Lib Path incorrect? In-Reply-To: <99DF6C0285C2CE4C99F02D78385719660181B9A8@hue.cybersoft-vn. com> Message-ID: <5.1.0.14.2.20050812104636.035fad48@127.0.0.1> You are using relative paths: these are relative to the current directory -- not the location of the file. The current directory is where the file is "run" from. When you run from the console, you are probably running from the directory containing the file. By default, eclipse runs from the top of the project hierarchy, although this can be changed. Choose the Run... menu item, select the arguments tab, and change the 'working directory'. Or you can use this: $LOAD_PATH.<< File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ This makes the path relative to the location of the file, rather than the current directory. Bret At 08:36 PM 8/11/2005, Hue Mach Dieu wrote: >Hi ALL, >My structure folder as like this >My Script >-- config > -- configLoad.xml >-- Util > -- report.rb >-- testcases > -- tc1.rb > >I define the report.rb as like this > >$LOAD_PATH << '..' if $0 == __FILE__ >... >Configurator.load_xml_file('../config/configLoad.xml') >.. > >In tc1.rb >I use some method in report.rb > >When I run it from console, don't have any problem >But when I run it within rbt (one plugin for Eclipse) >I got this error > >D:/ruby/lib/ruby/site_ruby/1.8/log4r/configurator.rb:56:in `initialize': >No such file or directory - D:\MyScript/Util/config/configLoad.xml >(Errno::ENOENT) > from D:/ruby/lib/ruby/site_ruby/1.8/log4r/configurator.rb:56:in >`new' > from D:/ruby/lib/ruby/site_ruby/1.8/log4r/configurator.rb:56:in >`load_xml_file' > from D:/MyScript/Util/report.rb:25 > from >D:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in >`require__' > from >D:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in >`require' > from D:/MyScript/testcases/tc1.rb:18 > >Is any incorrect with my script? >Thank you for help > >Hue > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From onceuponapriori at gmail.com Fri Aug 12 12:49:28 2005 From: onceuponapriori at gmail.com (Jared Nuzzolillo) Date: Fri, 12 Aug 2005 12:49:28 -0400 Subject: [Wtr-general] WATIR is slow ??? Message-ID: I started using Watir to automate a small portion of my projects tests. It has been wonderfully helpful, and I'd like to thank the Watir team for making it available. I do have, however have a problem. When I execute my program, it takes a REALLY long time to run. It is setting about 400 fields, and it was painful to watch it move slowly from field to field. I already tried setting it "fast mode" and "background" mode and it sped up significantly, but it was still slow. Fortunately, I generated the WATIR script from the HTML form using JScript. As a result of generating it, I used :name to access all of the fields I had to set. Unfortunately, I had hand-edited my generated script to put 'realistic' values into all of the fields, so it would have been a PITA to write new methods to set all of the fields. The fix I used was to overwrite the WATIR text_box, select_list, radio and checkbox methods to access the DOM directly instead of 'typing' the values into the fields. This changed the execution time from about 3.5 minutes to about 15 seconds. Thanks to the power of Ruby, I didn't have to edit my code generator and regen. Was there an easier path? Some flag of which I'm unaware? Thanks so much, Jared Nuzzolillo The (admittedly hackish and cruddy) code I used to modify it: class IE def text_field(toss, name) fld = self.ie.document.forms.namedItem("frmApply").elements.namedItem(name) class << fld def set(val) self.value = val end end fld end def checkbox(toss,name) fld = self.ie.document.forms.namedItem("frmApply").elements.namedItem(name) class << fld def set self.checked = true end #haven't tested this one yet def clear self.checked = false end end fld end def radio(toss,name) fld = self.ie.document.forms.namedItem ("frmApply").elements.namedItem(name)["0"] class << fld def set self.checked = true end #haven't tested this one yet def clear self.checked = false end end fld end def select_list(toss,name) fld = self.ie.document.forms.namedItem("frmApply").elements.namedItem(name) class << fld def select(txt) self.options.each{|i| i.selected = true if i.text == txt } end end fld end end -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050812/5ac59292/attachment.html From jkohl at telusplanet.net Fri Aug 12 13:11:48 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Fri, 12 Aug 2005 10:11:48 -0700 Subject: [Wtr-general] test::unit question In-Reply-To: <63915d6a05081208192e57f9af@mail.gmail.com> References: <63915d6a05081208192e57f9af@mail.gmail.com> Message-ID: <1123866708.42fcd854be18d@webmail.telusplanet.net> > This may have been covered in the mailing list before, I searched all > the messages I have and didn't find anything (is there a reason there > isn't a searchable archive for this mailing list?) You can search it using Google: site:rubyforge.org "[Wtr-general]" your search term > I am a Watir newbie, and also, not an OO programmer. I apologize up > front for what is likely to be poor terminology. My first script was > straightforward, I included everything in one script, and I used the > test::unit assertions to good effect. I had to have a class to do > this. > > My coworker who is more script savvy (he's a Perl programmer) came up > with what seems to me to be a good way to organize our scripts, with > modules in a lib directory that we can use from our scripts. These > have no classes. I can't get test::unit to work in them, even if I > add classes to both the modules and the main scripts. > I am confused on when to use modules vs. classes or if there is some > way to use them concurrently. I have looked at all the examples that > came with Watir, but they all appear to be self-contained scripts. > Are there any examples that might help us with knowing the best way to > organize our tests to maximize reuse and maintainability? Watir itself is probably the best example. Usage of classes and methods within test::unit are as follows: ie = Watir::IE.new #the "Watir" here is a module, and the "::" scope operator shows the usage A Module and a Class are similar. For what you describe, I think of modules almost like a namespace. There is more on this site: http://www.rubycentral.com/book/tut_modules.html The modules in the lib directory should look like this: module MyModule class MyClass def my_method1 end def my_method2 end end end #of module You would invoke methods in that module in test::unit like this: require 'test/unit' require 'test_lib' #file that contains MyModule require 'watir' #test unit code here #to use the module above: a = MyModule::MyClass.new b = a.my_method2 Hope that helps. The Pickaxe link I sent is something I use a lot. -Jonathan > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From bret at pettichord.com Fri Aug 12 13:12:31 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 12 Aug 2005 12:12:31 -0500 Subject: [Wtr-general] WATIR is slow ??? In-Reply-To: Message-ID: <5.1.0.14.2.20050812121059.036d8268@127.0.0.1> This is really cool, thanks for sharing it. I would very much like to provide an easier mechanism to allow people to change Watir behavior just like you did here. Bret At 11:49 AM 8/12/2005, Jared Nuzzolillo wrote: >I started using Watir to automate a small portion of my projects tests. It >has been wonderfully helpful, and I'd like to thank the Watir team for >making it available. > >I do have, however have a problem. When I execute my program, it takes a >REALLY long time to run. It is setting about 400 fields, and it was >painful to watch it move slowly from field to field. I already tried >setting it "fast mode" and "background" mode and it sped up significantly, >but it was still slow. > >Fortunately, I generated the WATIR script from the HTML form using >JScript. As a result of generating it, I used :name to access all of the >fields I had to set. Unfortunately, I had hand-edited my generated script >to put 'realistic' values into all of the fields, so it would have been a >PITA to write new methods to set all of the fields. The fix I used was to >overwrite the WATIR text_box, select_list, radio and checkbox methods to >access the DOM directly instead of 'typing' the values into the fields. >This changed the execution time from about 3.5 minutes to about 15 >seconds. Thanks to the power of Ruby, I didn't have to edit my code >generator and regen. > >Was there an easier path? Some flag of which I'm unaware? > >Thanks so much, >Jared Nuzzolillo > >The (admittedly hackish and cruddy) code I used to modify it: > >class IE > > def text_field(toss, name) > > fld = > self.ie.document.forms.namedItem("frmApply").elements.namedItem(name) > > class << fld > def set(val) > self.value = val > end > end > > fld > end > > def checkbox(toss,name) > > fld = > self.ie.document.forms.namedItem("frmApply").elements.namedItem(name) > > class << fld > def set > self.checked = true > end > > #haven't tested this one yet > def clear > self.checked = false > end > end > > fld > end > > def radio(toss,name) > fld = > self.ie.document.forms.namedItem("frmApply").elements.namedItem(name)["0"] > > class << fld > def set > self.checked = true > end > > #haven't tested this one yet > def clear > self.checked = false > end > end > > fld > end > > def select_list(toss,name) > fld = > self.ie.document.forms.namedItem("frmApply").elements.namedItem(name) > > class << fld > def select(txt) > self.options.each{|i| i.selected = true if i.text == txt } > end > end > > fld > end >end > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From mkelly at elevenwireless.com Fri Aug 12 13:17:11 2005 From: mkelly at elevenwireless.com (Michael Kelly) Date: Fri, 12 Aug 2005 10:17:11 -0700 Subject: [Wtr-general] WATIR is slow ??? Message-ID: <640C9D8653C87C44AB5F00F91A91FE210D4B6B@edison.elevenwireless.com> Have you tried "ie.set_fast_speed()"? -=michael=- -- Michael Kelly Sr. Software Engineer Eleven Wireless Inc. - The Possibilities are Wireless http://www.elevenwireless.com -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jared Nuzzolillo Sent: Friday, August 12, 2005 9:49 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] WATIR is slow ??? I started using Watir to automate a small portion of my projects tests. It has been wonderfully helpful, and I'd like to thank the Watir team for making it available. I do have, however have a problem. When I execute my program, it takes a REALLY long time to run. It is setting about 400 fields, and it was painful to watch it move slowly from field to field. I already tried setting it "fast mode" and "background" mode and it sped up significantly, but it was still slow. Fortunately, I generated the WATIR script from the HTML form using JScript. As a result of generating it, I used :name to access all of the fields I had to set. Unfortunately, I had hand-edited my generated script to put 'realistic' values into all of the fields, so it would have been a PITA to write new methods to set all of the fields. The fix I used was to overwrite the WATIR text_box, select_list, radio and checkbox methods to access the DOM directly instead of 'typing' the values into the fields. This changed the execution time from about 3.5 minutes to about 15 seconds. Thanks to the power of Ruby, I didn't have to edit my code generator and regen. Was there an easier path? Some flag of which I'm unaware? Thanks so much, Jared Nuzzolillo The (admittedly hackish and cruddy) code I used to modify it: class IE def text_field(toss, name) fld = self.ie.document.forms.namedItem("frmApply").elements.namedItem(name) class << fld def set(val) self.value = val end end fld end def checkbox(toss,name) fld = self.ie.document.forms.namedItem("frmApply").elements.namedItem(name) class << fld def set self.checked = true end #haven't tested this one yet def clear self.checked = false end end fld end def radio(toss,name) fld = self.ie.document.forms.namedItem("frmApply").elements.namedItem(name)["0 "] class << fld def set self.checked = true end #haven't tested this one yet def clear self.checked = false end end fld end def select_list(toss,name) fld = self.ie.document.forms.namedItem("frmApply").elements.namedItem(name) class << fld def select(txt) self.options.each{|i| i.selected = true if i.text == txt } end end fld end end -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050812/08144934/attachment.html From bret at pettichord.com Fri Aug 12 15:11:48 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 12 Aug 2005 14:11:48 -0500 Subject: [Wtr-general] Help read data in table with Row Span In-Reply-To: <001d01c59e1e$16017950$6600a8c0@NewDell> References: <99DF6C0285C2CE4C99F02D78385719660181B650@hue.cybersoft-vn.com> Message-ID: <5.1.0.14.2.20050812133433.03718ad0@127.0.0.1> Hue, I think i actually wrote the original table to_a code. I wrote it for a specific table, and Paul checked it in. It was never intended to work in the general case. I don't quite understand why Paul says it couldn't be fixed the way you want it to work. I think his concern is that it still wouldn't work in the general case. Figuring out how this should work in general is a hard design problem. I do think any of us could write a function that worked the way you wanted. But this is really something that you should be able to write yourself. One way would be to edit the standard watir.rb. But probably a better idea would be to change the Table#to_a method separately. Here's how. In a separate file: class Table def to_a # replacement code end end Then look at what we have a figure out how you might want to change it. Bret At 09:40 PM 8/10/2005, Paul Rogers wrote: >I took a quick look at this, and I don't know how we would do it. Using >my example table below, The table itself only has 2 cells on the row >after the rowspan. > >Even other methods like the one below only show it has having 2 cells, I >guess cos in reality it does only have 2 cells. >irb(main):011:0> puts ie.table(:index,1).row_values(3) >c2 >c3 > > >Sorry I couldn't help more > >Paul > > > >c1c2c3 >2 rowsc2c3 >c2c3 >Normalc2c3 >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Hue Mach Dieu >Sent: 10 August 2005 19:47 >To: wtr-general at rubyforge.org >Subject: [Wtr-general] Help read data in table with Row Span > > >Dear All, >My application table display data as like this > >----------------------------------------------- >| Col 1 | Col 2 | Col 3 | ... >----------------------------------------------- > | V1 | V2 .. >| Row 1 | ------------------------------------- > | V3 | V4 .. >----------------------------------------------- >| Row 3 | V5 | V6... >----------------------------------------------- >... > >When I use method: table(..).to_a >I got this result: >=> [["Col 1", "Col 2", "Col 3",..], ["Row 1", "V1", "V2",..], ["V3", >"V4",..],"Row 3", "V5", "V5",..] ] > >Looking this result, I found this value ["V3", "V4",..] missing 1 >column. > >So any solution for this table, that mean I would like the value get >from table always don't missing any column and row in case have row span >or column span >Ex: With the case above, I would like the value I got from table as like >this: > >[["Col 1", "Col 2", "Col 3",..], ["Row 1", "V1", "V2",..], ["nil", "V3", >"V4",..],"Row 3", "V5", "V5",..] ] > >Or > >[["Col 1", "Col 2", "Col 3",..], ["Row 1", "V1", "V2",..], ["Row 1", >"V3", "V4",..],"Row 3", "V5", "V5",..] ] > >Thank you for help. > >Hue > > >_______________________________________________ >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 _____________________ Bret Pettichord www.pettichord.com From onceuponapriori at gmail.com Fri Aug 12 16:58:08 2005 From: onceuponapriori at gmail.com (Jared Nuzzolillo) Date: Fri, 12 Aug 2005 16:58:08 -0400 Subject: [Wtr-general] WATIR is slow ??? In-Reply-To: <5.1.0.14.2.20050812121059.036d8268@127.0.0.1> References: <5.1.0.14.2.20050812121059.036d8268@127.0.0.1> Message-ID: I hope someone can make use of it. If I was using nearly any other language I would have had a much harder time getting things running. Thanks again for Watir! Jared On 8/12/05, Bret Pettichord wrote: > > This is really cool, thanks for sharing it. > > I would very much like to provide an easier mechanism to allow people to > change Watir behavior just like you did here. > > Bret > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050812/9413c691/attachment.html From onceuponapriori at gmail.com Fri Aug 12 17:02:23 2005 From: onceuponapriori at gmail.com (Jared Nuzzolillo) Date: Fri, 12 Aug 2005 17:02:23 -0400 Subject: [Wtr-general] WATIR is slow ??? In-Reply-To: <640C9D8653C87C44AB5F00F91A91FE210D4B6B@edison.elevenwireless.com> References: <640C9D8653C87C44AB5F00F91A91FE210D4B6B@edison.elevenwireless.com> Message-ID: Yes, and I even tried hiding IE with the "-b" flag and with ie.ie.Visible = false. While it did provide a significant speed increase, it was still taking approx 3.5 minutes to execute. I really wanted to avoid supporting the "Ruby is too slow" myth when I showed the tool to my boss, so I had to speed it up considerably; that is what led to the code changes. Thanks Jared On 8/12/05, Michael Kelly wrote: > > Have you tried "ie.set_fast_speed()"? > -=michael=- > > -- > Michael Kelly > Sr. Software Engineer > Eleven Wireless Inc. - The Possibilities are Wireless > http://www.elevenwireless.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050812/c460ac51/attachment.html From jkohl at telusplanet.net Fri Aug 12 17:09:53 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Fri, 12 Aug 2005 15:09:53 -0600 Subject: [Wtr-general] test::unit question In-Reply-To: <63915d6a05081208192e57f9af@mail.gmail.com> Message-ID: <20050812211027.FUHO29979.priv-edmwes25.telusplanet.net@tintin> Using "Head First Java" as a guide, here is one simplified way to think about modules, classes and methods: Here is a module: module MyModule end Q. What goes in a Module? A. classes go in modules module MyModule class TestClass end #of class end #of module Q. What goes in a class? A. methods go in classes module MyModule class TestClass def method1 end #of method1 end #of class end #of module Q. What goes in a method? A. statements go in methods module MyModule class TestClass def method1 statement1 statement2 end #of method1 end #of class end #of module Q. How do I access methods in a module? A. Provide access to the source file: include 'my_module_file' You might have more than one module in a file (or in memory), so we access the class in the module we want using a scope operator :: like this: MyModule::TestClass And create a new instance of the class like this: new_class = MyModule::TestClass.new Execute method1 like this: new_class.method1 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050812/49713cba/attachment.html From saudaziz at gmail.com Fri Aug 12 17:43:55 2005 From: saudaziz at gmail.com (saud aziz) Date: Fri, 12 Aug 2005 14:43:55 -0700 Subject: [Wtr-general] clearSecurityAlertBox() doesn't work? In-Reply-To: <42FC27BA.1000902@qantom.com> References: <24d0cb38050811130841164bb1@mail.gmail.com> <20050812030219.14825.qmail@web40423.mail.yahoo.com> <24d0cb3805081120592778d32f@mail.gmail.com> <42FC27BA.1000902@qantom.com> Message-ID: <24d0cb3805081214435d153e62@mail.gmail.com> Thanks to all. However, this doesn't resolve my second 'verfication' case problem. Please take a look at the following code and help if you can. Thanks in advance. 2) How can i set it to check whether it is on expected URL or > not? I have assert ie.url in my script but that didn't seem to > work and always gave a fail. > > require 'watir' > include Watir > re! quire 'test/unit' > require 'test/unit/ui/console/testrunn > > er' > > > > #logger includes > > require 'example_logger1' > > > > class TC_SSO_example < Test::Unit::TestCase > > > > def start > > #open the IE browser > > $ie = IE.new > > filePrefix = "test_logger1" > > #create a logger > > $logger = LoggerFactory.start_xml_logger(filePrefix) > > $ie.set_logger($logger) > > end > > > > > > def test_Login > > > > start > > test_site = 'http://www.SeattleSymphony.com > > ' > > test_success_URL = ' > > > http://www.seattlesymphony.org/symphony/index.aspx?month=9&year=2005&tries=1 > > < > http://www.seattlesymphony.org/symphony/index.aspx?month=9&year=2005&tries=1 > >' > > $logger.log("") > > > > #i! e = IE.new > > $ie.goto(test_site) > > $ie.link(:text, "Login").click > > $ie.text_field(:name, > > "template:tx_LoginName").set("mytestlogin") > > $ie.text_field(:name, > > "template:tx_Password").set("mytestlogin") > > $ie.button(:name, "template:btn_Login").click > > #wc = WinClicker.new > > #wc.clearSecurityAlertBox() <---- on enabling this and > > above, it starts dumping lots of irrelavent stuff. > > #clearSecurityAlertBox() <---- obviously doesn't work as it. > > > > begin > > assert($ie.contains_text("today!")) > > assert($ie.url(test_success_URL)) > > $logger.log("Passed. User has sucessfully logged in") > > $logger.log_results("test_Login", "mytestlogin", > > "test_URL", "TEST PASSED.") > > res! cue => e > > $logger.log("*FAILED*." + e.message + "\n" + > > e.backtrace.join("\n")) > > $logger.log_results("test_Login", "mytestlogin", > > "test_URL", "TEST FAILED.") #logs to both the XML file and > > corelogger > > > > end > > > > $logger.log '## End of test Login' > > $logger.end_log #close XML log file > > end > > > > > > end On 8/11/05, Sathya Shankar wrote: > > You can get WET from http://www.wet.qantom.org > > Thanks > Satti > > saud aziz wrote: > > > WET addon? whats that? Where can i get it from? > > > > On 8/11/05, *Shubha R* > > wrote: > > > > Have you tried the WET addon? I have just start to use it and > > it seems to do a very good job in handling all popups. > > > > S > > > > */saud aziz >/* wrote: > > > > Ok guys help me out.. > > > > I am trying to set up a login script to learn to use Watir as > > i plan on switching from SAMIE/Perl to Watir/Ruby. Here i have > > simple script made just to test how it would react and work > > with simple login to any site. > > > > Expected: > > > > The script should emulate user and login to the mentioned > > site. After successful login, it should either detect and log > > whether it was on correct URl or not. Also, it should check > > for string "today!" in the text on that URL. But according to > > this script, it always fails. > > > > 1) It doesn't take care of SSL popup. Should it be working, if > > so, what do i need to add/remove/edit in following script to > > make it work? > > 2) How can i set it to check whether it is on expected URL or > > not? I have assert ie.url in my script but that didn't seem to > > work and always gave a fail. > > > > require 'watir' > > include Watir > > re! quire 'test/unit' > > require 'test/unit/ui/console/testrunner' > > > > #logger includes > > require 'example_logger1' > > > > class TC_SSO_example < Test::Unit::TestCase > > > > def start > > #open the IE browser > > $ie = IE.new > > filePrefix = "test_logger1" > > #create a logger > > $logger = LoggerFactory.start_xml_logger(filePrefix) > > $ie.set_logger($logger) > > end > > > > > > def test_Login > > > > start > > test_site = 'http://www.SeattleSymphony.com > > ' > > test_success_URL = ' > > > http://www.seattlesymphony.org/symphony/index.aspx?month=9&year=2005&tries=1 > > < > http://www.seattlesymphony.org/symphony/index.aspx?month=9&year=2005&tries=1 > >' > > $logger.log("") > > > > #i! e = IE.new > > $ie.goto(test_site) > > $ie.link(:text, "Login").click > > $ie.text_field(:name, > > "template:tx_LoginName").set("mytestlogin") > > $ie.text_field(:name, > > "template:tx_Password").set("mytestlogin") > > $ie.button(:name, "template:btn_Login").click > > #wc = WinClicker.new > > #wc.clearSecurityAlertBox() <---- on enabling this and > > above, it starts dumping lots of irrelavent stuff. > > #clearSecurityAlertBox() <---- obviously doesn't work as it. > > > > begin > > assert($ie.contains_text("today!")) > > assert($ie.url(test_success_URL)) > > $logger.log("Passed. User has sucessfully logged in") > > $logger.log_results("test_Login", "mytestlogin", > > "test_URL", "TEST PASSED.") > > res! cue => e > > $logger.log("*FAILED*." + e.message + "\n" + > > e.backtrace.join("\n")) > > $logger.log_results("test_Login", "mytestlogin", > > "test_URL", "TEST FAILED.") #logs to both the XML file and > > corelogger > > > > end > > > > $logger.log '## End of test Login' > > $logger.end_log #close XML log file > > end > > > > > > end > > > > -- > > What is written without effort is in general read without > > pleasure. > > - Samuel Johnson > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > ------------------------------------------------------------------------ > > Start your day with Yahoo! - make it your home page > > > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > > > -- > > What is written without effort is in general read without pleasure. > > - Samuel Johnson > > > >------------------------------------------------------------------------ > > > >_______________________________________________ > >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 > -- What is written without effort is in general read without pleasure. - Samuel Johnson -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050812/79c669f6/attachment.html From tuyet.ctn at mscibarra.com Fri Aug 12 18:46:30 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Fri, 12 Aug 2005 15:46:30 -0700 Subject: [Wtr-general] Access is denied and Exception Errors - SUCCESS! Message-ID: The problem is actually a security issue on the machine that is executing the script! We fixed the "access is denied" issue by adding the URL that is causing the problem as a "trusted site". This is done in Tools/Internet Options/Security/Trusted Sites (then add the URL). No more "access is denied" error! Wowee! I am so relieved that we can continue developing with WATIR now! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050812/c27dc3a1/attachment.html From bret at pettichord.com Fri Aug 12 18:52:03 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 12 Aug 2005 17:52:03 -0500 Subject: [Wtr-general] RuntimeError: failed togetIEnumInterfaceHRESULTerror code:0x80004002 In-Reply-To: Message-ID: <5.1.0.14.2.20050812171330.03747220@127.0.0.1> This is very puzzling to me. It doesn't look like Watir can't get to the DOM tree. It is failing on ie.document.body.all This returns a COM object, but i has no IEnum Interface. It seems like maybe you are running a very old version of IE. Watir needs 5.5 or later. But i think you get that automatically with XP SP 1. A puzzle. Bret At 10:28 AM 8/12/2005, Pascal SERODES wrote: >Yes the navigatio seems OK, the error raised even if i try to get the >content of a text field, >Ie.text_field(:name, 'name').getContents() > >Again here the stack trace: >Microsoft Windows XP [version 5.1.2600] >(C) Copyright 1985-2001 Microsoft Corp. > >D:\siouxWatir\scripts>t2.rb >## Debut test: Sioux Test > >Step 1: connexion a sioux: >Step 2: loggin >d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:805:in `each': Failed to get IEnum >Interface (RuntimeError) > HRESULT error code:0x80004002 > Cette interface n'est pas prise en charge 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:3236: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 D:/siouxWatir/scripts/t2.rb:24 > >At line 24 of file t2.rb i have: > ie.text_field(:name, 'j_username').getContents() > > >Nota: the error raised even if i try to simulate a click on a button with >the line: > ie.button(:name, 'Connexion').click > >The initial error is on line 805 of watir.rb, looks like watir can't get >the DOM tree? > >About the OS is Windows XP, SP1, french version. >Ruby version 1.8.1.2-15 >Watir 1.4.2 >I just did what's is tell in the "User Guide" step1 to Step4 except that >the problem arrived since step3 (dont pass the unittests step) > > >Is the problem link with services on windows XP?? The use of the COM >interface may be need some extra >Setup, by the way i am the administrator of the machine. > > > >-----Message d'origine----- >De : wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] De la part de Paul Rogers >Envoy? : vendredi 12 ao?t 2005 16:46 >? : wtr-general at rubyforge.org >Objet : RE: [Wtr-general] RuntimeError: failed >togetIEnumInterfaceHRESULTerror code:0x80004002 > >It does the navigation ok, just doesn't do the set on a text field - is >that right? What about other controls? Can you read values from a text field? > >What OS are you using? > >Paul > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Pascal SERODES >Sent: 12 August 2005 08:23 >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] RuntimeError: failed to >getIEnumInterfaceHRESULTerror code:0x80004002 > > >No the unittests raise the same error > >-----Message d'origine----- >De : wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] De la part de Paul Rogers >Envoy? : vendredi 12 ao?t 2005 16:09 ? : wtr-general at rubyforge.org Objet >: RE: [Wtr-general] RuntimeError: failed to get IEnumInterfaceHRESULTerror >code:0x80004002 > >Do the unit tests work for you? > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Pascal SERODES >Sent: 12 August 2005 02:32 >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] RuntimeError: failed to get IEnum >InterfaceHRESULTerror code:0x80004002 > > >My script is very simple, >The error is as soon i try to set a value in a text field (line number >24) >------------------------------------------------------------------------ >-------------------------------------# ># test watir pour sioux ># >#----------------------------------------------------------------------- >-------------------------------------# > > require 'watir' # the watir controller > > # set a variable > siouxHome = 'http://localhost:8080/moa' > > # open the IE browser > ie = Watir::IE.new > > # print some comments > puts "## Debut test: Sioux Test" > puts " " > > puts "Step 1: connexion a sioux: " > ie.goto(siouxHome) > > > puts "Step 2: loggin " > ie.text_field(:name, 'j_username').set('xxx') --> line number 24; > ie.text_field(:name, 'j_password').set('xxx') > ie.button(:name, 'Connexion').click > > > if ie.contains_text("noErrorsOnPage") > puts "connexion effectu?e" > else > puts "no good" > end > > puts " " > puts "## Fin du test" > >-----Message d'origine----- >De : wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] De la part de Bret Pettichord >Envoy? : jeudi 11 ao?t 2005 17:56 ? : wtr-general at rubyforge.org Objet : >Re: [Wtr-general] RuntimeError: failed to get IEnum InterfaceHRESULT error >code:0x80004002 > >The error comes from this line of your script > > D:/watir-v1_4/sioux/scripts/t1.rb:24 > >Please show us your script. > > >At 04:01 AM 8/11/2005, Pascal SERODES wrote: > >Content-class: urn:content-classes:message > >Content-Type: multipart/alternative; > > boundary="----_=_NextPart_001_01C59E53.4882DE5C" > > > >i want to use watir but i'v got these troubleshooting: > > > > > >d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:805:in `each': Failed to get > > > > IEnum Interface (RuntimeError) HRESULT error code:0x80004002 > > > >Cette interface n'est pas prise en charge 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:3236: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 D:/watir-v1_4/sioux/scripts/t1.rb:24 > > > > > >This error raised everytime watir try to set something in IE like > > > > setting a value in a textfield, Reading value from ie looks like OK. > > > > im using window XP SP1 > > > > IE 6.0 > > > > watir 1.4.2 > > > >ruby 1.8.2-15 > > > > > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > >_____________________ > Bret Pettichord > www.pettichord.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 > > >_______________________________________________ >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 _____________________ Bret Pettichord www.pettichord.com From jkohl at telusplanet.net Fri Aug 12 19:09:16 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Fri, 12 Aug 2005 17:09:16 -0600 Subject: [Wtr-general] Access is denied and Exception Errors - SUCCESS! In-Reply-To: Message-ID: <20050812230949.HDIN29979.priv-edmwes25.telusplanet.net@tintin> Cool! Can we add that to the FAQ? Good work. -Jonathan _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tuyet Cong-Ton-Nu Sent: August 12, 2005 4:47 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Access is denied and Exception Errors - SUCCESS! The problem is actually a security issue on the machine that is executing the script! We fixed the "access is denied" issue by adding the URL that is causing the problem as a "trusted site". This is done in Tools/Internet Options/Security/Trusted Sites (then add the URL). No more "access is denied" error! Wowee! I am so relieved that we can continue developing with WATIR now! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050812/147dd6d2/attachment.html From huemach at Cybersoft-VN.com Sat Aug 13 02:57:06 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Sat, 13 Aug 2005 13:57:06 +0700 Subject: [Wtr-general] Re: Help Lib Path incorrect? Message-ID: <99DF6C0285C2CE4C99F02D783857196601854CCD@hue.cybersoft-vn.com> Hi Bret, I follow your way, but still get same error. Regards, Hue Mach From huemach at Cybersoft-VN.com Sat Aug 13 03:04:08 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Sat, 13 Aug 2005 14:04:08 +0700 Subject: [Wtr-general] RE: Help read data in table with Row Message-ID: <99DF6C0285C2CE4C99F02D783857196601854CCE@hue.cybersoft-vn.com> Hi All, I have the one way work around in this case. Normally, I still use method to_a read data in table. So I flatten it to 1D array. In the expected result, I also put it in 1D array. By the way, I can compare value of both arrays. Anyway, in some cases the compare result may be incorrect. Ex: actual result: [[1], [2], [3]] Expected result [[1,2,3]] When I flatten & compare them, I get the correct but incorrect result. :) Best regards, Hue From wkruse at sars.gov.za Tue Aug 2 01:50:32 2005 From: wkruse at sars.gov.za (Walter Kruse) Date: Tue, 2 Aug 2005 07:50:32 +0200 Subject: [Wtr-general] Question - Why ruby? Message-ID: <373AA889F642934D8983245F7A514588D95AFC@gaptarcbnt00002.sars.prod> NB: This email and its contents are subject to our email legal notice which can be viewed at http://www.sars.gov.za/Email_Disclaimer.pdf ---- I have a similar story. I was fortunate enough to be able to use Robot, SAMIE and WATiR on the same project. A few months down the line and the scripts that run everyday are...WATiR ! Michael Kelly's article really got me using Ruby. SAMIE is also very good, and the best about it is that Perl already has very mature supprt for DBI and it has Win32::GUITest. I still use Perl for all the database stuff. Ruby's DBI is not there yet. But I would like to use WATiR and Ruby more and more in the future. Unfortunately Ruby is as cryptic to me as Perl is to most people. I have looked at PAMIE too, as I am doing a series of tool reviews for the TestFOCUS magazine. krgds Walter -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] Sent: 01 August 2005 04:31 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Question - Why ruby? My 2 cents...for whatever it is worth. I started using Python's PAMIE framework to automate. However, the support was sporadic (the guy working on it was very busy and couldn't devote enough time to support the framework). Eventually I ran into a roadblock with popups (ironic given the volume of messages on this subject)--the framework had not evolved enough to support this activity yet. I also looked at SAMIE (way too cryptic), IEUnit (same roadblock as PAMIE) as well as a bout 15 other frameworks all boasting to have what I needed at a price. Enter Ruby. WATIR is by far the most complete web testing framework out here--that doesn't cost an arm and a leg. And this forum is the most active and well supported that I have seen. You can post a question and is just a short period of time get someone (most of the time the architects of the framework!) who will steer you in the right direct, give you a work around to get over any roadblocks, or add it to the framework if it doesn't currently exist. That is the reason I switched and tell everyone interest (and those not) that Ruby is the way to go! Save your money, get WATIR! --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Raghu Venkataramana Sent: Sunday, July 31, 2005 8:28 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Question - Why ruby? Bret, Jonathan: Thanks for these notes. I personally like Ruby's object oriented approach. The only 'flip' I found about ruby that I find is the relatively scarce resources / documentation when compared to Python. Almost all searches point to a different version of the 'pragmatic programmer'. Are there other online resources that you guys could point me to? For example, when trying to do something with the Win32 API callbacks, I couldn't find much help. Thanks Raghu Bret Pettichord wrote: > Perl encourages cryptic code, which makes it a bad choice. It also > lacks an interactive shell. > > Python could work. Ruby was Brian Marick's choice and he was convinced > to switch from Python to Ruby when he sat with Dave Thomas and Andy > Hunt on a bus. > > At 12:26 PM 7/31/2005, Raghu Venkataramana wrote: > >> Hi All, >> >> I was explaining to my friend about Watir and its nice capabilities. >> In the middle of the conversation he asked me as to why Watir uses >> Ruby, which is not as well known as Perl, Python or other scripting >> languages. Is there a special reason why Ruby is being used or is >> just incidental. >> >> Thanks >> Raghu >> _______________________________________________ >> Wtr-general mailing list >> Wtr-general at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-general > > > _____________________ > Bret Pettichord > www.pettichord.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/20050802/0e9f534f/attachment.html From domancheta at yahoo.com Sun Aug 14 16:29:43 2005 From: domancheta at yahoo.com (Dominic Ancheta) Date: Sun, 14 Aug 2005 13:29:43 -0700 (PDT) Subject: [Wtr-general] Any way to drag items to other items? Message-ID: <20050814202943.55494.qmail@web50912.mail.yahoo.com> Hello, I'm working on a project that uses r.a.d.treeview (a treeview library for ASP.NET) and I'm wondering how I can use Watir to do drag and drop events. Here's some of the javascript code I see in the HTML source: oncontextmenu="rtvDispatcher('RadTree1','context',event)" onselectstart="return false;" onmousedown="rtvDispatcher('RadTree1','mdown',event)" id=RadTree1Div onkeydown="rtvDispatcher('RadTree1','keydown',event)" ondblclick="rtvDispatcher('RadTree1','mdclick',event)" onmouseover="rtvDispatcher('RadTree1','mover',event)" Thanks for any help! -Dominic Dominic Ancheta Cell: 408-499-3961 Home: 408-984-5824 --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050814/42dee109/attachment.html From huemach at Cybersoft-VN.com Sun Aug 14 21:10:40 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Mon, 15 Aug 2005 08:10:40 +0700 Subject: [Wtr-general] RE: WATIR is slow ??? Message-ID: <99DF6C0285C2CE4C99F02D783857196601854CF7@hue.cybersoft-vn.com> Hi All, Currently, Watir input data into control so slow. Bc it input one by one character. But we can do this for increase watir input data into control by change a little bit core code of watir I change a little bit code in watir.rd and got the speed increase very fast. I think the Watir develop team can look at it again, If found it is useful, Watir team can update the core Watir in next release. My change code as like that: def doKeyPress( value ) ... # ---- Remove this orginal code ----------- #for i in 0 .. value.length-1 # sleep @ieController.typingspeed # typing speed # c = value[i,1] #@ieController.log " adding c.chr " + c #.chr.to_s # @o.value = @o.value.to_s + c #c.chr #fire_key_events #end # ------- My change code -------------------------------- @o.value = value fire_key_events end Anyway, I just test it with a little bit code Best regards, Hue Mach From paul.rogers at shaw.ca Sun Aug 14 21:51:51 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sun, 14 Aug 2005 19:51:51 -0600 Subject: [Wtr-general] Any way to drag items to other items? Message-ID: <32a81fc32aa7dd.32aa7dd32a81fc@shaw.ca> there is some basic support - for dragging text from one text field and dropping it on another. You could probably use that as a basis for writing some more advanced features. I doubt Bret or myself will get enough time to do it in the near future Paul Content-Type: multipart/alternative; boundary="0-1259847737-1124051383=:49335" Content-Transfer-Encoding: 8bit --0-1259847737-1124051383=:49335 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hello, I'm working on a project that uses r.a.d.treeview (a treeview library for ASP.NET) and I'm wondering how I can use Watir to do drag and drop events. Here's some of the javascript code I see in the HTML source: oncontextmenu="rtvDispatcher('RadTree1','context',event)" onselectstart="return false;" onmousedown="rtvDispatcher('RadTree1','mdown',event)" id=RadTree1Div onkeydown="rtvDispatcher('RadTree1','keydown',event)" ondblclick="rtvDispatcher('RadTree1','mdclick',event)" onmouseover="rtvDispatcher('RadTree1','mover',event)" Thanks for any help! -Dominic Dominic Ancheta Cell: 408-499-3961 Home: 408-984-5824 --------------------------------- Start your day with Yahoo! - make it your home page --0-1259847737-1124051383=:49335 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
Hello,
 
I'm working on a project that uses r.a.d.treeview (a treeview library for ASP.NET) and I'm wondering how I can use Watir to do drag and drop events.
 
Here's some of the javascript code I see in the HTML source:
oncontextmenu="rtvDispatcher('RadTree1','context',event)"
onselectstart="return false;"
onmousedown="rtvDispatcher('RadTree1','mdown',event)"
                        id=RadTree1Div
onkeydown="rtvDispatcher('RadTree1','keydown',event)"
ondblclick="rtvDispatcher('RadTree1','mdclick',event)"
onmouseover="rtvDispatcher('RadTree1','mover',event)"
 
Thanks for any help!
-Dominic


Dominic Ancheta
Cell:    408-499-3961
Home: 408-984-5824


Start your day with Yahoo! - make it your home page --0-1259847737-1124051383=:49335-- -------------- next part -------------- _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Sun Aug 14 21:55:19 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sun, 14 Aug 2005 19:55:19 -0600 Subject: [Wtr-general] RE: WATIR is slow ??? Message-ID: <32ab51832a9617.32a961732ab518@shaw.ca> if you dont care about javascript events, you can just use ie.text_field(:index,1).value='123' # it might be .value(123) I cant remember You can also use the -f switch or change the typing speed value the original code is there to make sure that all the javascript events ( keypress, keyup , keydown etc ) get executed correctly Paul ----- Original Message ----- From: Hue Mach Dieu Date: Sunday, August 14, 2005 7:10 pm Subject: [Wtr-general] RE: WATIR is slow ??? > > Hi All, > Currently, Watir input data into control so slow. Bc it input one > by one > character. > > But we can do this for increase watir input data into control by > changea little bit core code of watir > I change a little bit code in watir.rd and got the speed increase very > fast. I think the Watir develop team can look at it again, If > found it > is useful, Watir team can update the core Watir in next release. > > My change code as like that: > > def doKeyPress( value ) > ... > # ---- Remove this orginal code ----------- > #for i in 0 .. value.length-1 > # sleep @ieController.typingspeed # typing speed > # c = value[i,1] > #@ieController.log " adding c.chr " + c #.chr.to_s > # @o.value = @o.value.to_s + c #c.chr > #fire_key_events > #end > # ------- My change code -------------------------------- > @o.value = value > fire_key_events > end > > Anyway, I just test it with a little bit code > > Best regards, > > Hue Mach > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From onceuponapriori at gmail.com Sun Aug 14 22:00:13 2005 From: onceuponapriori at gmail.com (Jared Nuzzolillo) Date: Sun, 14 Aug 2005 22:00:13 -0400 Subject: [Wtr-general] RE: WATIR is slow ??? In-Reply-To: <32ab51832a9617.32a961732ab518@shaw.ca> References: <32ab51832a9617.32a961732ab518@shaw.ca> Message-ID: Of course, that makes perfect sense. Thanks Paul. That's exactly what I needed! On 8/14/05, Paul Rogers wrote: > > if you dont care about javascript events, you can just use > > ie.text_field(:index,1).value='123' # it might be .value(123) I cant > remember > > You can also use the -f switch or change the typing speed value > > the original code is there to make sure that all the javascript events ( > keypress, keyup , keydown etc ) get executed correctly > > > > Paul > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050814/4c2b9616/attachment.html From domancheta at yahoo.com Mon Aug 15 01:27:18 2005 From: domancheta at yahoo.com (Dominic Ancheta) Date: Sun, 14 Aug 2005 22:27:18 -0700 (PDT) Subject: [Wtr-general] Any way to drag items to other items? In-Reply-To: <32a81fc32aa7dd.32aa7dd32a81fc@shaw.ca> Message-ID: <20050815052718.96297.qmail@web50905.mail.yahoo.com> Is there an example of basic drag support somewhere? -Dominic Paul Rogers wrote: there is some basic support - for dragging text from one text field and dropping it on another. You could probably use that as a basis for writing some more advanced features. I doubt Bret or myself will get enough time to do it in the near future Paul Content-Type: multipart/alternative; boundary="0-1259847737-1124051383=:49335" Content-Transfer-Encoding: 8bit --0-1259847737-1124051383=:49335 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hello, I'm working on a project that uses r.a.d.treeview (a treeview library for ASP.NET) and I'm wondering how I can use Watir to do drag and drop events. Here's some of the javascript code I see in the HTML source: oncontextmenu="rtvDispatcher('RadTree1','context',event)" onselectstart="return false;" onmousedown="rtvDispatcher('RadTree1','mdown',event)" id=RadTree1Div onkeydown="rtvDispatcher('RadTree1','keydown',event)" ondblclick="rtvDispatcher('RadTree1','mdclick',event)" onmouseover="rtvDispatcher('RadTree1','mover',event)" Thanks for any help! -Dominic Dominic Ancheta Cell: 408-499-3961 Home: 408-984-5824 --------------------------------- Start your day with Yahoo! - make it your home page --0-1259847737-1124051383=:49335 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hello, I'm working on a project that uses r.a.d.treeview (a treeview library for ASP.NET) and I'm wondering how I can use Watir to do drag and drop events. Here's some of the javascript code I see in the HTML source: oncontextmenu="rtvDispatcher('RadTree1','context',event)" onselectstart="return false;" onmousedown="rtvDispatcher('RadTree1','mdown',event)" id=RadTree1Div onkeydown="rtvDispatcher('RadTree1','keydown',event)" ondblclick="rtvDispatcher('RadTree1','mdclick',event)" onmouseover="rtvDispatcher('RadTree1','mover',event)" Thanks for any help! -Dominic Dominic Ancheta Cell: 408-499-3961 Home: 408-984-5824 --------------------------------- Start your day with Yahoo! - make it your home page --0-1259847737-1124051383=:49335-- _______________________________________________ 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 __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050814/bf390939/attachment.html From Mark.Hammond at derivco.com Mon Aug 15 10:36:19 2005 From: Mark.Hammond at derivco.com (Mark Hammond) Date: Mon, 15 Aug 2005 16:36:19 +0200 Subject: [Wtr-general] Attaching to an embedded browser Message-ID: <0E839478EC690748ACC9A1B10DB0BCBC07E4A129@EXCHANGE.mgsops.net> HI there I am trying to attach to n embedded browser. How can I go about doing this? Thanks Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050815/b404296d/attachment.html From atuisheva at gmail.com Mon Aug 15 17:27:18 2005 From: atuisheva at gmail.com (Anna Tuisheva) Date: Mon, 15 Aug 2005 14:27:18 -0700 Subject: [Wtr-general] Attaching to an embedded browser In-Reply-To: <0E839478EC690748ACC9A1B10DB0BCBC07E4A129@EXCHANGE.mgsops.net> References: <0E839478EC690748ACC9A1B10DB0BCBC07E4A129@EXCHANGE.mgsops.net> Message-ID: <4b3ccea505081514277fc20520@mail.gmail.com> Mark, I did not have exactly your problem, but you may want to look at winClicker.rb and its getWindowHandle() method. After you get a handle, you can use something like clickWindowsButton_hwnd() from the same lib to click buttons in it or other methods. This is just a thought. I'm investigating how I can use winClicker with some of windows in my app, and I don't have much experience with it (yet ;-)) Anna. On 8/15/05, Mark Hammond wrote: > > > HI there > > > > I am trying to attach to n embedded browser. How can I go about doing this? > > > > Thanks > > Mark > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > From paul.rogers at shaw.ca Mon Aug 15 19:21:48 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 15 Aug 2005 17:21:48 -0600 Subject: [Wtr-general] Attaching to an embedded browser Message-ID: <3400b1f3401c6d.3401c6d3400b1f@shaw.ca> winclicker contains some very scary, badly written code. Id try to avoid it if possible. You might be able to attach to an embedded browser by using attach - or possibly a modified form of it and attach using the :url ( assuming you know the url of the embedded browser) Im sure you could also do something by fiding the hWnd of the embedding application, and then finding the child hWnd of the browser, and maybe using a modified form of Watir::IE::attach Paul ----- Original Message ----- From: Anna Tuisheva Date: Monday, August 15, 2005 3:27 pm Subject: Re: [Wtr-general] Attaching to an embedded browser > Mark, I did not have exactly your problem, but you may want to > look at > winClicker.rb and its getWindowHandle() method. After you get a > handle, you can use something like clickWindowsButton_hwnd() from the > same lib to click buttons in it or other methods. > This is just a thought. I'm investigating how I can use winClicker > with some of windows in my app, and I don't have much experience with > it (yet ;-)) > > Anna. > > > On 8/15/05, Mark Hammond wrote: > > > > > > HI there > > > > > > > > I am trying to attach to n embedded browser. How can I go about > doing this? > > > > > > > > Thanks > > > > Mark > > _______________________________________________ > > 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 atuisheva at gmail.com Mon Aug 15 20:05:53 2005 From: atuisheva at gmail.com (Anna Tuisheva) Date: Mon, 15 Aug 2005 17:05:53 -0700 Subject: [Wtr-general] Attaching to an embedded browser In-Reply-To: <3400b1f3401c6d.3401c6d3400b1f@shaw.ca> References: <3400b1f3401c6d.3401c6d3400b1f@shaw.ca> Message-ID: <4b3ccea505081517055e0deded@mail.gmail.com> Oh, good news (about badly written code) ;-) Paul, how can I attach an IE if I know the window handle? That would really help. There seem to be no other way to locate the modal IE window I'm working with. This does not work: hndl = wc.getWindowHandle('MyList -- Web Page Dialog', '') puts hndl wtitle = wc.getWindowTitle(hndl) wc.makeWindowActive(hndl) ie.attach(:title, wtitle) This code returns an error that there's no window with this title even though the handle is not -1. Thanks, Anna. On 8/15/05, Paul Rogers wrote: > winclicker contains some very scary, badly written code. Id try to avoid it if possible. > > You might be able to attach to an embedded browser by using attach - or possibly a modified form of it and attach using the :url ( assuming you know the url of the embedded browser) Im sure you could also do something by fiding the hWnd of the embedding application, and then finding the child hWnd of the browser, and maybe using a modified form of Watir::IE::attach > > Paul > > ----- Original Message ----- > From: Anna Tuisheva > Date: Monday, August 15, 2005 3:27 pm > Subject: Re: [Wtr-general] Attaching to an embedded browser > > > Mark, I did not have exactly your problem, but you may want to > > look at > > winClicker.rb and its getWindowHandle() method. After you get a > > handle, you can use something like clickWindowsButton_hwnd() from the > > same lib to click buttons in it or other methods. > > This is just a thought. I'm investigating how I can use winClicker > > with some of windows in my app, and I don't have much experience with > > it (yet ;-)) > > > > Anna. > > > > > > On 8/15/05, Mark Hammond wrote: > > > > > > > > > HI there > > > > > > > > > > > > I am trying to attach to n embedded browser. How can I go about > > doing this? > > > > > > > > > > > > Thanks > > > > > > Mark > > > _______________________________________________ > > > 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 paul.rogers at shaw.ca Mon Aug 15 20:08:37 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 15 Aug 2005 18:08:37 -0600 Subject: [Wtr-general] Attaching to an embedded browser Message-ID: <340bf5f3412b21.3412b21340bf5f@shaw.ca> are you trying to access a window open with showModalDialog() ? If so, someone recently posted some code they used to get this working using autoit - check the archives from the last 2 weeks. If you cant find it I probably still have it at home Paul ----- Original Message ----- From: Anna Tuisheva Date: Monday, August 15, 2005 6:05 pm Subject: Re: [Wtr-general] Attaching to an embedded browser > Oh, good news (about badly written code) ;-) > > Paul, how can I attach an IE if I know the window handle? That would > really help. There seem to be no other way to locate the modal IE > window I'm working with. > This does not work: > > hndl = wc.getWindowHandle('MyList -- Web Page Dialog', '') > puts hndl > wtitle = wc.getWindowTitle(hndl) > wc.makeWindowActive(hndl) > ie.attach(:title, wtitle) > > This code returns an error that there's no window with this title even > though the handle is not -1. > > Thanks, > Anna. > > On 8/15/05, Paul Rogers wrote: > > winclicker contains some very scary, badly written code. Id try > to avoid it if possible. > > > > You might be able to attach to an embedded browser by using > attach - or possibly a modified form of it and attach using the > :url ( assuming you know the url of the embedded browser) Im sure > you could also do something by fiding the hWnd of the embedding > application, and then finding the child hWnd of the browser, and > maybe using a modified form of Watir::IE::attach > > > > Paul > > > > ----- Original Message ----- > > From: Anna Tuisheva > > Date: Monday, August 15, 2005 3:27 pm > > Subject: Re: [Wtr-general] Attaching to an embedded browser > > > > > Mark, I did not have exactly your problem, but you may want to > > > look at > > > winClicker.rb and its getWindowHandle() method. After you get a > > > handle, you can use something like clickWindowsButton_hwnd() > from the > > > same lib to click buttons in it or other methods. > > > This is just a thought. I'm investigating how I can use winClicker > > > with some of windows in my app, and I don't have much > experience with > > > it (yet ;-)) > > > > > > Anna. > > > > > > > > > On 8/15/05, Mark Hammond wrote: > > > > > > > > > > > > HI there > > > > > > > > > > > > > > > > I am trying to attach to n embedded browser. How can I go about > > > doing this? > > > > > > > > > > > > > > > > Thanks > > > > > > > > Mark > > > > _______________________________________________ > > > > 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 atuisheva at gmail.com Mon Aug 15 20:43:36 2005 From: atuisheva at gmail.com (Anna Tuisheva) Date: Mon, 15 Aug 2005 17:43:36 -0700 Subject: [Wtr-general] Attaching to an embedded browser In-Reply-To: <340bf5f3412b21.3412b21340bf5f@shaw.ca> References: <340bf5f3412b21.3412b21340bf5f@shaw.ca> Message-ID: <4b3ccea5050815174376b4b85b@mail.gmail.com> Yes, this is what I'm trying to do. I'll check the archives on "autoit" and hopefully will have my questions answered... Thanks for your help! Anna. On 8/15/05, Paul Rogers wrote: > are you trying to access a window open with showModalDialog() ? > > If so, someone recently posted some code they used to get this working using autoit - check the archives from the last 2 weeks. If you cant find it I probably still have it at home > > Paul > > ----- Original Message ----- > From: Anna Tuisheva > Date: Monday, August 15, 2005 6:05 pm > Subject: Re: [Wtr-general] Attaching to an embedded browser > > > Oh, good news (about badly written code) ;-) > > > > Paul, how can I attach an IE if I know the window handle? That would > > really help. There seem to be no other way to locate the modal IE > > window I'm working with. > > This does not work: > > > > hndl = wc.getWindowHandle('MyList -- Web Page Dialog', '') > > puts hndl > > wtitle = wc.getWindowTitle(hndl) > > wc.makeWindowActive(hndl) > > ie.attach(:title, wtitle) > > > > This code returns an error that there's no window with this title even > > though the handle is not -1. > > > > Thanks, > > Anna. > > > > On 8/15/05, Paul Rogers wrote: > > > winclicker contains some very scary, badly written code. Id try > > to avoid it if possible. > > > > > > You might be able to attach to an embedded browser by using > > attach - or possibly a modified form of it and attach using the > > :url ( assuming you know the url of the embedded browser) Im sure > > you could also do something by fiding the hWnd of the embedding > > application, and then finding the child hWnd of the browser, and > > maybe using a modified form of Watir::IE::attach > > > > > > Paul > > > > > > ----- Original Message ----- > > > From: Anna Tuisheva > > > Date: Monday, August 15, 2005 3:27 pm > > > Subject: Re: [Wtr-general] Attaching to an embedded browser > > > > > > > Mark, I did not have exactly your problem, but you may want to > > > > look at > > > > winClicker.rb and its getWindowHandle() method. After you get a > > > > handle, you can use something like clickWindowsButton_hwnd() > > from the > > > > same lib to click buttons in it or other methods. > > > > This is just a thought. I'm investigating how I can use winClicker > > > > with some of windows in my app, and I don't have much > > experience with > > > > it (yet ;-)) > > > > > > > > Anna. > > > > > > > > > > > > On 8/15/05, Mark Hammond wrote: > > > > > > > > > > > > > > > HI there > > > > > > > > > > > > > > > > > > > > I am trying to attach to n embedded browser. How can I go about > > > > doing this? > > > > > > > > > > > > > > > > > > > > Thanks > > > > > > > > > > Mark > > > > > _______________________________________________ > > > > > 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 > From huemach at Cybersoft-VN.com Mon Aug 15 21:08:48 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Tue, 16 Aug 2005 08:08:48 +0700 Subject: [Wtr-general] RE: WATIR is slow ??? Message-ID: <99DF6C0285C2CE4C99F02D7838571966018550AE@hue.cybersoft-vn.com> Hi, You can use this method for increase Watir speed ie.set_fast_speed Regards, Hue From fredckp at yahoo.com.sg Mon Aug 15 21:56:45 2005 From: fredckp at yahoo.com.sg (Fred) Date: Tue, 16 Aug 2005 09:56:45 +0800 Subject: [Wtr-general] Dismiss Security Alert Window In-Reply-To: <20050812030616.11696.qmail@web40426.mail.yahoo.com> Message-ID: Hi, Anybody can advise what's a WET addon? Thanks. Regards, Fred -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Shubha R Sent: Friday, August 12, 2005 11:06 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Dismiss Security Alert Window I use the WET addon and that has been able to handle almost any window Larry Bolef wrote: Apologies in advance for a rank newbie question. I've skimmed the mailing list and noticed various references to this problem, but nothing that helped me. I'm using Ruby 1.8.2-15 and Watir v1.4 on Windows XP. I'm testing a website that triggers a "Security Alert" window. I'd like to dismiss (automatically click on the Yes button) this window. I've tried the code below, but hang on IE.start, so the clickWindowsButton never gets a chance to dismiss the window. Is there another way to dismiss the Windows security alert window? require 'watir' require 'watir\winClicker.rb' include Watir w = WinClicker.new ie=Watir::IE.start('http://xxxx') w.clickWindowsButton("Security Alert" , "&Yes" ) ie.text_field(:name, "username").set("username") ie.text_field(:name, "password").set("password") ie.button(:name, "Action").click ie.close ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ---------------------------------------------------------------------------- -- Yahoo! Mail for Mobile Take Yahoo! Mail with you! Check email on your mobile phone. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050816/4586c3ce/attachment.html From raghu at qantom.com Tue Aug 16 00:34:54 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Tue, 16 Aug 2005 10:04:54 +0530 Subject: [Wtr-general] Dismiss Security Alert Window In-Reply-To: References: Message-ID: <43016CEE.2080607@qantom.com> Hi Fred, (I am pasting the posting that I had submitted a few days back) WET is a great compliment to Watir. WET has the following features in a nutshell: 1) Object identification using multiple parameters 2) Object repository to store objects 3) Better popup handling 4) Easy manipulation of checkpoints 5) Results presented as HTML 6) Datatables 7) Test exeuction is controlled by a single test definition file. We have found this framework very helpful and hope this is going to be a great add-on and help all the users in the community. WET is available at http://www.wet.qantom.org Raghu Fred wrote: > Hi, > > Anybody can advise what's a WET addon? > Thanks. > > Regards, > Fred > > -----Original Message----- > *From:* wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org]*On Behalf Of *Shubha R > *Sent:* Friday, August 12, 2005 11:06 AM > *To:* wtr-general at rubyforge.org > *Subject:* Re: [Wtr-general] Dismiss Security Alert Window > > I use the WET addon and that has been able to handle > almost any window > > > */Larry Bolef /* wrote: > > Apologies in advance for a rank newbie question. I've > skimmed the mailing list and noticed various references to > this problem, but nothing that helped me. > > I'm using Ruby 1.8.2-15 and Watir v1.4 on Windows XP. I'm > testing a website that triggers a "Security Alert" window. > I'd like to dismiss (automatically click on the Yes button) > this window. > > I've tried the code below, but hang on IE.start, so the > clickWindowsButton never gets a chance to dismiss the > window. > > Is there another way to dismiss the Windows security alert > window? > > require 'watir' > require 'watir\winClicker.rb' > include Watir > w = WinClicker.new > ie=Watir::IE.start('http://xxxx') > w.clickWindowsButton("Security Alert" , "&Yes" ) > ie.text_field(:name, "username").set("username") > ie.text_field(:name, "password").set("password") > ie.button(:name, "Action").click > ie.close > > > > > ____________________________________________________ > Start your day with Yahoo! - make it your home page > http://www.yahoo.com/r/hs > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > ------------------------------------------------------------------------ > Yahoo! Mail for Mobile > Take Yahoo! Mail with you! > > Check email on your mobile phone. > >------------------------------------------------------------------------ > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > -- Qantom Software http://www.qantom.com Ph : 26799269 Xtn. 125 sip : raghu at sip411.com -- From fredckp at yahoo.com.sg Tue Aug 16 02:14:32 2005 From: fredckp at yahoo.com.sg (Fred) Date: Tue, 16 Aug 2005 14:14:32 +0800 Subject: [Wtr-general] Dismiss Security Alert Window In-Reply-To: <43016CEE.2080607@qantom.com> Message-ID: Thanks Raghu. I will check it out.. Regards, Fred -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Raghu Venkataramana Sent: Tuesday, August 16, 2005 12:35 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Dismiss Security Alert Window Hi Fred, (I am pasting the posting that I had submitted a few days back) WET is a great compliment to Watir. WET has the following features in a nutshell: 1) Object identification using multiple parameters 2) Object repository to store objects 3) Better popup handling 4) Easy manipulation of checkpoints 5) Results presented as HTML 6) Datatables 7) Test exeuction is controlled by a single test definition file. We have found this framework very helpful and hope this is going to be a great add-on and help all the users in the community. WET is available at http://www.wet.qantom.org Raghu Fred wrote: > Hi, > > Anybody can advise what's a WET addon? > Thanks. > > Regards, > Fred > > -----Original Message----- > *From:* wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org]*On Behalf Of *Shubha R > *Sent:* Friday, August 12, 2005 11:06 AM > *To:* wtr-general at rubyforge.org > *Subject:* Re: [Wtr-general] Dismiss Security Alert Window > > I use the WET addon and that has been able to handle > almost any window > > > */Larry Bolef /* wrote: > > Apologies in advance for a rank newbie question. I've > skimmed the mailing list and noticed various references to > this problem, but nothing that helped me. > > I'm using Ruby 1.8.2-15 and Watir v1.4 on Windows XP. I'm > testing a website that triggers a "Security Alert" window. > I'd like to dismiss (automatically click on the Yes button) > this window. > > I've tried the code below, but hang on IE.start, so the > clickWindowsButton never gets a chance to dismiss the > window. > > Is there another way to dismiss the Windows security alert > window? > > require 'watir' > require 'watir\winClicker.rb' > include Watir > w = WinClicker.new > ie=Watir::IE.start('http://xxxx') > w.clickWindowsButton("Security Alert" , "&Yes" ) > ie.text_field(:name, "username").set("username") > ie.text_field(:name, "password").set("password") > ie.button(:name, "Action").click > ie.close > > > > > ____________________________________________________ > Start your day with Yahoo! - make it your home page > http://www.yahoo.com/r/hs > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > ---------------------------------------------------------------------- -- > Yahoo! Mail for Mobile > Take Yahoo! Mail with you! > > Check email on your mobile phone. > >------------------------------------------------------------------------ > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > -- Qantom Software http://www.qantom.com Ph : 26799269 Xtn. 125 sip : raghu at sip411.com -- _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general Send instant messages to your online friends http://asia.messenger.yahoo.com From Tim.Feltham at orionhealth.com Tue Aug 16 02:40:22 2005 From: Tim.Feltham at orionhealth.com (Tim Feltham) Date: Tue, 16 Aug 2005 18:40:22 +1200 Subject: [Wtr-general] How does WET click a button like this? Message-ID: <0FDF67DB50EC904AAEA1B2A83A281050013A8B9B@mail.orion.internal> Hello, Seen as WATIR cannot handle the modal dialogs with select lists I thought I'd try out WET. However I can't get past the login screen. The login screen has a login button with this source Login in WATIR, to click this is simple ie.link(:text, 'Login').click How do I click it in WET? Cheers, Tim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050816/5a3bbabe/attachment.html From satti at qantom.com Tue Aug 16 03:05:13 2005 From: satti at qantom.com (Sathya Shankar) Date: Tue, 16 Aug 2005 12:35:13 +0530 Subject: [Wtr-general] How does WET click a button like this? In-Reply-To: <0FDF67DB50EC904AAEA1B2A83A281050013A8B9B@mail.orion.internal> References: <0FDF67DB50EC904AAEA1B2A83A281050013A8B9B@mail.orion.internal> Message-ID: <43019029.4060600@qantom.com> Try this Browser("title:=xxx").Link("text:=/.*Login.*/").click Satti Tim Feltham wrote: > Hello, > > Seen as WATIR cannot handle the modal dialogs with select lists I > thought I'd try out WET. > > However I can't get past the login screen. > > The login screen has a login button with this source > Login > in WATIR, to click this is simple > ie.link(:text, 'Login').click > > How do I click it in WET? > > Cheers, > Tim > >------------------------------------------------------------------------ > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > From pascal.serodes at ortec.fr Tue Aug 16 11:36:22 2005 From: pascal.serodes at ortec.fr (Pascal SERODES) Date: Tue, 16 Aug 2005 17:36:22 +0200 Subject: [Wtr-general] RuntimeError: failedtogetIEnumInterfaceHRESULTerror code:0x80004002 Message-ID: Yes it's really looks like a puzzle, damm! I using internet explorer ie version 6.0.28 wich direction may i take to try to Get futher on watir, is it more simple test than i can try to identify more forward the cause of this exception? -----Message d'origine----- De : wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] De la part de Bret Pettichord Envoy? : samedi 13 ao?t 2005 00:52 ? : wtr-general at rubyforge.org Objet : RE: [Wtr-general] RuntimeError: failedtogetIEnumInterfaceHRESULTerror code:0x80004002 This is very puzzling to me. It doesn't look like Watir can't get to the DOM tree. It is failing on ie.document.body.all This returns a COM object, but i has no IEnum Interface. It seems like maybe you are running a very old version of IE. Watir needs 5.5 or later. But i think you get that automatically with XP SP 1. A puzzle. Bret At 10:28 AM 8/12/2005, Pascal SERODES wrote: >Yes the navigatio seems OK, the error raised even if i try to get the >content of a text field, Ie.text_field(:name, 'name').getContents() > >Again here the stack trace: >Microsoft Windows XP [version 5.1.2600] >(C) Copyright 1985-2001 Microsoft Corp. > >D:\siouxWatir\scripts>t2.rb >## Debut test: Sioux Test > >Step 1: connexion a sioux: >Step 2: loggin >d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:805:in `each': Failed to get >IEnum Interface (RuntimeError) > HRESULT error code:0x80004002 > Cette interface n'est pas prise en charge 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:3236: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 D:/siouxWatir/scripts/t2.rb:24 > >At line 24 of file t2.rb i have: > ie.text_field(:name, 'j_username').getContents() > > >Nota: the error raised even if i try to simulate a click on a button >with the line: > ie.button(:name, 'Connexion').click > >The initial error is on line 805 of watir.rb, looks like watir can't >get the DOM tree? > >About the OS is Windows XP, SP1, french version. >Ruby version 1.8.1.2-15 >Watir 1.4.2 >I just did what's is tell in the "User Guide" step1 to Step4 except >that the problem arrived since step3 (dont pass the unittests step) > > >Is the problem link with services on windows XP?? The use of the COM >interface may be need some extra Setup, by the way i am the >administrator of the machine. > > > >-----Message d'origine----- >De : wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] De la part de Paul Rogers >Envoy? : vendredi 12 ao?t 2005 16:46 ? : wtr-general at rubyforge.org >Objet : RE: [Wtr-general] RuntimeError: failed >togetIEnumInterfaceHRESULTerror code:0x80004002 > >It does the navigation ok, just doesn't do the set on a text field - is >that right? What about other controls? Can you read values from a text field? > >What OS are you using? > >Paul > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Pascal SERODES >Sent: 12 August 2005 08:23 >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] RuntimeError: failed to >getIEnumInterfaceHRESULTerror code:0x80004002 > > >No the unittests raise the same error > >-----Message d'origine----- >De : wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] De la part de Paul Rogers >Envoy? : vendredi 12 ao?t 2005 16:09 ? : wtr-general at rubyforge.org >Objet >: RE: [Wtr-general] RuntimeError: failed to get >IEnumInterfaceHRESULTerror >code:0x80004002 > >Do the unit tests work for you? > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Pascal SERODES >Sent: 12 August 2005 02:32 >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] RuntimeError: failed to get IEnum >InterfaceHRESULTerror code:0x80004002 > > >My script is very simple, >The error is as soon i try to set a value in a text field (line number >24) >----------------------------------------------------------------------- >- >-------------------------------------# ># test watir pour sioux ># >#---------------------------------------------------------------------- >- >-------------------------------------# > > require 'watir' # the watir controller > > # set a variable > siouxHome = 'http://localhost:8080/moa' > > # open the IE browser > ie = Watir::IE.new > > # print some comments > puts "## Debut test: Sioux Test" > puts " " > > puts "Step 1: connexion a sioux: " > ie.goto(siouxHome) > > > puts "Step 2: loggin " > ie.text_field(:name, 'j_username').set('xxx') --> line number 24; > ie.text_field(:name, 'j_password').set('xxx') > ie.button(:name, 'Connexion').click > > > if ie.contains_text("noErrorsOnPage") > puts "connexion effectu?e" > else > puts "no good" > end > > puts " " > puts "## Fin du test" > >-----Message d'origine----- >De : wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] De la part de Bret >Pettichord Envoy? : jeudi 11 ao?t 2005 17:56 ? : wtr-general at rubyforge.org Objet : >Re: [Wtr-general] RuntimeError: failed to get IEnum InterfaceHRESULT >error >code:0x80004002 > >The error comes from this line of your script > > D:/watir-v1_4/sioux/scripts/t1.rb:24 > >Please show us your script. > > >At 04:01 AM 8/11/2005, Pascal SERODES wrote: > >Content-class: urn:content-classes:message > >Content-Type: multipart/alternative; > > boundary="----_=_NextPart_001_01C59E53.4882DE5C" > > > >i want to use watir but i'v got these troubleshooting: > > > > > >d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:805:in `each': Failed to get > > > > IEnum Interface (RuntimeError) HRESULT error code:0x80004002 > > > >Cette interface n'est pas prise en charge 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:3236: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 D:/watir-v1_4/sioux/scripts/t1.rb:24 > > > > > >This error raised everytime watir try to set something in IE like > > > > setting a value in a textfield, Reading value from ie looks like OK. > > > > im using window XP SP1 > > > > IE 6.0 > > > > watir 1.4.2 > > > >ruby 1.8.2-15 > > > > > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > >_____________________ > Bret Pettichord > www.pettichord.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 > > >_______________________________________________ >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 _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Peter.Ch at NETeller.com Tue Aug 16 13:13:59 2005 From: Peter.Ch at NETeller.com (Peter Chau) Date: Tue, 16 Aug 2005 11:13:59 -0600 Subject: [Wtr-general] Detecting a closed IE Message-ID: Hi, When you open a new ie window and your homepage is blank require 'watir' $ie = Watir::IE.new you can use $ie.url=="" to detect that the blank IE is open When you close this window ($ie.close), how can I detect that the window is closed? Peter From etabora at brandmuscle.com Tue Aug 16 15:53:17 2005 From: etabora at brandmuscle.com (Eric Tabora) Date: Tue, 16 Aug 2005 15:53:17 -0400 Subject: [Wtr-general] Returning a string Message-ID: Our form assigns a Request ID #. Your request has been submitted for approval. The request id is  137 Is it possible return the just the Request ID #? I've tried ie.text() but it returns all of the text on the page Thanks in advance. ------ Eric Tabora, Quality Assurance BrandMuscle, Inc. etabora at brandmuscle.com The information transmitted in this email is intended only for the person(s) or entity to which it is addressed and may contain proprietary, confidential and/or privileged material. If you have received this email in error, please contact the sender by replying and delete this email from your system. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050816/cbfcd6b6/attachment.html From paul.rogers at shaw.ca Tue Aug 16 16:37:44 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 16 Aug 2005 14:37:44 -0600 Subject: [Wtr-general] Returning a string Message-ID: <354bb02354a7b5.354a7b5354bb02@shaw.ca> you can use ie.span(:index,xxx).text it would be better if your developers addeda an id, then you can use ie.span(:id,'request_id').text Paul Content-class: urn:content-classes:message Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C5A29C.24B6B1F5" ------_=_NextPart_001_01C5A29C.24B6B1F5 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Our form assigns a Request ID #. =20 =20 Your request has been submitted for approval. The request id is  137 =20 Is it possible return the just the Request ID #? =20 I've tried ie.text() but it returns all of the text on the page =20 Thanks in advance. ------ Eric Tabora, Quality Assurance BrandMuscle, Inc. etabora at brandmuscle.com =20 The information transmitted in this email is intended only for the = person(s) or entity to which it is addressed and may contain = proprietary, confidential and/or privileged material. If you have = received this email in error, please contact the sender by replying and = delete this email from your system. ------_=_NextPart_001_01C5A29C.24B6B1F5 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Our form assigns a Request ID = #.

 

         =              <td class=3D"portlet-form-label-highlight" align=3D"left">

         =             &= nbsp; 

         =             &= nbsp;      Your request has been submitted for approval. The request id = is

         =             &= nbsp;      &nbsp;<span>137</span>      = ;            =      

         =              </td>

 

Is it possible return the just the Request ID = #?

 

I’ve tried   ie.text() but it returns = all of the text on the page

 

Thanks in advance.

------

Eric Tabora, Quality = Assurance

BrandMuscle, Inc.

etabora at brandmuscle.com

 


The information transmitted in this email is intended only for = the person(s) or entity to which it is addressed and may contain = proprietary, confidential and/or privileged material. If you have = received this email in error, please contact the sender by replying and = delete this email from your system.

------_=_NextPart_001_01C5A29C.24B6B1F5-- -------------- next part -------------- _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Ben.Torres at rhi.com Tue Aug 16 16:57:39 2005 From: Ben.Torres at rhi.com (Torres, Ben (HQP)) Date: Tue, 16 Aug 2005 13:57:39 -0700 Subject: [Wtr-general] trying to use ie.send_keys('{ENTER}') to clear security alert box Message-ID: <1641BB0AA7287848817A63C3EE9677D5075F6A28@hqp-ex-mb05.na.msds.rhi.com> Hi, I am trying to use the following to click on a form submit button, then to hit ENTER once the security alert box pops up: ie.image(:src, /submit/).click ie.send_keys('{ENTER}') When I do this, it seems that ie is waiting for the browser to be ready and the send_keys command doesn't execute. So, I tried doing this to force the browser ready: ie.image(:src, /submit/).getOLEObject.click ie.send_keys('{ENTER}') When I do this, the security alert box doesn't pop up fast enough, so by the time it does appear, the send_keys command has already executed. This works for on of my test pages that has a security box alert coming up instantly, but for the page I am having trouble with, has the security popup appearing after 2-3 seconds after hitting the submit button. Does anybody have any suggestions as to clearing this alert box? (I've used Autoit, and it works, but I would like to have my script run with just watir and ruby installed). I also tried this, but it also makes the browser wait for a very long time: ie.image(:src, /submit/).getOLEObject.click ie.wait(2) ie.send_keys('{ENTER}') Thanks for any help... -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050816/95994661/attachment.html From tuyet.ctn at mscibarra.com Tue Aug 16 20:02:34 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Tue, 16 Aug 2005 17:02:34 -0700 Subject: [Wtr-general] Returning a string Message-ID: Some questions came up during a demo of WATIR. Our automation team would like to know whether WATIR can do the following functions: 1. Launch external applications from a test script such as Excel, Word, etc. 2. Include variables, functions, web/window declarations and/or additional test cases from other test scripts (E.g. - "uses", "script:") 3. File I/O (E.g. - Logging, test input/output data, expected results, etc.) 4. Exception handling (WATIR errors distinguished from system or OS errors) 5. Customizable result states (E.g. - warnings) 6. Command line support (launch, quit, run one, run multiple, output) 7. Access & scope declarations (private, public, protected, friend, etc.) 8. Integrates & interacts directly w/ desktop applications & Operating System on some level (command line? Process id? Can it tell the OS of the machine running WATIR is Win2K or XP, etc.) 9. Change script to trap System Error when table is not accessible 10. Investigate launching 2 scripts at the same time (use two different instances of IE) I believe most of the answers are YES, but I am not sure about 4, 8 & 9. Your answers are appreciated. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050816/6bf8a703/attachment.html From tuyet.ctn at mscibarra.com Tue Aug 16 21:03:11 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Tue, 16 Aug 2005 18:03:11 -0700 Subject: [Wtr-general] What WATIR can do? Message-ID: Some questions came up during a demo of WATIR. Our automation team would like to know whether WATIR can do the following functions: 1. Launch external applications from a test script such as Excel, Word, etc. 2. Include variables, functions, web/window declarations and/or additional test cases from other test scripts (E.g. - "uses", "script:") 3. File I/O (E.g. - Logging, test input/output data, expected results, etc.) 4. Exception handling (WATIR errors distinguished from system or OS errors) 5. Customizable result states (E.g. - warnings) 6. Command line support (launch, quit, run one, run multiple, output) 7. Access & scope declarations (private, public, protected, friend, etc.) 8. Integrates & interacts directly w/ desktop applications & Operating System on some level (command line? Process id? Can it tell the OS of the machine running WATIR is Win2K or XP, etc.) 9. Change script to trap System Error when table is not accessible 10. Investigate launching 2 scripts at the same time (use two different instances of IE) I believe most of the answers are YES, but I am not sure about 4, 8 & 9. Your answers are appreciated. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050816/5087532d/attachment.html From alex at verk.info Tue Aug 16 21:24:29 2005 From: alex at verk.info (Alex Verhovsky) Date: Tue, 16 Aug 2005 19:24:29 -0600 Subject: [Wtr-general] What WATIR can do? In-Reply-To: References: Message-ID: <430291CD.2030407@verk.info> Tuyet Cong-Ton-Nu wrote: > Some questions came up during a demo of WATIR. > > Our automation team would like to know whether WATIR can do the > following functions: > > 1. Launch external applications from a test script such as Excel, > Word, etc. > > 2. Include variables, functions, web/window declarations and/or > additional test cases from other test scripts (E.g. ? ?uses?, ?script:?) > > 3. File I/O (E.g. ? Logging, test input/output data, expected results, > etc.) > > 4. Exception handling (WATIR errors distinguished from system or OS > errors) > > 5. Customizable result states (E.g. ? warnings) > > 6. Command line support (launch, quit, run one, run multiple, output) > > 7. Access & scope declarations (private, public, protected, friend, etc.) > > 8. Integrates & interacts directly w/ desktop applications & Operating > System on some level (command line? Process id? Can it tell the OS of > the machine running WATIR is Win2K or XP, etc.) > > 9. Change script to trap System Error when table is not accessible > > 10. Investigate launching 2 scripts at the same time (use two > different instances of IE) > > I believe most of the answers are YES, but I am not sure about 4, 8 & > 9. Your answers are appreciated. Thanks. > >------------------------------------------------------------------------ > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > 4 - yes, if I understand the question correctly 8. Ruby can certainly tell Win 2000 from XP, and has a lot of nice methods to interact with the file systems (much better than Java and C#). Since Win32API is available to Ruby, you can use that to achieve anything else.That's the beauty of having a real programming language in your automated tests - as opposed to surrogates offered by most commercial capture/playback tools. 9. - yes, if I understand the question correctly. Again, it's Ruby, so you have all the error handling that the language provides. So, you can do begin ie.table(:id, 'foo')[1, 2] rescue => e # whatever it is that you want to do about it end Alex From paul.rogers at shaw.ca Tue Aug 16 21:22:42 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 16 Aug 2005 19:22:42 -0600 Subject: [Wtr-general] What WATIR can do? In-Reply-To: Message-ID: <004601c5a2ca$2a143cb0$6600a8c0@NewDell> 4, yes. Watir Exceptions descend from a WatirException class, for this exact reason 8, in ruby you have access to the win api. You have to write code for some of it, or see if there is a library already done. You can access programs using OLE 9 Im not sure what that means - seems like you want to raise an error if you cant connect to a database or something I think all the others are a yes Hope that helps -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tuyet Cong-Ton-Nu Sent: 16 August 2005 19:03 To: wtr-general at rubyforge.org Subject: [Wtr-general] What WATIR can do? Some questions came up during a demo of WATIR. Our automation team would like to know whether WATIR can do the following functions: 1. Launch external applications from a test script such as Excel, Word, etc. 2. Include variables, functions, web/window declarations and/or additional test cases from other test scripts (E.g. - "uses", "script:") 3. File I/O (E.g. - Logging, test input/output data, expected results, etc.) 4. Exception handling (WATIR errors distinguished from system or OS errors) 5. Customizable result states (E.g. - warnings) 6. Command line support (launch, quit, run one, run multiple, output) 7. Access & scope declarations (private, public, protected, friend, etc.) 8. Integrates & interacts directly w/ desktop applications & Operating System on some level (command line? Process id? Can it tell the OS of the machine running WATIR is Win2K or XP, etc.) 9. Change script to trap System Error when table is not accessible 10. Investigate launching 2 scripts at the same time (use two different instances of IE) I believe most of the answers are YES, but I am not sure about 4, 8 & 9. Your answers are appreciated. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050816/48ff2fd5/attachment.html From paul.rogers at shaw.ca Tue Aug 16 21:19:46 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 16 Aug 2005 19:19:46 -0600 Subject: [Wtr-general] Detecting a closed IE In-Reply-To: Message-ID: <004501c5a2c9$c18e93c0$6600a8c0@NewDell> You could trap the exception that's thrown, but that could get kind of ugly. Especially as its probably a weird OLE exception. It seems like we need a closed? Method on ie. It would be trivial to do it when watir closes a window, but Im not sure I know how we would do it if the window is closed by javasscript or a user. ( maybe something like this.) I don't have the code handy, so Im going off memory Class IE # is this the correct class def window_exists? begin if .hWnd == -1 # I cant remember what the variable name for the actual browser is return false end return true rescue return true end end end You could try something like this and let us know how you get on ;-) -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Peter Chau Sent: 16 August 2005 11:14 To: wtr-general at rubyforge.org Subject: [Wtr-general] Detecting a closed IE Hi, When you open a new ie window and your homepage is blank require 'watir' $ie = Watir::IE.new you can use $ie.url=="" to detect that the blank IE is open When you close this window ($ie.close), how can I detect that the window is closed? Peter _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From jeff.darklight at gmail.com Tue Aug 16 23:26:33 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Tue, 16 Aug 2005 20:26:33 -0700 Subject: [Wtr-general] What WATIR can do? In-Reply-To: References: Message-ID: <4302AE69.6030309@gmail.com> Tuyet Cong-Ton-Nu wrote: > Some questions came up during a demo of WATIR. > > Our automation team would like to know whether WATIR can do the > following functions: > > > > 1. Launch external applications from a test script such as > Excel, Word, etc. > > 2. Include variables, functions, web/window declarations and/or > additional test cases from other test scripts (E.g. - "uses", "script:") > > 3. File I/O (E.g. - Logging, test input/output data, expected > results, etc.) > > 4. Exception handling (WATIR errors distinguished from system or > OS errors) > > 5. Customizable result states (E.g. - warnings) > > 6. Command line support (launch, quit, run one, run multiple, > output) > > 7. Access & scope declarations (private, public, protected, > friend, etc.) > > 8. Integrates & interacts directly w/ desktop applications & > Operating System on some level (command line? Process id? Can it tell > the OS of the machine running WATIR is Win2K or XP, etc.) > > 9. Change script to trap System Error when table is not accessible > > 10. Investigate launching 2 scripts at the same time (use two > different instances of IE) > > > > I believe most of the answers are YES, but I am not sure about 4, 8 & > 9. Your answers are appreciated. Thanks. > >------------------------------------------------------------------------ > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > Ok, #1 - Understand that WATiR is simply a library for Ruby ... since your scripts are all ruby programs you have access to everything Ruby can get to ... Ruby under Windows has the Win32Ole library which means it can talk with any COM enabled application. #2 - Again, scripts are Ruby based, you can pull functionality from multiple files together as well as database connectivity, command-line arguments, environment variables, etc. #3 - ... same answer, Ruby has File I/O. #4 - Yes, WATiR has it's own exception mechanisms that wrap application exceptions from Internet Explorer. #5 - ... I guess I need more specifics about what you are looking for. Programs have exit values just like a C application. Ruby also has a built in logging class that allows for differing levels of information to all be output to the same file... Warnings vs Errors vs Informational messages. Ruby also has built in support in the standard object library for xUnit style test case and test suite objects. #6 - ... I guess I need more specifics on this one too... You can kick off ruby scripts or, if you installed from the one-click installer, you can simply double click a script to run it. As far as run-one, run-all, etc ... well, that's up to whatever command-line options you program into your applications. But, again, fully-featured programming language, you should find everything you are looking for. #7 - Ruby has access specifiers and an Object inheritance model that should be more than sufficient for you, it even implements some things ( like mix-ins ) that you probably aren't used to. #8 - Ruby has access to the running environment which provides information about the running version of windows. You can run separate programs as separate processes ( child or otherwise ). #9 - Ruby has exception handling and you can simply wrap the call attempting to access a specific table/whatever with that error-handler and watch for the error that is raised when that situation occurs. #10 - Yes, WATiR supports multiple distinct IE processes... Each invocation of IE.new creates a new/distinct window. Let me know if I didn't answer any of your points to your satisfaction. j. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050816/bb00a40c/attachment.html From bret at pettichord.com Wed Aug 17 12:12:16 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 17 Aug 2005 11:12:16 -0500 Subject: [Wtr-general] I Like WET Message-ID: <5.1.0.14.2.20050817111049.02f96578@127.0.0.1> I really like WET and looking over its code has strongly influenced the direction that i want to take Watir in. For background, see this: http://www.io.com/~wazmo/blog/ I'll have more details about what i want to do posted here shortly. Bret _____________________ Bret Pettichord www.pettichord.com From etabora at brandmuscle.com Wed Aug 17 13:18:05 2005 From: etabora at brandmuscle.com (Eric Tabora) Date: Wed, 17 Aug 2005 13:18:05 -0400 Subject: [SPAM] - Re: [Wtr-general] Returning a string - Email found in subject Message-ID: I got our developer to put an 'id' in. I got this to work in irb, but cannot get it to work in my script. If I use ie.span(:id, 'submitted').flash The proper text will flash. When I use ie.span(:id, 'submitted').text Nothing is displayed. I'm a little baffled by this. Any ideas? ------ Eric Tabora, Quality Assurance BrandMuscle, Inc. P: 216.454.2010 Cell: 216-577-2835 etabora at brandmuscle.com -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, August 16, 2005 4:38 PM To: wtr-general at rubyforge.org Subject: [SPAM] - Re: [Wtr-general] Returning a string - Email found in subject you can use ie.span(:index,xxx).text it would be better if your developers addeda an id, then you can use ie.span(:id,'request_id').text Paul Content-class: urn:content-classes:message Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C5A29C.24B6B1F5" ------_=_NextPart_001_01C5A29C.24B6B1F5 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Our form assigns a Request ID #. =20 =20 Your request has been submitted for approval. The request id is  137 =20 Is it possible return the just the Request ID #? =20 I've tried ie.text() but it returns all of the text on the page =20 Thanks in advance. ------ Eric Tabora, Quality Assurance BrandMuscle, Inc. etabora at brandmuscle.com =20 The information transmitted in this email is intended only for the = person(s) or entity to which it is addressed and may contain = proprietary, confidential and/or privileged material. If you have = received this email in error, please contact the sender by replying and = delete this email from your system. ------_=_NextPart_001_01C5A29C.24B6B1F5 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Our form assigns a Request ID = #.

 

          ;=              <td class=3D"portlet-form-label-highlight" align=3D"left">

          ;=              &= nbsp; 

          ;=              &= nbsp;      Your request has been submitted for approval. The request id = is

          ;=              &= nbsp;      &nbsp;<span>137</span>     &nbs p= ;             ;=      

          ;=              </td>

 

Is it possible return the just the Request ID = #?

 

I’ve tried   ie.text() but it returns = all of the text on the page

 

Thanks in advance.

------

Eric Tabora, Quality = Assurance

BrandMuscle, Inc.

etabora at brandmuscle.com

 


The information transmitted in this email is intended only for = the person(s) or entity to which it is addressed and may contain = proprietary, confidential and/or privileged material. If you have = received this email in error, please contact the sender by replying and = delete this email from your system.

------_=_NextPart_001_01C5A29C.24B6B1F5-- From Peter.Ch at NETeller.com Wed Aug 17 13:47:57 2005 From: Peter.Ch at NETeller.com (Peter Chau) Date: Wed, 17 Aug 2005 11:47:57 -0600 Subject: [Wtr-general] Detecting a closed IE Message-ID: Thanx this works class IE def window_exists? begin return false if @ie.hWnd== -1 return true rescue return false end end end if __FILE__ == $0 require 'neteller' Test::Unit::TestCase class TC_ie < Test::Unit::TestCase def test_open openIE=Watir::IE.new assert(openIE.window_exists?) openIE.close end def test_close closeIE=Watir::IE.new closeIE.close assert_false(closeIE.window_exists?) end end end From mkelly at elevenwireless.com Wed Aug 17 14:22:41 2005 From: mkelly at elevenwireless.com (Michael Kelly) Date: Wed, 17 Aug 2005 11:22:41 -0700 Subject: [Wtr-general] I Like WET Message-ID: <640C9D8653C87C44AB5F00F91A91FE210D4B76@edison.elevenwireless.com> Bret, thanks for sharing your thoughts on WatirMaker. I have similar concerns about the utility of script recorders and caution your readers to not expect too much from WatirMaker. It has *not* been conceived of as a record/playback tool for non-programmers. On the contrary, at Eleven the programmers use Watir to write UI unit tests in a test-driven fashion. Nearly every test starts with some setup in the database using the DataMother design pattern (a variant of the ObjectMother pattern which can be found here: http://www.thoughtworks.com/us/library/ObjectMother%20Website.pdf), and concludes with one or more asserts validating specific conditions. It is the stuff in the middle that we hope WatirMaker will facilitate. We imagine the tool fitting nicely into a process that looks something like this: 1. Create test skeleton (including data prep). 2. Capture Watir statements and paste into the test skeleton. 3. Modify as needed and add asserts. In truth, I believe that we're seeking the same tool you've described as "...a tool that would show you the Watir syntax for identifying a control or page element you point to." We've simply conceived of the tool as a recorder. -=michael=- -- Michael Kelly Sr. Software Engineer Eleven Wireless Inc. - The Possibilities are Wireless http://www.elevenwireless.com -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Wednesday, August 17, 2005 9:12 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] I Like WET I really like WET and looking over its code has strongly influenced the direction that i want to take Watir in. For background, see this: http://www.io.com/~wazmo/blog/ I'll have more details about what i want to do posted here shortly. Bret _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Wed Aug 17 14:40:23 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 17 Aug 2005 12:40:23 -0600 Subject: [SPAM] - Re: [Wtr-general] Returning a string - Email found in subject Message-ID: <36b25a536b31fe.36b31fe36b25a5@shaw.ca> HAVE YOU LOOKED INTO THE UNITTEST FOR SPAN? oops caps lock was on , sorry! Paul ----- Original Message ----- From: Eric Tabora Date: Wednesday, August 17, 2005 11:18 am Subject: RE: [SPAM] - Re: [Wtr-general] Returning a string - Email found in subject > I got our developer to put an 'id' in. I got this to work in irb, but > cannot get it to work in my script. > > If I use > > ie.span(:id, 'submitted').flash > > The proper text will flash. > > When I use > > ie.span(:id, 'submitted').text > > Nothing is displayed. > > I'm a little baffled by this. Any ideas? > > > ------ > Eric Tabora, Quality Assurance > BrandMuscle, Inc. > > P: 216.454.2010 Cell: 216-577-2835 > etabora at brandmuscle.com > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Tuesday, August 16, 2005 4:38 PM > To: wtr-general at rubyforge.org > Subject: [SPAM] - Re: [Wtr-general] Returning a string - Email > found in > subject > > you can use > > ie.span(:index,xxx).text > > it would be better if your developers addeda an id, then you can use > ie.span(:id,'request_id').text > > Paul > > Content-class: urn:content-classes:message > Content-Type: multipart/alternative; > boundary="----_=_NextPart_001_01C5A29C.24B6B1F5" > > > ------_=_NextPart_001_01C5A29C.24B6B1F5 > Content-Type: text/plain; > charset="us-ascii" > Content-Transfer-Encoding: quoted-printable > > Our form assigns a Request ID #. > > =20 > > align=3D"left"> > > =20 > > Your request has been submitted for > approval. The request id is > > 137 > > > > > =20 > > Is it possible return the just the Request ID #? > > =20 > > I've tried ie.text() but it returns all of the text on the page > > =20 > > Thanks in advance. > > ------ > > Eric Tabora, Quality Assurance > > BrandMuscle, Inc. > > etabora at brandmuscle.com > > =20 > > > The information transmitted in this email is intended only for the = > person(s) or entity to which it is addressed and may contain = > proprietary, confidential and/or privileged material. If you have = > received this email in error, please contact the sender by > replying and > = > delete this email from your system. > > > > ------_=_NextPart_001_01C5A29C.24B6B1F5 > Content-Type: text/html; > charset="us-ascii" > Content-Transfer-Encoding: quoted-printable > > xmlns:w=3D"urn:schemas-microsoft-com:office:word" = > xmlns=3D"http://www.w3.org/TR/REC-html40"> > > > charset=3Dus-ascii"> > medium)"> > > > > > >
> >

style=3D'font-size:10.0pt; > font-family:Arial'>Our form assigns a Request ID = > #.

> >

style=3D'font-size:10.0pt; > font-family:Arial'>

> >

style=3D'font-size:10.0pt; > font-family:Arial'>   > ;= > > align=3D"left">

> >

style=3D'font-size:10.0pt; > font-family:Arial'>   > ;= > > &= > nbsp; >

> >

style=3D'font-size:10.0pt; > font-family:Arial'>   > ;= > > &= > nbsp; > Your request has been submitted for approval. The request id = > is

> >

style=3D'font-size:10.0pt; > font-family:Arial'>   > ;= > > &= > nbsp; > &nbsp; p= > ;   > ;= > >

> >

style=3D'font-size:10.0pt; > font-family:Arial'>   > ;= > >

> >

style=3D'font-size:10.0pt; > font-family:Arial'>

> >

style=3D'font-size:10.0pt; > font-family:Arial'>Is it possible return the just the Request ID = > #?

> >

style=3D'font-size:10.0pt; > font-family:Arial'>

> >

style=3D'font-size:10.0pt; > font-family:Arial'>I’ve tried ie.text() but it returns > = > all of > the text on the page

> >

style=3D'font-size:10.0pt; > font-family:Arial'>

> >

style=3D'font-size:10.0pt; > font-family:Arial'>Thanks in advance.

> >

style=3D'font-size:7.5pt; > font-family:Arial'>------

> >

style=3D'font-size:7.5pt; > font-family:Arial'>Eric Tabora, Quality = > Assurance

> >

style=3D'font-size:7.5pt; > font-family:Arial'>BrandMuscle, Inc.

> >

style=3D'font-size:7.5pt; > font- > family:Arial'>etabora at brandmuscle.com

>

style=3D'font-size: > 12.0pt'>

> >
> > > >

face=3DTahoma> >


> size=3D1>The information transmitted in this email is intended > only for > = > the person(s) or entity to which it is addressed and may contain = > proprietary, confidential and/or privileged material. If you have = > received this email in error, please contact the sender by > replying and > = > delete this email from your > system.

> ------_=_NextPart_001_01C5A29C.24B6B1F5-- > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From paul.rogers at shaw.ca Wed Aug 17 14:41:47 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 17 Aug 2005 12:41:47 -0600 Subject: [Wtr-general] Detecting a closed IE Message-ID: <36b377336b1d9f.36b1d9f36b3773@shaw.ca> Do you have check in rights? Bret, I think this would be a useful addition - is the method name corect? maybe Window_exists? Paul ----- Original Message ----- From: Peter Chau Date: Wednesday, August 17, 2005 11:47 am Subject: RE: [Wtr-general] Detecting a closed IE > > > Thanx this works > > class IE > def window_exists? > begin > return false if @ie.hWnd== -1 > return true > rescue > return false > end > end > end > > > if __FILE__ == $0 > require 'neteller' > Test::Unit::TestCase > > class TC_ie < Test::Unit::TestCase > > def test_open > openIE=Watir::IE.new > assert(openIE.window_exists?) > openIE.close > end > > def test_close > closeIE=Watir::IE.new > closeIE.close > assert_false(closeIE.window_exists?) > end > > end > end > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From bret at pettichord.com Wed Aug 17 18:12:21 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 17 Aug 2005 17:12:21 -0500 Subject: [Wtr-general] I Like WET In-Reply-To: <640C9D8653C87C44AB5F00F91A91FE210D4B76@edison.elevenwirele ss.com> Message-ID: <5.1.0.14.2.20050817171023.02e8f488@127.0.0.1> Michael, I don't doubt your intentions and wish you best of luck. Keep us informed of progress. And when you are ready for release, please set up a separate mailing list for all the clueless newbies who are are now going to be watir scripters! Bret At 01:22 PM 8/17/2005, Michael Kelly wrote: >Bret, thanks for sharing your thoughts on WatirMaker. I have similar >concerns about the utility of script recorders and caution your readers >to not expect too much from WatirMaker. It has *not* been conceived of >as a record/playback tool for non-programmers. On the contrary, at >Eleven the programmers use Watir to write UI unit tests in a test-driven >fashion. Nearly every test starts with some setup in the database using >the DataMother design pattern (a variant of the ObjectMother pattern >which can be found here: >http://www.thoughtworks.com/us/library/ObjectMother%20Website.pdf), and >concludes with one or more asserts validating specific conditions. It is >the stuff in the middle that we hope WatirMaker will facilitate. > >We imagine the tool fitting nicely into a process that looks something >like this: > >1. Create test skeleton (including data prep). >2. Capture Watir statements and paste into the test skeleton. >3. Modify as needed and add asserts. > >In truth, I believe that we're seeking the same tool you've described as >"...a tool that would show you the Watir syntax for identifying a >control or page element you point to." We've simply conceived of the >tool as a recorder. > >-=michael=- > >-- >Michael Kelly >Sr. Software Engineer >Eleven Wireless Inc. - The Possibilities are Wireless >http://www.elevenwireless.com > > > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord >Sent: Wednesday, August 17, 2005 9:12 AM >To: wtr-general at rubyforge.org >Subject: [Wtr-general] I Like WET > > >I really like WET and looking over its code has strongly influenced the >direction that i want to take Watir in. > >For background, see this: >http://www.io.com/~wazmo/blog/ > >I'll have more details about what i want to do posted here shortly. > >Bret > > >_____________________ > Bret Pettichord > www.pettichord.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 _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Aug 17 18:17:18 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 17 Aug 2005 17:17:18 -0500 Subject: [Wtr-general] Detecting a closed IE In-Reply-To: <36b377336b1d9f.36b1d9f36b3773@shaw.ca> Message-ID: <5.1.0.14.2.20050817171543.02f21ac0@127.0.0.1> How about just 'exists?' Note that the algorithm below will return false if the browser is hidden. Is that what you want? Bret At 01:41 PM 8/17/2005, Paul Rogers wrote: >Do you have check in rights? > >Bret, I think this would be a useful addition - is the method name corect? >maybe Window_exists? > >Paul > >----- Original Message ----- >From: Peter Chau >Date: Wednesday, August 17, 2005 11:47 am >Subject: RE: [Wtr-general] Detecting a closed IE > > > > > > > Thanx this works > > > > class IE > > def window_exists? > > begin > > return false if @ie.hWnd== -1 > > return true > > rescue > > return false > > end > > end > > end > > > > > > if __FILE__ == $0 > > require 'neteller' > > Test::Unit::TestCase > > > > class TC_ie < Test::Unit::TestCase > > > > def test_open > > openIE=Watir::IE.new > > assert(openIE.window_exists?) > > openIE.close > > end > > > > def test_close > > closeIE=Watir::IE.new > > closeIE.close > > assert_false(closeIE.window_exists?) > > end > > > > end > > end > > > > > > > > _______________________________________________ > > 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 _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Aug 17 18:31:55 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 17 Aug 2005 17:31:55 -0500 Subject: [Wtr-general] next steps Message-ID: <5.1.0.14.2.20050817172212.029412a0@127.0.0.1> 1. finish purging all camelCase names in methods and local and instance variables. 2. finish renaming stuff that has the wrong name (like all the references to containers called 'ieController') 3. separate logic for locating objects (get_object) so it can be configured separately without having to what the WET people did (change overriding syntax). 4. rip out winclicker and autoit and use wet/winobjects instead 5. make it so that anything that be a container; refactor different methods currently used for this (frames & forms) and then 6. defer invokation of COM calls until necessary I've been pushing us this way for a while and believe that it is more important than ever. The simplest example of what this means is that code like this will work: table = ie.frame(:name, 'foo').table(:index, 4) # do stuff table[3][4].button(:index, 1).click This is convenient and often what casual users expect. Currently watir supports this to one level only. Once we have this, this gives us a platform that we can do several other things: a. invoke method in a separate process, so we never run into thread blocking problems again. b. invoke selenium or xcom/mozilla or another browser-driving technology instead of IE/COM c. attach a logger so we get cheap, decent, accurate logging _____________________ Bret Pettichord www.pettichord.com From paul.rogers at shaw.ca Wed Aug 17 18:36:43 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 17 Aug 2005 16:36:43 -0600 Subject: [Wtr-general] Detecting a closed IE Message-ID: <372d022372cf18.372cf18372d022@shaw.ca> exits? sounds fine. WHat do you mean by hidden, minimised? or, behind another window or something else Im not thinking of? Paul ----- Original Message ----- From: Bret Pettichord Date: Wednesday, August 17, 2005 4:17 pm Subject: Re: RE: [Wtr-general] Detecting a closed IE > How about just 'exists?' > > Note that the algorithm below will return false if the browser is > hidden. > Is that what you want? > > Bret > > At 01:41 PM 8/17/2005, Paul Rogers wrote: > >Do you have check in rights? > > > >Bret, I think this would be a useful addition - is the method > name corect? > >maybe Window_exists? > > > >Paul > > > >----- Original Message ----- > >From: Peter Chau > >Date: Wednesday, August 17, 2005 11:47 am > >Subject: RE: [Wtr-general] Detecting a closed IE > > > > > > > > > > > Thanx this works > > > > > > class IE > > > def window_exists? > > > begin > > > return false if @ie.hWnd== -1 > > > return true > > > rescue > > > return false > > > end > > > end > > > end > > > > > > > > > if __FILE__ == $0 > > > require 'neteller' > > > Test::Unit::TestCase > > > > > > class TC_ie < Test::Unit::TestCase > > > > > > def test_open > > > openIE=Watir::IE.new > > > assert(openIE.window_exists?) > > > openIE.close > > > end > > > > > > def test_close > > > closeIE=Watir::IE.new > > > closeIE.close > > > assert_false(closeIE.window_exists?) > > > end > > > > > > end > > > end > > > > > > > > > > > > _______________________________________________ > > > 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 > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From jkohl at telusplanet.net Wed Aug 17 18:36:13 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Wed, 17 Aug 2005 16:36:13 -0600 Subject: [Wtr-general] next steps In-Reply-To: <5.1.0.14.2.20050817172212.029412a0@127.0.0.1> Message-ID: <20050817223649.TDSO9601.priv-edtnes28.telusplanet.net@tintin> > 4. rip out winclicker and autoit and use wet/winobjects > instead +100 We need a good solution for modal dialog boxes, alerts, popups, etc. This is the feature I get asked about most frequently (even just a couple of hours ago). -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret > Pettichord > Sent: August 17, 2005 4:32 PM > To: wtr-general at rubyforge.org > Subject: [Wtr-general] next steps > > 1. finish purging all camelCase names in methods and local > and instance variables. > 2. finish renaming stuff that has the wrong name (like all > the references to containers called 'ieController') 3. > separate logic for locating objects (get_object) so it can be > configured separately without having to what the WET people > did (change overriding syntax). > 4. rip out winclicker and autoit and use wet/winobjects > instead 5. make it so that anything that be a container; > refactor different methods currently used for this (frames & forms) > > and then > > 6. defer invokation of COM calls until necessary > > I've been pushing us this way for a while and believe that it > is more important than ever. The simplest example of what > this means is that code like this will work: > > table = ie.frame(:name, 'foo').table(:index, 4) > # do stuff > table[3][4].button(:index, 1).click > > This is convenient and often what casual users expect. > Currently watir supports this to one level only. > > Once we have this, this gives us a platform that we can do > several other > things: > a. invoke method in a separate process, so we never run into > thread blocking problems again. > b. invoke selenium or xcom/mozilla or another browser-driving > technology instead of IE/COM c. attach a logger so we get > cheap, decent, accurate logging > > > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From paul.rogers at shaw.ca Wed Aug 17 18:46:29 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 17 Aug 2005 16:46:29 -0600 Subject: [Wtr-general] next steps Message-ID: <3730204372f703.372f7033730204@shaw.ca> some other things that we should consider: table#to_a currently returns the cells as text. I think ( I think it was Bret that suggested it) this should return an array of TableCell objects which menas we need Table#to_text_array ( or similar name). This may well break peoples existing code, so Im in 2 minds about it. I think it needs to be done, but I dont want to piss people off by having to make many changes a method to get the html className of any element - or did this already get in? in many apps, on an error condition, a textfield may have a different color background to highlight a mandatory field or erroronous entry, we could then confirm by doing if ie.text_field(:index,1).class_name == 'ErrorClass' # some message confirm we got the right thing end The exception objects should have more info, so I can do begin ie.text_field(:index,1).set('foo') rescue ObjectDisabledException => e puts "Object is readoly!!" puts e.how # displays index - maybe a better name is needed puts e.what # displays 1 - maybe a better name is needed puts e.url # displays the url of the error puts e.page_title # puts e. anything else? end ----- Original Message ----- From: Bret Pettichord Date: Wednesday, August 17, 2005 4:31 pm Subject: [Wtr-general] next steps > 1. finish purging all camelCase names in methods and local and > instance > variables. > 2. finish renaming stuff that has the wrong name (like all the > references > to containers called 'ieController') > 3. separate logic for locating objects (get_object) so it can be > configured > separately without having to what the WET people did (change > overriding > syntax). > 4. rip out winclicker and autoit and use wet/winobjects instead > 5. make it so that anything that be a container; refactor > different methods > currently used for this (frames & forms) > > and then > > 6. defer invokation of COM calls until necessary > > I've been pushing us this way for a while and believe that it is > more > important than ever. The simplest example of what this means is > that code > like this will work: > > table = ie.frame(:name, 'foo').table(:index, 4) > # do stuff > table[3][4].button(:index, 1).click > > This is convenient and often what casual users expect. Currently > watir > supports this to one level only. > > Once we have this, this gives us a platform that we can do several > other > things: > a. invoke method in a separate process, so we never run into > thread > blocking problems again. > b. invoke selenium or xcom/mozilla or another browser-driving > technology > instead of IE/COM > c. attach a logger so we get cheap, decent, accurate logging > > > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From tuyet.ctn at mscibarra.com Wed Aug 17 19:54:01 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Wed, 17 Aug 2005 16:54:01 -0700 Subject: [Wtr-general] What WATIR can do? Message-ID: Thank everyone for all your input. It was of great help. I will relay the answers back to the Automation Tool team. I -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050817/57f535fc/attachment.html From mkelly at elevenwireless.com Wed Aug 17 20:40:58 2005 From: mkelly at elevenwireless.com (Michael Kelly) Date: Wed, 17 Aug 2005 17:40:58 -0700 Subject: [Wtr-general] I Like WET Message-ID: <640C9D8653C87C44AB5F00F91A91FE210D4B7E@edison.elevenwireless.com> Will do. Do you happen to know someone I can point them to for training? :-) -=michael=- -- Michael Kelly Sr. Software Engineer Eleven Wireless Inc. - The Possibilities are Wireless http://www.elevenwireless.com -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Wednesday, August 17, 2005 3:12 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] I Like WET Michael, I don't doubt your intentions and wish you best of luck. Keep us informed of progress. And when you are ready for release, please set up a separate mailing list for all the clueless newbies who are are now going to be watir scripters! Bret At 01:22 PM 8/17/2005, Michael Kelly wrote: >Bret, thanks for sharing your thoughts on WatirMaker. I have similar >concerns about the utility of script recorders and caution your readers >to not expect too much from WatirMaker. It has *not* been conceived of >as a record/playback tool for non-programmers. On the contrary, at >Eleven the programmers use Watir to write UI unit tests in a >test-driven fashion. Nearly every test starts with some setup in the >database using the DataMother design pattern (a variant of the >ObjectMother pattern which can be found here: >http://www.thoughtworks.com/us/library/ObjectMother%20Website.pdf), and >concludes with one or more asserts validating specific conditions. It >is the stuff in the middle that we hope WatirMaker will facilitate. > >We imagine the tool fitting nicely into a process that looks something >like this: > >1. Create test skeleton (including data prep). >2. Capture Watir statements and paste into the test skeleton. 3. Modify >as needed and add asserts. > >In truth, I believe that we're seeking the same tool you've described >as "...a tool that would show you the Watir syntax for identifying a >control or page element you point to." We've simply conceived of the >tool as a recorder. > >-=michael=- > >-- >Michael Kelly >Sr. Software Engineer >Eleven Wireless Inc. - The Possibilities are Wireless >http://www.elevenwireless.com > > > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord >Sent: Wednesday, August 17, 2005 9:12 AM >To: wtr-general at rubyforge.org >Subject: [Wtr-general] I Like WET > > >I really like WET and looking over its code has strongly influenced the >direction that i want to take Watir in. > >For background, see this: >http://www.io.com/~wazmo/blog/ > >I'll have more details about what i want to do posted here shortly. > >Bret > > >_____________________ > Bret Pettichord > www.pettichord.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 _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Wed Aug 17 21:37:38 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 17 Aug 2005 19:37:38 -0600 Subject: [Wtr-general] Detecting a closed IE In-Reply-To: <372d022372cf18.372cf18372d022@shaw.ca> Message-ID: <001501c5a395$6aae2760$6600a8c0@NewDell> Ive just realised that you mean when the browser is running with visible=false ( or -b from the command line when starting the script) Peter - can you try with this set up and report if there is a way to do this... Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: 17 August 2005 16:37 To: wtr-general at rubyforge.org Subject: Re: RE: [Wtr-general] Detecting a closed IE exits? sounds fine. WHat do you mean by hidden, minimised? or, behind another window or something else Im not thinking of? Paul ----- Original Message ----- From: Bret Pettichord Date: Wednesday, August 17, 2005 4:17 pm Subject: Re: RE: [Wtr-general] Detecting a closed IE > How about just 'exists?' > > Note that the algorithm below will return false if the browser is > hidden. > Is that what you want? > > Bret > > At 01:41 PM 8/17/2005, Paul Rogers wrote: > >Do you have check in rights? > > > >Bret, I think this would be a useful addition - is the method > name corect? > >maybe Window_exists? > > > >Paul > > > >----- Original Message ----- > >From: Peter Chau > >Date: Wednesday, August 17, 2005 11:47 am > >Subject: RE: [Wtr-general] Detecting a closed IE > > > > > > > > > > > Thanx this works > > > > > > class IE > > > def window_exists? > > > begin > > > return false if @ie.hWnd== -1 > > > return true > > > rescue > > > return false > > > end > > > end > > > end > > > > > > > > > if __FILE__ == $0 > > > require 'neteller' > > > Test::Unit::TestCase > > > > > > class TC_ie < Test::Unit::TestCase > > > > > > def test_open > > > openIE=Watir::IE.new > > > assert(openIE.window_exists?) > > > openIE.close > > > end > > > > > > def test_close > > > closeIE=Watir::IE.new > > > closeIE.close > > > assert_false(closeIE.window_exists?) > > > end > > > > > > end > > > end > > > > > > > > > > > > _______________________________________________ > > > 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 > > _____________________ > Bret Pettichord > www.pettichord.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 From bret at pettichord.com Wed Aug 17 19:59:15 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 17 Aug 2005 18:59:15 -0500 Subject: [Wtr-general] next steps In-Reply-To: <20050817223649.TDSO9601.priv-edtnes28.telusplanet.net@tint in> References: <5.1.0.14.2.20050817172212.029412a0@127.0.0.1> Message-ID: <5.1.0.14.2.20050817185655.02f50a50@127.0.0.1> I wanna hear from the WET guys on this. Satti? Raghu? There are two parts of the problem. 1. Just click the buttons and working the controls. WET has this licked. 2. Avoiding the thread-locking. WET uses a method similar to our IE#remote_eval. But i have ideas on how to make this better. Bret At 05:36 PM 8/17/2005, Jonathan Kohl wrote: > > 4. rip out winclicker and autoit and use wet/winobjects > > instead >+100 >We need a good solution for modal dialog boxes, alerts, popups, etc. This is >the feature I get asked about most frequently (even just a couple of hours >ago). > >-Jonathan > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret > > Pettichord > > Sent: August 17, 2005 4:32 PM > > To: wtr-general at rubyforge.org > > Subject: [Wtr-general] next steps > > > > 1. finish purging all camelCase names in methods and local > > and instance variables. > > 2. finish renaming stuff that has the wrong name (like all > > the references to containers called 'ieController') 3. > > separate logic for locating objects (get_object) so it can be > > configured separately without having to what the WET people > > did (change overriding syntax). > > 4. rip out winclicker and autoit and use wet/winobjects > > instead 5. make it so that anything that be a container; > > refactor different methods currently used for this (frames & forms) > > > > and then > > > > 6. defer invokation of COM calls until necessary > > > > I've been pushing us this way for a while and believe that it > > is more important than ever. The simplest example of what > > this means is that code like this will work: > > > > table = ie.frame(:name, 'foo').table(:index, 4) > > # do stuff > > table[3][4].button(:index, 1).click > > > > This is convenient and often what casual users expect. > > Currently watir supports this to one level only. > > > > Once we have this, this gives us a platform that we can do > > several other > > things: > > a. invoke method in a separate process, so we never run into > > thread blocking problems again. > > b. invoke selenium or xcom/mozilla or another browser-driving > > technology instead of IE/COM c. attach a logger so we get > > cheap, decent, accurate logging > > > > > > > > _____________________ > > Bret Pettichord > > www.pettichord.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 _____________________ Bret Pettichord www.pettichord.com From jkohl at telusplanet.net Wed Aug 17 22:14:07 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Wed, 17 Aug 2005 20:14:07 -0600 Subject: [Wtr-general] next steps In-Reply-To: <5.1.0.14.2.20050817185655.02f50a50@127.0.0.1> Message-ID: <20050818021441.KCBV8288.priv-edmwes25.telusplanet.net@tintin> Is it possible to pull the text contents out of JavaScript popups as well? That would be a big bonus, particularly on pages that might use a lot of them for different reasons and you want to be sure the right one popped up, or to validate the contents of them. I found SilkTest, one JavaScript popup wasn't distinguishable from another. Getting them handled well though would be a great start. Thanks; -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret > Pettichord > Sent: August 17, 2005 5:59 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] next steps > > I wanna hear from the WET guys on this. Satti? Raghu? > > There are two parts of the problem. > 1. Just click the buttons and working the controls. WET has > this licked. > 2. Avoiding the thread-locking. WET uses a method similar to > our IE#remote_eval. But i have ideas on how to make this better. > > Bret > > At 05:36 PM 8/17/2005, Jonathan Kohl wrote: > > > 4. rip out winclicker and autoit and use wet/winobjects > > > instead > >+100 > >We need a good solution for modal dialog boxes, alerts, popups, etc. > >This is the feature I get asked about most frequently (even just a > >couple of hours ago). > > > >-Jonathan > > > > > -----Original Message----- > > > From: wtr-general-bounces at rubyforge.org > > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret > > > Pettichord > > > Sent: August 17, 2005 4:32 PM > > > To: wtr-general at rubyforge.org > > > Subject: [Wtr-general] next steps > > > > > > 1. finish purging all camelCase names in methods and local and > > > instance variables. > > > 2. finish renaming stuff that has the wrong name (like all the > > > references to containers called 'ieController') 3. > > > separate logic for locating objects (get_object) so it can be > > > configured separately without having to what the WET people did > > > (change overriding syntax). > > > 4. rip out winclicker and autoit and use wet/winobjects > instead 5. > > > make it so that anything that be a container; refactor different > > > methods currently used for this (frames & forms) > > > > > > and then > > > > > > 6. defer invokation of COM calls until necessary > > > > > > I've been pushing us this way for a while and believe that it is > > > more important than ever. The simplest example of what > this means > > > is that code like this will work: > > > > > > table = ie.frame(:name, 'foo').table(:index, 4) > > > # do stuff > > > table[3][4].button(:index, 1).click > > > > > > This is convenient and often what casual users expect. > > > Currently watir supports this to one level only. > > > > > > Once we have this, this gives us a platform that we can > do several > > > other > > > things: > > > a. invoke method in a separate process, so we never run > into thread > > > blocking problems again. > > > b. invoke selenium or xcom/mozilla or another browser-driving > > > technology instead of IE/COM c. attach a logger so we get cheap, > > > decent, accurate logging > > > > > > > > > > > > _____________________ > > > Bret Pettichord > > > www.pettichord.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 > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From raghu at qantom.com Wed Aug 17 22:50:21 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Thu, 18 Aug 2005 08:20:21 +0530 Subject: [Wtr-general] I Like WET In-Reply-To: <5.1.0.14.2.20050817111049.02f96578@127.0.0.1> References: <5.1.0.14.2.20050817111049.02f96578@127.0.0.1> Message-ID: <4303F76D.4020403@qantom.com> Hi Bret, Thanks for your testimonials. It is a great boost for our team. We look forward to working more with you. Raghu Bret Pettichord wrote: > I really like WET and looking over its code has strongly influenced > the direction that i want to take Watir in. > > For background, see this: > http://www.io.com/~wazmo/blog/ > > I'll have more details about what i want to do posted here shortly. > > Bret > > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From paul.rogers at shaw.ca Wed Aug 17 22:30:09 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 17 Aug 2005 20:30:09 -0600 Subject: [Wtr-general] next steps In-Reply-To: <20050818021441.KCBV8288.priv-edmwes25.telusplanet.net@tintin> Message-ID: <001701c5a39c$c0bacb20$6600a8c0@NewDell> There is some stuff in winclicker to do that - if you're brave enough to use it Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jonathan Kohl Sent: 17 August 2005 20:14 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] next steps Is it possible to pull the text contents out of JavaScript popups as well? That would be a big bonus, particularly on pages that might use a lot of them for different reasons and you want to be sure the right one popped up, or to validate the contents of them. I found SilkTest, one JavaScript popup wasn't distinguishable from another. Getting them handled well though would be a great start. Thanks; -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret > Pettichord > Sent: August 17, 2005 5:59 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] next steps > > I wanna hear from the WET guys on this. Satti? Raghu? > > There are two parts of the problem. > 1. Just click the buttons and working the controls. WET has > this licked. > 2. Avoiding the thread-locking. WET uses a method similar to > our IE#remote_eval. But i have ideas on how to make this better. > > Bret > > At 05:36 PM 8/17/2005, Jonathan Kohl wrote: > > > 4. rip out winclicker and autoit and use wet/winobjects > > > instead > >+100 > >We need a good solution for modal dialog boxes, alerts, popups, etc. > >This is the feature I get asked about most frequently (even just a > >couple of hours ago). > > > >-Jonathan > > > > > -----Original Message----- > > > From: wtr-general-bounces at rubyforge.org > > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret > > > Pettichord > > > Sent: August 17, 2005 4:32 PM > > > To: wtr-general at rubyforge.org > > > Subject: [Wtr-general] next steps > > > > > > 1. finish purging all camelCase names in methods and local and > > > instance variables. > > > 2. finish renaming stuff that has the wrong name (like all the > > > references to containers called 'ieController') 3. > > > separate logic for locating objects (get_object) so it can be > > > configured separately without having to what the WET people did > > > (change overriding syntax). > > > 4. rip out winclicker and autoit and use wet/winobjects > instead 5. > > > make it so that anything that be a container; refactor different > > > methods currently used for this (frames & forms) > > > > > > and then > > > > > > 6. defer invokation of COM calls until necessary > > > > > > I've been pushing us this way for a while and believe that it is > > > more important than ever. The simplest example of what > this means > > > is that code like this will work: > > > > > > table = ie.frame(:name, 'foo').table(:index, 4) > > > # do stuff > > > table[3][4].button(:index, 1).click > > > > > > This is convenient and often what casual users expect. Currently > > > watir supports this to one level only. > > > > > > Once we have this, this gives us a platform that we can > do several > > > other > > > things: > > > a. invoke method in a separate process, so we never run > into thread > > > blocking problems again. > > > b. invoke selenium or xcom/mozilla or another browser-driving > > > technology instead of IE/COM c. attach a logger so we get cheap, > > > decent, accurate logging > > > > > > > > > > > > _____________________ > > > Bret Pettichord > > > www.pettichord.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 > > _____________________ > Bret Pettichord > www.pettichord.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 From jkohl at telusplanet.net Wed Aug 17 22:54:49 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Wed, 17 Aug 2005 20:54:49 -0600 Subject: [Wtr-general] next steps In-Reply-To: <001701c5a39c$c0bacb20$6600a8c0@NewDell> Message-ID: <20050818025523.KJTQ26288.priv-edmwes26.telusplanet.net@tintin> I want it all in a pretty package. :-) -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: August 17, 2005 8:30 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] next steps > > There is some stuff in winclicker to do that - if you're > brave enough to use it > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jonathan Kohl > Sent: 17 August 2005 20:14 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] next steps > > > Is it possible to pull the text contents out of JavaScript > popups as well? That would be a big bonus, particularly on > pages that might use a lot of them for different reasons and > you want to be sure the right one popped up, or to validate > the contents of them. I found SilkTest, one JavaScript popup > wasn't distinguishable from another. > > Getting them handled well though would be a great start. > > Thanks; > > -Jonathan > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret > > Pettichord > > Sent: August 17, 2005 5:59 PM > > To: wtr-general at rubyforge.org > > Subject: RE: [Wtr-general] next steps > > > > I wanna hear from the WET guys on this. Satti? Raghu? > > > > There are two parts of the problem. > > 1. Just click the buttons and working the controls. WET has this > > licked. > > 2. Avoiding the thread-locking. WET uses a method similar to our > > IE#remote_eval. But i have ideas on how to make this better. > > > > Bret > > > > At 05:36 PM 8/17/2005, Jonathan Kohl wrote: > > > > 4. rip out winclicker and autoit and use wet/winobjects > > > > instead > > >+100 > > >We need a good solution for modal dialog boxes, alerts, > popups, etc. > > >This is the feature I get asked about most frequently (even just a > > >couple of hours ago). > > > > > >-Jonathan > > > > > > > -----Original Message----- > > > > From: wtr-general-bounces at rubyforge.org > > > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret > > > > Pettichord > > > > Sent: August 17, 2005 4:32 PM > > > > To: wtr-general at rubyforge.org > > > > Subject: [Wtr-general] next steps > > > > > > > > 1. finish purging all camelCase names in methods and local and > > > > instance variables. > > > > 2. finish renaming stuff that has the wrong name (like all the > > > > references to containers called 'ieController') 3. > > > > separate logic for locating objects (get_object) so it can be > > > > configured separately without having to what the WET people did > > > > (change overriding syntax). > > > > 4. rip out winclicker and autoit and use wet/winobjects > > instead 5. > > > > make it so that anything that be a container; refactor > different > > > > methods currently used for this (frames & forms) > > > > > > > > and then > > > > > > > > 6. defer invokation of COM calls until necessary > > > > > > > > I've been pushing us this way for a while and believe > that it is > > > > more important than ever. The simplest example of what > > this means > > > > is that code like this will work: > > > > > > > > table = ie.frame(:name, 'foo').table(:index, 4) > > > > # do stuff > > > > table[3][4].button(:index, 1).click > > > > > > > > This is convenient and often what casual users expect. > Currently > > > > watir supports this to one level only. > > > > > > > > Once we have this, this gives us a platform that we can > > do several > > > > other > > > > things: > > > > a. invoke method in a separate process, so we never run > > into thread > > > > blocking problems again. > > > > b. invoke selenium or xcom/mozilla or another browser-driving > > > > technology instead of IE/COM c. attach a logger so we > get cheap, > > > > decent, accurate logging > > > > > > > > > > > > > > > > _____________________ > > > > Bret Pettichord > > > > www.pettichord.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 > > > > _____________________ > > Bret Pettichord > > www.pettichord.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 > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From jeff.darklight at gmail.com Wed Aug 17 23:22:17 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 17 Aug 2005 20:22:17 -0700 Subject: [Wtr-general] next steps In-Reply-To: <5.1.0.14.2.20050817185655.02f50a50@127.0.0.1> References: <5.1.0.14.2.20050817172212.029412a0@127.0.0.1> <5.1.0.14.2.20050817185655.02f50a50@127.0.0.1> Message-ID: <4303FEE9.9060902@gmail.com> Bret Pettichord wrote: > I wanna hear from the WET guys on this. Satti? Raghu? > > There are two parts of the problem. > 1. Just click the buttons and working the controls. WET has this licked. > 2. Avoiding the thread-locking. WET uses a method similar to our > IE#remote_eval. But i have ideas on how to make this better. > > Bret > > At 05:36 PM 8/17/2005, Jonathan Kohl wrote: > >> > 4. rip out winclicker and autoit and use wet/winobjects >> > instead >> +100 >> We need a good solution for modal dialog boxes, alerts, popups, etc. >> This is >> the feature I get asked about most frequently (even just a couple of >> hours >> ago). >> >> -Jonathan >> >> > -----Original Message----- >> > From: wtr-general-bounces at rubyforge.org >> > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret >> > Pettichord >> > Sent: August 17, 2005 4:32 PM >> > To: wtr-general at rubyforge.org >> > Subject: [Wtr-general] next steps >> > >> > 1. finish purging all camelCase names in methods and local >> > and instance variables. >> > 2. finish renaming stuff that has the wrong name (like all >> > the references to containers called 'ieController') 3. >> > separate logic for locating objects (get_object) so it can be >> > configured separately without having to what the WET people >> > did (change overriding syntax). >> > 4. rip out winclicker and autoit and use wet/winobjects >> > instead 5. make it so that anything that be a container; >> > refactor different methods currently used for this (frames & forms) >> > >> > and then >> > >> > 6. defer invokation of COM calls until necessary >> > >> > I've been pushing us this way for a while and believe that it >> > is more important than ever. The simplest example of what >> > this means is that code like this will work: >> > >> > table = ie.frame(:name, 'foo').table(:index, 4) >> > # do stuff >> > table[3][4].button(:index, 1).click >> > >> > This is convenient and often what casual users expect. >> > Currently watir supports this to one level only. >> > >> > Once we have this, this gives us a platform that we can do >> > several other >> > things: >> > a. invoke method in a separate process, so we never run into >> > thread blocking problems again. >> > b. invoke selenium or xcom/mozilla or another browser-driving >> > technology instead of IE/COM c. attach a logger so we get >> > cheap, decent, accurate logging >> > >> > >> > >> > _____________________ >> > Bret Pettichord >> > www.pettichord.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 > > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > So, when are the two projects simply going to merge? I mean, it sounds like all of the involved parties wouldn't mind... j. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050817/eded782e/attachment.html From raghu at qantom.com Wed Aug 17 23:37:14 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Thu, 18 Aug 2005 09:07:14 +0530 Subject: [Wtr-general] next steps In-Reply-To: <5.1.0.14.2.20050817185655.02f50a50@127.0.0.1> References: <5.1.0.14.2.20050817172212.029412a0@127.0.0.1> <5.1.0.14.2.20050817185655.02f50a50@127.0.0.1> Message-ID: <4304026A.3080604@qantom.com> Comments inline Bret Pettichord wrote: > I wanna hear from the WET guys on this. Satti? Raghu? > > There are two parts of the problem. > 1. Just click the buttons and working the controls. WET has this licked. > 2. Avoiding the thread-locking. WET uses a method similar to our > IE#remote_eval. But i have ideas on how to make this better. Are you suggesting that every method call (or atleast the clicks, sets,etc.) will be called in a separate process? If yes, I am concerned that this may not be the intended behavior always. Most of the times the desired intention may be to wait for current line of invocation before moving on to the next line. I think that making this choice between invoking a method call in a separate process should be left to the tester. Say, the click method could take an optional parameter: Click(inprocess=true) { } The second point that we need to be careful about when invoking methods out of process is the 'object identification'. We need to make sure that the object identified when called in a method 'outofprocess', is exactly the same as the object on which the method was invoked. This could be slightly tricky (and usually source for errors). Consider this - If you have a web application whose browser title is 'FooBar' and this browser opens more browser windows with the same title. Making an assumption that the outofprocess method call should look for a browser with the title of 'FooBar' is clearly a source for errors. My two cents. > > Bret > > At 05:36 PM 8/17/2005, Jonathan Kohl wrote: > >> > 4. rip out winclicker and autoit and use wet/winobjects >> > instead >> +100 >> We need a good solution for modal dialog boxes, alerts, popups, etc. >> This is >> the feature I get asked about most frequently (even just a couple of >> hours >> ago). >> >> -Jonathan >> >> > -----Original Message----- >> > From: wtr-general-bounces at rubyforge.org >> > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret >> > Pettichord >> > Sent: August 17, 2005 4:32 PM >> > To: wtr-general at rubyforge.org >> > Subject: [Wtr-general] next steps >> > >> > 1. finish purging all camelCase names in methods and local >> > and instance variables. >> > 2. finish renaming stuff that has the wrong name (like all >> > the references to containers called 'ieController') 3. >> > separate logic for locating objects (get_object) so it can be >> > configured separately without having to what the WET people >> > did (change overriding syntax). >> > 4. rip out winclicker and autoit and use wet/winobjects >> > instead 5. make it so that anything that be a container; >> > refactor different methods currently used for this (frames & forms) >> > >> > and then >> > >> > 6. defer invokation of COM calls until necessary >> > >> > I've been pushing us this way for a while and believe that it >> > is more important than ever. The simplest example of what >> > this means is that code like this will work: >> > >> > table = ie.frame(:name, 'foo').table(:index, 4) >> > # do stuff >> > table[3][4].button(:index, 1).click >> > >> > This is convenient and often what casual users expect. >> > Currently watir supports this to one level only. >> > >> > Once we have this, this gives us a platform that we can do >> > several other >> > things: >> > a. invoke method in a separate process, so we never run into >> > thread blocking problems again. >> > b. invoke selenium or xcom/mozilla or another browser-driving >> > technology instead of IE/COM c. attach a logger so we get >> > cheap, decent, accurate logging >> > >> > >> > >> > _____________________ >> > Bret Pettichord >> > www.pettichord.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 > > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From bret at pettichord.com Thu Aug 18 00:49:57 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 17 Aug 2005 23:49:57 -0500 Subject: [Wtr-general] another next step Message-ID: <5.1.0.14.2.20050817234937.02fa81e0@127.0.0.1> 7. make a gem how could i forget -- kingsley is helping me with this. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Aug 18 01:04:45 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 18 Aug 2005 00:04:45 -0500 Subject: [Wtr-general] next steps In-Reply-To: <3730204372f703.372f7033730204@shaw.ca> Message-ID: <5.1.0.14.2.20050817235416.02fac800@127.0.0.1> At 05:46 PM 8/17/2005, Paul Rogers wrote: >some other things that we should consider: > >table#to_a currently returns the cells as text. I think ( I think it was >Bret that suggested it) this should return an array of TableCell objects >which menas we need Table#to_text_array ( or similar name). This may well >break peoples existing code, so Im in 2 minds about it. I think it needs >to be done, but I dont want to piss people off by having to make many changes The way to do it is to create a file in watir/old_table.rb that reverts to prior behavior. If anyone needs the old way, they can just add a require and they get it. I'll probably do that with the those old camelCase commands for 1.5. (I'll simply stop requiring watir/camel_case.rb fror watir.rb). You can also release the new code in a separate file and get comments on it first, before making it part of the watir package. I've done this with the new IE#remote_eval method. (Which by the way, i'm prolly going to rename to forked_eval for now, while we still need it.) >a method to get the html className of any element - or did this already >get in? class_name, ahem. Yes i did that. You wrote the code, but then attached it to a method called 'style'. > in many apps, on an error condition, a textfield may have a different > color background to highlight a mandatory field or erroronous entry, we > could then confirm by doing >if ie.text_field(:index,1).class_name == 'ErrorClass' > # some message confirm we got the right thing >end The next step is actually to allow ie.text_field(:class, 'ErrorClass') to work. This would be awesome. Actually my plan is to let any attribute be able to be used here. It's just a matter of writing less code -- seriously. >The exception objects should have more info, so I can do > >begin > ie.text_field(:index,1).set('foo') >rescue ObjectDisabledException => e > puts "Object is readoly!!" > puts e.how # displays index - maybe a better name is needed > puts e.what # displays 1 - maybe a better name is needed > puts e.url # displays the url of the error > puts e.page_title # > puts e. anything else? >end Maybe. I think the how and why will eventually evolve into a more complex structure that will allow multiple hows and whys -- like WET. What we need is Element#inspect to describe how the object was invoked. I think. This is how WET redefines the to_s method. I think we need two methods -- one that says how the object was specified (and that probably also reports on container/ancestor objects) and the other that lists attributes in detail. Maybe we give these two different names, neither of which is to_s or inspect and then these names can have a default binding to these methods, but this can easily be changed by frameworks (like WET) that want to do things different. I am also thinking that what we really need is a hook for an exception handler, so people can customize it get the behavior they want. >----- Original Message ----- >From: Bret Pettichord >Date: Wednesday, August 17, 2005 4:31 pm >Subject: [Wtr-general] next steps > > > 1. finish purging all camelCase names in methods and local and > > instance > > variables. > > 2. finish renaming stuff that has the wrong name (like all the > > references > > to containers called 'ieController') > > 3. separate logic for locating objects (get_object) so it can be > > configured > > separately without having to what the WET people did (change > > overriding > > syntax). > > 4. rip out winclicker and autoit and use wet/winobjects instead > > 5. make it so that anything that be a container; refactor > > different methods > > currently used for this (frames & forms) > > > > and then > > > > 6. defer invokation of COM calls until necessary > > > > I've been pushing us this way for a while and believe that it is > > more > > important than ever. The simplest example of what this means is > > that code > > like this will work: > > > > table = ie.frame(:name, 'foo').table(:index, 4) > > # do stuff > > table[3][4].button(:index, 1).click > > > > This is convenient and often what casual users expect. Currently > > watir > > supports this to one level only. > > > > Once we have this, this gives us a platform that we can do several > > other > > things: > > a. invoke method in a separate process, so we never run into > > thread > > blocking problems again. > > b. invoke selenium or xcom/mozilla or another browser-driving > > technology > > instead of IE/COM > > c. attach a logger so we get cheap, decent, accurate logging > > > > > > > > _____________________ > > Bret Pettichord > > www.pettichord.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 _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Aug 18 01:12:28 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 18 Aug 2005 00:12:28 -0500 Subject: [Wtr-general] Detecting a closed IE In-Reply-To: <372d022372cf18.372cf18372d022@shaw.ca> Message-ID: <5.1.0.14.2.20050818000529.02fbce70@127.0.0.1> IE.ie.visible == false is what i meant, but minimized is also a good point. Does a minimized browser have an hWnd? This is complex enough that i'd just rather encourage people to use IE.ie.hWnd != -1 for now. BTW, i recently checked in IE#minimize, but i didn't think that maybe it should be IE#minimise. Any one know the Ruby convention on this kind of thing. We've been using Pickaxe as our style guide, which is written by a Brit living in Texas, so i have no idea what his preference is offhand. At 05:36 PM 8/17/2005, Paul Rogers wrote: >exits? sounds fine. WHat do you mean by hidden, minimised? or, behind >another window or something else Im not thinking of? > >Paul > >----- Original Message ----- >From: Bret Pettichord >Date: Wednesday, August 17, 2005 4:17 pm >Subject: Re: RE: [Wtr-general] Detecting a closed IE > > > How about just 'exists?' > > > > Note that the algorithm below will return false if the browser is > > hidden. > > Is that what you want? > > > > Bret > > > > At 01:41 PM 8/17/2005, Paul Rogers wrote: > > >Do you have check in rights? > > > > > >Bret, I think this would be a useful addition - is the method > > name corect? > > >maybe Window_exists? > > > > > >Paul > > > > > >----- Original Message ----- > > >From: Peter Chau > > >Date: Wednesday, August 17, 2005 11:47 am > > >Subject: RE: [Wtr-general] Detecting a closed IE > > > > > > > > > > > > > > > Thanx this works > > > > > > > > class IE > > > > def window_exists? > > > > begin > > > > return false if @ie.hWnd== -1 > > > > return true > > > > rescue > > > > return false > > > > end > > > > end > > > > end > > > > > > > > > > > > if __FILE__ == $0 > > > > require 'neteller' > > > > Test::Unit::TestCase > > > > > > > > class TC_ie < Test::Unit::TestCase > > > > > > > > def test_open > > > > openIE=Watir::IE.new > > > > assert(openIE.window_exists?) > > > > openIE.close > > > > end > > > > > > > > def test_close > > > > closeIE=Watir::IE.new > > > > closeIE.close > > > > assert_false(closeIE.window_exists?) > > > > end > > > > > > > > end > > > > end > > > > > > > > > > > > > > > > _______________________________________________ > > > > 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 > > > > _____________________ > > Bret Pettichord > > www.pettichord.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 _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Aug 18 01:14:16 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 18 Aug 2005 00:14:16 -0500 Subject: [Wtr-general] next steps In-Reply-To: <20050818021441.KCBV8288.priv-edmwes25.telusplanet.net@tint in> References: <5.1.0.14.2.20050817185655.02f50a50@127.0.0.1> Message-ID: <5.1.0.14.2.20050818001327.02fbe550@127.0.0.1> We can get the text from the popup using autoit, so i'm pretty sure WET can do that too. At 09:14 PM 8/17/2005, Jonathan Kohl wrote: >Is it possible to pull the text contents out of JavaScript popups as well? >That would be a big bonus, particularly on pages that might use a lot of >them for different reasons and you want to be sure the right one popped up, >or to validate the contents of them. I found SilkTest, one JavaScript popup >wasn't distinguishable from another. > >Getting them handled well though would be a great start. > >Thanks; > >-Jonathan > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret > > Pettichord > > Sent: August 17, 2005 5:59 PM > > To: wtr-general at rubyforge.org > > Subject: RE: [Wtr-general] next steps > > > > I wanna hear from the WET guys on this. Satti? Raghu? > > > > There are two parts of the problem. > > 1. Just click the buttons and working the controls. WET has > > this licked. > > 2. Avoiding the thread-locking. WET uses a method similar to > > our IE#remote_eval. But i have ideas on how to make this better. > > > > Bret > > > > At 05:36 PM 8/17/2005, Jonathan Kohl wrote: > > > > 4. rip out winclicker and autoit and use wet/winobjects > > > > instead > > >+100 > > >We need a good solution for modal dialog boxes, alerts, popups, etc. > > >This is the feature I get asked about most frequently (even just a > > >couple of hours ago). > > > > > >-Jonathan > > > > > > > -----Original Message----- > > > > From: wtr-general-bounces at rubyforge.org > > > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret > > > > Pettichord > > > > Sent: August 17, 2005 4:32 PM > > > > To: wtr-general at rubyforge.org > > > > Subject: [Wtr-general] next steps > > > > > > > > 1. finish purging all camelCase names in methods and local and > > > > instance variables. > > > > 2. finish renaming stuff that has the wrong name (like all the > > > > references to containers called 'ieController') 3. > > > > separate logic for locating objects (get_object) so it can be > > > > configured separately without having to what the WET people did > > > > (change overriding syntax). > > > > 4. rip out winclicker and autoit and use wet/winobjects > > instead 5. > > > > make it so that anything that be a container; refactor different > > > > methods currently used for this (frames & forms) > > > > > > > > and then > > > > > > > > 6. defer invokation of COM calls until necessary > > > > > > > > I've been pushing us this way for a while and believe that it is > > > > more important than ever. The simplest example of what > > this means > > > > is that code like this will work: > > > > > > > > table = ie.frame(:name, 'foo').table(:index, 4) > > > > # do stuff > > > > table[3][4].button(:index, 1).click > > > > > > > > This is convenient and often what casual users expect. > > > > Currently watir supports this to one level only. > > > > > > > > Once we have this, this gives us a platform that we can > > do several > > > > other > > > > things: > > > > a. invoke method in a separate process, so we never run > > into thread > > > > blocking problems again. > > > > b. invoke selenium or xcom/mozilla or another browser-driving > > > > technology instead of IE/COM c. attach a logger so we get cheap, > > > > decent, accurate logging > > > > > > > > > > > > > > > > _____________________ > > > > Bret Pettichord > > > > www.pettichord.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 > > > > _____________________ > > Bret Pettichord > > www.pettichord.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 _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Aug 18 01:24:12 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 18 Aug 2005 00:24:12 -0500 Subject: [Wtr-general] next steps In-Reply-To: <4304026A.3080604@qantom.com> References: <5.1.0.14.2.20050817185655.02f50a50@127.0.0.1> <5.1.0.14.2.20050817172212.029412a0@127.0.0.1> <5.1.0.14.2.20050817185655.02f50a50@127.0.0.1> Message-ID: <5.1.0.14.2.20050818001528.02fd44e0@127.0.0.1> At 10:37 PM 8/17/2005, Raghu Venkataramana wrote: >Comments inline > >Bret Pettichord wrote: > >>I wanna hear from the WET guys on this. Satti? Raghu? >> >>There are two parts of the problem. >>1. Just click the buttons and working the controls. WET has this licked. >>2. Avoiding the thread-locking. WET uses a method similar to our >>IE#remote_eval. But i have ideas on how to make this better. > >Are you suggesting that every method call (or atleast the clicks, >sets,etc.) will be called in a separate process? I thought that was what you all did? No? Oh... now i see. Well, yes, that was my idea. >If yes, I am concerned that this may not be the intended behavior always. >Most of the times the desired intention >may be to wait for current line of invocation before moving on to the next >line. I think that making this choice between >invoking a method call in a separate process should be left to the tester. >Say, the click method could take an >optional parameter: > >Click(inprocess=true) >{ >} If it is the tester's choice, i would rather they do out_of_process { ie.button('foo').click } than ie.button('foo').click(true) or even ie.button('foo').click(:out_of_process) This is both easier to do in Ruby, and to me, in the end, easier to understand by humans (even if it is harder to understand by humans trained in procedural programming). >The second point that we need to be careful about when invoking methods >out of process is the 'object identification'. We >need to make sure that the object identified when called in a method >'outofprocess', is exactly the same as the object on >which the method was invoked. This could be slightly tricky (and usually >source for errors). Consider this - If you have >a web application whose browser title is 'FooBar' and this browser opens >more browser windows with the same title. >Making an assumption that the outofprocess method call should look for a >browser with the title of 'FooBar' is clearly >a source for errors. Currently, IE#remote_eval uses title for identification and could easily fall for the scenario you describe. But i think i want to change this so that it uses the hwnd instead -- that should be unique. But i am rethinking, now that i see i misunderstood your code. >My two cents. > >> >>Bret >> >>At 05:36 PM 8/17/2005, Jonathan Kohl wrote: >> >>> > 4. rip out winclicker and autoit and use wet/winobjects >>> > instead >>>+100 >>>We need a good solution for modal dialog boxes, alerts, popups, etc. This is >>>the feature I get asked about most frequently (even just a couple of hours >>>ago). >>> >>>-Jonathan >>> >>> > -----Original Message----- >>> > From: wtr-general-bounces at rubyforge.org >>> > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret >>> > Pettichord >>> > Sent: August 17, 2005 4:32 PM >>> > To: wtr-general at rubyforge.org >>> > Subject: [Wtr-general] next steps >>> > >>> > 1. finish purging all camelCase names in methods and local >>> > and instance variables. >>> > 2. finish renaming stuff that has the wrong name (like all >>> > the references to containers called 'ieController') 3. >>> > separate logic for locating objects (get_object) so it can be >>> > configured separately without having to what the WET people >>> > did (change overriding syntax). >>> > 4. rip out winclicker and autoit and use wet/winobjects >>> > instead 5. make it so that anything that be a container; >>> > refactor different methods currently used for this (frames & forms) >>> > >>> > and then >>> > >>> > 6. defer invokation of COM calls until necessary >>> > >>> > I've been pushing us this way for a while and believe that it >>> > is more important than ever. The simplest example of what >>> > this means is that code like this will work: >>> > >>> > table = ie.frame(:name, 'foo').table(:index, 4) >>> > # do stuff >>> > table[3][4].button(:index, 1).click >>> > >>> > This is convenient and often what casual users expect. >>> > Currently watir supports this to one level only. >>> > >>> > Once we have this, this gives us a platform that we can do >>> > several other >>> > things: >>> > a. invoke method in a separate process, so we never run into >>> > thread blocking problems again. >>> > b. invoke selenium or xcom/mozilla or another browser-driving >>> > technology instead of IE/COM c. attach a logger so we get >>> > cheap, decent, accurate logging >>> > >>> > >>> > >>> > _____________________ >>> > Bret Pettichord >>> > www.pettichord.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 >> >> >>_____________________ >> Bret Pettichord >> www.pettichord.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 _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Aug 18 01:25:32 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 18 Aug 2005 00:25:32 -0500 Subject: [Wtr-general] next steps In-Reply-To: <4303FEE9.9060902@gmail.com> References: <5.1.0.14.2.20050817185655.02f50a50@127.0.0.1> <5.1.0.14.2.20050817172212.029412a0@127.0.0.1> <5.1.0.14.2.20050817185655.02f50a50@127.0.0.1> Message-ID: <5.1.0.14.2.20050818002439.02fb11e0@127.0.0.1> At 10:22 PM 8/17/2005, Jeff Wood wrote: >So, when are the two projects simply going to merge? I mean, it sounds >like all of the involved parties wouldn't mind... Well, that is the topic under discussion. Like a marriage, there are many things to discuss... _____________________ Bret Pettichord www.pettichord.com From Tim.Feltham at orionhealth.com Thu Aug 18 01:41:12 2005 From: Tim.Feltham at orionhealth.com (Tim Feltham) Date: Thu, 18 Aug 2005 17:41:12 +1200 Subject: [Wtr-general] another next step Message-ID: <0FDF67DB50EC904AAEA1B2A83A281050013A8BB0@mail.orion.internal> Is there any thought of adding a 8. WATIR for firefox? Our app is going to have firefox support soonish, so it would be cool to be able to use the same (or similar) WATIR tests scripts against firefox. ________________________________ From: wtr-general-bounces at rubyforge.org on behalf of Bret Pettichord Sent: Thu 18/08/2005 4:49 p.m. To: wtr-general at rubyforge.org Subject: [Wtr-general] another next step 7. make a gem how could i forget -- kingsley is helping me with this. _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 3768 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050818/225d0f12/attachment.bin From bret at pettichord.com Thu Aug 18 02:47:24 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 18 Aug 2005 01:47:24 -0500 Subject: [Wtr-general] another next step In-Reply-To: <0FDF67DB50EC904AAEA1B2A83A281050013A8BB0@mail.orion.intern al> Message-ID: <5.1.0.14.2.20050818014625.03000130@127.0.0.1> At 12:41 AM 8/18/2005, Tim Feltham wrote: Is there any thought of adding a 8. WATIR for firefox? Read #6 again: > > 6. defer invokation of COM calls until necessary > > > > I've been pushing us this way for a while and believe that it is > > more > > important than ever. The simplest example of what this means is > > that code > > like this will work: > > > > table = ie.frame(:name, 'foo').table(:index, 4) > > # do stuff > > table[3][4].button(:index, 1).click > > > > This is convenient and often what casual users expect. Currently > > watir > > supports this to one level only. > > > > Once we have this, this gives us a platform that we can do several > > other > > things: > > a. invoke method in a separate process, so we never run into > > thread > > blocking problems again. > > b. invoke selenium or xcom/mozilla or another browser-driving > > technology > > instead of IE/COM > > c. attach a logger so we get cheap, decent, accurate logging _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Aug 18 02:48:57 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 18 Aug 2005 01:48:57 -0500 Subject: [Wtr-general] another next step Message-ID: <5.1.0.14.2.20050818014811.02f4f890@127.0.0.1> To be more specific, Both xcom/mozilla and selenium are technologies that will drive firefox. At 12:41 AM 8/18/2005, Tim Feltham wrote: Is there any thought of adding a 8. WATIR for firefox? Read #6 again: > > 6. defer invokation of COM calls until necessary > > > > I've been pushing us this way for a while and believe that it is > > more > > important than ever. The simplest example of what this means is > > that code > > like this will work: > > > > table = ie.frame(:name, 'foo').table(:index, 4) > > # do stuff > > table[3][4].button(:index, 1).click > > > > This is convenient and often what casual users expect. Currently > > watir > > supports this to one level only. > > > > Once we have this, this gives us a platform that we can do several > > other > > things: > > a. invoke method in a separate process, so we never run into > > thread > > blocking problems again. > > b. invoke selenium or xcom/mozilla or another browser-driving > > technology > > instead of IE/COM > > c. attach a logger so we get cheap, decent, accurate logging _____________________ Bret Pettichord www.pettichord.com From noreply at rubyforge.org Thu Aug 18 09:02:17 2005 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 18 Aug 2005 13:02:17 GMT Subject: [Wtr-general] [ wtr-Support Requests-2259 ] File Download Dialog box : how to handle Message-ID: <200508181302.j7ID2Hl0013549@rubyforge.org> Support Requests item #2259, was opened at 2005-08-18 13:02 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=488&aid=2259&group_id=104 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Richard Green (basebal446) Assigned to: Nobody (None) Summary: File Download Dialog box : how to handle Initial Comment: Im working on trying to use watir to download files from a server (ie. tucows.com or such) and save to a folder, can anyone give me any insite on how to do this... i was hoping it would be simple.....thanks in advance for any help ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=488&aid=2259&group_id=104 From Peter.Ch at NETeller.com Thu Aug 18 12:12:26 2005 From: Peter.Ch at NETeller.com (Peter Chau) Date: Thu, 18 Aug 2005 10:12:26 -0600 Subject: [Wtr-general] Detecting a closed IE Message-ID: This code works for minimize and background IE browsers... Is there a way to turn background on/off in the middle of a script?? require 'watir' include Watir class IE def exists? begin @ie.hWnd== -1 return true rescue return false end end end if __FILE__ == $0 require 'test/unit' class TC_ie < Test::Unit::TestCase def test_open $ie=IE.new assert($ie.exists?) $ie.close end def test_close $ie=IE.new $ie.close sleep 0.1 # the browser takes some time to close assert(!$ie.exists?) end def test_minimize $ie=IE.new $ie.goto("http://www.google.ca") # can't minimize a blank window because it throws an error $ie.minimize assert($ie.exists?) $ie.close end def test_invisible_open command_line_flag('-b') # this doesn't work the way I want $ie=IE.new assert($ie.exists?) $ie.close end end end From mkelly at elevenwireless.com Thu Aug 18 12:21:28 2005 From: mkelly at elevenwireless.com (Michael Kelly) Date: Thu, 18 Aug 2005 09:21:28 -0700 Subject: [Wtr-general] A general question about the role of scripted tests within the responsibilities of QA. Message-ID: <640C9D8653C87C44AB5F00F91A91FE210D4B7F@edison.elevenwireless.com> My developer chums and I use Watir as part of our test-driven development. As such, we're giddy to be able to finally write unit tests for the UI. But the presence of these developer written UI test scripts raises questions about what impact, if any, they will have on what our QA engineer will focus on. It's tempting to suggest that there is a whole set of functionality that they simply don't have to test manually anymore. But clearly this is just wrong, wrong, wrong. The developers will only write tests for the things they think of, and we all know that developers tend to be optimistic about their code. In addition, the unit tests themselves can have flaws that cause a test to pass when the code is not, in fact, functioning properly. So, it seems that we still need the QA engineer to do a full manual QA pass on the software. At what point do these scripts allieviate some of the QA engineer's manual testing burden? Thanks for your thoughts, -=michael=- -- Michael Kelly Sr. Software Engineer Eleven Wireless Inc. - The Possibilities are Wireless http://www.elevenwireless.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050818/6d592e02/attachment.html From bret at pettichord.com Thu Aug 18 12:27:16 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 18 Aug 2005 11:27:16 -0500 Subject: [Wtr-general] Detecting a closed IE In-Reply-To: Message-ID: <5.1.0.14.2.20050818112705.03055a58@127.0.0.1> $ie.ie.visible = false At 11:12 AM 8/18/2005, Peter Chau wrote: >This code works for minimize and background IE browsers... Is there a >way to turn background on/off in the middle of a script?? > > > >require 'watir' >include Watir > >class IE > def exists? > begin > @ie.hWnd== -1 > return true > rescue > return false > end > end > end > > >if __FILE__ == $0 > require 'test/unit' > > class TC_ie < Test::Unit::TestCase > > def test_open > $ie=IE.new > assert($ie.exists?) > $ie.close > end > > def test_close > $ie=IE.new > $ie.close > sleep 0.1 # the browser takes some time to close > assert(!$ie.exists?) > end > > def test_minimize > $ie=IE.new > $ie.goto("http://www.google.ca") # can't minimize a >blank window because it throws an error > $ie.minimize > assert($ie.exists?) > $ie.close > end > > def test_invisible_open > command_line_flag('-b') # this doesn't work the way I want > $ie=IE.new > assert($ie.exists?) > $ie.close > end > end > end > > > > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Aug 18 12:29:56 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 18 Aug 2005 11:29:56 -0500 Subject: [Wtr-general] A general question about the role of scripted tests within the responsibilities of QA. In-Reply-To: <640C9D8653C87C44AB5F00F91A91FE210D4B7F@edison.elevenwirele ss.com> Message-ID: <5.1.0.14.2.20050818112800.0305d650@127.0.0.1> With little developer testing, testers often have to run lots of simple tests to uncover simple bugs. Getting the developers more involved in testing should allow the testers to move to more complex tests more quickly. At 11:21 AM 8/18/2005, Michael Kelly wrote: >Content-class: urn:content-classes:message >Content-Type: multipart/alternative; > boundary="----_=_NextPart_001_01C5A410.E2FD8D11" > >My developer chums and I use Watir as part of our test-driven >development. As such, we're giddy to be able to finally write unit tests >for the UI. But the presence of these developer written UI test scripts >raises questions about what impact, if any, they will have on what our QA >engineer will focus on. It's tempting to suggest that there is a whole >set of functionality that they simply don't have to test manually >anymore. But clearly this is just wrong, wrong, wrong. The developers >will only write tests for the things they think of, and we all know that >developers tend to be optimistic about their code. In addition, the unit >tests themselves can have flaws that cause a test to pass when the code is >not, in fact, functioning properly. > >So, it seems that we still need the QA engineer to do a full manual QA >pass on the software. At what point do these scripts allieviate some of >the QA engineer's manual testing burden? > >Thanks for your thoughts, > >-=michael=- > >-- >Michael Kelly >Sr. Software Engineer >Eleven Wireless Inc. - The Possibilities are Wireless >http://www.elevenwireless.com > > > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From jkohl at telusplanet.net Thu Aug 18 12:39:24 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Thu, 18 Aug 2005 10:39:24 -0600 Subject: [Wtr-general] A general question about the role of scripted testswithin the responsibilities of QA. In-Reply-To: <640C9D8653C87C44AB5F00F91A91FE210D4B7F@edison.elevenwireless.com> Message-ID: <20050818164001.KXLZ25255.priv-edtnes56.telusplanet.net@tintin> >At what point do these scripts allieviate some of the QA engineer's manual testing burden? Until machines are intelligent, they can't really do testing at all. Testing to me is assessing risks, asking questions about software, using a guide to show me whether something is wrong, using techniques and tools to help ask questions of the software, and analyze results. Automated testing tools can't do any of that, but as a tester I can use them to help increase my efficiency. What task is a computer better at, or faster at, and how can I use the tool to make my testing work more efficient? So to me the manual testing is essential to complement the automated efforts. Automated tests are great for quick passes of certain kinds of tasks, and are nice for change detection. They can't replace a human, but people can use them for more efficiency. Instead of doing a smoke test suite manually that might take hours or days, an automated smoke "change detection" suite can give me a rough approximation of changes in minutes or hours. Then as a tester I can focus on areas of risk, and spot check trouble spots. Efficiency is key to me, not trying to replace manual testing work. The former is achievable, the latter isn't going to happen. Over reliance on regression tests to do testing for us means that obvious problems a tester would spot immediately go out the door. The human eye can pattern match better than a computer can, and the mind behind the tools can investigate, use inference and track down tricky problems. many times when we are running a manual test, we discover a problem that is not related to the test. Many of the high impact bugs I've come across were something we stumbled upon when testing other things, investigated and fixed. A computer isn't curious, aware and can't investigate suspicious behavior like a tester can. I find those qualities valuable. My $0.02 -Jonathan _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Michael Kelly Sent: August 18, 2005 10:21 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] A general question about the role of scripted testswithin the responsibilities of QA. My developer chums and I use Watir as part of our test-driven development. As such, we're giddy to be able to finally write unit tests for the UI. But the presence of these developer written UI test scripts raises questions about what impact, if any, they will have on what our QA engineer will focus on. It's tempting to suggest that there is a whole set of functionality that they simply don't have to test manually anymore. But clearly this is just wrong, wrong, wrong. The developers will only write tests for the things they think of, and we all know that developers tend to be optimistic about their code. In addition, the unit tests themselves can have flaws that cause a test to pass when the code is not, in fact, functioning properly. So, it seems that we still need the QA engineer to do a full manual QA pass on the software. At what point do these scripts allieviate some of the QA engineer's manual testing burden? Thanks for your thoughts, -=michael=- -- Michael Kelly Sr. Software Engineer Eleven Wireless Inc. - The Possibilities are Wireless http://www.elevenwireless.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050818/10c607aa/attachment.html From john.lloydjones at gmail.com Thu Aug 18 12:40:42 2005 From: john.lloydjones at gmail.com (John Lloyd-Jones) Date: Thu, 18 Aug 2005 09:40:42 -0700 Subject: [Wtr-general] A general question about the role of scripted tests within the responsibilities of QA. In-Reply-To: <640C9D8653C87C44AB5F00F91A91FE210D4B7F@edison.elevenwireless.com> References: <640C9D8653C87C44AB5F00F91A91FE210D4B7F@edison.elevenwireless.com> Message-ID: <6fcd26f105081809404d2f8f0@mail.gmail.com> Michael In our project, developers use watir for validating a build -- basically regression testing to demonstrate that the build is viable and worthy of deploying in the test environment. Testers use a disfferent tool. Their job is made simpler because they don't wate time on a build that has one of those dumb breakages that stops testing because a page gives Error 500 or some essential feature is broken and prevents accessing a whole area of functionality. It automates what developers needed to do manually before. It makes life better for everyone; developers dislike regression testing; testers hate broken builds. John On 8/18/05, Michael Kelly wrote: > > My developer chums and I use Watir as part of our test-driven development. > As such, we're giddy to be able to finally write unit tests for the UI. But > the presence of these developer written UI test scripts raises questions > about what impact, if any, they will have on what our QA engineer will focus > on. It's tempting to suggest that there is a whole set of functionality > that they simply don't have to test manually anymore. But clearly this is > just wrong, wrong, wrong. The developers will only write tests for the > things they think of, and we all know that developers tend to be optimistic > about their code. In addition, the unit tests themselves can have flaws > that cause a test to pass when the code is not, in fact, functioning > properly. > > So, it seems that we still need the QA engineer to do a full manual QA pass > on the software. At what point do these scripts allieviate some of the QA > engineer's manual testing burden? > > Thanks for your thoughts, > > -=michael=- > > > -- > Michael Kelly > Sr. Software Engineer > Eleven Wireless Inc. - The Possibilities are Wireless > http://www.elevenwireless.com > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > From tomfeo at presslogic.com Thu Aug 18 12:45:28 2005 From: tomfeo at presslogic.com (Tom) Date: Thu, 18 Aug 2005 10:45:28 -0600 Subject: [Wtr-general] A general question about the role of scripted tests within the responsibilities of QA. In-Reply-To: <640C9D8653C87C44AB5F00F91A91FE210D4B7F@edison.elevenwireless.com> Message-ID: Hi Michael I am the sole QA grunt for our company, and there are several ways that Watir has helped alleviate my testing burden: 1 - I use Watir scripts to update our baseline data to try and mimic the client's use of our application so our testing data is up to date. 2 - I run a scripted timed test which performs the same tasks each time and logs the amount of time it takes for those tasks to finish. This allows me to identify if a change in the code is making a certain process run faster or slower then it did in a previous version. 3 - I am still developing some simple regression test scripts. These will be used on areas of the site that virtually never change and are a pain to run through manually. Of course there is nothing that can replace the 'real user' testing - at least that's what I'm basing my career on! There are many functions in our application that are way too cumbersome to automate as there are too many combinations and permutations of the results. These functions will always be manually tested, but by automating some of the more simpler tasks, it allows me more time to focus on the more difficult ones. Hope that helps Tom Feodoroff Presslogic Inc. Calgary _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Michael Kelly Sent: Thursday, August 18, 2005 10:21 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] A general question about the role of scripted testswithin the responsibilities of QA. My developer chums and I use Watir as part of our test-driven development. As such, we're giddy to be able to finally write unit tests for the UI. But the presence of these developer written UI test scripts raises questions about what impact, if any, they will have on what our QA engineer will focus on. It's tempting to suggest that there is a whole set of functionality that they simply don't have to test manually anymore. But clearly this is just wrong, wrong, wrong. The developers will only write tests for the things they think of, and we all know that developers tend to be optimistic about their code. In addition, the unit tests themselves can have flaws that cause a test to pass when the code is not, in fact, functioning properly. So, it seems that we still need the QA engineer to do a full manual QA pass on the software. At what point do these scripts allieviate some of the QA engineer's manual testing burden? Thanks for your thoughts, -=michael=- -- Michael Kelly Sr. Software Engineer Eleven Wireless Inc. - The Possibilities are Wireless http://www.elevenwireless.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050818/e922653c/attachment.html From mkelly at elevenwireless.com Thu Aug 18 12:48:52 2005 From: mkelly at elevenwireless.com (Michael Kelly) Date: Thu, 18 Aug 2005 09:48:52 -0700 Subject: [Wtr-general] A general question about the role ofscripted tests within the responsibilities of QA. Message-ID: <640C9D8653C87C44AB5F00F91A91FE210D4B80@edison.elevenwireless.com> I guess I've assumed that code thoroughly tested by developers would reduce the time QA spends documenting issues, but that the QA engineer would still have an obligation to manually exercise all the simple test cases. Is this not true? -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Thursday, August 18, 2005 9:30 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] A general question about the role ofscripted tests within the responsibilities of QA. With little developer testing, testers often have to run lots of simple tests to uncover simple bugs. Getting the developers more involved in testing should allow the testers to move to more complex tests more quickly. At 11:21 AM 8/18/2005, Michael Kelly wrote: >Content-class: urn:content-classes:message >Content-Type: multipart/alternative; > boundary="----_=_NextPart_001_01C5A410.E2FD8D11" > >My developer chums and I use Watir as part of our test-driven >development. As such, we're giddy to be able to finally write unit tests >for the UI. But the presence of these developer written UI test scripts >raises questions about what impact, if any, they will have on what our QA >engineer will focus on. It's tempting to suggest that there is a whole >set of functionality that they simply don't have to test manually >anymore. But clearly this is just wrong, wrong, wrong. The developers >will only write tests for the things they think of, and we all know that >developers tend to be optimistic about their code. In addition, the unit >tests themselves can have flaws that cause a test to pass when the code is >not, in fact, functioning properly. > >So, it seems that we still need the QA engineer to do a full manual QA >pass on the software. At what point do these scripts allieviate some of >the QA engineer's manual testing burden? > >Thanks for your thoughts, > >-=michael=- > >-- >Michael Kelly >Sr. Software Engineer >Eleven Wireless Inc. - The Possibilities are Wireless >http://www.elevenwireless.com >"urn:schemas-microsoft-com:office:office" /> > > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From jkohl at telusplanet.net Thu Aug 18 12:55:25 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Thu, 18 Aug 2005 10:55:25 -0600 Subject: [Wtr-general] A general question about the role ofscripted testswithin the responsibilities of QA. In-Reply-To: <640C9D8653C87C44AB5F00F91A91FE210D4B80@edison.elevenwireless.com> Message-ID: <20050818165603.KKFL19601.priv-edtnes46.telusplanet.net@tintin> > I guess I've assumed that code thoroughly tested by > developers would reduce the time QA spends documenting > issues, but that the QA engineer would still have an > obligation to manually exercise all the simple test cases. > Is this not true? Well tested and testable code reduces the length of feedback cycles. The days of bad builds, things that won't install, and basically untestable software that leaves testers twiddling their thumbs is greatly reduced. Instead of logging a lot of the easy, obvious bugs, testers can focus on areas of risk, and some of the trickier bugs. At some point, hopefully this becomes common place, and the testers can start spending time designing the really (as Chris McMahon would say) hairy test cases. Instead of doing basic tests, they can stretch out and really get their minds and skills behind more testing. Then you get a nice diverse, thorough test instead of a rush near the end once the code stabilizes. -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret > Pettichord > Sent: Thursday, August 18, 2005 9:30 AM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] A general question about the role > ofscripted tests within the responsibilities of QA. > > > With little developer testing, testers often have to run lots > of simple tests to uncover simple bugs. > > Getting the developers more involved in testing should allow > the testers to move to more complex tests more quickly. > > At 11:21 AM 8/18/2005, Michael Kelly wrote: > >Content-class: urn:content-classes:message > >Content-Type: multipart/alternative; > > boundary="----_=_NextPart_001_01C5A410.E2FD8D11" > > > >My developer chums and I use Watir as part of our test-driven > >development. As such, we're giddy to be able to finally write unit > tests > >for the UI. But the presence of these developer written UI test > scripts > >raises questions about what impact, if any, they will have > on what our > QA > >engineer will focus on. It's tempting to suggest that there > is a whole > > >set of functionality that they simply don't have to test manually > >anymore. But clearly this is just wrong, wrong, wrong. The > developers > > >will only write tests for the things they think of, and we all know > that > >developers tend to be optimistic about their code. In addition, the > unit > >tests themselves can have flaws that cause a test to pass > when the code > is > >not, in fact, functioning properly. > > > >So, it seems that we still need the QA engineer to do a full > manual QA > >pass on the software. At what point do these scripts allieviate some > of > >the QA engineer's manual testing burden? > > > >Thanks for your thoughts, > > > >-=michael=- > > > >-- > >Michael Kelly > >Sr. Software Engineer > >Eleven Wireless Inc. - The Possibilities are Wireless > >http://www.elevenwireless.com > > >"urn:schemas-microsoft-com:office:office" /> > > > > > > > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > _____________________ > Bret Pettichord > www.pettichord.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 > From mkelly at elevenwireless.com Thu Aug 18 12:58:27 2005 From: mkelly at elevenwireless.com (Michael Kelly) Date: Thu, 18 Aug 2005 09:58:27 -0700 Subject: [Wtr-general] A general question about the role ofscriptedtestswithin the responsibilities of QA. Message-ID: <640C9D8653C87C44AB5F00F91A91FE210D4B81@edison.elevenwireless.com> Nice. Very helpful. I'll forward these thoughts to the team. Thanks, -=michael=- -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jonathan Kohl Sent: Thursday, August 18, 2005 9:55 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] A general question about the role ofscriptedtestswithin the responsibilities of QA. > I guess I've assumed that code thoroughly tested by > developers would reduce the time QA spends documenting > issues, but that the QA engineer would still have an > obligation to manually exercise all the simple test cases. > Is this not true? Well tested and testable code reduces the length of feedback cycles. The days of bad builds, things that won't install, and basically untestable software that leaves testers twiddling their thumbs is greatly reduced. Instead of logging a lot of the easy, obvious bugs, testers can focus on areas of risk, and some of the trickier bugs. At some point, hopefully this becomes common place, and the testers can start spending time designing the really (as Chris McMahon would say) hairy test cases. Instead of doing basic tests, they can stretch out and really get their minds and skills behind more testing. Then you get a nice diverse, thorough test instead of a rush near the end once the code stabilizes. -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret > Pettichord > Sent: Thursday, August 18, 2005 9:30 AM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] A general question about the role > ofscripted tests within the responsibilities of QA. > > > With little developer testing, testers often have to run lots > of simple tests to uncover simple bugs. > > Getting the developers more involved in testing should allow > the testers to move to more complex tests more quickly. > > At 11:21 AM 8/18/2005, Michael Kelly wrote: > >Content-class: urn:content-classes:message > >Content-Type: multipart/alternative; > > boundary="----_=_NextPart_001_01C5A410.E2FD8D11" > > > >My developer chums and I use Watir as part of our test-driven > >development. As such, we're giddy to be able to finally write unit > tests > >for the UI. But the presence of these developer written UI test > scripts > >raises questions about what impact, if any, they will have > on what our > QA > >engineer will focus on. It's tempting to suggest that there > is a whole > > >set of functionality that they simply don't have to test manually > >anymore. But clearly this is just wrong, wrong, wrong. The > developers > > >will only write tests for the things they think of, and we all know > that > >developers tend to be optimistic about their code. In addition, the > unit > >tests themselves can have flaws that cause a test to pass > when the code > is > >not, in fact, functioning properly. > > > >So, it seems that we still need the QA engineer to do a full > manual QA > >pass on the software. At what point do these scripts allieviate some > of > >the QA engineer's manual testing burden? > > > >Thanks for your thoughts, > > > >-=michael=- > > > >-- > >Michael Kelly > >Sr. Software Engineer > >Eleven Wireless Inc. - The Possibilities are Wireless > >http://www.elevenwireless.com > > >"urn:schemas-microsoft-com:office:office" /> > > > > > > > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > _____________________ > Bret Pettichord > www.pettichord.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 > _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From noreply at rubyforge.org Thu Aug 18 14:27:58 2005 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 18 Aug 2005 13:27:58 -0500 Subject: [Wtr-general] [ wtr-Bugs-2261 ] Form.html and Form.show_all_objects are broken Message-ID: <200508181827.j7IIRwRl025773@rubyforge.org> Bugs item #2261, was opened at 2005-08-18 13:27 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=487&aid=2261&group_id=104 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Bret Pettichord (bret) Assigned to: Nobody (None) Summary: Form.html and Form.show_all_objects are broken Initial Comment: Here are some excerpts from my actual, public IRB session... irb(main):006:0> ie.form(:name, 'refresh').html NoMethodError: undefined method `document' for nil:NilClass from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1400:in `getDocument' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1522:in `html' from (irb):6 irb(main):007:0> ie.form(:name, 'refresh').show_all_objects -----------Objects in page ------------- NoMethodError: undefined method `document' for nil:NilClass from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1400:in `getDocument' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1667:in `show_all_objects' from (irb):7 irb(main):008:0> ie.form(:name, 'refresh').flash NoMethodError: undefined method `flash' for # from (irb):8 ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=487&aid=2261&group_id=104 From noreply at rubyforge.org Thu Aug 18 14:28:36 2005 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 18 Aug 2005 13:28:36 -0500 Subject: [Wtr-general] [ wtr-Bugs-2262 ] show_all_objects only shows some objects -- it should be renamed Message-ID: <200508181828.j7IISaeY025838@rubyforge.org> Bugs item #2262, was opened at 2005-08-18 13:28 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=487&aid=2262&group_id=104 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Bret Pettichord (bret) Assigned to: Nobody (None) Summary: show_all_objects only shows some objects -- it should be renamed Initial Comment: x ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=487&aid=2262&group_id=104 From noreply at rubyforge.org Thu Aug 18 14:30:06 2005 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 18 Aug 2005 13:30:06 -0500 Subject: [Wtr-general] [ wtr-Bugs-2263 ] Table should be a container Message-ID: <200508181830.j7IIU6mj026160@rubyforge.org> Bugs item #2263, was opened at 2005-08-18 13:30 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=487&aid=2263&group_id=104 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Bret Pettichord (bret) Assigned to: Nobody (None) Summary: Table should be a container Initial Comment: I assumed it was when i was publicly demo'ing Watir. Here are some excerpts from my actual, public IRB session... irb(main):014:0> ie.table(:id, 'job_and_day').show_all_objects NoMethodError: undefined method `show_all_objects' for # from (irb):14 irb(main):015:0> ie.table(:id, 'job_and_day').p(:index, 1).flash NoMethodError: private method `p' called for # from (irb):15 In fact, shouldn't most objects be able to be used as containers? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=487&aid=2263&group_id=104 From warren at meyer-pollans.net Thu Aug 18 16:23:22 2005 From: warren at meyer-pollans.net (Warren Pollans) Date: Thu, 18 Aug 2005 16:23:22 -0400 Subject: [Wtr-general] need help understanding "focus" error Message-ID: <20050818162322.5ef5ebf8@localhost.localdomain> How can I figure out (debug) what this complaint is about: WIN32OLERuntimeError: focus OLE error code:8000FFFF in htmlfile Unexpected call to method or property access. HRESULT error code:0x80020009 Exception occurred. c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3399:in `method_missing' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3399:in `set' Where can I find what the error codes mean? ++++++++++++++++++++++++++++++++++++++++++++++++++++ I have defined an instance variable: @s_fld = $ie.test_field(:name, xxx) zzz = "some text" and then called @s_fld.set(zzz) The error is generated from this "set" statement. To get to this point in the watir code, it's already verified that @s_fld exists, is enabled and is not read only - it seems to be unable set the focus Help please :-) Thanks, Warren From bret at pettichord.com Thu Aug 18 17:13:38 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 18 Aug 2005 16:13:38 -0500 Subject: [Wtr-general] need help understanding "focus" error In-Reply-To: <20050818162322.5ef5ebf8@localhost.localdomain> Message-ID: <5.1.0.14.2.20050818161130.03038940@127.0.0.1> At 03:23 PM 8/18/2005, Warren Pollans wrote: >How can I figure out (debug) what this complaint is about: > >WIN32OLERuntimeError: focus > OLE error code:8000FFFF in htmlfile > Unexpected call to method or property access. > HRESULT error code:0x80020009 > Exception occurred. > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3399:in `method_missing' > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3399:in `set' > >Where can I find what the error codes mean? > >++++++++++++++++++++++++++++++++++++++++++++++++++++ > >I have defined an instance variable: > > @s_fld = $ie.test_field(:name, xxx) > zzz = "some text" > >and then called > > @s_fld.set(zzz) try this instead and tell us what happens: $ie.text_field(:name, xxx).set(zzz) >The error is generated from this "set" statement. To get to this point >in the watir code, it's already verified that @s_fld exists, is enabled >and is not read only - it seems to be unable set the focus > > >Help please :-) > >Thanks, > >Warren >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From warren at meyer-pollans.net Thu Aug 18 18:07:32 2005 From: warren at meyer-pollans.net (Warren Pollans) Date: Thu, 18 Aug 2005 18:07:32 -0400 Subject: [Wtr-general] need help understanding "focus" error In-Reply-To: <5.1.0.14.2.20050818161130.03038940@127.0.0.1> References: <20050818162322.5ef5ebf8@localhost.localdomain> <5.1.0.14.2.20050818161130.03038940@127.0.0.1> Message-ID: <20050818180732.55d37aae@localhost.localdomain> That works - but why doesn't the other work? I've temporarily bypassed this particular problem by using the value= method - just so I can get on with writing the test On or about Thu, 18 Aug 2005 16:13:38 -0500 Bret Pettichord allegedly wrote: > At 03:23 PM 8/18/2005, Warren Pollans wrote: > >How can I figure out (debug) what this complaint is about: > > > >WIN32OLERuntimeError: focus > > OLE error code:8000FFFF in htmlfile > > Unexpected call to method or property access. > > HRESULT error code:0x80020009 > > Exception occurred. > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3399:in `method_missing' > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3399:in `set' > > > >Where can I find what the error codes mean? > > > >++++++++++++++++++++++++++++++++++++++++++++++++++++ > > > >I have defined an instance variable: > > > > @s_fld = $ie.test_field(:name, xxx) > > zzz = "some text" > > > >and then called > > > > @s_fld.set(zzz) > > try this instead and tell us what happens: > > $ie.text_field(:name, xxx).set(zzz) > From jkohl at telusplanet.net Thu Aug 18 19:38:41 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Thu, 18 Aug 2005 17:38:41 -0600 Subject: [Wtr-general] installer issues Message-ID: <20050818233917.HWLZ19601.priv-edtnes46.telusplanet.net@tintin> I am getting some emails reporting a couple of issues. The first is from folks trying to install Watir with Ruby 182-15. They get an error message about the installer not being able to find Fox. Looks like Fox is now installed as a Gem, so one must also require rubygems in the installer. We should figure out a way to clean this up; I'm wondering how many new users are running into this, not telling us and moving on in frustration. Here are two issues that were last emailed to me: I installed the 182-15 one-click Ruby build to start. When I tried to install watir using install.rb, the install failed because the Fox gui libraries couldn't be found. This seems likely to be a problem with the ruby installation not working correctly. The installer mentioned something about running a "command line" version of the installer, but it wasn't obvious where that might be and your documentation didn't mention anything about it either. So, I figured that 182-15 was shot just like 182-13 is. :) - After downloading and installing 182-14, I was able to get the watir installer to start up and run. However, during the installation, I got a dialog saying that a LoadLibrary("c:\Programs") failed (or something to that effect). This is because I installed Ruby in "C:\Program Files\Ruby" and watir in "C:\Program Files\Ruby\watir" initially (since I don't like to clutter up C:\ and D:\). I'm guessing that the load library call can't handle the space in the directory name. This could be a watir install problem (improper string quoting/escaping) or a ruby load library problem I guess. These have been popping up on the email list as well lately. Any thoughts or ideas on fixes? Thanks; -Jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050818/91a0c215/attachment.html From jim_che_tih at yahoo.com Thu Aug 18 22:10:04 2005 From: jim_che_tih at yahoo.com (jim che) Date: Thu, 18 Aug 2005 19:10:04 -0700 (PDT) Subject: [Wtr-general] Can anybody tell what the mean of 'ie.document.frames.length' is and how it changes Message-ID: <20050819021004.68232.qmail@web33308.mail.mud.yahoo.com> Below is my code require 'watir' include Watir require 'methods/login' $au3 = WIN32OLE.new("AutoItX3.Control") $au3.Opt("MouseCoordMode",0) admin_login("admin","123456") $ie.link(:text,"License generation").click sleep(1) puts "ie.document.frames.length is " puts $ie.document.frames.length ####### the system will print 0 table = $ie.table(:index, 6) tableCel = table.body(:index, 1)[3][1].focus() $au3.Send("{TAB 2}{ENTER}") sleep(10) puts "ie.document.frames.length is " puts $ie.document.frames.length ######## the system will print nil table1 = $ie.table(:index, 6) tableCel1 = table1.body(:index, 1)[12][1].focus() $au3.Send("{TAB 2}{ENTER}") sleep(1) puts "ie.document.frames.length is " puts $ie.document.frames.length ####### the system will print 1 a = $ie.contains_text("Please at least enter information into one of the domain and IP address fields") b = $ie.contains_text("This information is required") puts a if a && b puts "the information of 'Domain', 'IpAddress' and 'Quantity of CAL' fields are required" else puts "some errors appeared..." end $ie.text_field(:name,"domain").set("a.com") $ie.text_field(:name,"ipAddress").set("1.1.1.1") $ie.text_field(:name,"calQuantity").set("aaa") table1 = $ie.table(:index, 6) tableCel1 = table1.body(:index, 1)[12][1].focus() $au3.Send("{TAB 2}{ENTER}") sleep(1) c = $ie.contains_text("This information should be numeric") if c puts "'Quantity of CAL' should be numeric" puts "test of form_validation is successful" else puts "some errors appeared..." end puts "ie.document.frames.length is " puts $ie.document.frames.length ####### the system will print 1 As you see above in the four parts of this code I print the value of 'ie.document.frames.length' and the value was changed I want to know what the 'ie.document,frames,length' means and why the value turned to 'nil' in the second part Thank you very much jim --------------------------------- Start your day with Yahoo! - make it your home page --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050818/07db084c/attachment.html From alex at verk.info Thu Aug 18 23:33:41 2005 From: alex at verk.info (Alex Verhovsky) Date: Thu, 18 Aug 2005 21:33:41 -0600 Subject: [Wtr-general] another next step In-Reply-To: <5.1.0.14.2.20050817234937.02fa81e0@127.0.0.1> References: <5.1.0.14.2.20050817234937.02fa81e0@127.0.0.1> Message-ID: <43055315.9040401@verk.info> Bret Pettichord wrote: > 7. make a gem > > how could i forget -- kingsley is helping me with this. To remind, I once submitted a gemspec for Watir. It was before there were any native libraries in the distibution though. Anyway, Bret, if you need help with a gem, just whistle :) Alexey Verkhovsky From jeff.darklight at gmail.com Thu Aug 18 23:32:16 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Thu, 18 Aug 2005 20:32:16 -0700 Subject: [Wtr-general] installer issues In-Reply-To: <20050818233917.HWLZ19601.priv-edtnes46.telusplanet.net@tintin> References: <20050818233917.HWLZ19601.priv-edtnes46.telusplanet.net@tintin> Message-ID: <430552C0.9040209@gmail.com> Jonathan Kohl wrote: > I am getting some emails reporting a couple of issues. The first is > from folks trying to install Watir with Ruby 182-15. They get an error > message about the installer not being able to find Fox. Looks like Fox > is now installed as a Gem, so one must also require rubygems in the > installer. We should figure out a way to clean this up; I'm wondering > how many new users are running into this, not telling us and moving on > in frustration. > > Here are two issues that were last emailed to me: > > I installed the 182-15 one-click Ruby build to start. When I tried to > install watir using install.rb, the install failed because the Fox gui > libraries couldn't be found. This seems likely to be a problem with > the ruby installation not working correctly. The installer mentioned > something about running a "command line" version of the installer, but > it wasn't obvious where that might be and your documentation didn't > mention anything about it either. So, I figured that 182-15 was shot > just like 182-13 is. :) > > - After downloading and installing 182-14, I was able to get the watir > installer to start up and run. However, during the installation, I got > a dialog saying that a LoadLibrary("c:\Programs") failed (or something > to that effect). This is because I installed Ruby in "C:\Program > Files\Ruby" and watir in "C:\Program Files\Ruby\watir" initially > (since I don't like to clutter up C:\ and D:\). I'm guessing that the > load library call can't handle the space in the directory name. This > could be a watir install problem (improper string quoting/escaping) or > a ruby load library problem I guess. > > These have been popping up on the email list as well lately. Any > thoughts or ideas on fixes? > > Thanks; > > -Jonathan > >------------------------------------------------------------------------ > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > The problem is quite easy to fix, simply add require 'rubygems' right before the require 'fox' line.... Everything works from there. j. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050818/864f8400/attachment.html From bret at pettichord.com Fri Aug 19 00:46:59 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 18 Aug 2005 23:46:59 -0500 Subject: [Wtr-general] installer issues In-Reply-To: <430552C0.9040209@gmail.com> References: <20050818233917.HWLZ19601.priv-edtnes46.telusplanet.net@tintin> <20050818233917.HWLZ19601.priv-edtnes46.telusplanet.net@tintin> Message-ID: <5.1.0.14.2.20050818232203.012c0df8@127.0.0.1> I just installed Ruby 182-15 and then Watir 1.4 and did not have any problems. All the unit tests (but the three frame tests -- a known issue) ran without problem. I did not need to add require 'rubygems'. I'm pretty sure that Fox was a gem in 182-14 as well. The second problem cited below, regarding LoadLibrary not working when there are spaces, would not be a Watir problem. But a Ruby problem. If someone wants to track this down, they should report it to the Ruby Installer team. If we confirm this doesn't work, i suppose we could update our install docs. For a while now, installing Ruby sets environment variable RUBYOPT to rubygems. If someone did not have administrator privileges then they would not get this setting and i could imagine that they would run into problems like those detailed below. * You must install as administrator on Windows NT, 2000, and XP in order for path and environment variable settings to take effect. So far, i haven't taken the time to understand how Ruby and Watir work in a non-administrator environment and haven't taken the time to support it. I see that this is not documented in the readme, so i can update that. If someone wants to investigate running watir and ruby in a non-admin environment and give a detailed report as to whether it can be made to work, that would be appreciated. Do we want to support this kind of environment? Wouldn't this mean that ruby would not be in your path? Sounds like a headache to me. Several people have suggested that we replace our current Watir installer with a nullsoft installer (in addition to creating a Gem). I think that's the general direction i'd like to move, rather than try to bulletproof our current installer (which is admitedly shaky). If there are more reports of problems, i would like to see them. Actual error messages and details as to exactly when they occur would be extremely helpful. Bret P.S. Since i teach classes on effective bug reporting, i thought i might cite the second report below as a particular good example of a common mistake than many people make in their bug reports. It is vague on specifics around the actual error message ("or something to that effect") and long on guesses as to what the source of the problem might be. At 10:32 PM 8/18/2005, Jeff Wood wrote: >Jonathan Kohl wrote: >>I am getting some emails reporting a couple of issues. The first is from >>folks trying to install Watir with Ruby 182-15. They get an error message >>about the installer not being able to find Fox. Looks like Fox is now >>installed as a Gem, so one must also require rubygems in the installer. >>We should figure out a way to clean this up; I'm wondering how many new >>users are running into this, not telling us and moving on in frustration. >> >>Here are two issues that were last emailed to me: >> >>I installed the 182-15 one-click Ruby build to start. When I tried to >>install watir using install.rb, the install failed because the Fox gui >>libraries couldn't be found. This seems likely to be a problem with the >>ruby installation not working correctly. The installer mentioned >>something about running a "command line" version of the installer, but it >>wasn't obvious where that might be and your documentation didn't mention >>anything about it either. So, I figured that 182-15 was shot just like >>182-13 is. :) >> >>- After downloading and installing 182-14, I was able to get the watir >>installer to start up and run. However, during the installation, I got a >>dialog saying that a LoadLibrary("c:\Programs") failed (or something to >>that effect). This is because I installed Ruby in "C:\Program Files\Ruby" >>and watir in "C:\Program Files\Ruby\watir" initially (since I don't like >>to clutter up C:\ and D:\). I'm guessing that the load library call can't >>handle the space in the directory name. This could be a watir install >>problem (improper string quoting/escaping) or a ruby load library problem >>I guess. >> >>These have been popping up on the email list as well lately. Any thoughts >>or ideas on fixes? >> >>Thanks; >> >>-Jonathan >> >> >> >> >>_______________________________________________ >>Wtr-general mailing list >>Wtr-general at rubyforge.org >>http://rubyforge.org/mailman/listinfo/wtr-general >> >The problem is quite easy to fix, simply add require 'rubygems' right >before the require 'fox' line.... Everything works from there. > >j. > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Fri Aug 19 00:52:12 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 18 Aug 2005 23:52:12 -0500 Subject: [Wtr-general] another next step In-Reply-To: <43055315.9040401@verk.info> References: <5.1.0.14.2.20050817234937.02fa81e0@127.0.0.1> <5.1.0.14.2.20050817234937.02fa81e0@127.0.0.1> Message-ID: <5.1.0.14.2.20050818235154.01faf970@127.0.0.1> Thanks for the reminder. I had searched my mail archive for your posts, but i didn't think to search for all possible spellings of your name Mr. Ver(k)hovsky. At 10:33 PM 8/18/2005, Alex Verhovsky wrote: >Bret Pettichord wrote: > >>7. make a gem >> >>how could i forget -- kingsley is helping me with this. > >To remind, I once submitted a gemspec for Watir. It was before there were >any native libraries in the distibution though. Anyway, Bret, if you need >help with a gem, just whistle :) > >Alexey Verkhovsky > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Fri Aug 19 00:56:39 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 18 Aug 2005 23:56:39 -0500 Subject: [Wtr-general] need help understanding "focus" error In-Reply-To: <20050818180732.55d37aae@localhost.localdomain> References: <5.1.0.14.2.20050818161130.03038940@127.0.0.1> <20050818162322.5ef5ebf8@localhost.localdomain> <5.1.0.14.2.20050818161130.03038940@127.0.0.1> Message-ID: <5.1.0.14.2.20050818235445.01fb8830@127.0.0.1> At 05:07 PM 8/18/2005, Warren Pollans wrote: >That works - but why doesn't the other work? The object reference you stored becomes stale when a page loads or reloads. The same thing will happen to the value= method. >I've temporarily bypassed this particular problem by using the value= >method - just so I can get on with writing the test > >On or about Thu, 18 Aug 2005 16:13:38 -0500 >Bret Pettichord allegedly wrote: > > > At 03:23 PM 8/18/2005, Warren Pollans wrote: > > >How can I figure out (debug) what this complaint is about: > > > > > >WIN32OLERuntimeError: focus > > > OLE error code:8000FFFF in htmlfile > > > Unexpected call to method or property access. > > > HRESULT error code:0x80020009 > > > Exception occurred. > > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3399:in `method_missing' > > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3399:in `set' > > > > > >Where can I find what the error codes mean? > > > > > >++++++++++++++++++++++++++++++++++++++++++++++++++++ > > > > > >I have defined an instance variable: > > > > > > @s_fld = $ie.test_field(:name, xxx) > > > zzz = "some text" > > > > > >and then called > > > > > > @s_fld.set(zzz) > > > > try this instead and tell us what happens: > > > > $ie.text_field(:name, xxx).set(zzz) > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From jeff.darklight at gmail.com Fri Aug 19 01:16:46 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Thu, 18 Aug 2005 22:16:46 -0700 Subject: [Wtr-general] installer issues In-Reply-To: <5.1.0.14.2.20050818232203.012c0df8@127.0.0.1> References: <20050818233917.HWLZ19601.priv-edtnes46.telusplanet.net@tintin> <20050818233917.HWLZ19601.priv-edtnes46.telusplanet.net@tintin> <5.1.0.14.2.20050818232203.012c0df8@127.0.0.1> Message-ID: <43056B3E.2030803@gmail.com> Bret Pettichord wrote: > I just installed Ruby 182-15 and then Watir 1.4 and did not have any > problems. All the unit tests (but the three frame tests -- a known > issue) ran without problem. I did not need to add require 'rubygems'. > I'm pretty sure that Fox was a gem in 182-14 as well. > > The second problem cited below, regarding LoadLibrary not working when > there are spaces, would not be a Watir problem. But a Ruby problem. If > someone wants to track this down, they should report it to the Ruby > Installer team. If we confirm this doesn't work, i suppose we could > update our install docs. > > For a while now, installing Ruby sets environment variable RUBYOPT to > rubygems. If someone did not have administrator privileges then they > would not get this setting and i could imagine that they would run > into problems like those detailed below. > > * You must install as administrator on Windows NT, > 2000, and XP in order for path and environment > variable settings to take effect. > > So far, i haven't taken the time to understand how Ruby and Watir work > in a non-administrator environment and haven't taken the time to > support it. I see that this is not documented in the readme, so i can > update that. If someone wants to investigate running watir and ruby in > a non-admin environment and give a detailed report as to whether it > can be made to work, that would be appreciated. Do we want to support > this kind of environment? Wouldn't this mean that ruby would not be in > your path? Sounds like a headache to me. > > Several people have suggested that we replace our current Watir > installer with a nullsoft installer (in addition to creating a Gem). I > think that's the general direction i'd like to move, rather than try > to bulletproof our current installer (which is admitedly shaky). > > If there are more reports of problems, i would like to see them. > Actual error messages and details as to exactly when they occur would > be extremely helpful. > > Bret > > P.S. Since i teach classes on effective bug reporting, i thought i > might cite the second report below as a particular good example of a > common mistake than many people make in their bug reports. It is vague > on specifics around the actual error message ("or something to that > effect") and long on guesses as to what the source of the problem > might be. > > At 10:32 PM 8/18/2005, Jeff Wood wrote: > >> Jonathan Kohl wrote: >> >>> I am getting some emails reporting a couple of issues. The first is >>> from folks trying to install Watir with Ruby 182-15. They get an >>> error message about the installer not being able to find Fox. Looks >>> like Fox is now installed as a Gem, so one must also require >>> rubygems in the installer. We should figure out a way to clean this >>> up; I'm wondering how many new users are running into this, not >>> telling us and moving on in frustration. >>> >>> Here are two issues that were last emailed to me: >>> >>> I installed the 182-15 one-click Ruby build to start. When I tried >>> to install watir using install.rb, the install failed because the >>> Fox gui libraries couldn't be found. This seems likely to be a >>> problem with the ruby installation not working correctly. The >>> installer mentioned something about running a "command line" version >>> of the installer, but it wasn't obvious where that might be and your >>> documentation didn't mention anything about it either. So, I figured >>> that 182-15 was shot just like 182-13 is. :) >>> >>> - After downloading and installing 182-14, I was able to get the >>> watir installer to start up and run. However, during the >>> installation, I got a dialog saying that a >>> LoadLibrary("c:\Programs") failed (or something to that effect). >>> This is because I installed Ruby in "C:\Program Files\Ruby" and >>> watir in "C:\Program Files\Ruby\watir" initially (since I don't like >>> to clutter up C:\ and D:\). I'm guessing that the load library call >>> can't handle the space in the directory name. This could be a watir >>> install problem (improper string quoting/escaping) or a ruby load >>> library problem I guess. >>> >>> These have been popping up on the email list as well lately. Any >>> thoughts or ideas on fixes? >>> >>> Thanks; >>> >>> -Jonathan >>> >>> >>> >>> >>> _______________________________________________ >>> Wtr-general mailing list >>> Wtr-general at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/wtr-general >>> >> The problem is quite easy to fix, simply add require 'rubygems' right >> before the require 'fox' line.... Everything works from there. >> >> j. >> >> _______________________________________________ >> Wtr-general mailing list >> Wtr-general at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-general > > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > Bret, If you have any, I would really appreciate any materials you could send my way to help me teach a class on WATiR ... I'm sure I can some up with some, but if you have some already, it would save me time. I'm going to give a learning session on it, and I expect attendance to be between 100 & 200 people ( could be more )... So, as you can see, it gives me a great chance to evangelize & help get more folks in the ruby way ... Thanks in advance for your time. j. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050818/48af86c2/attachment.html From jeff.darklight at gmail.com Fri Aug 19 01:21:46 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Thu, 18 Aug 2005 22:21:46 -0700 Subject: [Wtr-general] installer issues In-Reply-To: <5.1.0.14.2.20050818232203.012c0df8@127.0.0.1> References: <20050818233917.HWLZ19601.priv-edtnes46.telusplanet.net@tintin> <20050818233917.HWLZ19601.priv-edtnes46.telusplanet.net@tintin> <5.1.0.14.2.20050818232203.012c0df8@127.0.0.1> Message-ID: <43056C6A.8020002@gmail.com> Bret Pettichord wrote: > I just installed Ruby 182-15 and then Watir 1.4 and did not have any > problems. All the unit tests (but the three frame tests -- a known > issue) ran without problem. I did not need to add require 'rubygems'. > I'm pretty sure that Fox was a gem in 182-14 as well. > > The second problem cited below, regarding LoadLibrary not working when > there are spaces, would not be a Watir problem. But a Ruby problem. If > someone wants to track this down, they should report it to the Ruby > Installer team. If we confirm this doesn't work, i suppose we could > update our install docs. > > For a while now, installing Ruby sets environment variable RUBYOPT to > rubygems. If someone did not have administrator privileges then they > would not get this setting and i could imagine that they would run > into problems like those detailed below. > > * You must install as administrator on Windows NT, > 2000, and XP in order for path and environment > variable settings to take effect. > > So far, i haven't taken the time to understand how Ruby and Watir work > in a non-administrator environment and haven't taken the time to > support it. I see that this is not documented in the readme, so i can > update that. If someone wants to investigate running watir and ruby in > a non-admin environment and give a detailed report as to whether it > can be made to work, that would be appreciated. Do we want to support > this kind of environment? Wouldn't this mean that ruby would not be in > your path? Sounds like a headache to me. > > Several people have suggested that we replace our current Watir > installer with a nullsoft installer (in addition to creating a Gem). I > think that's the general direction i'd like to move, rather than try > to bulletproof our current installer (which is admitedly shaky). > > If there are more reports of problems, i would like to see them. > Actual error messages and details as to exactly when they occur would > be extremely helpful. > > Bret > > P.S. Since i teach classes on effective bug reporting, i thought i > might cite the second report below as a particular good example of a > common mistake than many people make in their bug reports. It is vague > on specifics around the actual error message ("or something to that > effect") and long on guesses as to what the source of the problem > might be. > > At 10:32 PM 8/18/2005, Jeff Wood wrote: > >> Jonathan Kohl wrote: >> >>> I am getting some emails reporting a couple of issues. The first is >>> from folks trying to install Watir with Ruby 182-15. They get an >>> error message about the installer not being able to find Fox. Looks >>> like Fox is now installed as a Gem, so one must also require >>> rubygems in the installer. We should figure out a way to clean this >>> up; I'm wondering how many new users are running into this, not >>> telling us and moving on in frustration. >>> >>> Here are two issues that were last emailed to me: >>> >>> I installed the 182-15 one-click Ruby build to start. When I tried >>> to install watir using install.rb, the install failed because the >>> Fox gui libraries couldn't be found. This seems likely to be a >>> problem with the ruby installation not working correctly. The >>> installer mentioned something about running a "command line" version >>> of the installer, but it wasn't obvious where that might be and your >>> documentation didn't mention anything about it either. So, I figured >>> that 182-15 was shot just like 182-13 is. :) >>> >>> - After downloading and installing 182-14, I was able to get the >>> watir installer to start up and run. However, during the >>> installation, I got a dialog saying that a >>> LoadLibrary("c:\Programs") failed (or something to that effect). >>> This is because I installed Ruby in "C:\Program Files\Ruby" and >>> watir in "C:\Program Files\Ruby\watir" initially (since I don't like >>> to clutter up C:\ and D:\). I'm guessing that the load library call >>> can't handle the space in the directory name. This could be a watir >>> install problem (improper string quoting/escaping) or a ruby load >>> library problem I guess. >>> >>> These have been popping up on the email list as well lately. Any >>> thoughts or ideas on fixes? >>> >>> Thanks; >>> >>> -Jonathan >>> >>> >>> >>> >>> _______________________________________________ >>> Wtr-general mailing list >>> Wtr-general at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/wtr-general >>> >> The problem is quite easy to fix, simply add require 'rubygems' right >> before the require 'fox' line.... Everything works from there. >> >> j. >> >> _______________________________________________ >> Wtr-general mailing list >> Wtr-general at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-general > > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > BTW ... regarding the require 'rubygems' line ... it doesn't hurt anything to put it there ... and some people don't have the possibility of running as Administrator. Simply adding that line fixes the problem... I wish you'd reconsider it. j. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050818/4a45069b/attachment.html From bret at pettichord.com Fri Aug 19 02:51:05 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 19 Aug 2005 01:51:05 -0500 Subject: [Wtr-general] Deferred element binding Message-ID: <5.1.0.14.2.20050819013217.028629d0@127.0.0.1> For a long time i have talked about how important it is for Watir to make code like these examples work: @ie_new = Watir::IE.new text_field = @ie_new.text_field(:name, 'text1') @ie_new.goto($htmlRoot + "textfields1.html") assert_equal('Hello World', text_field.value) $ie.goto($htmlRoot + "textfields1.html") text_field = $ie.text_field(:name, 'text1') $ie.refresh assert_equal('Hello World', text_field.value) Currently, these both have errors, in the first place, you get an ugly OLE error, in the second, the reference is stale and text_field.value returns an empty string. This is something that often surprises and confuses new users. I haven't really know what to call the ability to make these examples work. For a while i called it mapping, because it allows you to create predefined window maps, if you want to, but that got Jonathan all prickly because of years he'd spent suffering from having to update SilkTest window maps. You could also call it lazy instantiation. Not quite accurate, but it gives the right impression. Or late binding. At the moment i think i want to call it deferred element binding, because the Watir object wouldn't actually get mapped to an element in a page until as late as possible. This would really loosen the binding between an individual Watir object and the page elements it can refer to -- and now a single Water object can in fact be used to refer to the same element on different pages or simply successive page loads (which previously all required new Watir objects). And it would also loosen the binding between Watir and COM, making it easier to support bindings to other browser driving technologies, including Selenium and XP/COM. In other words: Firefox support. Actually, i lied. The examples above do in fact work with the latest version of Watir, found in HEAD. I just wrote the needed code tonight. Right now it only works with text boxes. And only in the simple case where it is in an IE container. But i've refactored enough of the code that the path ahead to making deferred element binding work with all elements and all containers is simply a matter of continuing the same kinds of refactorings that i've been making over the past few months anyhow. By removing duplication and reducing the size of the Watir code base, i am sure that we can get this feature working across the board. Particular thanks go to Elisabeth Hendrickson who prodded me to prove to her that this would be hard. In the process i realized it wouldn't be quite so hard after all. Bret _____________________ Bret Pettichord www.pettichord.com From zeljko.filipin at gmail.com Fri Aug 19 03:57:12 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 19 Aug 2005 09:57:12 +0200 Subject: [Wtr-general] installer issues In-Reply-To: <43056B3E.2030803@gmail.com> Message-ID: <430590ad.02403ef1.5fdf.ffffd741@mx.gmail.com> Go to http://rubyforge.org/projects/wtr/ > Latest File Releases > scripting101 > Download or just click http://rubyforge.org/frs/?group_id=104&release_id=2516 . As far as I remember, there are materials that could help you. Zeljko ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood Sent: Friday, August 19, 2005 7:17 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] installer issues Bret, If you have any, I would really appreciate any materials you could send my way to help me teach a class on WATiR ... I'm sure I can some up with some, but if you have some already, it would save me time. I'm going to give a learning session on it, and I expect attendance to be between 100 & 200 people ( could be more )... So, as you can see, it gives me a great chance to evangelize & help get more folks in the ruby way ... Thanks in advance for your time. j. From mich.mueller at fhso.ch Fri Aug 19 04:18:48 2005 From: mich.mueller at fhso.ch (=?iso-8859-1?Q?Michael_M=FCller?=) Date: Fri, 19 Aug 2005 10:18:48 +0200 Subject: [Wtr-general] Set the Focus to a newly opened Window Message-ID: <000601c5a496$a2d42930$9449590a@mmvalidation> I need to set to Focus to a newly opened Window (Opened within the script). How can I set the Focus to the new Window? The situation is: Within a script I press the "login" link -> a new Window open -> all further action will take place within this window but I cant set the Focus to this window. Instead I get a Object not found error because the Focus still stays on the old window (I tested it by pressing a link in the original window when the new windows is already open). Can anybody help me? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050819/433f3454/attachment.html From zeljko.filipin at gmail.com Fri Aug 19 04:29:38 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 19 Aug 2005 10:29:38 +0200 Subject: [Wtr-general] Set the Focus to a newly opened Window In-Reply-To: <000601c5a496$a2d42930$9449590a@mmvalidation> Message-ID: <43059849.4b645663.7eb8.0da2@mx.gmail.com> IE#atach will do it if your window is new browser window ie=Watir::IE.attach(:title,'title') or ie=Watir::IE.attach(:url,'url') Zeljko _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Michael M?ller Sent: Friday, August 19, 2005 10:19 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Set the Focus to a newly opened Window I need to set to Focus to a newly opened Window (Opened within the script). How can I set the Focus to the new Window? The situation is: Within a script I press the "login" link -> a new Window open -> all further action will take place within this window but I cant set the Focus to this window. Instead I get a Object not found error because the Focus still stays on the old window (I tested it by pressing a link in the original window when the new windows is already open). Can anybody help me? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050819/fcfd9c76/attachment.html From jeff.darklight at gmail.com Fri Aug 19 08:58:56 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Fri, 19 Aug 2005 05:58:56 -0700 Subject: [Wtr-general] installer issues In-Reply-To: <430590ad.02403ef1.5fdf.ffffd741@mx.gmail.com> References: <430590ad.02403ef1.5fdf.ffffd741@mx.gmail.com> Message-ID: <4305D790.2050102@gmail.com> Zeljko Filipin wrote: >Go to http://rubyforge.org/projects/wtr/ > Latest File Releases > >scripting101 > Download > >or just click http://rubyforge.org/frs/?group_id=104&release_id=2516 . > >As far as I remember, there are materials that could help you. > >Zeljko > >________________________________ > >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood >Sent: Friday, August 19, 2005 7:17 AM >To: wtr-general at rubyforge.org >Subject: Re: [Wtr-general] installer issues > > Bret, > > If you have any, I would really appreciate any materials you could >send my way to help me teach a class on WATiR ... I'm sure I can some up >with some, but if you have some already, it would save me time. > > I'm going to give a learning session on it, and I expect attendance >to be between 100 & 200 people ( could be more )... > > So, as you can see, it gives me a great chance to evangelize & help >get more folks in the ruby way ... > > Thanks in advance for your time. > > j. > > > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > Thanks for the link ... I feel a bit dumb for not recogniting that package to be exactly that... So, the 101 stuff is based on WATiR 1.3.1 ... Is an update to 1.4 due ? or would that be a good thing to contribute back? j. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050819/e41ccb3a/attachment.html From jeff.darklight at gmail.com Fri Aug 19 09:20:53 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Fri, 19 Aug 2005 06:20:53 -0700 Subject: [Wtr-general] installer issues In-Reply-To: <4305D790.2050102@gmail.com> References: <430590ad.02403ef1.5fdf.ffffd741@mx.gmail.com> <4305D790.2050102@gmail.com> Message-ID: <4305DCB5.10500@gmail.com> Jeff Wood wrote: > Zeljko Filipin wrote: > >>Go to http://rubyforge.org/projects/wtr/ > Latest File Releases > >>scripting101 > Download >> >>or just click http://rubyforge.org/frs/?group_id=104&release_id=2516 . >> >>As far as I remember, there are materials that could help you. >> >>Zeljko >> >>________________________________ >> >>From: wtr-general-bounces at rubyforge.org >>[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood >>Sent: Friday, August 19, 2005 7:17 AM >>To: wtr-general at rubyforge.org >>Subject: Re: [Wtr-general] installer issues >> >> Bret, >> >> If you have any, I would really appreciate any materials you could >>send my way to help me teach a class on WATiR ... I'm sure I can some up >>with some, but if you have some already, it would save me time. >> >> I'm going to give a learning session on it, and I expect attendance >>to be between 100 & 200 people ( could be more )... >> >> So, as you can see, it gives me a great chance to evangelize & help >>get more folks in the ruby way ... >> >> Thanks in advance for your time. >> >> j. >> >> >> >> >>_______________________________________________ >>Wtr-general mailing list >>Wtr-general at rubyforge.org >>http://rubyforge.org/mailman/listinfo/wtr-general >> >> >> > Thanks for the link ... I feel a bit dumb for not recogniting that > package to be exactly that... So, the 101 stuff is based on WATiR > 1.3.1 ... Is an update to 1.4 due ? or would that be a good thing to > contribute back? > > j. > >------------------------------------------------------------------------ > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > Ok, I looked at that stuff ... and unfortunately ... It looks like this tutorial is meant as a day-long kinda class ... I only have 1-2 hours ... So, I'm going to include documentation on getting Ruby & WATiR installed under Windows ... And I'm going to show them irb and doing live testing with it. as well as using the Test::Unit framework. I'll do some simple tests of some of the web-based interfaces around the company. Thanks for the reference though. j. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050819/627028df/attachment.html From warren at meyer-pollans.net Fri Aug 19 11:37:41 2005 From: warren at meyer-pollans.net (Warren Pollans) Date: Fri, 19 Aug 2005 11:37:41 -0400 Subject: [Wtr-general] need help understanding "focus" error In-Reply-To: <5.1.0.14.2.20050818235445.01fb8830@127.0.0.1> References: <5.1.0.14.2.20050818161130.03038940@127.0.0.1> <20050818162322.5ef5ebf8@localhost.localdomain> <5.1.0.14.2.20050818161130.03038940@127.0.0.1> <5.1.0.14.2.20050818235445.01fb8830@127.0.0.1> Message-ID: <20050819113741.656f9375@localhost.localdomain> Thanks - that explains a lot On or about Thu, 18 Aug 2005 23:56:39 -0500 Bret Pettichord allegedly wrote: > At 05:07 PM 8/18/2005, Warren Pollans wrote: > >That works - but why doesn't the other work? > > The object reference you stored becomes stale when a page loads or > reloads. The same thing will happen to the value= method. > > >I've temporarily bypassed this particular problem by using the value= > >method - just so I can get on with writing the test > > > >On or about Thu, 18 Aug 2005 16:13:38 -0500 > >Bret Pettichord allegedly wrote: > > > > > At 03:23 PM 8/18/2005, Warren Pollans wrote: > > > >How can I figure out (debug) what this complaint is about: > > > > > > > >WIN32OLERuntimeError: focus > > > > OLE error code:8000FFFF in htmlfile > > > > Unexpected call to method or property access. > > > > HRESULT error code:0x80020009 > > > > Exception occurred. > > > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3399:in > > > > `method_missing' c:/ruby/lib/ruby/site_ruby/1.8/ > > > > watir.rb:3399:in `set' > > > > > > > >Where can I find what the error codes mean? > > > > > > > >++++++++++++++++++++++++++++++++++++++++++++++++++++ > > > > > > > >I have defined an instance variable: > > > > > > > > @s_fld = $ie.test_field(:name, xxx) > > > > zzz = "some text" > > > > > > > >and then called > > > > > > > > @s_fld.set(zzz) > > > > > > try this instead and tell us what happens: > > > > > > $ie.text_field(:name, xxx).set(zzz) > > > > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From warren at meyer-pollans.net Fri Aug 19 11:57:43 2005 From: warren at meyer-pollans.net (Warren Pollans) Date: Fri, 19 Aug 2005 11:57:43 -0400 Subject: [Wtr-general] finding text in a cell that contains a specified image? Message-ID: <20050819115743.183cd83b@localhost.localdomain> Hello again, Could some please point me to a way of finding text in a cell that contains a specified image? There are no ids available for the table, row or cell :-( - and there are several tables on the page. There is only one cell (at a time) that contains this particular image - the text in the cell is displaying status that I'm trying to capture. This status msg can occur in one of four different tables - depending on which form on the page is submitted - the same image is used in all cases. I think I want to walk through the DOM looking for a td element that has "img src=xxx" - I imagine there's a simpler watir way :-) Thanks, Warren From shaorobics at gmail.com Fri Aug 19 12:16:13 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Fri, 19 Aug 2005 12:16:13 -0400 Subject: [Wtr-general] finding text in a cell that contains a specified image? In-Reply-To: <20050819115743.183cd83b@localhost.localdomain> References: <20050819115743.183cd83b@localhost.localdomain> Message-ID: <593b9ae8050819091663528ab3@mail.gmail.com> I'm doing something similar. But I'm not dealing with images, rather links and texts, so I'd imagine the code would be similar to the one I"m using and would work: ie.tables.each do|t| # since you don't have ID's, look at every table for i in 1..t.row_count # for every row in this table # for every column in this row, look at its contents t[i].each{|c| if c.image(:src, xxx).exists? # if true, this is your cell return c.text.strip } end end On 8/19/05, Warren Pollans wrote: > Hello again, > > Could some please point me to a way of finding text in a cell that > contains a specified image? There are no ids available for the table, > row or cell :-( - and there are several tables on the page. There is > only one cell (at a time) that contains this particular image - the > text in the cell is displaying status that I'm trying to capture. This > status msg can occur in one of four different tables - depending on > which form on the page is submitted - the same image is used in all > cases. > > I think I want to walk through the DOM looking for a td element that has > "img src=xxx" - I imagine there's a simpler watir way :-) > > Thanks, > > Warren > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From jeff.darklight at gmail.com Fri Aug 19 12:28:47 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Fri, 19 Aug 2005 09:28:47 -0700 Subject: [Wtr-general] finding text in a cell that contains a specified image? In-Reply-To: <593b9ae8050819091663528ab3@mail.gmail.com> References: <20050819115743.183cd83b@localhost.localdomain> <593b9ae8050819091663528ab3@mail.gmail.com> Message-ID: I know it's a user preference game, but it's much more "the ruby way" to stay away from "for ... in ... " ... also, your range starts @ 1 ... what about row 0 ? Oh, and exists? is deprecated (1.4), you should get used to exist? how about, t.row_count.times do |i| theCell = t[i].find { |c| c.image( :src, xxx ).exist? } return theCell.text.strip if theCell end anyways, comments are welcome. j. On 8/19/05, Shao Kang Tat wrote: > I'm doing something similar. But I'm not dealing with images, rather > links and texts, so I'd imagine the code would be similar to the one > I"m using and would work: > > > ie.tables.each do|t| # since you don't have ID's, look at every table > for i in 1..t.row_count # for every row in this table > > # for every column in this row, look at its contents > t[i].each{|c| if c.image(:src, xxx).exists? # if true, this > is your cell > return c.text.strip > } > end > end > > > > > > > > On 8/19/05, Warren Pollans wrote: > > Hello again, > > > > Could some please point me to a way of finding text in a cell that > > contains a specified image? There are no ids available for the table, > > row or cell :-( - and there are several tables on the page. There is > > only one cell (at a time) that contains this particular image - the > > text in the cell is displaying status that I'm trying to capture. This > > status msg can occur in one of four different tables - depending on > > which form on the page is submitted - the same image is used in all > > cases. > > > > I think I want to walk through the DOM looking for a td element that has > > "img src=xxx" - I imagine there's a simpler watir way :-) > > > > Thanks, > > > > Warren > > _______________________________________________ > > 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 > -- "So long, and thanks for all the fish" Jeff Wood From shaorobics at gmail.com Fri Aug 19 12:33:09 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Fri, 19 Aug 2005 12:33:09 -0400 Subject: [Wtr-general] finding text in a cell that contains a specified image? In-Reply-To: References: <20050819115743.183cd83b@localhost.localdomain> <593b9ae8050819091663528ab3@mail.gmail.com> Message-ID: <593b9ae805081909333cfb2fce@mail.gmail.com> well the loop starts at 1 because there is no row 0 for a table :) Shao On 8/19/05, Jeff Wood wrote: > I know it's a user preference game, but it's much more "the ruby way" > to stay away from "for ... in ... " ... also, your range starts @ 1 > ... what about row 0 ? Oh, and exists? is deprecated (1.4), you should > get used to exist? > > how about, > > t.row_count.times do |i| > theCell = t[i].find { |c| c.image( :src, xxx ).exist? } > return theCell.text.strip if theCell > end > > anyways, comments are welcome. > > j. > > On 8/19/05, Shao Kang Tat wrote: > > I'm doing something similar. But I'm not dealing with images, rather > > links and texts, so I'd imagine the code would be similar to the one > > I"m using and would work: > > > > > > ie.tables.each do|t| # since you don't have ID's, look at every table > > for i in 1..t.row_count # for every row in this table > > > > # for every column in this row, look at its contents > > t[i].each{|c| if c.image(:src, xxx).exists? # if true, this > > is your cell > > return c.text.strip > > } > > end > > end > > > > > > > > > > > > > > > > On 8/19/05, Warren Pollans wrote: > > > Hello again, > > > > > > Could some please point me to a way of finding text in a cell that > > > contains a specified image? There are no ids available for the table, > > > row or cell :-( - and there are several tables on the page. There is > > > only one cell (at a time) that contains this particular image - the > > > text in the cell is displaying status that I'm trying to capture. This > > > status msg can occur in one of four different tables - depending on > > > which form on the page is submitted - the same image is used in all > > > cases. > > > > > > I think I want to walk through the DOM looking for a td element that has > > > "img src=xxx" - I imagine there's a simpler watir way :-) > > > > > > Thanks, > > > > > > Warren > > > _______________________________________________ > > > 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 > > > > > -- > "So long, and thanks for all the fish" > > Jeff Wood > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From bret at pettichord.com Fri Aug 19 11:08:07 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 19 Aug 2005 10:08:07 -0500 Subject: [Wtr-general] installer issues In-Reply-To: <4305D790.2050102@gmail.com> References: <430590ad.02403ef1.5fdf.ffffd741@mx.gmail.com> <430590ad.02403ef1.5fdf.ffffd741@mx.gmail.com> Message-ID: <5.1.0.14.2.20050819100721.02fcee50@127.0.0.1> At 07:58 AM 8/19/2005, Jeff Wood wrote: >Thanks for the link ... I feel a bit dumb for not recogniting that package >to be exactly that... So, the 101 stuff is based on WATiR 1.3.1 ... Is an >update to 1.4 due ? or would that be a good thing to contribute back? I think it works with 1.4 also, already. If not, fixes or reports would be appreciated. _____________________ Bret Pettichord www.pettichord.com From jeff.darklight at gmail.com Fri Aug 19 13:33:20 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Fri, 19 Aug 2005 10:33:20 -0700 Subject: [Wtr-general] finding text in a cell that contains a specified image? In-Reply-To: <593b9ae805081909333cfb2fce@mail.gmail.com> References: <20050819115743.183cd83b@localhost.localdomain> <593b9ae8050819091663528ab3@mail.gmail.com> <593b9ae805081909333cfb2fce@mail.gmail.com> Message-ID: well, that's a good reason for not trying row 0 then ;) j. On 8/19/05, Shao Kang Tat wrote: > well the loop starts at 1 because there is no row 0 for a table :) > > > Shao > > > > On 8/19/05, Jeff Wood wrote: > > I know it's a user preference game, but it's much more "the ruby way" > > to stay away from "for ... in ... " ... also, your range starts @ 1 > > ... what about row 0 ? Oh, and exists? is deprecated (1.4), you should > > get used to exist? > > > > how about, > > > > t.row_count.times do |i| > > theCell = t[i].find { |c| c.image( :src, xxx ).exist? } > > return theCell.text.strip if theCell > > end > > > > anyways, comments are welcome. > > > > j. > > > > On 8/19/05, Shao Kang Tat wrote: > > > I'm doing something similar. But I'm not dealing with images, rather > > > links and texts, so I'd imagine the code would be similar to the one > > > I"m using and would work: > > > > > > > > > ie.tables.each do|t| # since you don't have ID's, look at every table > > > for i in 1..t.row_count # for every row in this table > > > > > > # for every column in this row, look at its contents > > > t[i].each{|c| if c.image(:src, xxx).exists? # if true, this > > > is your cell > > > return c.text.strip > > > } > > > end > > > end > > > > > > > > > > > > > > > > > > > > > > > > On 8/19/05, Warren Pollans wrote: > > > > Hello again, > > > > > > > > Could some please point me to a way of finding text in a cell that > > > > contains a specified image? There are no ids available for the table, > > > > row or cell :-( - and there are several tables on the page. There is > > > > only one cell (at a time) that contains this particular image - the > > > > text in the cell is displaying status that I'm trying to capture. This > > > > status msg can occur in one of four different tables - depending on > > > > which form on the page is submitted - the same image is used in all > > > > cases. > > > > > > > > I think I want to walk through the DOM looking for a td element that has > > > > "img src=xxx" - I imagine there's a simpler watir way :-) > > > > > > > > Thanks, > > > > > > > > Warren > > > > _______________________________________________ > > > > 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 > > > > > > > > > -- > > "So long, and thanks for all the fish" > > > > Jeff Wood > > > > _______________________________________________ > > 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 > -- "So long, and thanks for all the fish" Jeff Wood From shaorobics at gmail.com Fri Aug 19 13:47:25 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Fri, 19 Aug 2005 13:47:25 -0400 Subject: [Wtr-general] finding text in a cell that contains a specified image? In-Reply-To: References: <20050819115743.183cd83b@localhost.localdomain> <593b9ae8050819091663528ab3@mail.gmail.com> <593b9ae805081909333cfb2fce@mail.gmail.com> Message-ID: <593b9ae8050819104745879a6c@mail.gmail.com> actually I tested out tables using t.row_count.times do|i|. Theproblem with using this method on tables is that it attempts to do row0 (or so I think). I used IRB to go to google.ca and did a ie.tables.each do |t| m = tend which set m to be the last table on the page. (it has 2 rows)Then I did a comparison between .times do and for i in.... methods. Here are the results: Using: .times do|i| irb(main):183:0> m.row_count.times do|i|irb(main):184:1* m[i].each {|c| puts c.text}irb(main):185:1> end WIN32OLERuntimeError: Unknown property or method `-1' HRESULT error code:0x80020006 Unknown name. from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2472:in `[]' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2472:in `row' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2422:in `[]' from (irb):184 fromirb(main):183:0> m.row_count.times do|i|irb(main):184:1* m[i].each {|c| puts c.text}irb(main):185:1> endWIN32OLERuntimeError: Unknown property or method `-1' HRESULT error code:0x80020006 Unknown name. from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2472:in `[]' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2472:in `row' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2422:in `[]' from (irb):184 from (irb):183:in `times' from (irb):183 from ?:0 (irb):183:in `times' from (irb):183 from ?:0 using for i in 1..rowcount irb(main):189:0> for i in 1..m.row_countirb(main):190:1> m[i].each{|c| puts c.text}irb(main):191:1> end Advanced Search Preferences Language ToolsSearch: the webpages from Canada So I'm assuming Watir will always start at index 0 when using .times do|x|is that right? Would it be possible to make watir Know what iscalling .times so that it can start at a different index - in thiscase, tables? I actually do use .times do|x| in some cases but Inever tried with tables until now because I assumed it would start atindex 0. Shao From bret at pettichord.com Fri Aug 19 12:46:04 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 19 Aug 2005 11:46:04 -0500 Subject: [Wtr-general] finding text in a cell that contains a specified image? In-Reply-To: References: <593b9ae8050819091663528ab3@mail.gmail.com> <20050819115743.183cd83b@localhost.localdomain> <593b9ae8050819091663528ab3@mail.gmail.com> Message-ID: <5.1.0.14.2.20050819114510.02fdb2b0@127.0.0.1> At 11:28 AM 8/19/2005, Jeff Wood wrote: >Oh, and exists? is deprecated (1.4), you should >get used to exist? huh? we've always used 'exists?' in watir. _____________________ Bret Pettichord www.pettichord.com From jeff.darklight at gmail.com Fri Aug 19 14:00:52 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Fri, 19 Aug 2005 11:00:52 -0700 Subject: [Wtr-general] finding text in a cell that contains a specified image? In-Reply-To: <593b9ae8050819104745879a6c@mail.gmail.com> References: <20050819115743.183cd83b@localhost.localdomain> <593b9ae8050819091663528ab3@mail.gmail.com> <593b9ae805081909333cfb2fce@mail.gmail.com> <593b9ae8050819104745879a6c@mail.gmail.com> Message-ID: .times is part of Fixnum from Ruby, not a specific piece of WATiR. It's functioning properly, your range solution vs my times solution isbetter in this circumstance. j. On 8/19/05, Shao Kang Tat wrote:> actually I tested out tables using t.row_count.times do|i|. Theproblem with using this method on tables is that it attempts to do row0 (or so I think). I used IRB to go to google.ca and did a> ie.tables.each do |t| m = tend> which set m to be the last table on the page. (it has 2 rows)Then I did a comparison between .times do and for i in.... methods. Here are the results:> > Using: .times do|i|> irb(main):183:0> m.row_count.times do|i|irb(main):184:1* m[i].each {|c| puts c.text}irb(main):185:1> end> WIN32OLERuntimeError: Unknown property or method `-1' HRESULT error code:0x80020006 Unknown name. from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2472:in `[]' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2472:in `row' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2422:in `[]' from (irb):184 fromirb(main):183:0> m.row_count.times do|i|irb(main):184:1* m[i].each {|c| puts c.text}irb(main):185:1> endWIN32OLERuntimeError: Unknown property or method `-1' HRESULT error code:0x80020006 Unknown name. from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2472:in `[]' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2472:in `row' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2422:in `[]' from (irb):184 from (irb):183:in `times' from (irb):183 from ?:0 (irb):183:in `times' from (irb):183 from ?:0> using for i in 1..rowcount> irb(main):189:0> for i in 1..m.row_countirb(main):190:1> m[i].each{|c| puts c.text}irb(main):191:1> end> > Advanced Search Preferences Language ToolsSearch: the webpages from Canada> > So I'm assuming Watir will always start at index 0 when using .times do|x|is that right? Would it be possible to make watir Know what iscalling .times so that it can start at a different index - in thiscase, tables? I actually do use .times do|x| in some cases but Inever tried with tables until now because I assumed it would start atindex 0.> Shao> _______________________________________________> Wtr-general mailing list> Wtr-general at rubyforge.org> http://rubyforge.org/mailman/listinfo/wtr-general> -- "So long, and thanks for all the fish" Jeff Wood From jeff.darklight at gmail.com Fri Aug 19 14:06:05 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Fri, 19 Aug 2005 11:06:05 -0700 Subject: [Wtr-general] finding text in a cell that contains a specified image? In-Reply-To: <5.1.0.14.2.20050819114510.02fdb2b0@127.0.0.1> References: <20050819115743.183cd83b@localhost.localdomain> <593b9ae8050819091663528ab3@mail.gmail.com> <5.1.0.14.2.20050819114510.02fdb2b0@127.0.0.1> Message-ID: Bret, My bad ... it's part of Ruby not you ... File.exist? and File.exists? I knew I'd seen it recently ... just wasn't clear on WHERE. Check the Std Lib docs ... under File#exist? and File#exists? ... exists? is marked obsolete. j. On 8/19/05, Bret Pettichord wrote: > At 11:28 AM 8/19/2005, Jeff Wood wrote: > >Oh, and exists? is deprecated (1.4), you should > >get used to exist? > > huh? we've always used 'exists?' in watir. > > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "So long, and thanks for all the fish" Jeff Wood From bret at pettichord.com Fri Aug 19 14:08:09 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 19 Aug 2005 13:08:09 -0500 Subject: [Wtr-general] installer issues In-Reply-To: <43056C6A.8020002@gmail.com> References: <5.1.0.14.2.20050818232203.012c0df8@127.0.0.1> <20050818233917.HWLZ19601.priv-edtnes46.telusplanet.net@tintin> <20050818233917.HWLZ19601.priv-edtnes46.telusplanet.net@tintin> <5.1.0.14.2.20050818232203.012c0df8@127.0.0.1> Message-ID: <5.1.0.14.2.20050819130746.03047958@127.0.0.1> At 12:21 AM 8/19/2005, Jeff Wood wrote: >>>The problem is quite easy to fix, simply add require 'rubygems' right >>>before the require 'fox' line.... Everything works from there. ok. i've committed this fix. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Fri Aug 19 14:11:04 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 19 Aug 2005 13:11:04 -0500 Subject: [Wtr-general] installer issues In-Reply-To: <4305DCB5.10500@gmail.com> References: <4305D790.2050102@gmail.com> <430590ad.02403ef1.5fdf.ffffd741@mx.gmail.com> <4305D790.2050102@gmail.com> Message-ID: <5.1.0.14.2.20050819130936.01fbccc8@127.0.0.1> At 08:20 AM 8/19/2005, Jeff Wood wrote: >Ok, I looked at that stuff ... and unfortunately ... It looks like this >tutorial is meant as a day-long kinda class ... I only have 1-2 hours ... > >So, I'm going to include documentation on getting Ruby & WATiR installed >under Windows ... And I'm going to show them irb and doing live testing >with it. as well as using the Test::Unit framework. > >I'll do some simple tests of some of the web-based interfaces around the >company. There are also some slide decks in there you may want to use. And more here: http://members.shaw.ca/paul_rogers/index.html _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Fri Aug 19 14:12:02 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 19 Aug 2005 13:12:02 -0500 Subject: [Wtr-general] need help understanding "focus" error In-Reply-To: <20050819113741.656f9375@localhost.localdomain> References: <5.1.0.14.2.20050818235445.01fb8830@127.0.0.1> <5.1.0.14.2.20050818161130.03038940@127.0.0.1> <20050818162322.5ef5ebf8@localhost.localdomain> <5.1.0.14.2.20050818161130.03038940@127.0.0.1> <5.1.0.14.2.20050818235445.01fb8830@127.0.0.1> Message-ID: <5.1.0.14.2.20050819131125.02fd9dd0@127.0.0.1> At 10:37 AM 8/19/2005, Warren Pollans wrote: >Thanks - that explains a lot > >On or about Thu, 18 Aug 2005 23:56:39 -0500 >Bret Pettichord allegedly wrote: > > > At 05:07 PM 8/18/2005, Warren Pollans wrote: > > >That works - but why doesn't the other work? > > > > The object reference you stored becomes stale when a page loads or > > reloads. The same thing will happen to the value= method. And, like i reported last night, this annoying behavior will be fixed in 1.5. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Fri Aug 19 14:27:05 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 19 Aug 2005 13:27:05 -0500 Subject: [Wtr-general] finding text in a cell that contains a specified image? In-Reply-To: <593b9ae8050819104745879a6c@mail.gmail.com> References: <20050819115743.183cd83b@localhost.localdomain> <593b9ae8050819091663528ab3@mail.gmail.com> <593b9ae805081909333cfb2fce@mail.gmail.com> Message-ID: <5.1.0.14.2.20050819131402.02861a20@127.0.0.1> At 12:47 PM 8/19/2005, Shao Kang Tat wrote: >So I'm assuming Watir will always start at index 0 when using .times >do|x|is that right? Would it be possible to make watir Know what >iscalling .times so that it can start at a different index - in thiscase, >tables? I actually do use .times do|x| in some cases but Inever tried >with tables until now because I assumed it would start atindex 0. >Shao Ruby always starts at index 0. We made a big mistake in designing Watir and used one-based indexing. The problems you are running into are consequences of our design error. For example, ie.table(:name, 'foo')[2][3].text is the same as ie.table(:name, 'foo').to_a[1][2] This is because the first is 'watir' and the second is 'ruby', but we realize that everyday users will never be likely to figure this out. We've discussed changing Watir to use zero-based indexing, but are concerned about compatability. Paul discussed this in a recent email. Comments? Anyone opposed to a switch? Bret _____________________ Bret Pettichord www.pettichord.com From jkohl at telusplanet.net Fri Aug 19 14:37:26 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Fri, 19 Aug 2005 12:37:26 -0600 Subject: [Wtr-general] finding text in a cell that contains aspecified image? In-Reply-To: <5.1.0.14.2.20050819131402.02861a20@127.0.0.1> Message-ID: <20050819183803.DXYQ26307.priv-edmwes26.telusplanet.net@tintin> I prefer 0-based counting, but I don't have a bunch of tests I'm relying on that use indexes like others might. For me, I find it hard to explain 0-based counting in data structures like arrays to beginners, and then have to change gears and tell them that when they use an index, that it is 1-based. There are pros and cons to both, but I think when programming in terms of 0-based. Actually, programming has completely ruined my mental model for 1-based counting in general. :) This is probably something beginners have less of a problem with at first than people with programming backgrounds, but the inconsistency is what I think feels wrong. -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret > Pettichord > Sent: August 19, 2005 12:27 PM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] finding text in a cell that > contains aspecified image? > > At 12:47 PM 8/19/2005, Shao Kang Tat wrote: > >So I'm assuming Watir will always start at index 0 when using .times > >do|x|is that right? Would it be possible to make watir Know what > >iscalling .times so that it can start at a different index - in > >thiscase, tables? I actually do use .times do|x| in some cases but > >Inever tried with tables until now because I assumed it > would start atindex 0. > >Shao > > Ruby always starts at index 0. > > We made a big mistake in designing Watir and used one-based > indexing. The problems you are running into are consequences > of our design error. > > For example, > > ie.table(:name, 'foo')[2][3].text > > is the same as > > ie.table(:name, 'foo').to_a[1][2] > > This is because the first is 'watir' and the second is > 'ruby', but we realize that everyday users will never be > likely to figure this out. > > We've discussed changing Watir to use zero-based indexing, > but are concerned about compatability. Paul discussed this in > a recent email. > Comments? Anyone opposed to a switch? > > Bret > > > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From bret at pettichord.com Fri Aug 19 15:07:14 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 19 Aug 2005 14:07:14 -0500 Subject: [Wtr-general] finding text in a cell that contains aspecified image? In-Reply-To: <20050819183803.DXYQ26307.priv-edmwes26.telusplanet.net@tin tin> References: <5.1.0.14.2.20050819131402.02861a20@127.0.0.1> Message-ID: <5.1.0.14.2.20050819140505.03042078@127.0.0.1> Should i read this as +1 for changing to 0-based indexing in watir? For both (:index, n) as well as table indexing? At 01:37 PM 8/19/2005, Jonathan Kohl wrote: >I prefer 0-based counting, but I don't have a bunch of tests I'm relying on >that use indexes like others might. > >For me, I find it hard to explain 0-based counting in data structures like >arrays to beginners, and then have to change gears and tell them that when >they use an index, that it is 1-based. There are pros and cons to both, but >I think when programming in terms of 0-based. Actually, programming has >completely ruined my mental model for 1-based counting in general. :) > >This is probably something beginners have less of a problem with at first >than people with programming backgrounds, but the inconsistency is what I >think feels wrong. > >-Jonathan > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret > > Pettichord > > Sent: August 19, 2005 12:27 PM > > To: wtr-general at rubyforge.org > > Subject: Re: [Wtr-general] finding text in a cell that > > contains aspecified image? > > > > At 12:47 PM 8/19/2005, Shao Kang Tat wrote: > > >So I'm assuming Watir will always start at index 0 when using .times > > >do|x|is that right? Would it be possible to make watir Know what > > >iscalling .times so that it can start at a different index - in > > >thiscase, tables? I actually do use .times do|x| in some cases but > > >Inever tried with tables until now because I assumed it > > would start atindex 0. > > >Shao > > > > Ruby always starts at index 0. > > > > We made a big mistake in designing Watir and used one-based > > indexing. The problems you are running into are consequences > > of our design error. > > > > For example, > > > > ie.table(:name, 'foo')[2][3].text > > > > is the same as > > > > ie.table(:name, 'foo').to_a[1][2] > > > > This is because the first is 'watir' and the second is > > 'ruby', but we realize that everyday users will never be > > likely to figure this out. > > > > We've discussed changing Watir to use zero-based indexing, > > but are concerned about compatability. Paul discussed this in > > a recent email. > > Comments? Anyone opposed to a switch? > > > > Bret > > > > > > > > _____________________ > > Bret Pettichord > > www.pettichord.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 _____________________ Bret Pettichord www.pettichord.com From jkohl at telusplanet.net Fri Aug 19 15:09:08 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Fri, 19 Aug 2005 13:09:08 -0600 Subject: [Wtr-general] finding text in a cell that containsaspecified image? In-Reply-To: <5.1.0.14.2.20050819140505.03042078@127.0.0.1> Message-ID: <20050819190945.RPUO18908.priv-edtnes56.telusplanet.net@tintin> Consistent 0-based counting is my preference. > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret > Pettichord > Sent: August 19, 2005 1:07 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] finding text in a cell that > containsaspecified image? > > Should i read this as +1 for changing to 0-based indexing in > watir? For both (:index, n) as well as table indexing? > > At 01:37 PM 8/19/2005, Jonathan Kohl wrote: > >I prefer 0-based counting, but I don't have a bunch of tests I'm > >relying on that use indexes like others might. > > > >For me, I find it hard to explain 0-based counting in data > structures > >like arrays to beginners, and then have to change gears and > tell them > >that when they use an index, that it is 1-based. There are pros and > >cons to both, but I think when programming in terms of 0-based. > >Actually, programming has completely ruined my mental model > for 1-based > >counting in general. :) > > > >This is probably something beginners have less of a problem with at > >first than people with programming backgrounds, but the > inconsistency > >is what I think feels wrong. > > > >-Jonathan > > > > > -----Original Message----- > > > From: wtr-general-bounces at rubyforge.org > > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret > > > Pettichord > > > Sent: August 19, 2005 12:27 PM > > > To: wtr-general at rubyforge.org > > > Subject: Re: [Wtr-general] finding text in a cell that contains > > > aspecified image? > > > > > > At 12:47 PM 8/19/2005, Shao Kang Tat wrote: > > > >So I'm assuming Watir will always start at index 0 when using > > > >.times > > > >do|x|is that right? Would it be possible to make watir Know what > > > >iscalling .times so that it can start at a different index - in > > > >thiscase, tables? I actually do use .times do|x| in > some cases but > > > >Inever tried with tables until now because I assumed it > > > would start atindex 0. > > > >Shao > > > > > > Ruby always starts at index 0. > > > > > > We made a big mistake in designing Watir and used one-based > > > indexing. The problems you are running into are > consequences of our > > > design error. > > > > > > For example, > > > > > > ie.table(:name, 'foo')[2][3].text > > > > > > is the same as > > > > > > ie.table(:name, 'foo').to_a[1][2] > > > > > > This is because the first is 'watir' and the second is > 'ruby', but > > > we realize that everyday users will never be likely to > figure this > > > out. > > > > > > We've discussed changing Watir to use zero-based > indexing, but are > > > concerned about compatability. Paul discussed this in a recent > > > email. > > > Comments? Anyone opposed to a switch? > > > > > > Bret > > > > > > > > > > > > _____________________ > > > Bret Pettichord > > > www.pettichord.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 > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From shaorobics at gmail.com Fri Aug 19 15:22:33 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Fri, 19 Aug 2005 15:22:33 -0400 Subject: [Wtr-general] finding text in a cell that containsaspecified image? In-Reply-To: <20050819190945.RPUO18908.priv-edtnes56.telusplanet.net@tintin> References: <5.1.0.14.2.20050819140505.03042078@127.0.0.1> <20050819190945.RPUO18908.priv-edtnes56.telusplanet.net@tintin> Message-ID: <593b9ae8050819122248b3bb08@mail.gmail.com> I can't decide if it's a +1 or -1 yet..But here's what I have to say I tend to like 0-based, since it's something that's taught to you as a programmer. So when I first worked with tables and thought table[0][0] would give me the first cell (which errored out..it kinda threw me off a bit). On one hand it makes sense (table wise) to start indexing at row 1 and column 1, on the other hand it's like a 2D array which should have the same indexing as any other array, starting at 0. I guess having it 0-based will prevent any other incompatibilities such as the .times do|x| as above. Having said that, my indecisiveness is now leaning more towards +1...although it might mean some script changes to reflect my table *for loops* starting at index 1 :) Shao On 8/19/05, Jonathan Kohl wrote: > Consistent 0-based counting is my preference. > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret > > Pettichord > > Sent: August 19, 2005 1:07 PM > > To: wtr-general at rubyforge.org > > Subject: RE: [Wtr-general] finding text in a cell that > > containsaspecified image? > > > > Should i read this as +1 for changing to 0-based indexing in > > watir? For both (:index, n) as well as table indexing? > > > > At 01:37 PM 8/19/2005, Jonathan Kohl wrote: > > >I prefer 0-based counting, but I don't have a bunch of tests I'm > > >relying on that use indexes like others might. > > > > > >For me, I find it hard to explain 0-based counting in data > > structures > > >like arrays to beginners, and then have to change gears and > > tell them > > >that when they use an index, that it is 1-based. There are pros and > > >cons to both, but I think when programming in terms of 0-based. > > >Actually, programming has completely ruined my mental model > > for 1-based > > >counting in general. :) > > > > > >This is probably something beginners have less of a problem with at > > >first than people with programming backgrounds, but the > > inconsistency > > >is what I think feels wrong. > > > > > >-Jonathan > > > > > > > -----Original Message----- > > > > From: wtr-general-bounces at rubyforge.org > > > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret > > > > Pettichord > > > > Sent: August 19, 2005 12:27 PM > > > > To: wtr-general at rubyforge.org > > > > Subject: Re: [Wtr-general] finding text in a cell that contains > > > > aspecified image? > > > > > > > > At 12:47 PM 8/19/2005, Shao Kang Tat wrote: > > > > >So I'm assuming Watir will always start at index 0 when using > > > > >.times > > > > >do|x|is that right? Would it be possible to make watir Know what > > > > >iscalling .times so that it can start at a different index - in > > > > >thiscase, tables? I actually do use .times do|x| in > > some cases but > > > > >Inever tried with tables until now because I assumed it > > > > would start atindex 0. > > > > >Shao > > > > > > > > Ruby always starts at index 0. > > > > > > > > We made a big mistake in designing Watir and used one-based > > > > indexing. The problems you are running into are > > consequences of our > > > > design error. > > > > > > > > For example, > > > > > > > > ie.table(:name, 'foo')[2][3].text > > > > > > > > is the same as > > > > > > > > ie.table(:name, 'foo').to_a[1][2] > > > > > > > > This is because the first is 'watir' and the second is > > 'ruby', but > > > > we realize that everyday users will never be likely to > > figure this > > > > out. > > > > > > > > We've discussed changing Watir to use zero-based > > indexing, but are > > > > concerned about compatability. Paul discussed this in a recent > > > > email. > > > > Comments? Anyone opposed to a switch? > > > > > > > > Bret > > > > > > > > > > > > > > > > _____________________ > > > > Bret Pettichord > > > > www.pettichord.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 > > > > _____________________ > > Bret Pettichord > > www.pettichord.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 > From jeff.darklight at gmail.com Fri Aug 19 16:07:23 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Fri, 19 Aug 2005 13:07:23 -0700 Subject: [Wtr-general] installer issues In-Reply-To: <5.1.0.14.2.20050819130936.01fbccc8@127.0.0.1> References: <430590ad.02403ef1.5fdf.ffffd741@mx.gmail.com> <4305D790.2050102@gmail.com> <4305DCB5.10500@gmail.com> <5.1.0.14.2.20050819130936.01fbccc8@127.0.0.1> Message-ID: Bret, Thank you for the link to Paul's site ... He's got some good stuff in his watir-5 pdf copy of his presentation... So, I'll use that as a basis, but I'm still going to do the actual demo against one of the in-house web apps ... that way people get more buy-in ... Thanks so much ... Also, I do have a question about the docs for WATiR ... I haven't found a good place that lists all of the "how" criteria for the different objects... If there's anything good for this somewhere, please let me know ... Paul's pdf had a good start on this ... j. On 8/19/05, Bret Pettichord wrote: > At 08:20 AM 8/19/2005, Jeff Wood wrote: > >Ok, I looked at that stuff ... and unfortunately ... It looks like this > >tutorial is meant as a day-long kinda class ... I only have 1-2 hours ... > > > >So, I'm going to include documentation on getting Ruby & WATiR installed > >under Windows ... And I'm going to show them irb and doing live testing > >with it. as well as using the Test::Unit framework. > > > >I'll do some simple tests of some of the web-based interfaces around the > >company. > > > There are also some slide decks in there you may want to use. > > And more here: http://members.shaw.ca/paul_rogers/index.html > > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "So long, and thanks for all the fish" Jeff Wood From jeff.darklight at gmail.com Fri Aug 19 16:15:56 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Fri, 19 Aug 2005 13:15:56 -0700 Subject: [Wtr-general] finding text in a cell that containsaspecified image? In-Reply-To: <593b9ae8050819122248b3bb08@mail.gmail.com> References: <5.1.0.14.2.20050819140505.03042078@127.0.0.1> <20050819190945.RPUO18908.priv-edtnes56.telusplanet.net@tintin> <593b9ae8050819122248b3bb08@mail.gmail.com> Message-ID: I'm strongly FOR consistency... don't surprise people like this did me... That's bad when you are trying to get experienced programmers to use this. j. On 8/19/05, Shao Kang Tat wrote: > I can't decide if it's a +1 or -1 yet..But here's what I have to say > > I tend to like 0-based, since it's something that's taught to you as a > programmer. So when I first worked with tables and thought > table[0][0] would give me the first cell (which errored out..it kinda > threw me off a bit). On one hand it makes sense (table wise) to start > indexing at row 1 and column 1, on the other hand it's like a 2D array > which should have the same indexing as any other array, starting at 0. > > I guess having it 0-based will prevent any other incompatibilities > such as the .times do|x| as above. Having said that, my > indecisiveness is now leaning more towards +1...although it might mean > some script changes to reflect my table *for loops* starting at index > 1 :) > > Shao > > > > > On 8/19/05, Jonathan Kohl wrote: > > Consistent 0-based counting is my preference. > > > > > -----Original Message----- > > > From: wtr-general-bounces at rubyforge.org > > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret > > > Pettichord > > > Sent: August 19, 2005 1:07 PM > > > To: wtr-general at rubyforge.org > > > Subject: RE: [Wtr-general] finding text in a cell that > > > containsaspecified image? > > > > > > Should i read this as +1 for changing to 0-based indexing in > > > watir? For both (:index, n) as well as table indexing? > > > > > > At 01:37 PM 8/19/2005, Jonathan Kohl wrote: > > > >I prefer 0-based counting, but I don't have a bunch of tests I'm > > > >relying on that use indexes like others might. > > > > > > > >For me, I find it hard to explain 0-based counting in data > > > structures > > > >like arrays to beginners, and then have to change gears and > > > tell them > > > >that when they use an index, that it is 1-based. There are pros and > > > >cons to both, but I think when programming in terms of 0-based. > > > >Actually, programming has completely ruined my mental model > > > for 1-based > > > >counting in general. :) > > > > > > > >This is probably something beginners have less of a problem with at > > > >first than people with programming backgrounds, but the > > > inconsistency > > > >is what I think feels wrong. > > > > > > > >-Jonathan > > > > > > > > > -----Original Message----- > > > > > From: wtr-general-bounces at rubyforge.org > > > > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret > > > > > Pettichord > > > > > Sent: August 19, 2005 12:27 PM > > > > > To: wtr-general at rubyforge.org > > > > > Subject: Re: [Wtr-general] finding text in a cell that contains > > > > > aspecified image? > > > > > > > > > > At 12:47 PM 8/19/2005, Shao Kang Tat wrote: > > > > > >So I'm assuming Watir will always start at index 0 when using > > > > > >.times > > > > > >do|x|is that right? Would it be possible to make watir Know what > > > > > >iscalling .times so that it can start at a different index - in > > > > > >thiscase, tables? I actually do use .times do|x| in > > > some cases but > > > > > >Inever tried with tables until now because I assumed it > > > > > would start atindex 0. > > > > > >Shao > > > > > > > > > > Ruby always starts at index 0. > > > > > > > > > > We made a big mistake in designing Watir and used one-based > > > > > indexing. The problems you are running into are > > > consequences of our > > > > > design error. > > > > > > > > > > For example, > > > > > > > > > > ie.table(:name, 'foo')[2][3].text > > > > > > > > > > is the same as > > > > > > > > > > ie.table(:name, 'foo').to_a[1][2] > > > > > > > > > > This is because the first is 'watir' and the second is > > > 'ruby', but > > > > > we realize that everyday users will never be likely to > > > figure this > > > > > out. > > > > > > > > > > We've discussed changing Watir to use zero-based > > > indexing, but are > > > > > concerned about compatability. Paul discussed this in a recent > > > > > email. > > > > > Comments? Anyone opposed to a switch? > > > > > > > > > > Bret > > > > > > > > > > > > > > > > > > > > _____________________ > > > > > Bret Pettichord > > > > > www.pettichord.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 > > > > > > _____________________ > > > Bret Pettichord > > > www.pettichord.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 > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "So long, and thanks for all the fish" Jeff Wood From joe.yakich at eplanservices.com Fri Aug 19 17:39:15 2005 From: joe.yakich at eplanservices.com (Joe Yakich) Date: Fri, 19 Aug 2005 15:39:15 -0600 Subject: [Wtr-general] Need advice on assert, module/class setup, and Watir Message-ID: <20050819213929.75696EBD64@mail4.firstlink.com> Gurus, I'm testing a fairly complicated web application. We have been using Canoo WebTest for GUI testing, but we decided to try out Watir and we've been very pleased with it so far. Because of the complexity, I wanted to have a layer (a library or API -type level) containing Watir calls and then have the test scripts themselves require the library classes. (Note that I am not wedded to classes if they are inappropriate; modules would be just fine.) I had hoped to insulate most of the Watir calls in the library, partly to localize changes if the application under test changes, partly to make writing the actual scripts easier for others, and partly to make the logic of the actual test case more apparent. Anyway, my primary problem is this: I thought it would be convenient to put assert() calls in the library class (Login.rb, below), but when I do so and run the test script (test_login.rb, below), those assertions are not counted up when the test script runs, although if I introduce a failure, the failure count does include the error. That is, I see this: 1 tests, 0 assertions, 0 failures, 0 errors [ when the test script passes] 1 tests, 0 assertions, 1 failures, 0 errors [ when the test script fails ] when I was expecting this: 1 tests, 1 assertions, 0 failures, 0 errors [ when the test script passes] 1 tests, 1 assertions, 1 failures, 0 errors [ when the test script fails ] Directly inheriting Test::Unit::TestCase in my library didn't seem to work, either, as then I get messages like "No tests were specified." Secondarily, if anyone has suggestions on how to better set up a similar library/script hierarchy, I would love to hear them. I'm new to Ruby and Watir, so suggestions about coding style, naming, etc. are welcomed as well. Code follows (note that I edited the code for brevity and that it's possible that it won't actually run, but I thought it was sufficient for illustration): ################################################################## # test_login.rb # The actual test script (edited for brevity) ################################################################## $:.push("../../../lib") require 'Login/Login' require 'watir' require 'test/unit' class SimpleLogin < Test::Unit::TestCase include Watir @username = 'username' @password = 'password' @url = 'http://www.fake_url.com/login_page.html' def test_login ie = IE.new l = Login.new() l.login(ie, @url, @username, @password) end end ################################################################## # Login.rb # The Login class (edited for brevity) ################################################################## class Login require 'test/unit' require 'test/unit/assertions' require 'watir' include Watir include Test::Unit::Assertions def login(ie, url, username, password) ie.goto(url) ie.link(:text, "site login").click ie.text_field(:name, "username").set(username) ie.text_field(:name, "password").set(password) ie.button(:name, 'submitBtn').click assert(ie.contains_text("Welcome #{username}")) end end ############################################################################ ########################## # End of code ############################################################################ ########################## Thank you! Joe -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050819/9554b40c/attachment.html From bret at pettichord.com Fri Aug 19 18:47:16 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 19 Aug 2005 17:47:16 -0500 Subject: [Wtr-general] installer issues In-Reply-To: References: <5.1.0.14.2.20050819130936.01fbccc8@127.0.0.1> <430590ad.02403ef1.5fdf.ffffd741@mx.gmail.com> <4305D790.2050102@gmail.com> <4305DCB5.10500@gmail.com> <5.1.0.14.2.20050819130936.01fbccc8@127.0.0.1> Message-ID: <5.1.0.14.2.20050819174038.0302ad40@127.0.0.1> At 03:07 PM 8/19/2005, Jeff Wood wrote: >So, I'll use that as a basis, but I'm still going to do the actual >demo against one of the in-house web apps ... that way people get more >buy-in ... I completely agree. Also, I do have a question about the docs for WATiR ... I haven't >found a good place that lists all of the "how" criteria for the >different objects... > >If there's anything good for this somewhere, please let me know ... The Watir API Doc, AKA the RDOC, is the prolly the best place for this. Eventually, i'd liek to allow any property of an element (e.g. title, class_name, text...) be able to be used to specify it. Bret _____________________ Bret Pettichord www.pettichord.com From tuyet.ctn at mscibarra.com Fri Aug 19 19:06:00 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Fri, 19 Aug 2005 16:06:00 -0700 Subject: [Wtr-general] Sleep statements and Attach Message-ID: The code below, for example, is a typical thing that I have to do in our application. 1) Click on an icon to launch the "Select Portfolio" window 2) The problem is that it may take the "Select Portfolio" window a little while to load, so I have to add a Sleep parameter otherwise, the "attach" statement will fail because it can't find the title 3) Is there a way to do this without using the Sleep statements? 4) Also once I am done with this Select Portfolio, I close it, and need to reconnect back to the main window of the application to continue with the script and there again I have to put a Sleep statement. 5) Any help/suggestion you have to handle this is appreciated ie.frame("main").frame(:name, "context_bar").image(:src, /icon_open.gif/).click sleep 3 ie = Watir::IE.attach(:title, "Select Portfolio") #Reconnect back to main frame sleep 3 ie = Watir::IE.attach(:url, "https://test.com/araneae/app") -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050819/9aec04aa/attachment.html From tuyet.ctn at mscibarra.com Fri Aug 19 19:18:21 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Fri, 19 Aug 2005 16:18:21 -0700 Subject: [Wtr-general] Set Debugging Breakpoint in WATIR/Ruby script? Message-ID: Is there a way to insert a command inside the ruby script to stop it's execution so you can debug or set a breakpoint on a certain line of code. Kind of like the way Segue's SilkTest allows you to run in debug mode with all the variables and context available? It would be great if the script can execute up to a certain line and then launches irb for debugging. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050819/3a21d55a/attachment.html From paul.rogers at shaw.ca Fri Aug 19 19:30:33 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 19 Aug 2005 17:30:33 -0600 Subject: [Wtr-general] finding text in a cell that contains a specifiedimage? In-Reply-To: Message-ID: <00a801c5a515$fe965b10$6600a8c0@NewDell> I had a nedd to write something like this a while back. I was intending to do a generic thing, maybe like ie.table(:index,2).find_cell_that_contains(:image , {:src => /mypic.gif/} ) In the end I did something different. But I think this would be a useful addition. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood Sent: 19 August 2005 10:29 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] finding text in a cell that contains a specifiedimage? I know it's a user preference game, but it's much more "the ruby way" to stay away from "for ... in ... " ... also, your range starts @ 1 ... what about row 0 ? Oh, and exists? is deprecated (1.4), you should get used to exist? how about, t.row_count.times do |i| theCell = t[i].find { |c| c.image( :src, xxx ).exist? } return theCell.text.strip if theCell end anyways, comments are welcome. j. On 8/19/05, Shao Kang Tat wrote: > I'm doing something similar. But I'm not dealing with images, rather > links and texts, so I'd imagine the code would be similar to the one > I"m using and would work: > > > ie.tables.each do|t| # since you don't have ID's, look at every table > for i in 1..t.row_count # for every row in this table > > # for every column in this row, look at its contents > t[i].each{|c| if c.image(:src, xxx).exists? # if true, this > is your cell > return c.text.strip > } > end > end > > > > > > > > On 8/19/05, Warren Pollans wrote: > > Hello again, > > > > Could some please point me to a way of finding text in a cell that > > contains a specified image? There are no ids available for the > > table, row or cell :-( - and there are several tables on the page. > > There is only one cell (at a time) that contains this particular > > image - the text in the cell is displaying status that I'm trying to > > capture. This status msg can occur in one of four different tables > > - depending on which form on the page is submitted - the same image > > is used in all cases. > > > > I think I want to walk through the DOM looking for a td element that > > has "img src=xxx" - I imagine there's a simpler watir way :-) > > > > Thanks, > > > > Warren > > _______________________________________________ > > 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 > -- "So long, and thanks for all the fish" Jeff Wood _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Fri Aug 19 19:26:02 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 19 Aug 2005 17:26:02 -0600 Subject: [Wtr-general] finding text in a cell that containsaspecified image? In-Reply-To: <20050819190945.RPUO18908.priv-edtnes56.telusplanet.net@tintin> Message-ID: <00a701c5a515$5d26d750$6600a8c0@NewDell> I orinally thought we could add a switch to watir so people could decide how they wanted to use this, and so we could get 0 based stuff in with out breaking existing code. This to me seems like too much work now. I suggest we go with 0 based. Even though Im usually against major changes like this for fear of wrecking existing tests, I think this is an important step for watir, and should be done soon. +1 for me Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jonathan Kohl Sent: 19 August 2005 13:09 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] finding text in a cell that containsaspecified image? Consistent 0-based counting is my preference. > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret > Pettichord > Sent: August 19, 2005 1:07 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] finding text in a cell that > containsaspecified image? > > Should i read this as +1 for changing to 0-based indexing in > watir? For both (:index, n) as well as table indexing? > > At 01:37 PM 8/19/2005, Jonathan Kohl wrote: > >I prefer 0-based counting, but I don't have a bunch of tests I'm > >relying on that use indexes like others might. > > > >For me, I find it hard to explain 0-based counting in data > structures > >like arrays to beginners, and then have to change gears and > tell them > >that when they use an index, that it is 1-based. There are pros and > >cons to both, but I think when programming in terms of 0-based. > >Actually, programming has completely ruined my mental model > for 1-based > >counting in general. :) > > > >This is probably something beginners have less of a problem with at > >first than people with programming backgrounds, but the > inconsistency > >is what I think feels wrong. > > > >-Jonathan > > > > > -----Original Message----- > > > From: wtr-general-bounces at rubyforge.org > > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret > > > Pettichord > > > Sent: August 19, 2005 12:27 PM > > > To: wtr-general at rubyforge.org > > > Subject: Re: [Wtr-general] finding text in a cell that contains > > > aspecified image? > > > > > > At 12:47 PM 8/19/2005, Shao Kang Tat wrote: > > > >So I'm assuming Watir will always start at index 0 when using > > > >.times > > > >do|x|is that right? Would it be possible to make watir Know what > > > >iscalling .times so that it can start at a different index - in > > > >thiscase, tables? I actually do use .times do|x| in > some cases but > > > >Inever tried with tables until now because I assumed it > > > would start atindex 0. > > > >Shao > > > > > > Ruby always starts at index 0. > > > > > > We made a big mistake in designing Watir and used one-based > > > indexing. The problems you are running into are > consequences of our > > > design error. > > > > > > For example, > > > > > > ie.table(:name, 'foo')[2][3].text > > > > > > is the same as > > > > > > ie.table(:name, 'foo').to_a[1][2] > > > > > > This is because the first is 'watir' and the second is > 'ruby', but > > > we realize that everyday users will never be likely to > figure this > > > out. > > > > > > We've discussed changing Watir to use zero-based > indexing, but are > > > concerned about compatability. Paul discussed this in a recent > > > email. > > > Comments? Anyone opposed to a switch? > > > > > > Bret > > > > > > > > > > > > _____________________ > > > Bret Pettichord > > > www.pettichord.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 > > _____________________ > Bret Pettichord > www.pettichord.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 From mkelly at elevenwireless.com Fri Aug 19 19:44:02 2005 From: mkelly at elevenwireless.com (Michael Kelly) Date: Fri, 19 Aug 2005 16:44:02 -0700 Subject: [Wtr-general] Set Debugging Breakpoint in WATIR/Ruby script? Message-ID: <640C9D8653C87C44AB5F00F91A91FE210D4B86@edison.elevenwireless.com> Quoted from Alex Verhovsky: there is this RubyForge project called 'breakpoint', http://ruby-breakpoint.rubyforge.org/wiki/wiki.pl?HomePage, which opens an IRB session inside a running Ruby program. With it, you can do something like test/watir/long_convoluted_test_script.rb require 'watir' include Watir config = load_configuration database = connect_to_database ie = IE.start('http:/foo.bar.com/login') ie.text_field(:id, 'username').set_value('me') ... ... ... # somewhere in the middle require 'breakpoint' breakpoint ... and this will execute the script until breakpoint and then open an IRB session in which the actual values of ie, configuration, database are available and even can be modified. As well as any other variable visible from the breakpoint location. Exiting the IRB continues the program. This is often the easiest way to get to the state that you want to play with. Besides, you can do conditional breakpoints breakpoint if Bottom line: don't leave home without it. Alex _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -- Michael Kelly Sr. Software Engineer Eleven Wireless Inc. - The Possibilities are Wireless http://www.elevenwireless.com -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tuyet Cong-Ton-Nu Sent: Friday, August 19, 2005 4:18 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Set Debugging Breakpoint in WATIR/Ruby script? Is there a way to insert a command inside the ruby script to stop it's execution so you can debug or set a breakpoint on a certain line of code. Kind of like the way Segue's SilkTest allows you to run in debug mode with all the variables and context available? It would be great if the script can execute up to a certain line and then launches irb for debugging. From paul.rogers at shaw.ca Fri Aug 19 19:23:25 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 19 Aug 2005 17:23:25 -0600 Subject: [Wtr-general] Set Debugging Breakpoint in WATIR/Ruby script? In-Reply-To: Message-ID: <00a201c5a514$ff8914f0$6600a8c0@NewDell> there is the breakpoint library. Its very powerful. Ive tried it - not to debug a real application just to try it out http://rubyforge.org/projects/ruby-breakpoint/ -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tuyet Cong-Ton-Nu Sent: 19 August 2005 17:18 To: wtr-general at rubyforge.org Subject: [Wtr-general] Set Debugging Breakpoint in WATIR/Ruby script? Is there a way to insert a command inside the ruby script to stop it's execution so you can debug or set a breakpoint on a certain line of code. Kind of like the way Segue's SilkTest allows you to run in debug mode with all the variables and context available? It would be great if the script can execute up to a certain line and then launches irb for debugging. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050819/8cc7253b/attachment.html From tuyet.ctn at mscibarra.com Fri Aug 19 21:16:30 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Fri, 19 Aug 2005 18:16:30 -0700 Subject: [Wtr-general] Set Debugging Breakpoint in WATIR/Ruby script? Message-ID: Oh, GREAT. I will try it out and let you know! Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050819/37d398b5/attachment.html From zeljko.filipin at gmail.com Sat Aug 20 04:46:52 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Sat, 20 Aug 2005 10:46:52 +0200 Subject: [Wtr-general] Sleep statements and Attach In-Reply-To: Message-ID: <4306edd4.09c4a489.26c7.ffffda81@mx.gmail.com> I have the same problem, but I have not found the solution yet. Zeljko _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tuyet Cong-Ton-Nu Sent: Saturday, August 20, 2005 1:06 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Sleep statements and Attach The code below, for example, is a typical thing that I have to do in our application. 1) Click on an icon to launch the "Select Portfolio" window 2) The problem is that it may take the "Select Portfolio" window a little while to load, so I have to add a Sleep parameter otherwise, the "attach" statement will fail because it can't find the title 3) Is there a way to do this without using the Sleep statements? 4) Also once I am done with this Select Portfolio, I close it, and need to reconnect back to the main window of the application to continue with the script and there again I have to put a Sleep statement. 5) Any help/suggestion you have to handle this is appreciated ie.frame("main").frame(:name, "context_bar").image(:src, /icon_open.gif/).click sleep 3 ie = Watir::IE.attach(:title, "Select Portfolio") #Reconnect back to main frame sleep 3 ie = Watir::IE.attach(:url, "https://test.com/araneae/app") -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050820/83e74920/attachment.html From shaorobics at gmail.com Sat Aug 20 13:04:47 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Sat, 20 Aug 2005 13:04:47 -0400 Subject: [Wtr-general] Need advice on assert, module/class setup, and Watir In-Reply-To: <20050819213929.75696EBD64@mail4.firstlink.com> References: <20050819213929.75696EBD64@mail4.firstlink.com> Message-ID: <593b9ae805082010042de73fd@mail.gmail.com> Here's my guess...try this: class attr_reader :username, :password, :url def initialize @username = 'username' @password = 'password' @url = 'http://www.fake_url.com/login_page.html' end def.... l.login(ie, @url, @username, @password) end end From bret at pettichord.com Fri Aug 19 20:11:48 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 19 Aug 2005 19:11:48 -0500 Subject: [Wtr-general] Need advice on assert, module/class setup, and Watir In-Reply-To: <20050819213929.75696EBD64@mail4.firstlink.com> Message-ID: <5.1.0.14.2.20050819190801.0306d710@127.0.0.1> I suggest that you put your library methods in a Module. Thus: # library.rb module MyLibrary def my_library_method(arg) # code... end end # tests.rb require 'test/unit' require 'library.rb' class TC1 << Test::Unit::TestCase include MyLibrary def test_method my_library_method arg # more code end end At 04:39 PM 8/19/2005, Joe Yakich wrote: >Gurus, > > > >I m testing a fairly complicated web application. We have been using Canoo >WebTest for GUI testing, but we decided to try out Watir and we ve been >very pleased with it so far. > > > >Because of the complexity, I wanted to have a layer (a library or API type >level) containing Watir calls and then have the test scripts themselves >require the library classes. (Note that I am not wedded to classes if they >are inappropriate; modules would be just fine.) I had hoped to insulate >most of the Watir calls in the library, partly to localize changes if the >application under test changes, partly to make writing the actual scripts >easier for others, and partly to make the logic of the actual test case >more apparent. > > > >Anyway, my primary problem is this: I thought it would be convenient to >put assert() calls in the library class (Login.rb, below), but when I do >so and run the test script (test_login.rb, below), those assertions are >not counted up when the test script runs, although if I introduce >a failure, the failure count does include the error. That is, I see this: > > > >1 tests, 0 assertions, 0 failures, 0 errors [ when the test script passes] > >1 tests, 0 assertions, 1 failures, 0 errors [ when the test script fails ] > > > >when I was expecting this: > > > >1 tests, 1 assertions, 0 failures, 0 errors [ when the test script passes] > >1 tests, 1 assertions, 1 failures, 0 errors [ when the test script fails ] > > > >Directly inheriting Test::Unit::TestCase in my library didn t seem to >work, either, as then I get messages like No tests were specified. > > > >Secondarily, if anyone has suggestions on how to better set up a similar >library/script hierarchy, I would love to hear them. I m new to Ruby and >Watir, so suggestions about coding style, naming, etc. are welcomed as well. > > > >Code follows (note that I edited the code for brevity and that it s >possible that it won t actually run, but I thought it was sufficient for >illustration): > > > >################################################################## > ># test_login.rb > ># The actual test script (edited for brevity) > >################################################################## > >$:.push("../../../lib") > > > >require 'Login/Login' > >require 'watir' > >require 'test/unit' > > > >class SimpleLogin < Test::Unit::TestCase > > include Watir > > > > @username = 'username' > > @password = 'password' > > @url = 'http://www.fake_url.com/login_page.html' > > > > def test_login > > ie = IE.new > > l = Login.new() > > l.login(ie, @url, @username, @password) > > end > > > >end > > > >################################################################## > ># Login.rb > ># The Login class (edited for brevity) > >################################################################## > >class Login > > > > require 'test/unit' > > require 'test/unit/assertions' > > require 'watir' > > include Watir > > include Test::Unit::Assertions > > > > def login(ie, url, username, password) > > ie.goto(url) > > ie.link(:text, "site login").click > > ie.text_field(:name, "username").set(username) > > ie.text_field(:name, "password").set(password) > > ie.button(:name, 'submitBtn').click > > assert(ie.contains_text("Welcome #{username}")) > > end > > > >end > > > >###################################################################################################### > ># End of code > >###################################################################################################### > > > >Thank you! > > > >Joe >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From shaorobics at gmail.com Sat Aug 20 15:28:45 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Sat, 20 Aug 2005 15:28:45 -0400 Subject: [Wtr-general] Sleep statements and Attach In-Reply-To: <4306edd4.09c4a489.26c7.ffffda81@mx.gmail.com> References: <4306edd4.09c4a489.26c7.ffffda81@mx.gmail.com> Message-ID: <593b9ae80508201228bbfb234@mail.gmail.com> How about starting up autoit in another thread, then have that process infinite loop until it finds the window? Shao From bret at pettichord.com Sat Aug 20 14:03:22 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 20 Aug 2005 13:03:22 -0500 Subject: [Wtr-general] Set Debugging Breakpoint in WATIR/Ruby script? In-Reply-To: Message-ID: <5.1.0.14.2.20050820130256.030865e0@127.0.0.1> I have been told that there is a ruby library called 'breakpoint' that provides this functionality. Bret At 06:18 PM 8/19/2005, Tuyet Cong-Ton-Nu wrote: >Is there a way to insert a command inside the ruby script to stop it s >execution so you can debug or set a breakpoint on a certain line of code. > >Kind of like the way Segue s SilkTest allows you to run in debug mode with >all the variables and context available? > >It would be great if the script can execute up to a certain line and then >launches irb for debugging. >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From jkohl at telusplanet.net Sat Aug 20 17:37:43 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Sat, 20 Aug 2005 15:37:43 -0600 Subject: [Wtr-general] installer issues In-Reply-To: <5.1.0.14.2.20050818232203.012c0df8@127.0.0.1> Message-ID: <20050820213822.RKKF16367.priv-edtnes56.telusplanet.net@tintin> > P.S. Since i teach classes on effective bug reporting, i > thought i might cite the second report below as a particular > good example of a common mistake than many people make in > their bug reports. It is vague on specifics around the actual > error message ("or something to that effect") and long on > guesses as to what the source of the problem might be. To be fair, those were emailed to me by a developer. :) -Jonathan From kingsley at icecode.org Sat Aug 20 19:45:16 2005 From: kingsley at icecode.org (Kingsley) Date: Sun, 21 Aug 2005 00:45:16 +0100 Subject: [Wtr-general] Watir In-Reply-To: <001701c4f1f9$f6933610$6400a8c0@NewDell> Message-ID: <000701c5a5e1$37a91660$0600a8c0@Mercury> Hi I finally started working on Watir after lurking in the shadows for sometime. Hopefully I'll be able to contribute increasingly more as I understand the architecture and vision. Anyway - to start - I checked in a shiny new installer Hope you like it All the best Kingsley From bret at pettichord.com Sat Aug 20 17:39:39 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 20 Aug 2005 16:39:39 -0500 Subject: [Wtr-general] images test fails Message-ID: <5.1.0.14.2.20050820163836.030bc058@127.0.0.1> Paul, Did you forget to check in a change to images1.html? This test is failing in HEAD: Loaded suite d:/workspace/watir/unittests/images_test Started... 1) Error: test_image_click(TC_Images): Watir::Exception::UnknownObjectException: Unable to locate object, using name and disabler_test d:/workspace/watir/unittests/../watir.rb:1768:in `assert_exists' (eval):2:in `disabled' d:/workspace/watir/unittests/images_test.rb:56:in `test_image_click' 7 tests, 86 assertions, 0 failures, 1 errors _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Sat Aug 20 22:39:37 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 20 Aug 2005 21:39:37 -0500 Subject: [Wtr-general] installer issues In-Reply-To: <20050820213822.RKKF16367.priv-edtnes56.telusplanet.net@tin tin> References: <5.1.0.14.2.20050818232203.012c0df8@127.0.0.1> Message-ID: <5.1.0.14.2.20050820213918.030e9c90@127.0.0.1> At 04:37 PM 8/20/2005, Jonathan Kohl wrote: >To be fair, those were emailed to me by a developer. :) Then he has even less of an excuse. heh. _____________________ Bret Pettichord www.pettichord.com From noreply at rubyforge.org Sat Aug 20 15:41:44 2005 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 20 Aug 2005 19:41:44 GMT Subject: [Wtr-general] [ wtr-Feature Requests-2274 ] Standard Tag Attributes ... should all be search criteria... Message-ID: <200508201941.j7KJfiRl000976@rubyforge.org> Feature Requests item #2274, was opened at 2005-08-20 19:41 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=490&aid=2274&group_id=104 Category: General Group: Next Release (example) Status: Open Resolution: None Priority: 3 Submitted By: Jeff Wood (programr) Assigned to: Nobody (None) Summary: Standard Tag Attributes ... should all be search criteria... Initial Comment: I went digging through HTML docs and compiled a list of what seems to be standard attributes that are available on most if not all HTML elements... [Core Attributes] id class title style [Language Attributes] dir lang [Keyboard Attributes] tabindex accesskey I know we have a few of these, but it would definately be nice to have them all. And, as you'd expect, not all of these are supported on all tags, but, I don't think it would hurt to try to use them. j. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=490&aid=2274&group_id=104 From bret at pettichord.com Sun Aug 21 00:56:36 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 20 Aug 2005 23:56:36 -0500 Subject: [Wtr-general] Set Debugging Breakpoint in WATIR/Ruby script? In-Reply-To: <640C9D8653C87C44AB5F00F91A91FE210D4B86@edison.elevenwirele ss.com> Message-ID: <5.1.0.14.2.20050820235538.0310b3e0@127.0.0.1> More advice from Alex: alexey verkhovsky: typing alexey verkhovsky: require 'breakpoint'; breakpoint alexey verkhovsky: is too long alexey verkhovsky: therefore, I usually have something like alexey verkhovsky: def bp require 'breakpoint'; breakpoint; end alexey verkhovsky: somewhere in the ap alexey verkhovsky: this way, inserting a breakpoint is just bp alexey verkhovsky: and it doesnt try to load brerakpoint.rb when it doesnt need to alexey verkhovsky: (it's quite long to load) BTW, i also found out that require 'breakpoint' won't work in IRB. At 06:44 PM 8/19/2005, Michael Kelly wrote: >Quoted from Alex Verhovsky: > >there is this RubyForge project called 'breakpoint', >http://ruby-breakpoint.rubyforge.org/wiki/wiki.pl?HomePage, which opens >an IRB session inside a running Ruby program. With it, you can do >something like >test/watir/long_convoluted_test_script.rb >require 'watir' >include Watir >config = load_configuration >database = connect_to_database >ie = IE.start('http:/foo.bar.com/login') >ie.text_field(:id, 'username').set_value('me') >... >... >... ># somewhere in the middle >require 'breakpoint' >breakpoint >... >and this will execute the script until breakpoint and then open an IRB >session in which the actual values of ie, configuration, database are >available and even can be modified. As well as any other variable >visible from the breakpoint location. Exiting the IRB continues the >program. >This is often the easiest way to get to the state that you want to play >with. Besides, you can do conditional breakpoints >breakpoint if >Bottom line: don't leave home without it. >Alex _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Sun Aug 21 02:20:23 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sun, 21 Aug 2005 01:20:23 -0500 Subject: [Wtr-general] New Installer for Watir 1.4.1 Message-ID: <5.1.0.14.2.20050821011711.0303fa80@127.0.0.1> Watir 1.4.1 is a minor update to 1.4.0 that includes a brand new installer. We think people will find this much easier to use. Thanks to Kingsley for providing it. It is a nullsoft-based installer. http://rubyforge.org/frs/?group_id=104&release_id=2725 Please let us know if there are problems. We also fixed the tests that were failing in 1.4.0. We plan to have a gem for 1.4.1 out very shortly. Bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Sun Aug 21 02:27:43 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sun, 21 Aug 2005 01:27:43 -0500 Subject: [Wtr-general] Sleep statements and Attach In-Reply-To: <4306edd4.09c4a489.26c7.ffffda81@mx.gmail.com> References: Message-ID: <5.1.0.14.2.20050821012141.03042c08@127.0.0.1> This is a bug. Please go ahead and log it on our bug tracker. Attach should wait a reasonable amount of time for a new window to appear. It should attach to the window when it appears, or else fail after a reasonable amount of time has passed. (BTW, IE#wait should also fail after a reasonable amount of time has passed. Right now it waits forever.) What is reasonable? The default should probably be about 5 seconds. It should be set as a configurable option. To date, we have attached these kinds of configurable options to a particular IE object. That approach won't work here, because the IE object doesn't exist until IE#attach has returned. (I've been wanting to set up configuration options as a separate object for a while. This situation should be taken into account.) Bret At 03:46 AM 8/20/2005, Zeljko Filipin wrote: >"urn:schemas-microsoft-com:office:office" xmlns:w = >"urn:schemas-microsoft-com:office:word"> >I have the same problem, but I have not found the solution yet. > >Zeljko > > >---------- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tuyet Cong-Ton-Nu >Sent: Saturday, August 20, 2005 1:06 AM >To: wtr-general at rubyforge.org >Subject: [Wtr-general] Sleep statements and Attach > >The code below, for example, is a typical thing that I have to do in our >application. > >1) Click on an icon to launch the Select Portfolio window > >2) The problem is that it may take the Select Portfolio window a >little while to load, > > so I have to add a Sleep parameter otherwise, the attach > statement will fail because it can t find the title > >3) Is there a way to do this without using the Sleep statements? > >4) Also once I am done with this Select Portfolio, I close it, and >need to reconnect back to the main window of the application to continue >with the script and there again I have to put a Sleep statement. > >5) Any help/suggestion you have to handle this is appreciated > > > > ie.frame("main").frame(:name, "context_bar").image(:src, > /icon_open.gif/).click > > sleep 3 > > ie = Watir::IE.attach(:title, "Select Portfolio") > > > > #Reconnect back to main frame > > sleep 3 > > ie = Watir::IE.attach(:url, "https://test.com/araneae/app") >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From paul.rogers at shaw.ca Sun Aug 21 12:35:12 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sun, 21 Aug 2005 10:35:12 -0600 Subject: [Wtr-general] images test fails Message-ID: <3b2f9183b360d7.3b360d73b2f918@shaw.ca> its there now Paul ----- Original Message ----- From: Bret Pettichord Date: Saturday, August 20, 2005 3:39 pm Subject: [Wtr-general] images test fails > Paul, > > Did you forget to check in a change to images1.html? > > This test is failing in HEAD: > > > Loaded suite d:/workspace/watir/unittests/images_test > Started... > > 1) Error: > test_image_click(TC_Images): > Watir::Exception::UnknownObjectException: Unable to locate object, > using > name and disabler_test > d:/workspace/watir/unittests/../watir.rb:1768:in `assert_exists' > (eval):2:in `disabled' > d:/workspace/watir/unittests/images_test.rb:56:in > `test_image_click' > 7 tests, 86 assertions, 0 failures, 1 errors > > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From paul.rogers at shaw.ca Sun Aug 21 12:43:26 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sun, 21 Aug 2005 10:43:26 -0600 Subject: [Wtr-general] next steps In-Reply-To: <5.1.0.14.2.20050817235416.02fac800@127.0.0.1> Message-ID: <000501c5a66f$748ee670$6600a8c0@NewDell> Comments in-line, preceeded by Paul-> -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: 17 August 2005 23:05 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] next steps At 05:46 PM 8/17/2005, Paul Rogers wrote: >some other things that we should consider: > >table#to_a currently returns the cells as text. I think ( I think it >was >Bret that suggested it) this should return an array of TableCell objects >which menas we need Table#to_text_array ( or similar name). This may well >break peoples existing code, so Im in 2 minds about it. I think it needs >to be done, but I dont want to piss people off by having to make many changes The way to do it is to create a file in watir/old_table.rb that reverts to prior behavior. If anyone needs the old way, they can just add a require and they get it. I'll probably do that with the those old camelCase commands for 1.5. (I'll simply stop requiring watir/camel_case.rb fror watir.rb). Paul -> Great idea You can also release the new code in a separate file and get comments on it first, before making it part of the watir package. I've done this with the new IE#remote_eval method. (Which by the way, i'm prolly going to rename to forked_eval for now, while we still need it.) >a method to get the html className of any element - or did this already >get in? class_name, ahem. Yes i did that. You wrote the code, but then attached it to a method called 'style'. Paul -> Yes, Id know id already written it, and named it wrong! But it currently only applies to span/div. it should get moved into Element ( I think that's whatis called now) so it applies to all html elements > in many apps, on an error condition, a textfield may have a different > color background to highlight a mandatory field or erroronous entry, we > could then confirm by doing >if ie.text_field(:index,1).class_name == 'ErrorClass' > # some message confirm we got the right thing >end The next step is actually to allow ie.text_field(:class, 'ErrorClass') to work. This would be awesome. Actually my plan is to let any attribute be able to be used here. It's just a matter of writing less code -- seriously. Paul -> yep, someone just enterd a feature request for this - the example you give here wouldn't necessarily work for what I was thinking, as there may be several textfields with that class >The exception objects should have more info, so I can do > >begin > ie.text_field(:index,1).set('foo') >rescue ObjectDisabledException => e > puts "Object is readoly!!" > puts e.how # displays index - maybe a better name is needed > puts e.what # displays 1 - maybe a better name is needed > puts e.url # displays the url of the error > puts e.page_title # > puts e. anything else? >end Maybe. I think the how and why will eventually evolve into a more complex structure that will allow multiple hows and whys -- like WET. What we need is Element#inspect to describe how the object was invoked. I think. This is how WET redefines the to_s method. I think we need two methods -- one that says how the object was specified (and that probably also reports on container/ancestor objects) and the other that lists attributes in detail. Maybe we give these two different names, neither of which is to_s or inspect and then these names can have a default binding to these methods, but this can easily be changed by frameworks (like WET) that want to do things different. I am also thinking that what we really need is a hook for an exception handler, so people can customize it get the behavior they want. >----- Original Message ----- >From: Bret Pettichord >Date: Wednesday, August 17, 2005 4:31 pm >Subject: [Wtr-general] next steps > > > 1. finish purging all camelCase names in methods and local and > > instance variables. > > 2. finish renaming stuff that has the wrong name (like all the > > references > > to containers called 'ieController') > > 3. separate logic for locating objects (get_object) so it can be > > configured > > separately without having to what the WET people did (change > > overriding > > syntax). > > 4. rip out winclicker and autoit and use wet/winobjects instead > > 5. make it so that anything that be a container; refactor > > different methods > > currently used for this (frames & forms) > > > > and then > > > > 6. defer invokation of COM calls until necessary > > > > I've been pushing us this way for a while and believe that it is > > more important than ever. The simplest example of what this means > > is that code > > like this will work: > > > > table = ie.frame(:name, 'foo').table(:index, 4) > > # do stuff > > table[3][4].button(:index, 1).click > > > > This is convenient and often what casual users expect. Currently > > watir supports this to one level only. > > > > Once we have this, this gives us a platform that we can do several > > other > > things: > > a. invoke method in a separate process, so we never run into thread > > blocking problems again. > > b. invoke selenium or xcom/mozilla or another browser-driving > > technology > > instead of IE/COM > > c. attach a logger so we get cheap, decent, accurate logging > > > > > > > > _____________________ > > Bret Pettichord > > www.pettichord.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 _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From jkohl at telusplanet.net Sun Aug 21 20:23:34 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Sun, 21 Aug 2005 18:23:34 -0600 Subject: [Wtr-general] New Installer for Watir 1.4.1 In-Reply-To: <5.1.0.14.2.20050821011711.0303fa80@127.0.0.1> Message-ID: <20050822002409.DNGR26220.priv-edmwes25.telusplanet.net@tintin> Installer works great! -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret > Pettichord > Sent: August 21, 2005 12:20 AM > To: wtr-general at rubyforge.org > Subject: [Wtr-general] New Installer for Watir 1.4.1 > > Watir 1.4.1 is a minor update to 1.4.0 that includes a brand > new installer. > We think people will find this much easier to use. Thanks to > Kingsley for providing it. It is a nullsoft-based installer. > > http://rubyforge.org/frs/?group_id=104&release_id=2725 > > Please let us know if there are problems. We also fixed the > tests that were failing in 1.4.0. > > We plan to have a gem for 1.4.1 out very shortly. > > Bret > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From saudaziz at gmail.com Mon Aug 22 00:13:15 2005 From: saudaziz at gmail.com (saud aziz) Date: Sun, 21 Aug 2005 21:13:15 -0700 Subject: [Wtr-general] Load Testing with Watir? Message-ID: <24d0cb3805082121137eb284c9@mail.gmail.com> Anyone here ever tried to create scripts that could be used for load testing? What are the Con's of such approach? Would it be any effective at all in your opinion? -- "..man is a human being, not because of his physical powers for physically the camel is his superior; not because of his size for the elephant is larger; not because of his courage for the lion is more courageous; not because of his appetite for the ox has the greater; not because of coitus for the least of the birds is more virile than he, but rather by virtue of his noble aims and ideals. [As a matter of fact] he was only created to know." (Al- Ghazali; The book of Knowledge, Section 1) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050821/a2e4e5be/attachment.html From jkohl at telusplanet.net Mon Aug 22 00:20:41 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Sun, 21 Aug 2005 22:20:41 -0600 Subject: [Wtr-general] Load Testing with Watir? In-Reply-To: <24d0cb3805082121137eb284c9@mail.gmail.com> Message-ID: <20050822042120.HIFM28423.priv-edtnes46.telusplanet.net@tintin> You could generate some load, but you would have Internet Explorer instances using a lot of resources on your test machines. Not using a browser and sending HTTP requests doesn't require the resources that multiple IE instances would, so you can generate more simulated load. -Jonathan _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of saud aziz Sent: August 21, 2005 10:13 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Load Testing with Watir? Anyone here ever tried to create scripts that could be used for load testing? What are the Con's of such approach? Would it be any effective at all in your opinion? -- "..man is a human being, not because of his physical powers for physically the camel is his superior; not because of his size for the elephant is larger; not because of his courage for the lion is more courageous; not because of his appetite for the ox has the greater; not because of coitus for the least of the birds is more virile than he, but rather by virtue of his noble aims and ideals. [As a matter of fact] he was only created to know." (Al- Ghazali; The book of Knowledge, Section 1) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050821/16f7f2d1/attachment.html From zeljko.filipin at gmail.com Mon Aug 22 04:49:36 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Mon, 22 Aug 2005 10:49:36 +0200 Subject: [Wtr-general] New Installer for Watir 1.4.1 In-Reply-To: <5.1.0.14.2.20050821011711.0303fa80@127.0.0.1> Message-ID: <43099176.4b05ec64.62d1.403f@mx.gmail.com> Installer works, but... I ran all_tests.rb and got this (win xp sp2, ruby 1.8.2, watir 1.4.1, ruby in c:\ruby, watir in c:\Watir): 1) Failure: test_bmp(TC_Capture) [C:/Watir/unittests/../unittests/screen_capture_test.rb:50]: is not true. 2) Failure: test_imageHasLoaded(TC_Images) [C:/Watir/unittests/../unittests/images_test.rb:76]: is not true. 3) Failure: test_image_properties(TC_Images) [C:/Watir/unittests/../unittests/images_test.rb:104]: <"88"> expected but was <"30">. 4) Error: test_save_local_image(TC_Images): WIN32OLERuntimeError: navigate OLE error code:800704C7 in HRESULT error code:0x80020009 Exception occurred. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1253:in `method_missing' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1253:in `goto' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2797:in `save' C:/Watir/unittests/../unittests/images_test.rb:160:in `safe_file_block' C:/Watir/unittests/../unittests/images_test.rb:160:in `each' C:/Watir/unittests/../unittests/images_test.rb:160:in `safe_file_block' C:/Watir/unittests/../unittests/images_test.rb:143:in `test_save_local_image' 5) Error: test_save_local_image_returns_original_page(TC_Images): WIN32OLERuntimeError: navigate OLE error code:800704C7 in HRESULT error code:0x80020009 Exception occurred. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1253:in `method_missing' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1253:in `goto' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2797:in `save' C:/Watir/unittests/../unittests/images_test.rb:160:in `safe_file_block' C:/Watir/unittests/../unittests/images_test.rb:160:in `each' C:/Watir/unittests/../unittests/images_test.rb:160:in `safe_file_block' C:/Watir/unittests/../unittests/images_test.rb:153:in `test_save_local_image_returns_original_page' 6) Failure: test_http_errors(TC_Navigate) [C:/Watir/unittests/../unittests/navigate_test.rb:51]: exception expected but none was thrown. 7) Failure: test_links_and_images_in_table(TC_Tables) [C:/Watir/unittests/../unittests/table_test.rb:165]: <"106"> expected but was <"28">. 182 tests, 1053 assertions, 5 failures, 2 errors Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Sunday, August 21, 2005 8:20 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] New Installer for Watir 1.4.1 Watir 1.4.1 is a minor update to 1.4.0 that includes a brand new installer. We think people will find this much easier to use. Thanks to Kingsley for providing it. It is a nullsoft-based installer. http://rubyforge.org/frs/?group_id=104&release_id=2725 Please let us know if there are problems. We also fixed the tests that were failing in 1.4.0. We plan to have a gem for 1.4.1 out very shortly. Bret _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From noreply at rubyforge.org Sun Aug 21 16:54:45 2005 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 21 Aug 2005 15:54:45 -0500 Subject: [Wtr-general] [ wtr-Feature Requests-2276 ] Installer should create links to examples Message-ID: <200508212054.j7LKsjSP001043@rubyforge.org> Feature Requests item #2276, was opened at 2005-08-21 15:54 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=490&aid=2276&group_id=104 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Bret Pettichord (bret) Assigned to: Kingsley Hendrickse (dragonkh) Summary: Installer should create links to examples Initial Comment: The installer (i.e. the new null soft installer) should create links, both on the desktop and on the start menu, to the examples directory. The UI to the options for these links should be like those for the documentation. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=490&aid=2276&group_id=104 From noreply at rubyforge.org Sun Aug 21 17:02:28 2005 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 21 Aug 2005 16:02:28 -0500 Subject: [Wtr-general] [ wtr-Feature Requests-2277 ] Uninstall (Nullsoft) should uninstall Watir library Message-ID: <200508212102.j7LL2SOk004297@rubyforge.org> Feature Requests item #2277, was opened at 2005-08-21 16:02 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=490&aid=2277&group_id=104 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Bret Pettichord (bret) Assigned to: Kingsley Hendrickse (dragonkh) Summary: Uninstall (Nullsoft) should uninstall Watir library Initial Comment: The uninstall feature currently uninstalls the doc and tests, but not the actual watir library itself. It should. One reason is that, people really should uninstall via nullsoft before installing watir via gem, otherwise who knows what library they will actually end up using. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=490&aid=2277&group_id=104 From noreply at rubyforge.org Sun Aug 21 18:30:22 2005 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 21 Aug 2005 17:30:22 -0500 Subject: [Wtr-general] [ wtr-Stories-2278 ] Reorganize rdoc Message-ID: <200508212230.j7LMUMit013061@rubyforge.org> Stories item #2278, was opened at 2005-08-21 17:30 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1999&aid=2278&group_id=104 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Bret Pettichord (bret) Assigned to: Nobody (None) Summary: Reorganize rdoc Initial Comment: The main page for rdoc should be Watir::IE. We should :include: the readme file here. We should also take the release notes out of the readme and into a release notes file. The release notes arguably don't need to be in the rdoc at all. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1999&aid=2278&group_id=104 From noreply at rubyforge.org Mon Aug 22 02:46:56 2005 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 22 Aug 2005 01:46:56 -0500 Subject: [Wtr-general] [ wtr-Stories-2280 ] Rdoc needs to be set up as an enry point to Watir Documentation Message-ID: <200508220646.j7M6kujt032246@rubyforge.org> Stories item #2280, was opened at 2005-08-22 01:46 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1999&aid=2280&group_id=104 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Bret Pettichord (bret) Assigned to: Jonathan Kohl (jonathankohl) Summary: Rdoc needs to be set up as an enry point to Watir Documentation Initial Comment: Now that we are distributing Watir as a Gem, we need to make the RDOC be a portal to all of our documentation. 1. The main page of the RDOC should include links to the other Watir documentation (all doc in our package is also on our website). We also need to rearrange release notes, support information, etc, taking a cue from how other ruby projects are documented. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1999&aid=2280&group_id=104 From noreply at rubyforge.org Mon Aug 22 03:27:48 2005 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 22 Aug 2005 02:27:48 -0500 Subject: [Wtr-general] [ wtr-Feature Requests-2281 ] make watir use zero-based indexing Message-ID: <200508220727.j7M7RmUa008471@rubyforge.org> Feature Requests item #2281, was opened at 2005-08-22 02:27 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=490&aid=2281&group_id=104 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Bret Pettichord (bret) Assigned to: Nobody (None) Summary: make watir use zero-based indexing Initial Comment: we currently use one-based indexing for :index and for columns and rows in tables, but users are confused and can't tell where Watir's one-based indexing end and Ruby's zero-based indexing begins. We need to make watir consistent with ruby. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=490&aid=2281&group_id=104 From noreply at rubyforge.org Mon Aug 22 03:31:02 2005 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 22 Aug 2005 02:31:02 -0500 Subject: [Wtr-general] [ wtr-Feature Requests-2282 ] Attach should wait for window to appear Message-ID: <200508220731.j7M7V2ei009178@rubyforge.org> Feature Requests item #2282, was opened at 2005-08-22 02:31 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=490&aid=2282&group_id=104 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Bret Pettichord (bret) Assigned to: Nobody (None) Summary: Attach should wait for window to appear Initial Comment: This is a bug. Please go ahead and log it on our bug tracker. Attach should wait a reasonable amount of time for a new window to appear. It should attach to the window when it appears, or else fail after a reasonable amount of time has passed. (BTW, IE#wait should also fail after a reasonable amount of time has passed. Right now it waits forever.) What is reasonable? The default should probably be about 5 seconds. It should be set as a configurable option. To date, we have attached these kinds of configurable options to a particular IE object. That approach won't work here, because the IE object doesn't exist until IE#attach has returned. (I've been wanting to set up configuration options as a separate object for a while. This situation should be taken into account.) Bret At 03:46 AM 8/20/2005, Zeljko Filipin wrote: "urn:schemas-microsoft-com:office:office" xmlns:w = "urn:schemas-microsoft-com:office:word"> I have the same problem, but I have not found the solution yet. Zeljko ---------- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tuyet Cong-Ton-Nu Sent: Saturday, August 20, 2005 1:06 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Sleep statements and Attach The code below, for example, is a typical thing that I have to do in our application. 1) Click on an icon to launch the Select Portfolio window 2) The problem is that it may take the Select Portfolio window a little while to load, so I have to add a Sleep parameter otherwise, the attach statement will fail because it can t find the title 3) Is there a way to do this without using the Sleep statements? 4) Also once I am done with this Select Portfolio, I close it, and need to reconnect back to the main window of the application to continue with the script and there again I have to put a Sleep statement. 5) Any help/suggestion you have to handle this is appreciated ie.frame("main").frame(:name, "context_bar").image(:src, /icon_open.gif/).click sleep 3 ie = Watir::IE.attach(:title, "Select Portfolio") #Reconnect back to main frame sleep 3 ie = Watir::IE.attach(:url, "https://test.com/araneae/app") ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=490&aid=2282&group_id=104 From noreply at rubyforge.org Mon Aug 22 09:19:11 2005 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 22 Aug 2005 13:19:11 GMT Subject: [Wtr-general] [ wtr-Bugs-2284 ] rubyw.exe broken in most ruby one click installer packages Message-ID: <200508221319.j7MDJBqQ023294@rubyforge.org> Bugs item #2284, was opened at 2005-08-22 13:19 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=487&aid=2284&group_id=104 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Kingsley Hendrickse (dragonkh) Assigned to: Kingsley Hendrickse (dragonkh) Summary: rubyw.exe broken in most ruby one click installer packages Initial Comment: rubyw.exe is broken in nearly all the one click installers apart from latest one - which causes the watir installer to break as it uses rubyw - should change this to ruby -e for now ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=487&aid=2284&group_id=104 From noreply at rubyforge.org Mon Aug 22 09:32:16 2005 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 22 Aug 2005 13:32:16 GMT Subject: [Wtr-general] [ wtr-Bugs-2285 ] New installer not registering AutoIt dll Message-ID: <200508221332.j7MDWGIp024690@rubyforge.org> Bugs item #2285, was opened at 2005-08-22 13:32 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=487&aid=2285&group_id=104 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Kingsley Hendrickse (dragonkh) Assigned to: Nobody (None) Summary: New installer not registering AutoIt dll Initial Comment: the new installer is not registering the AutoIt.dll ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=487&aid=2285&group_id=104 From warren at meyer-pollans.net Mon Aug 22 11:43:11 2005 From: warren at meyer-pollans.net (Warren Pollans) Date: Mon, 22 Aug 2005 11:43:11 -0400 Subject: [Wtr-general] Need advice on assert, module/class setup, and Watir In-Reply-To: <5.1.0.14.2.20050819190801.0306d710@127.0.0.1> References: <20050819213929.75696EBD64@mail4.firstlink.com> <5.1.0.14.2.20050819190801.0306d710@127.0.0.1> Message-ID: <20050822114311.6ee920d4@localhost.localdomain> Hello, I have a similar problem/confusion. My assertions are contained in instance methods of classes defined in an external file - so I don't think the suggestion below is applicable - at least it didn't work when I tried it. The page I'm testing has 4 forms - forms 1 and 4 are nearly identical (aside from form element names) and forms 2 and 3 are also similar - so putting the assertions into instance methods seemed the natural thing to do. My test script follows - the results show only one assertion - in test_a. I'd like to be able to see the total count of assertions. The tests work fine - I'd just like to see more information - I am imagine I could keep the count myself but suspect that there must be a way to have watir or test/unit do it for me. Any suggestions would be appreciated. I'm still very new to ruby and watir and windows - I'm porting tests from perl and WWW::Mechanize - Over-explaining accepted :-) Here's my test script: ++++++++++++++++++++++++++ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'unittests/setup' ## from watir unittests require 'unittests/filter_settings' ## classes defined here $url = url $uid = userid $pas = password class TC_filtersettings < Test::Unit::TestCase include Watir def setup() $ie.goto($url) end def test_a_login $ie.text_field(:name, "userid").set($uid) $ie.text_field(:name, "password").set($pas) $ie.button(:value, "Login").click $ie.wait assert( $ie.title =~ /Email Defense Solution/, "Got to mailset_spam page" ) end ## Spam Settings def test_b_spam Filterbutton.new(1, "spam_handling", 1).button_test() Filterbutton.new(1, "spam_handling", 2).button_test() Filterbutton.new(1, "spam_handling", 3).button_test() end ## Virus Settings def test_c_virus Filterbutton.new(4, "virus_scanning", 1).button_test() Filterbutton.new(4, "virus_scanning", 2).button_test() end def test_d_whitelist wl = Filterlist.new('whitelist', 'form1') wl.clear_list() wl.getAddlist.each {|x| wl.add2list(x[0], x[1])} wl.getSearchlist.each {|x| wl.search_list(x[0], x[1])} wl.delete_first() wl.clear_list() end def test_e_blacklist bl = Filterlist.new('blacklist', 'form2') bl.clear_list() bl.getAddlist.each {|x| bl.add2list(x[0], x[1])} bl.getSearchlist.each {|x| bl.search_list(x[0], x[1])} bl.delete_first() bl.clear_list() end end ++++++++++++++++++++ On or about Fri, 19 Aug 2005 19:11:48 -0500 Bret Pettichord allegedly wrote: > I suggest that you put your library methods in a Module. Thus: > > # library.rb > module MyLibrary > def my_library_method(arg) > # code... > end > end > > # tests.rb > require 'test/unit' > require 'library.rb' > > class TC1 << Test::Unit::TestCase > include MyLibrary > def test_method > my_library_method arg > # more code > end > end > > From bret at pettichord.com Mon Aug 22 12:22:52 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 22 Aug 2005 11:22:52 -0500 Subject: [Wtr-general] Need advice on assert, module/class setup, and Watir In-Reply-To: <20050822114311.6ee920d4@localhost.localdomain> References: <5.1.0.14.2.20050819190801.0306d710@127.0.0.1> <20050819213929.75696EBD64@mail4.firstlink.com> <5.1.0.14.2.20050819190801.0306d710@127.0.0.1> Message-ID: <5.1.0.14.2.20050822111827.02bc9350@127.0.0.1> This is a hard problem, that i'm still looking for a good answer. I've spent time investigating it. The problem is that there are two different versions of add_assertion, the method that updates the assertion count. One of them is in Test::Unit::TestCase -- and it is what you get if you do what Warren did below. The other is is Test::Unit::Assertions -- and this is the one that doesn't actually count your assertions. The solution? I don't know. I've been meaning to write up this problem on ruby-talk and see if i could get some help there with the problem. With time i'd like to emulate WET and add methods like ie.text_field(:name, 'foo').verify('bar') but this problem needs to get figured out first. I suggest raising this issue on that forum. Bret At 10:43 AM 8/22/2005, Warren Pollans wrote: >Hello, > >I have a similar problem/confusion. My assertions are contained in >instance methods of classes defined in an external file - so I don't >think the suggestion below is applicable - at least it didn't work >when I tried it. The page I'm testing has 4 forms - forms 1 and 4 are >nearly identical (aside from form element names) and forms 2 and 3 are >also similar - so putting the assertions into instance methods seemed >the natural thing to do. My test script follows - the results show only >one assertion - in test_a. I'd like to be able to see the total count >of assertions. The tests work fine - I'd just like to see more >information - I am imagine I could keep the count myself but suspect >that there must be a way to have watir or test/unit do it for me. > >Any suggestions would be appreciated. I'm still very new to ruby and >watir and windows - I'm porting tests from perl and WWW::Mechanize - >Over-explaining accepted :-) > >Here's my test script: > >++++++++++++++++++++++++++ > >$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == >__FILE__ > >require 'unittests/setup' ## from watir unittests >require 'unittests/filter_settings' ## classes defined here > >$url = url >$uid = userid >$pas = password > >class TC_filtersettings < Test::Unit::TestCase > > include Watir > > def setup() > $ie.goto($url) > end > > def test_a_login > $ie.text_field(:name, "userid").set($uid) > $ie.text_field(:name, "password").set($pas) > $ie.button(:value, "Login").click > $ie.wait > assert( $ie.title =~ /Email Defense Solution/, "Got to >mailset_spam page" ) > end > > ## Spam Settings > def test_b_spam > Filterbutton.new(1, "spam_handling", 1).button_test() > Filterbutton.new(1, "spam_handling", 2).button_test() > Filterbutton.new(1, "spam_handling", 3).button_test() > end > > ## Virus Settings > def test_c_virus > Filterbutton.new(4, "virus_scanning", 1).button_test() > Filterbutton.new(4, "virus_scanning", 2).button_test() > end > > def test_d_whitelist > wl = Filterlist.new('whitelist', 'form1') > wl.clear_list() > wl.getAddlist.each {|x| wl.add2list(x[0], x[1])} > wl.getSearchlist.each {|x| wl.search_list(x[0], x[1])} > wl.delete_first() > wl.clear_list() > end > > def test_e_blacklist > bl = Filterlist.new('blacklist', 'form2') > bl.clear_list() > bl.getAddlist.each {|x| bl.add2list(x[0], x[1])} > bl.getSearchlist.each {|x| bl.search_list(x[0], x[1])} > bl.delete_first() > bl.clear_list() > end >end > >++++++++++++++++++++ > > >On or about Fri, 19 Aug 2005 19:11:48 -0500 >Bret Pettichord allegedly wrote: > > > I suggest that you put your library methods in a Module. Thus: > > > > # library.rb > > module MyLibrary > > def my_library_method(arg) > > # code... > > end > > end > > > > # tests.rb > > require 'test/unit' > > require 'library.rb' > > > > class TC1 << Test::Unit::TestCase > > include MyLibrary > > def test_method > > my_library_method arg > > # more code > > end > > end > > > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From saudaziz at gmail.com Mon Aug 22 13:49:05 2005 From: saudaziz at gmail.com (saud aziz) Date: Mon, 22 Aug 2005 10:49:05 -0700 Subject: [Wtr-general] Load Testing with Watir? In-Reply-To: <20050822042120.HIFM28423.priv-edtnes46.telusplanet.net@tintin> References: <24d0cb3805082121137eb284c9@mail.gmail.com> <20050822042120.HIFM28423.priv-edtnes46.telusplanet.net@tintin> Message-ID: <24d0cb3805082210495682dc64@mail.gmail.com> True, but i could set up scripts to run on different computers, say at most 15-20 scenarios for each machine on a total of 30 machines and get performance metrics out of web server. Do you think that is even a good start? On 8/21/05, Jonathan Kohl wrote: > > You could generate some load, but you would have Internet Explorer > instances using a lot of resources on your test machines. Not using a > browser and sending HTTP requests doesn't require the resources that > multiple IE instances would, so you can generate more simulated load. > -Jonathan > > ------------------------------ > *From:* wtr-general-bounces at rubyforge.org [mailto: > wtr-general-bounces at rubyforge.org] *On Behalf Of *saud aziz > *Sent:* August 21, 2005 10:13 PM > *To:* wtr-general at rubyforge.org > *Subject:* [Wtr-general] Load Testing with Watir? > > Anyone here ever tried to create scripts that could be used for load > testing? > > What are the Con's of such approach? Would it be any effective at all in > your opinion? > > > > -- > "..man is a human being, not because of his physical powers for physically > the camel is his superior; not because of his size for the elephant is > larger; not because of his courage for the lion is more courageous; not > because of his appetite for the ox has the greater; not because of coitus > for the least of the birds is more virile than he, but rather by virtue of > his noble aims and ideals. [As a matter of fact] he was only created to > know." (Al- Ghazali; The book of Knowledge, Section 1) > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > -- "..man is a human being, not because of his physical powers for physically the camel is his superior; not because of his size for the elephant is larger; not because of his courage for the lion is more courageous; not because of his appetite for the ox has the greater; not because of coitus for the least of the birds is more virile than he, but rather by virtue of his noble aims and ideals. [As a matter of fact] he was only created to know." (Al- Ghazali; The book of Knowledge, Section 1) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050822/d0512714/attachment.html From jkohl at telusplanet.net Mon Aug 22 13:57:05 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Mon, 22 Aug 2005 11:57:05 -0600 Subject: [Wtr-general] Load Testing with Watir? In-Reply-To: <24d0cb3805082210495682dc64@mail.gmail.com> Message-ID: <20050822175743.SESI14474.priv-edtnes56.telusplanet.net@tintin> You can absolutely do that. You can just create more load per machine by not using a browser, which I think is why most load testing tools just use HTTP. _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of saud aziz Sent: August 22, 2005 11:49 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Load Testing with Watir? True, but i could set up scripts to run on different computers, say at most 15-20 scenarios for each machine on a total of 30 machines and get performance metrics out of web server. Do you think that is even a good start? On 8/21/05, Jonathan Kohl wrote: You could generate some load, but you would have Internet Explorer instances using a lot of resources on your test machines. Not using a browser and sending HTTP requests doesn't require the resources that multiple IE instances would, so you can generate more simulated load. -Jonathan _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of saud aziz Sent: August 21, 2005 10:13 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Load Testing with Watir? Anyone here ever tried to create scripts that could be used for load testing? What are the Con's of such approach? Would it be any effective at all in your opinion? -- "..man is a human being, not because of his physical powers for physically the camel is his superior; not because of his size for the elephant is larger; not because of his courage for the lion is more courageous; not because of his appetite for the ox has the greater; not because of coitus for the least of the birds is more virile than he, but rather by virtue of his noble aims and ideals. [As a matter of fact] he was only created to know." (Al- Ghazali; The book of Knowledge, Section 1) _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -- "..man is a human being, not because of his physical powers for physically the camel is his superior; not because of his size for the elephant is larger; not because of his courage for the lion is more courageous; not because of his appetite for the ox has the greater; not because of coitus for the least of the birds is more virile than he, but rather by virtue of his noble aims and ideals. [As a matter of fact] he was only created to know." (Al- Ghazali; The book of Knowledge, Section 1) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050822/91cedc65/attachment.html From tuyet.ctn at mscibarra.com Mon Aug 22 14:30:19 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Mon, 22 Aug 2005 11:30:19 -0700 Subject: [Wtr-general] Use Index in a Table given by SpySmith Message-ID: I used SpySmith (great tool, thanks Bret for letting us know) to find a value (USAL6l1) in a table and it gave me this info: Innermost Element: [TD], Frame: [main/body/tabContent], Index: [137] USAL6I1 I want to extract "USAL6l1" from this table, and I can do it in irb with this command: irb(main):032:0> puts frame1.table(:index, 3)[6][3] USAL6I1 But how can I do it using the Index [137] that SpySmith gave me? I looked at the table_test.rb and tried various combinations, but nothing worked. Your help is appreciated. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050822/30f22d3b/attachment.html From warren at meyer-pollans.net Mon Aug 22 14:54:38 2005 From: warren at meyer-pollans.net (Warren Pollans) Date: Mon, 22 Aug 2005 14:54:38 -0400 Subject: [Wtr-general] Need advice on assert, module/class setup, and Watir In-Reply-To: <5.1.0.14.2.20050822111827.02bc9350@127.0.0.1> References: <5.1.0.14.2.20050819190801.0306d710@127.0.0.1> <20050819213929.75696EBD64@mail4.firstlink.com> <5.1.0.14.2.20050819190801.0306d710@127.0.0.1> <5.1.0.14.2.20050822111827.02bc9350@127.0.0.1> Message-ID: <20050822145438.5d778536@localhost.localdomain> I ended up creating a class, from which my two test classes inherit, that does the bookkeeping. I needed to trap the failed assertions anyway because they caused the test to abort. Here's what I ended up with - I would have made it a module to include but I couldn't figure out how create a class method in the including class (self.show_subtotals() below). .show_subtotals gets called after each subseries of tests class Filterbase @@tests = 0 @@passes = 0 @@failures = 0 def do_assertion(assert_test, msg) begin assert(assert_test, msg) rescue Test::Unit::AssertionFailedError => e puts e.to_s puts "BACKTRACE follows" puts e.backtrace.reject {|x| x =~ /^c:/} puts "\n" @@failures = @@failures + 1 else @@passes = @@passes + 1 ensure @@tests = @@tests + 1 # puts "T:#{@@tests}:P:#{@@passes}:F:#{@@failures}:" end end def self.show_subtotals puts "#{@@tests} Assertions, #{@@failures} Failures" puts "\n" end end On or about Mon, 22 Aug 2005 11:22:52 -0500 Bret Pettichord allegedly wrote: > This is a hard problem, that i'm still looking for a good answer. > > I've spent time investigating it. The problem is that there are two > different versions of add_assertion, the method that updates the > assertion count. > > One of them is in Test::Unit::TestCase -- and it is what you get if > you do what Warren did below. > > The other is is Test::Unit::Assertions -- and this is the one that > doesn't actually count your assertions. > > The solution? I don't know. I've been meaning to write up this > problem on ruby-talk and see if i could get some help there with the > problem. > > With time i'd like to emulate WET and add methods like ie.text_field > (:name, 'foo').verify('bar') but this problem needs to get figured > out first. > > I suggest raising this issue on that forum. > > Bret > > At 10:43 AM 8/22/2005, Warren Pollans wrote: > >Hello, > > > >I have a similar problem/confusion. My assertions are contained in > >instance methods of classes defined in an external file - so I don't > >think the suggestion below is applicable - at least it didn't work > >when I tried it. The page I'm testing has 4 forms - forms 1 and 4 are > >nearly identical (aside from form element names) and forms 2 and 3 > >are also similar - so putting the assertions into instance methods > >seemed the natural thing to do. My test script follows - the results > >show only one assertion - in test_a. I'd like to be able to see the > >total count of assertions. The tests work fine - I'd just like to > >see more information - I am imagine I could keep the count myself > >but suspect that there must be a way to have watir or test/unit do > >it for me. > > > >Any suggestions would be appreciated. I'm still very new to ruby and > >watir and windows - I'm porting tests from perl and WWW::Mechanize - > >Over-explaining accepted :-) > > > >Here's my test script: > > > >++++++++++++++++++++++++++ > > > >$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == > >__FILE__ > > > >require 'unittests/setup' ## from watir unittests > >require 'unittests/filter_settings' ## classes defined here > > > >$url = url > >$uid = userid > >$pas = password > > > >class TC_filtersettings < Test::Unit::TestCase > > > > include Watir > > > > def setup() > > $ie.goto($url) > > end > > > > def test_a_login > > $ie.text_field(:name, "userid").set($uid) > > $ie.text_field(:name, "password").set($pas) > > $ie.button(:value, "Login").click > > $ie.wait > > assert( $ie.title =~ /Email Defense Solution/, "Got > > to > >mailset_spam page" ) > > end > > > > ## Spam Settings > > def test_b_spam > > Filterbutton.new(1, "spam_handling", 1).button_test > > () Filterbutton.new(1, "spam_handling", 2).button_test() > > Filterbutton.new(1, "spam_handling", 3).button_test > > () end > > > > ## Virus Settings > > def test_c_virus > > Filterbutton.new(4, "virus_scanning", 1).button_test > > () Filterbutton.new(4, "virus_scanning", 2).button_test() > > end > > > > def test_d_whitelist > > wl = Filterlist.new('whitelist', 'form1') > > wl.clear_list() > > wl.getAddlist.each {|x| wl.add2list(x[0], x[1])} > > wl.getSearchlist.each {|x| wl.search_list(x[0], x > > [1])} wl.delete_first() > > wl.clear_list() > > end > > > > def test_e_blacklist > > bl = Filterlist.new('blacklist', 'form2') > > bl.clear_list() > > bl.getAddlist.each {|x| bl.add2list(x[0], x[1])} > > bl.getSearchlist.each {|x| bl.search_list(x[0], x > > [1])} bl.delete_first() > > bl.clear_list() > > end > >end > > > >++++++++++++++++++++ > > > > > >On or about Fri, 19 Aug 2005 19:11:48 -0500 > >Bret Pettichord allegedly wrote: > > > > > I suggest that you put your library methods in a Module. Thus: > > > > > > # library.rb > > > module MyLibrary > > > def my_library_method(arg) > > > # code... > > > end > > > end > > > > > > # tests.rb > > > require 'test/unit' > > > require 'library.rb' > > > > > > class TC1 << Test::Unit::TestCase > > > include MyLibrary > > > def test_method > > > my_library_method arg > > > # more code > > > end > > > end > > > > > > > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From lisa.crispin at gmail.com Mon Aug 22 15:44:11 2005 From: lisa.crispin at gmail.com (Lisa Crispin) Date: Mon, 22 Aug 2005 13:44:11 -0600 Subject: [Wtr-general] How to click a javascript alert button Message-ID: <63915d6a050822124418b323c1@mail.gmail.com> Our app has some buttons that, when clicked, pop up a Javascript alert and want a 'yes' or 'ok' response to continue and do the function that they do. I found some suggestions for how to do this with Watir but none of 'em worked. For example I tried this one: Thread.new { sleep 0.1; WindowHelper.new.push_alert_button } $ie.link(:id, "whatever").click #this causes an Alert() Unfortunately I've forgotten the other one I tried and can't find it now (this was Friday, I've had a whole weekend to forget). I found some emails with references to AutoIt, and tried researching that but the emails were too cryptic for me. Is there a way to click a button on a Javascript popup alert? thanks Lisa From saudaziz at gmail.com Mon Aug 22 15:48:35 2005 From: saudaziz at gmail.com (saud aziz) Date: Mon, 22 Aug 2005 12:48:35 -0700 Subject: [Wtr-general] Running IE minimized or invisible? Message-ID: <24d0cb380508221248596cfe0a@mail.gmail.com> Is it possible to run your tests scripting in Ruby with Watir (of course) either with IE minimized or invisible? I would like to be able to work on other stuff while it does its thing without interrupted. Is that possible? -- "..man is a human being, not because of his physical powers for physically the camel is his superior; not because of his size for the elephant is larger; not because of his courage for the lion is more courageous; not because of his appetite for the ox has the greater; not because of coitus for the least of the birds is more virile than he, but rather by virtue of his noble aims and ideals. [As a matter of fact] he was only created to know." (Al- Ghazali; The book of Knowledge, Section 1) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050822/dc3923e1/attachment.html From lisa.crispin at gmail.com Mon Aug 22 17:19:16 2005 From: lisa.crispin at gmail.com (Lisa Crispin) Date: Mon, 22 Aug 2005 15:19:16 -0600 Subject: [Wtr-general] Test suites Message-ID: <63915d6a05082214194454f300@mail.gmail.com> Eventually we want to run our tests from CruiseControl, but I think the first baby step would be actually to run a suite of tests from the command line. (Or maybe I'm wrong about that, maybe I should run each test from ant, I am not sure, I am seeking advice on this). The test::unit doc (http://www.ruby-doc.org/core/classes/Test/Unit.html) shows that you can simply require each test and it will magically be run. This works. However, I want a summary of the results at the end, how many tests ran, how many assertions, failures, errors, summed for all the tests that ran. I've googled and looked at the Scripting for Testers class materials (Boy, I wish I could have attended that at Agile 2005, but I was presenting at the same time), and I can't find out how to do this. I see there is something called 'Watir::logging' (very clever) but I can't find any doc on how to use it (at least, not any doc that I can make heads or tails out of). Is there a way to run a suite of tests and get a summary of the results at the end? Am I better off doing this in ant from the get-go or am I correct to look for intermediate steps? thanks, Lisa From christopher.mcmahon at gmail.com Mon Aug 22 18:28:59 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 22 Aug 2005 17:28:59 -0500 Subject: [Wtr-general] Load Testing with Watir? In-Reply-To: <24d0cb3805082210495682dc64@mail.gmail.com> References: <24d0cb3805082121137eb284c9@mail.gmail.com> <20050822042120.HIFM28423.priv-edtnes46.telusplanet.net@tintin> <24d0cb3805082210495682dc64@mail.gmail.com> Message-ID: <72799cd705082215285390eae7@mail.gmail.com> On 8/22/05, saud aziz wrote: > True, but i could set up scripts to run on different computers, say at most > 15-20 scenarios for each machine on a total of 30 machines and get > performance metrics out of web server. Do you think that is even a good > start? > The other problem is that if you do encounter a performance problem, there are no hooks into Windows for diagnosis in Watir, and probably not in Ruby either. Check out Grinder or OpenSTA for full-fledged open-source performance test frameworks. On the other hand, Watir/Ruby will give you simple lightweight performance information, as long as you don't expect too much. -Chris From tuyet.ctn at mscibarra.com Mon Aug 22 19:51:24 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Mon, 22 Aug 2005 16:51:24 -0700 Subject: [Wtr-general] WAIT statement didn't wait? Message-ID: I used both the WAIT command and a loop with a "sleep" statement but they both didn't "wait" or "sleep long enough"? Here is the code: ie.frame("main").frame("sidebar").wait("analysisSidebarTabContent") sleep 3 while !ie.frame("main").frame("sidebar").frame("analysisSidebarTabContent").image( :src,/icon_report_positions.gif/).exists? sleep 0.1 end ie.frame("main").frame("sidebar").frame("analysisSidebarTabContent").image(: src, /icon_report_positions.gif/).click Even with the WAIT command and the sleep command after the WAIT, I got this error on line 110 which is the "while" statement: 1) Error: test_a_analysis1(TC_Analysis): Watir::Exception::UnknownFrameException: Unable to locate a frame with name analysisSidebarTabContent c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1739:in `initialize' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:222:in `new' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:222:in `frame' C:/watir/Analysis.rb:110:in `test_a_analysis1' 1 tests, 1 assertions, 0 failures, 1 errors -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050822/5fe25bc4/attachment.html From jeff.darklight at gmail.com Mon Aug 22 22:12:42 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Mon, 22 Aug 2005 19:12:42 -0700 Subject: [Wtr-general] Use Index in a Table given by SpySmith In-Reply-To: References: Message-ID: <430A861A.30401@gmail.com> Tuyet Cong-Ton-Nu wrote: > I used SpySmith (great tool, thanks Bret for letting us know) to find > a value (USAL6l1) in a table and it gave me this info: > > Innermost Element: [TD], Frame: [main/body/tabContent], Index: [137] > > > > USAL6I1 > > > > I want to extract "USAL6l1" from this table, and I can do it in irb > with this command: > > irb(main):032:0> puts frame1.table(:index, 3)[6][3] > > USAL6I1 > > > > But how can I do it using the Index [137] that SpySmith gave me? > > > > I looked at the table_test.rb and tried various combinations, but > nothing worked. > > Your help is appreciated. Thanks. > >------------------------------------------------------------------------ > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > That index is based on the sourceIndex property of the element... Maybe we should add support for finding items by sourceIndex or by index from the all collection... What'dya think bret? j. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050822/f9a891cc/attachment.html From jeff.darklight at gmail.com Mon Aug 22 22:19:14 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Mon, 22 Aug 2005 19:19:14 -0700 Subject: [Wtr-general] Test suites In-Reply-To: <63915d6a05082214194454f300@mail.gmail.com> References: <63915d6a05082214194454f300@mail.gmail.com> Message-ID: <430A87A2.3090300@gmail.com> Lisa Crispin wrote: >Eventually we want to run our tests from CruiseControl, but I think >the first baby step would be actually to run a suite of tests from the >command line. (Or maybe I'm wrong about that, maybe I should run each >test from ant, I am not sure, I am seeking advice on this). The >test::unit doc (http://www.ruby-doc.org/core/classes/Test/Unit.html) >shows that you can simply require each test and it will magically be >run. This works. However, I want a summary of the results at the >end, how many tests ran, how many assertions, failures, errors, summed >for all the tests that ran. > >I've googled and looked at the Scripting for Testers class materials >(Boy, I wish I could have attended that at Agile 2005, but I was >presenting at the same time), and I can't find out how to do this. I >see there is something called 'Watir::logging' (very clever) but I >can't find any doc on how to use it (at least, not any doc that I can >make heads or tails out of). > >Is there a way to run a suite of tests and get a summary of the >results at the end? > >Am I better off doing this in ant from the get-go or am I correct to >look for intermediate steps? >thanks, >Lisa > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > Simply review http://www.ruby-doc.org/stdlib/libdoc/test/unit/rdoc/classes/Test/Unit.html The Test::Unit framework supports TestCase objects ( multiple tests within a single class ) .. and TestSuite objects which lets you aggregate multiple TestCase objects into a single suite. The documentation has numerous examples. I think it will cover all of the situations you are trying to cover. j. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050822/0883ae3d/attachment.html From jeff.darklight at gmail.com Mon Aug 22 22:20:45 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Mon, 22 Aug 2005 19:20:45 -0700 Subject: [Wtr-general] Running IE minimized or invisible? In-Reply-To: <24d0cb380508221248596cfe0a@mail.gmail.com> References: <24d0cb380508221248596cfe0a@mail.gmail.com> Message-ID: <430A87FD.0@gmail.com> saud aziz wrote: > Is it possible to run your tests scripting in Ruby with Watir (of > course) either with IE minimized or invisible? > > I would like to be able to work on other stuff while it does its thing > without interrupted. Is that possible? > > -- > "..man is a human being, not because of his physical powers for > physically the camel is his superior; not because of his size for the > elephant is larger; not because of his courage for the lion is more > courageous; not because of his appetite for the ox has the greater; > not because of coitus for the least of the birds is more virile than > he, but rather by virtue of his noble aims and ideals. [As a matter of > fact] he was only created to know." (Al- Ghazali; The book of > Knowledge, Section 1) > >------------------------------------------------------------------------ > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > As long as your tests don't involve interacting with PopUps, this should work ... I believe much of the PopUp functionality requires the popup to be the top-most window. People will correct me if I'm wrong. j. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050822/39c14e88/attachment.html From bret at pettichord.com Tue Aug 23 00:45:36 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 22 Aug 2005 23:45:36 -0500 Subject: [Wtr-general] Load Testing with Watir? In-Reply-To: <24d0cb3805082210495682dc64@mail.gmail.com> References: <20050822042120.HIFM28423.priv-edtnes46.telusplanet.net@tintin> <24d0cb3805082121137eb284c9@mail.gmail.com> <20050822042120.HIFM28423.priv-edtnes46.telusplanet.net@tintin> Message-ID: <5.1.0.14.2.20050822234448.02fccbb0@127.0.0.1> if you go this route, you may want to look at Ruby's DRB, which makes it really easy to coordiate between different machines. bret At 12:49 PM 8/22/2005, saud aziz wrote: >True, but i could set up scripts to run on different computers, say at >most 15-20 scenarios for each machine on a total of 30 machines and get >performance metrics out of web server. Do you think that is even a good start? > > > >On 8/21/05, Jonathan Kohl ><jkohl at telusplanet.net> wrote: >>You could generate some load, but you would have Internet Explorer >>instances using a lot of resources on your test machines. Not using a >>browser and sending HTTP requests doesn't require the resources that >>multiple IE instances would, so you can generate more simulated load. >> >>-Jonathan >> >>> >>>---------- >>>From: >>>wtr-general-bounces at rubyforge.o >>>rg [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of saud aziz >>>Sent: August 21, 2005 10:13 PM >>>To: wtr-general at rubyforge.org >>>Subject: [Wtr-general] Load Testing with Watir? >>> >>>Anyone here ever tried to create scripts that could be used for load >>>testing? >>> >>>What are the Con's of such approach? Would it be any effective at all in >>>your opinion? >>> >>> >>> >>>-- >>>"..man is a human being, not because of his physical powers for >>>physically the camel is his superior; not because of his size for the >>>elephant is larger; not because of his courage for the lion is more >>>courageous; not because of his appetite for the ox has the greater; not >>>because of coitus for the least of the birds is more virile than he, but >>>rather by virtue of his noble aims and ideals. [As a matter of fact] he >>>was only created to know." (Al- Ghazali; The book of Knowledge, Section 1) >> >>_______________________________________________ >>Wtr-general mailing list >>Wtr-general at rubyforge.org >>http://rubyforge.org/mailman/listinfo/wtr-general >> > > > >-- >"..man is a human being, not because of his physical powers for physically >the camel is his superior; not because of his size for the elephant is >larger; not because of his courage for the lion is more courageous; not >because of his appetite for the ox has the greater; not because of coitus >for the least of the birds is more virile than he, but rather by virtue of >his noble aims and ideals. [As a matter of fact] he was only created to >know." (Al- Ghazali; The book of Knowledge, Section 1) > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Tue Aug 23 01:04:06 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 23 Aug 2005 00:04:06 -0500 Subject: [Wtr-general] WAIT statement didn't wait? In-Reply-To: Message-ID: <5.1.0.14.2.20050822234840.02fbc040@127.0.0.1> The fact that you have to mess with all of this is probably a bug in the wait method. Can you give us more info on what preceeds this code? In the mean time, this should do what you want: ie.frame("main").frame("sidebar").wait("analysisSidebarTabContent") sleep 3 until (begin ie.frame("main").frame("sidebar").frame("analysisSidebarTabContent").image(:src,/icon_report_positions.gif/).exists? rescue UnknownFrameException false end) do sleep 0.1 end ie.frame("main").frame("sidebar").frame("analysisSidebarTabContent").image(:src, /icon_report_positions.gif/).click At 06:51 PM 8/22/2005, Tuyet Cong-Ton-Nu wrote: >I used both the WAIT command and a loop with a sleep statement but they >both didn t wait or sleep long enough ? > >Here is the code: > > >ie.frame("main").frame("sidebar").wait("analysisSidebarTabContent") > > sleep 3 > > while > !ie.frame("main").frame("sidebar").frame("analysisSidebarTabContent").image(:src,/icon_report_positions.gif/).exists? > > sleep 0.1 > > end > > >ie.frame("main").frame("sidebar").frame("analysisSidebarTabContent").image(:src, >/icon_report_positions.gif/).click > > > > > >Even with the WAIT command and the sleep command after the WAIT, I got >this error on line 110 which is the while statement: > > 1) Error: > >test_a_analysis1(TC_Analysis): > >Watir::Exception::UnknownFrameException: Unable to locate a frame with >name analysisSidebarTabContent > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1739:in `initialize' > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:222:in `new' > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:222:in `frame' > > C:/watir/Analysis.rb:110:in `test_a_analysis1' > > > >1 tests, 1 assertions, 0 failures, 1 errors >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Tue Aug 23 01:06:07 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 23 Aug 2005 00:06:07 -0500 Subject: [Wtr-general] Use Index in a Table given by SpySmith In-Reply-To: <430A861A.30401@gmail.com> References: Message-ID: <5.1.0.14.2.20050823000507.02fcc9a8@127.0.0.1> At 09:12 PM 8/22/2005, Jeff Wood wrote: >>But how can I do it using the Index [137] that SpySmith gave me? We don't support this. And that seems to be a really bad idea anyway. Any change to the page layout will break this. Bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Tue Aug 23 01:10:36 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 23 Aug 2005 00:10:36 -0500 Subject: [Wtr-general] Test suites In-Reply-To: <63915d6a05082214194454f300@mail.gmail.com> Message-ID: <5.1.0.14.2.20050823000658.02fceda0@127.0.0.1> How are you running your tests? Are you double-clicking on a script with all the requires? Instead, go to a cmd prompt and type "ruby script.rb". Then you will see the summary. It's being created all along, but when you double-click, there is no where to show it. This is also a GUI test runner for Test::Unit. I haven't used it, but you may want to give it a look. You are on the right track to run all the tests from the command line. It's a simple matter to then wrap this up as an ant task. Bret At 04:19 PM 8/22/2005, Lisa Crispin wrote: >Eventually we want to run our tests from CruiseControl, but I think >the first baby step would be actually to run a suite of tests from the >command line. (Or maybe I'm wrong about that, maybe I should run each >test from ant, I am not sure, I am seeking advice on this). The >test::unit doc (http://www.ruby-doc.org/core/classes/Test/Unit.html) >shows that you can simply require each test and it will magically be >run. This works. However, I want a summary of the results at the >end, how many tests ran, how many assertions, failures, errors, summed >for all the tests that ran. > >I've googled and looked at the Scripting for Testers class materials >(Boy, I wish I could have attended that at Agile 2005, but I was >presenting at the same time), and I can't find out how to do this. I >see there is something called 'Watir::logging' (very clever) but I >can't find any doc on how to use it (at least, not any doc that I can >make heads or tails out of). > >Is there a way to run a suite of tests and get a summary of the >results at the end? > >Am I better off doing this in ant from the get-go or am I correct to >look for intermediate steps? >thanks, >Lisa > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Tue Aug 23 01:12:23 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 23 Aug 2005 00:12:23 -0500 Subject: [Wtr-general] Running IE minimized or invisible? In-Reply-To: <24d0cb380508221248596cfe0a@mail.gmail.com> Message-ID: <5.1.0.14.2.20050823001119.02ff0ac0@127.0.0.1> Any of these should work... > testscript.rb -b ie.ie.visible = false ie.minimize At 02:48 PM 8/22/2005, saud aziz wrote: >Is it possible to run your tests scripting in Ruby with Watir (of course) >either with IE minimized or invisible? > >I would like to be able to work on other stuff while it does its thing >without interrupted. Is that possible? > >-- >"..man is a human being, not because of his physical powers for physically >the camel is his superior; not because of his size for the elephant is >larger; not because of his courage for the lion is more courageous; not >because of his appetite for the ox has the greater; not because of coitus >for the least of the birds is more virile than he, but rather by virtue of >his noble aims and ideals. [As a matter of fact] he was only created to >know." (Al- Ghazali; The book of Knowledge, Section 1) > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From thomas.ohrbom at extend.no Tue Aug 23 01:36:57 2005 From: thomas.ohrbom at extend.no (=?ISO-8859-1?Q?Thomas_=D8hrbom?=) Date: Tue, 23 Aug 2005 07:36:57 +0200 Subject: [Wtr-general] Using Watir with javascript HTML-editor (textarea)? Message-ID: <430AB5F9.7070407@extend.no> 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 QA Manager, extend AS thomas.ohrbom at extend.no | http://www.extend.no/ From bret at pettichord.com Tue Aug 23 01:49:24 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 23 Aug 2005 00:49:24 -0500 Subject: [Wtr-general] How to click a javascript alert button In-Reply-To: <63915d6a050822124418b323c1@mail.gmail.com> Message-ID: <5.1.0.14.2.20050823004732.03015d08@127.0.0.1> This is the hardest thing to do with Watir right now, and out top priority to fix. You might want to look at watir/dialog.rb in HEAD for a new way to handle this -- see dialog_tests.rb for examples on how to use this. What is HEAD -- this is our CVS repository. At 02:44 PM 8/22/2005, Lisa Crispin wrote: >Our app has some buttons that, when clicked, pop up a Javascript alert >and want a 'yes' or 'ok' response to continue and do the function that >they do. I found some suggestions for how to do this with Watir but >none of 'em worked. For example I tried this one: > Thread.new { sleep 0.1; WindowHelper.new.push_alert_button } > $ie.link(:id, "whatever").click #this causes an Alert() >Unfortunately I've forgotten the other one I tried and can't find it >now (this was Friday, I've had a whole weekend to forget). > >I found some emails with references to AutoIt, and tried researching >that but the emails were too cryptic for me. Is there a way to click >a button on a Javascript popup alert? >thanks >Lisa > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Tue Aug 23 02:27:07 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 23 Aug 2005 01:27:07 -0500 Subject: [Wtr-general] Using Watir with javascript HTML-editor (textarea)? In-Reply-To: <430AB5F9.7070407@extend.no> Message-ID: <5.1.0.14.2.20050823012357.03017540@127.0.0.1> 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 >QA Manager, extend AS >thomas.ohrbom at extend.no | http://www.extend.no/ >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From singh_angrez at rediffmail.com Tue Aug 23 08:57:59 2005 From: singh_angrez at rediffmail.com (Angrez Singh) Date: 23 Aug 2005 12:57:59 -0000 Subject: [Wtr-general] "Unknown Method" error in Watir 1.4 Message-ID: <20050823125759.16287.qmail@webmail32.rediffmail.com> ? Hi, I have downloaded Watir 1.4 and got the following error while trying to access 'to_s' method of 'P' element. My script accesses the 'P' element using the 'id' attribute. The code looks like this: 1. element = $ie.p(:id,"pElement") 2. puts element.type 3. puts element.to_s The exact error is: P d:/installations/ruby/lib/ruby/site_ruby/1.8/watir.rb:2211:in `span_div_string_creator': undefined method `style' for # (NoMethodError) from d:/installations/ruby/lib/ruby/site_ruby/1.8/watir.rb:2222:in `to_s' from testXpath.rb:10 The 'P' on first line is shown due to line no.2 of the code shown above but when I try to access 'to_s' method it gives an error. I think there is a bug in the 'span_div_string_creator' method of 'class SpanDivCommon' The code of this function looks like this in version 1.4: # this method is used to populate the properties in the to_s method def span_div_string_creator n = [] n << "style:".ljust(TO_S_SIZE) + self.style n << "text:".ljust(TO_S_SIZE) + self.text return n end private :span_div_string_creator Now when we try to do 'self.style' an error is thrown because there is no property or method called 'style' for 'IHTMLParaElement' whose object we access in watir. For more information: http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/mshtml/reference/ifaces/paraelement/paraelement.asp This link from MSDN shows that 'IHTMLParaElement' has only one property called 'align' Similarly while accessing 'SPAN' element I got the same error because 'IHTMLSpanFlow' element also contains only 'align' property. For more information: http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/mshtml/reference/ifaces/spanflow/spanflow.asp This holds true from 'DIV' element also because 'IHTMLDivElement' contains properties 'noWrap' and 'align' For more information: http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/mshtml/reference/ifaces/divelement/divelement.asp Or am I missing something completely here? Regards, Angrez -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050823/112dc263/attachment.html From alex at cine.gr Tue Aug 23 09:41:00 2005 From: alex at cine.gr (Alex GLove) Date: Tue, 23 Aug 2005 14:41:00 +0100 Subject: [Wtr-general] How to use it in Watir? Message-ID: Hi guys, I am trying to make watir to click on an object but with no luck. I tried both: ie.image(:src, '/Images/xxx.gif').click ie.image(:id,Your DIsco needs you').click what am I supposed to enter? many thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050823/7e22af0c/attachment.html From zeljko.filipin at gmail.com Tue Aug 23 09:53:18 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 23 Aug 2005 15:53:18 +0200 Subject: [Wtr-general] How to use it inWatir? In-Reply-To: Message-ID: <430b2a29.4fc9322b.3a80.ffffa09c@mx.gmail.com> is really a button, so you should do: ie.button(:src, '/Images/xxx.gif').click Zeljko _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Alex GLove Sent: Tuesday, August 23, 2005 3:41 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] How to use it inWatir? Hi guys, I am trying to make watir to click on an object but with no luck. I tried both: ie.image(:src, '/Images/xxx.gif').click ie.image(:id,Your DIsco needs you').click what am I supposed to enter? many thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050823/531a4332/attachment.html From singh_angrez at rediffmail.com Tue Aug 23 10:04:06 2005 From: singh_angrez at rediffmail.com (Angrez Singh) Date: 23 Aug 2005 14:04:06 -0000 Subject: [Wtr-general] finding text in a cell that contains a specified image? Message-ID: <20050823140406.17818.qmail@webmail47.rediffmail.com> ? Hi, I think instead of iterating through the each table and then subsequently each row and cell of that table, we need a more powerful way of addressing elements using some structure specific query mechanism like XPath. If your HTML looks something like this:
And now you want to access the
tag which has image with source '2.jpg', you can use the following XPath expression to identify the element of interest: "//img[@src='2.jpg']/../" And the Watir code to specify this will look like: $ie.td(:xpath,"//img[@src='2.img']/../") We have been working on Watir to add XPath support for elements that can't (easily) be accessed using the attributes that are provided by Watir, but can be structurally addressed. A test version of that is ready which we have been testing and using internally; we plan to make it available to the larger Watir community if Bret, Paul et al think that it would be helpful. We had originally planned to do some more testing but if people might find it useful to have it available earlier we'll do it sooner. On Fri, 19 Aug 2005 Shao Kang Tat wrote : >I'm doing something similar. But I'm not dealing with images, rather >links and texts, so I'd imagine the code would be similar to the one >I"m using and would work: > > >ie.tables.each do|t| # since you don't have ID's, look at every table > for i in 1..t.row_count # for every row in this table > > # for every column in this row, look at its contents > t[i].each{|c| if c.image(:src, xxx).exists? # if true, this >is your cell > return c.text.strip > } > end >end > > > > > > > >On 8/19/05, Warren Pollans wrote: > > Hello again, > > > > Could some please point me to a way of finding text in a cell that > > contains a specified image? There are no ids available for the table, > > row or cell :-( - and there are several tables on the page. There is > > only one cell (at a time) that contains this particular image - the > > text in the cell is displaying status that I'm trying to capture. This > > status msg can occur in one of four different tables - depending on > > which form on the page is submitted - the same image is used in all > > cases. > > > > I think I want to walk through the DOM looking for a td element that has > > "img src=xxx" - I imagine there's a simpler watir way :-) > > > > Thanks, > > > > Warren > > _______________________________________________ > > 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/20050823/cfbf0115/attachment.html From shaorobics at gmail.com Tue Aug 23 10:28:08 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Tue, 23 Aug 2005 10:28:08 -0400 Subject: [Wtr-general] Table bug Message-ID: <593b9ae805082307282298aef8@mail.gmail.com> I'm working on an app which makes an empty table (it has zero columnsfor some reason and has NO ID) So as I test in IRB I did: ie.tables.each do|t|puts tend I get an error: WIN32OLERuntimeError: Unknown property or method `0' HRESULT error code:0x80020006 Unknown name. from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2472:in `[]' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2472:in `row' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2438:in `column_count' from (irb):50 from (irb):49:in `each' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2119:in `upto' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2119:in `each' from (irb):49 from ?:0 which I pinpointed to t.column_count since when I *puts* each of theother properties out one at a time I don['t get this error From zeljko.filipin at gmail.com Tue Aug 23 10:46:05 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 23 Aug 2005 16:46:05 +0200 Subject: [Wtr-general] watir/dialog Message-ID: <430b3687.55872ece.3a80.ffffbd93@mx.gmail.com> Is watir/dialog removed from new version? I just installed watir gem, and both remote_eval and watir/dialog seem to be missing (or am I missing something)? I recently moved to remote_eval for dealing with javascript pop up windows. Zeljko From lisa.crispin at gmail.com Tue Aug 23 11:09:06 2005 From: lisa.crispin at gmail.com (Lisa Crispin) Date: Tue, 23 Aug 2005 09:09:06 -0600 Subject: [Wtr-general] Re: Wtr-general Digest, Vol 21, Issue 68 In-Reply-To: <200508230509.j7N59ocT021847@rubyforge.org> References: <200508230509.j7N59ocT021847@rubyforge.org> Message-ID: <63915d6a050823080946888207@mail.gmail.com> Thanks, Bret, that did the trick. I wasn't double clicking, I was just typing the name of the suite.rb file from the command prompt, which must amount to the same thing. I knew there had to be some simple way to do this! -- Lisa > ------------------------------ > > Message: 7 > Date: Tue, 23 Aug 2005 00:10:36 -0500 > From: Bret Pettichord > Subject: Re: [Wtr-general] Test suites > To: wtr-general at rubyforge.org > Message-ID: <5.1.0.14.2.20050823000658.02fceda0 at 127.0.0.1> > Content-Type: text/plain; charset="us-ascii"; format=flowed > > How are you running your tests? Are you double-clicking on a script with > all the requires? Instead, go to a cmd prompt and type "ruby script.rb". > Then you will see the summary. > > It's being created all along, but when you double-click, there is no where > to show it. > > This is also a GUI test runner for Test::Unit. I haven't used it, but you > may want to give it a look. > > You are on the right track to run all the tests from the command line. It's > a simple matter to then wrap this up as an ant task. > > Bret > > At 04:19 PM 8/22/2005, Lisa Crispin wrote: > >Eventually we want to run our tests from CruiseControl, but I think > >the first baby step would be actually to run a suite of tests from the > >command line. (Or maybe I'm wrong about that, maybe I should run each > >test from ant, I am not sure, I am seeking advice on this). The > >test::unit doc (http://www.ruby-doc.org/core/classes/Test/Unit.html) > >shows that you can simply require each test and it will magically be > >run. This works. However, I want a summary of the results at the > >end, how many tests ran, how many assertions, failures, errors, summed > >for all the tests that ran. > > > >I've googled and looked at the Scripting for Testers class materials > >(Boy, I wish I could have attended that at Agile 2005, but I was > >presenting at the same time), and I can't find out how to do this. I > >see there is something called 'Watir::logging' (very clever) but I > >can't find any doc on how to use it (at least, not any doc that I can > >make heads or tails out of). > > > >Is there a way to run a suite of tests and get a summary of the > >results at the end? > > > >Am I better off doing this in ant from the get-go or am I correct to > >look for intermediate steps? > >thanks, > >Lisa > > > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > _____________________ > Bret Pettichord > www.pettichord.com > > > > ------------------------------ > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > End of Wtr-general Digest, Vol 21, Issue 68 > ******************************************* > From exortech at gmail.com Tue Aug 23 11:33:31 2005 From: exortech at gmail.com (Owen Rogers) Date: Tue, 23 Aug 2005 11:33:31 -0400 Subject: [Wtr-general] html() and outerhtml() methods Message-ID: just noticed that the html() and outerhtml() methods return getDocument().body.outerHTML. this returns only the html for the body section, not for the entire page, which i'm inferring from the comments, is the correct behaviour. to get the html for the entire page, i've found that getDocument().firstChild.outerHTML does the trick, though there might be a better way to get the document root element. cheers, owen. -- Owen Rogers | http://dotnetjunkies.com/weblog/exortech | CruiseControl.NET - http://ccnet.thoughtworks.com From Ben.Torres at rhi.com Tue Aug 23 12:00:41 2005 From: Ben.Torres at rhi.com (Torres, Ben (HQP)) Date: Tue, 23 Aug 2005 09:00:41 -0700 Subject: [Wtr-general] Re: How to click a javascript alert button Message-ID: <1641BB0AA7287848817A63C3EE9677D5077FC010@hqp-ex-mb05.na.msds.rhi.com> Hi, How can I get to HEAD to download dialog_tests.rb? Thanks, Ben ------------------------------ Date: Tue, 23 Aug 2005 00:49:24 -0500 From: Bret Pettichord Subject: Re: [Wtr-general] How to click a javascript alert button To: wtr-general at rubyforge.org Message-ID: <5.1.0.14.2.20050823004732.03015d08 at 127.0.0.1> Content-Type: text/plain; charset="us-ascii"; format=flowed This is the hardest thing to do with Watir right now, and out top priority to fix. You might want to look at watir/dialog.rb in HEAD for a new way to handle this -- see dialog_tests.rb for examples on how to use this. What is HEAD -- this is our CVS repository. At 02:44 PM 8/22/2005, Lisa Crispin wrote: >Our app has some buttons that, when clicked, pop up a Javascript alert >and want a 'yes' or 'ok' response to continue and do the function that >they do. I found some suggestions for how to do this with Watir but >none of 'em worked. For example I tried this one: > Thread.new { sleep 0.1; WindowHelper.new.push_alert_button } > $ie.link(:id, "whatever").click #this causes an Alert() >Unfortunately I've forgotten the other one I tried and can't find it >now (this was Friday, I've had a whole weekend to forget). > >I found some emails with references to AutoIt, and tried researching >that but the emails were too cryptic for me. Is there a way to click >a button on a Javascript popup alert? >thanks >Lisa > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From noreply at rubyforge.org Tue Aug 23 12:41:22 2005 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 23 Aug 2005 12:41:22 -0400 Subject: [Wtr-general] [ wtr-Bugs-2292 ] Watir 1.4.1 installer - error opening file for writing Message-ID: <200508231641.j7NGfMQT006423@rubyforge.org> Bugs item #2292, was opened at 2005-08-23 12:41 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=487&aid=2292&group_id=104 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: Watir 1.4.1 installer - error opening file for writing Initial Comment: Win2k Unable to install watir using new 1.4.1 installer Steps: 1) Run installer 2) Change Destination Folder to c:\watir 3) Click Install Results: Error message: Dialog box: Error opening file for writing: \watir\AutoItX.chm Abort,Retry,Ignore Details: Output folder: \watir Can't write \watir\AutoItX.chm ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=487&aid=2292&group_id=104 From bret at pettichord.com Tue Aug 23 09:31:54 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 23 Aug 2005 08:31:54 -0500 Subject: [Wtr-general] "Unknown Method" error in Watir 1.4 In-Reply-To: <20050823125759.16287.qmail@webmail32.rediffmail.com> Message-ID: <5.1.0.14.2.20050823083138.0304ef28@127.0.0.1> This is fixed in 1.4.1 At 07:57 AM 8/23/2005, Angrez Singh wrote: > >Hi, > >I have downloaded Watir 1.4 and got the following error while trying to >access 'to_s' method of 'P' element. > >My script accesses the 'P' element using the 'id' attribute. The code >looks like this: > > 1. element = $ie.p(:id,"pElement") > 2. puts element.type > 3. puts element.to_s > >The exact error is: >P >d:/installations/ruby/lib/ruby/site_ruby/1.8/watir.rb:2211:in >`span_div_string_creator': undefined method `style' for ># (NoMethodError) > from > d:/installations/ruby/lib/ruby/site_ruby/1.8/watir.rb:2222:in `to_s' > from testXpath.rb:10 > >The 'P' on first line is shown due to line no.2 of the code shown above >but when I try to access 'to_s' method it gives an error. > >I think there is a bug in the 'span_div_string_creator' method of 'class >SpanDivCommon' > >The code of this function looks like this in version 1.4: > # this method is used to populate the properties in the to_s method > def span_div_string_creator > n = [] > n << "style:".ljust(TO_S_SIZE) + self.style > n << "text:".ljust(TO_S_SIZE) + self.text > return n > end > private :span_div_string_creator > >Now when we try to do 'self.style' an error is thrown because there is no >property or method called 'style' for 'IHTMLParaElement' whose object we >access in watir. > >For more information: >http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/mshtml/reference/ifaces/paraelement/paraelement.asp > >This link from MSDN shows that 'IHTMLParaElement' has only one property >called 'align' > >Similarly while accessing 'SPAN' element I got the same error because >'IHTMLSpanFlow' element also contains only 'align' property. > >For more information: >http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/mshtml/reference/ifaces/spanflow/spanflow.asp > >This holds true from 'DIV' element also because 'IHTMLDivElement' contains >properties 'noWrap' and 'align' >For more information: >http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/mshtml/reference/ifaces/divelement/divelement.asp > >Or am I missing something completely here? > >Regards, >Angrez > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From tuyet.ctn at mscibarra.com Tue Aug 23 13:46:22 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Tue, 23 Aug 2005 10:46:22 -0700 Subject: [Wtr-general] WAIT statement didn't wait? Message-ID: OK, thanks, Bret for the suggestion. Per your request, here are some additional lines of code that preceded the "while" statement. There is the "attach" statement which may be causing the problem since you had opened up a bug on that a couple of days ago? ie.frame(:name, "portfolioTreeContent").frame(:name, treeframe).link(:text, /MMIM/).click sleep 3 ie = Watir::IE.attach(:url, "https://test.com/araneae/app") #Reconnect back to main frame ie.frame("main").frame("sidebar").wait("analysisSidebarTabContent") sleep 3 while !ie.frame("main").frame("sidebar").frame("analysisSidebarTabContent").image( :src, /icon_report_positions.gif/).exists? sleep 0.1 end ie.frame("main").frame("sidebar").frame("analysisSidebarTabContent").image(: src, /icon_report_positions.gif/).click -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050823/b169e0c4/attachment.html From bret at pettichord.com Tue Aug 23 16:30:15 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 23 Aug 2005 15:30:15 -0500 Subject: [Wtr-general] watir/dialog In-Reply-To: <430b3687.55872ece.3a80.ffffbd93@mx.gmail.com> Message-ID: <5.1.0.14.2.20050823152941.03059720@127.0.0.1> It has not yet been released. Unlike previous releases, 1.4.1 did not include everything in HEAD. Bret At 09:46 AM 8/23/2005, Zeljko Filipin wrote: >Is watir/dialog removed from new version? I just installed watir gem, and >both remote_eval and watir/dialog seem to be missing (or am I missing >something)? >I recently moved to remote_eval for dealing with javascript pop up windows. > >Zeljko > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Tue Aug 23 16:59:24 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 23 Aug 2005 15:59:24 -0500 Subject: [Wtr-general] How to use it in Watir? In-Reply-To: Message-ID: <5.1.0.14.2.20050823155905.03082ae8@127.0.0.1> ie.image(:name, 'xxx').click At 08:41 AM 8/23/2005, Alex GLove wrote: >Hi guys, > >I am trying to make watir to click on an >object but with no luck. > >I tried both: >ie.image(:src, '/Images/xxx.gif').click >ie.image(:id,Your DIsco needs you').click > >what am I supposed to enter? > >many thanks >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Tue Aug 23 17:01:41 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 23 Aug 2005 16:01:41 -0500 Subject: [Wtr-general] finding text in a cell that contains a specified image? In-Reply-To: <20050823140406.17818.qmail@webmail47.rediffmail.com> Message-ID: <5.1.0.14.2.20050823160048.0301d008@127.0.0.1> At 09:04 AM 8/23/2005, Angrez Singh wrote: >We have been working on Watir to add XPath support for elements that can't >(easily) be accessed using the attributes that are provided by Watir, but >can be structurally addressed. A test version of that is ready which we >have been testing and using internally; we plan to make it available to >the larger Watir community if Bret, Paul et al think that it would be >helpful. We had originally planned to do some more testing but if people >might find it useful to have it available earlier we'll do it sooner. This sounds interesting and useful. Can you also give us unit tests? _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Tue Aug 23 17:04:13 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 23 Aug 2005 16:04:13 -0500 Subject: [Wtr-general] html() and outerhtml() methods In-Reply-To: Message-ID: <5.1.0.14.2.20050823160225.0307e8a0@127.0.0.1> I would call this a bug, actually. At 10:33 AM 8/23/2005, Owen Rogers wrote: >just noticed that the html() and outerhtml() methods return >getDocument().body.outerHTML. this returns only the html for the body >section, not for the entire page, which i'm inferring from the >comments, is the correct behaviour. >to get the html for the entire page, i've found that >getDocument().firstChild.outerHTML does the trick, though there might >be a better way to get the document root element. >cheers, >owen. >-- >Owen Rogers | http://dotnetjunkies.com/weblog/exortech | >CruiseControl.NET - http://ccnet.thoughtworks.com > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Tue Aug 23 17:09:37 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 23 Aug 2005 16:09:37 -0500 Subject: [Wtr-general] WAIT statement didn't wait? In-Reply-To: Message-ID: <5.1.0.14.2.20050823160530.0307eed0@127.0.0.1> Tx for the info. Just so you know, this doesn't do what you think: ie.frame("main").frame("sidebar").wait("analysisSidebarTabContent") It's actually the same as ie.frame("main").frame("sidebar").wait(true) The fix regarding wait and attach is in 1.4., so this may be a new problem. Bret At 12:46 PM 8/23/2005, Tuyet Cong-Ton-Nu wrote: >OK, thanks, Bret for the suggestion. Per your request, here are some >additional lines of code that preceded the while statement. > >There is the attach statement which may be causing the problem since you >had opened up a bug on that a couple of days ago? > > > > > >ie.frame(:name, "portfolioTreeContent").frame(:name, >treeframe).link(:text, /MMIM/).click > > sleep 3 > > ie = Watir::IE.attach(:url, > "https://test.com/araneae/app") #Reconnect back to main frame > > >ie.frame("main").frame("sidebar").wait("analysisSidebarTabContent") > > sleep 3 > > while > !ie.frame("main").frame("sidebar").frame("analysisSidebarTabContent").image(:src, > /icon_report_positions.gif/).exists? > > sleep 0.1 > > end > > >ie.frame("main").frame("sidebar").frame("analysisSidebarTabContent").image(:src, >/icon_report_positions.gif/).click >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Tue Aug 23 17:41:49 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 23 Aug 2005 16:41:49 -0500 Subject: [Wtr-general] Table bug In-Reply-To: <593b9ae805082307282298aef8@mail.gmail.com> Message-ID: <5.1.0.14.2.20050823164127.03096678@127.0.0.1> Could you log this in our bug tracker? At 09:28 AM 8/23/2005, Shao Kang Tat wrote: >I'm working on an app which makes an empty table (it has zero columnsfor >some reason and has NO ID) >So as I test in IRB I did: >ie.tables.each do|t|puts tend >I get an error: >WIN32OLERuntimeError: Unknown property or method `0' HRESULT error >code:0x80020006 Unknown name. from >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2472:in `[]' from >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2472:in `row' from >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2438:in `column_count' from >(irb):50 from (irb):49:in `each' from >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2119:in `upto' from >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2119:in `each' from >(irb):49 from ??:0 >which I pinpointed to t.column_count since when I *puts* each of theother >properties out one at a time I don['t get this error >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Tue Aug 23 17:43:33 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 23 Aug 2005 16:43:33 -0500 Subject: [Wtr-general] Re: How to click a javascript alert button In-Reply-To: <1641BB0AA7287848817A63C3EE9677D5077FC010@hqp-ex-mb05.na.ms ds.rhi.com> Message-ID: <5.1.0.14.2.20050823164311.030a0030@127.0.0.1> At 11:00 AM 8/23/2005, Torres, Ben (HQP) wrote: >How can I get to HEAD to download dialog_tests.rb? http://rubyforge.org/scm/?group_id=104 Go here and browse the CVS repostory. _____________________ Bret Pettichord www.pettichord.com From Jan.Montano at thomson.com Tue Aug 23 21:07:13 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Wed, 24 Aug 2005 09:07:13 +0800 Subject: [Wtr-general] recording of scripts for watir Message-ID: Hi! Is there a functionality or tool in watir that could records actions taken navigating a site and then automatically translating it into watir script? just like in microsoft application center test? From Tim.Feltham at orionhealth.com Tue Aug 23 21:11:52 2005 From: Tim.Feltham at orionhealth.com (Tim Feltham) Date: Wed, 24 Aug 2005 13:11:52 +1200 Subject: [Wtr-general] recording of scripts for watir Message-ID: <0FDF67DB50EC904AAEA1B2A83A281050013A8BE9@mail.orion.internal> nearly, sort of. There is work on something called WatirMaker, but its going to be more of a tool to base the scripts on. ________________________________ From: wtr-general-bounces at rubyforge.org on behalf of Jan.Montano at thomson.com Sent: Wed 24/08/2005 1:07 p.m. To: wtr-general at rubyforge.org Subject: [Wtr-general] recording of scripts for watir Hi! Is there a functionality or tool in watir that could records actions taken navigating a site and then automatically translating it into watir script? just like in microsoft application center test? _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 3673 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050824/fb43ed7f/attachment.bin From exortech at gmail.com Tue Aug 23 22:45:09 2005 From: exortech at gmail.com (Owen Rogers) Date: Tue, 23 Aug 2005 22:45:09 -0400 Subject: [Wtr-general] html() and outerhtml() methods In-Reply-To: <5.1.0.14.2.20050823160225.0307e8a0@127.0.0.1> References: <5.1.0.14.2.20050823160225.0307e8a0@127.0.0.1> Message-ID: > At 10:33 AM 8/23/2005, Owen Rogers wrote: > >to get the html for the entire page, i've found that > >getDocument().firstChild.outerHTML does the trick, though there might > >be a better way to get the document root element. On 23/08/05, Bret Pettichord wrote: > I would call this a bug, actually. incidentally, contrary to what i thought, getDocument().firstChild.outerHTML doesn't work in all cases. if the document is not single-rooted the firstChild could be anything. if it's xml then you'll end up with the xml processing instruction. there must be an appropriate object in the DOM, but i haven't figured out yet what it is. cheers, owen. -- Owen Rogers | http://dotnetjunkies.com/weblog/exortech | CruiseControl.NET - http://ccnet.thoughtworks.com From Jan.Montano at thomson.com Tue Aug 23 22:47:41 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Wed, 24 Aug 2005 10:47:41 +0800 Subject: [Wtr-general] recording of scripts for watir Message-ID: ahh ok. Thanks! -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Tim Feltham Sent: Wednesday, August 24, 2005 9:12 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] recording of scripts for watir nearly, sort of. There is work on something called WatirMaker, but its going to be more of a tool to base the scripts on. _____ From: wtr-general-bounces at rubyforge.org on behalf of Jan.Montano at thomson.com Sent: Wed 24/08/2005 1:07 p.m. To: wtr-general at rubyforge.org Subject: [Wtr-general] recording of scripts for watir Hi! Is there a functionality or tool in watir that could records actions taken navigating a site and then automatically translating it into watir script? just like in microsoft application center test? _______________________________________________ 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/20050824/2874cbc2/attachment.html From zeljko.filipin at gmail.com Wed Aug 24 06:00:08 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 24 Aug 2005 12:00:08 +0200 Subject: [Wtr-general] watir/dialog In-Reply-To: <5.1.0.14.2.20050823152941.03059720@127.0.0.1> Message-ID: <430c4504.6a44e4dd.29da.ffffb850@mx.gmail.com> Thanks. I downloaded HEAD. Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Tuesday, August 23, 2005 10:30 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] watir/dialog It has not yet been released. Unlike previous releases, 1.4.1 did not include everything in HEAD. Bret At 09:46 AM 8/23/2005, Zeljko Filipin wrote: >Is watir/dialog removed from new version? I just installed watir gem, and >both remote_eval and watir/dialog seem to be missing (or am I missing >something)? >I recently moved to remote_eval for dealing with javascript pop up windows. > >Zeljko > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From sathish.chandrasekaran at tatainfotech.com Wed Aug 24 08:42:09 2005 From: sathish.chandrasekaran at tatainfotech.com (Sathish Chandrasekaran) Date: Wed, 24 Aug 2005 18:12:09 +0530 Subject: [Wtr-general] WATIR Queries Message-ID: <00bf01c5a8a9$3e0f0bc0$370b7aa3@PC30> Hi all, We are using WATIR for automating a java application. We have the following queries: 1. I have a select (combo) box in a form. But i want to access data from a file and use the data for selecting the option in a combo box. How to write a ruby script for the above ( combo box or radio button or List or Option menu and other similar types of selection . ) Can the above be automated using Watir or should it be done manually ?? 2. How to generate a brief report using WATIR, after having populated the database through the form for hundred records ? Please let me know asap Regards Sathish C -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050824/243b588e/attachment.html From zeljko.filipin at gmail.com Wed Aug 24 08:32:24 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 24 Aug 2005 14:32:24 +0200 Subject: [Wtr-general] RE: file_field.set Message-ID: <430c68b8.6a19feb2.29da.02ef@mx.gmail.com> There was no answer to this, but it is really ruining my output. :) I am aware that this is cosmetic issue, but I would really prefer no output when selecting file (like there is no output for any other watir method). Zeljko -----Original Message----- 1) After I do: ie.file_field(:index,1).set('C:\file.txt') I get: Starting win setFileDialog in new process. Setting text C:\file.txt Starting app: C:/ruby/lib/ruby/site_ruby/1.8/watir/setFileDialog.rb C:\file.txt Is there a way to do this without this output? From sathish.chandrasekaran at tatainfotech.com Wed Aug 24 08:48:02 2005 From: sathish.chandrasekaran at tatainfotech.com (Sathish Chandrasekaran) Date: Wed, 24 Aug 2005 18:18:02 +0530 Subject: [Wtr-general] WATIR Queries Message-ID: <00ee01c5a8aa$108d2780$370b7aa3@PC30> Hi all, We are using WATIR for automating a java application. We have the following queries: 1. I have a select (combo) box in a form. But i want to access data from a file and use the data for selecting the option in a combo box. How to write a ruby script for the above ( combo box or radio button or List or Option menu and other similar types of selection . ) Can the above be automated using Watir or should it be done manually ?? 2. How to generate a brief report using WATIR, after having populated the database through the form for hundred records ? Please let me know asap Regards Sathish C -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050824/f982844f/attachment.html From DBoyt at anteon.com Wed Aug 24 10:26:17 2005 From: DBoyt at anteon.com (Boyt, Darrel) Date: Wed, 24 Aug 2005 10:26:17 -0400 Subject: [Wtr-general] How can I access an object a Label points to? Message-ID: <258593F548C79D4AB7CBA2AE72DEBEC88E04E2@HQ-EXVS02.anteon.com> I would like to access a Label by its text. I know what the text is supposed to be, but I don't know what its index, id, or "for" (the index of the object the label's for) is. For example, here's what I have to do now to select an option in a select_list when I know the select_list's label, but not its id: ie.labels.each do |l| if l.text.include?("the label's text") ie.select_list(:id, l.for).select("option text") break end end What I'd like to be able to do is something like this: ie.select_list(:id, ie.label(:text, "the label's text").for).select("option text") Any possibility of this type of functionality being made available sometime? Thanks, Darrel Boyt Systems Analyst Anteon Corporation Montgomery, Alabama From jeff.darklight at gmail.com Wed Aug 24 11:08:20 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 24 Aug 2005 08:08:20 -0700 Subject: [Wtr-general] WATIR Queries In-Reply-To: <00bf01c5a8a9$3e0f0bc0$370b7aa3@PC30> References: <00bf01c5a8a9$3e0f0bc0$370b7aa3@PC30> Message-ID: Sathish, RE: #1 Remember that you have full access to all of Ruby and its core libraries ( as well as a large wealth of 3rd party libraries ) for your WATiR scripts. You can read from files yourself, or connect to a database or any of those options. RE: #2 You'd have to tell us what specifically you are looking for in the way of reporting... Are you looking for database-related information? or, web-server generated information? or testing-side information? It makes a pretty large difference in suggesting a tool for you. j. On 8/24/05, Sathish Chandrasekaran wrote: > > Hi all, > > We are using WATIR for automating a java application. > > We have the following queries: > > 1. I have a select (combo) box in a form. > > But i want to access data from a file and use the data for selecting the > option in a combo box. > > How to write a ruby script for the above ( combo box or radio button or List > or Option menu and other similar types of selection . ) > > Can the above be automated using Watir or should it be done manually ?? > > 2. How to generate a brief report using WATIR, after having populated the > database through the form for hundred records ? > > Please let me know asap > > Regards > > Sathish C > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > -- "So long, and thanks for all the fish" Jeff Wood From paul.rogers at shaw.ca Wed Aug 24 11:21:23 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 24 Aug 2005 09:21:23 -0600 Subject: [Wtr-general] How can I access an object a Label points to? Message-ID: <3f2d4e73f28157.3f281573f2d4e7@shaw.ca> yes, that should definitely be there. Can you add it to the tracker so it doesnt get forgotten? Paul ----- Original Message ----- From: "Boyt, Darrel" Date: Wednesday, August 24, 2005 8:26 am Subject: [Wtr-general] How can I access an object a Label points to? > I would like to access a Label by its text. I know what the text is > supposed to be, but I don't know what its index, id, or "for" (the > indexof the object the label's for) is. > > For example, here's what I have to do now to select an option in a > select_list when I know the select_list's label, but not its id: > > ie.labels.each do |l| > if l.text.include?("the label's text") > ie.select_list(:id, l.for).select("option text") > break > end > end > > What I'd like to be able to do is something like this: > > ie.select_list(:id, ie.label(:text, "the label's > text").for).select("option text") > > Any possibility of this type of functionality being made available > sometime? > > Thanks, > > Darrel Boyt > Systems Analyst > Anteon Corporation > Montgomery, Alabama > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From jeff.darklight at gmail.com Wed Aug 24 11:31:46 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 24 Aug 2005 08:31:46 -0700 Subject: [Wtr-general] Question... Message-ID: I've been looking through the function lists ... There are a number of things like showAllObjects and show_all_objects textField and text_field and on and on ... Was there a decision to change apis at some point ... that's what I seem to be seeing... and if so, which is the current preferred API ? I mean, I prefer to use as few _ chars as possible ... but, let me know. j. -- "So long, and thanks for all the fish" Jeff Wood From noreply at rubyforge.org Wed Aug 24 11:32:59 2005 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 24 Aug 2005 11:32:59 -0400 Subject: [Wtr-general] [ wtr-Bugs-2299 ] Add ability to access a Label by its text Message-ID: <200508241532.j7OFWxis007448@rubyforge.org> Bugs item #2299, was opened at 2005-08-24 11:32 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=487&aid=2299&group_id=104 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: Add ability to access a Label by its text Initial Comment: I would like to access a Label by its text. I know what the text is supposed to be, but I don't know what its index, id, or "for" (the index of the object the label's for) is. For example, here's what I have to do now to select an option in a select_list when I know the select_list's label, but not its id: ie.labels.each do |l| if l.text.include?("the label's text") ie.select_list(:id, l.for).select("option text") break end end What I'd like to be able to do is something like this: ie.select_list(:id, ie.label(:text, "the label's text").for).select("option text") Thanks, Darrel Boyt Systems Analyst Anteon Corporation Montgomery, Alabama ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=487&aid=2299&group_id=104 From paul.rogers at shaw.ca Wed Aug 24 11:56:48 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 24 Aug 2005 09:56:48 -0600 Subject: [Wtr-general] Question... Message-ID: <3f3d96d3f3cbe8.3f3cbe83f3d96d@shaw.ca> I originally wrote the methods using camelCase. the prefferred ruby way is train_case. The camelCase ones will get deprecated, so use train_case Paul ----- Original Message ----- From: Jeff Wood Date: Wednesday, August 24, 2005 9:31 am Subject: [Wtr-general] Question... > I've been looking through the function lists ... There are a > number of > things like > > showAllObjects and show_all_objects > textField and text_field > and on and on ... > > Was there a decision to change apis at some point ... that's what I > seem to be seeing... and if so, which is the current preferred API ? > > I mean, I prefer to use as few _ chars as possible ... but, let me > know. > j. > > > -- > "So long, and thanks for all the fish" > > Jeff Wood > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From jeff.darklight at gmail.com Wed Aug 24 12:21:33 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 24 Aug 2005 09:21:33 -0700 Subject: [Wtr-general] Question... In-Reply-To: <3f3d96d3f3cbe8.3f3cbe83f3d96d@shaw.ca> References: <3f3d96d3f3cbe8.3f3cbe83f3d96d@shaw.ca> Message-ID: darn, but, ok. thanks. j. On 8/24/05, Paul Rogers wrote: > I originally wrote the methods using camelCase. the prefferred ruby way is train_case. > The camelCase ones will get deprecated, so use train_case > > Paul > > ----- Original Message ----- > From: Jeff Wood > Date: Wednesday, August 24, 2005 9:31 am > Subject: [Wtr-general] Question... > > > I've been looking through the function lists ... There are a > > number of > > things like > > > > showAllObjects and show_all_objects > > textField and text_field > > and on and on ... > > > > Was there a decision to change apis at some point ... that's what I > > seem to be seeing... and if so, which is the current preferred API ? > > > > I mean, I prefer to use as few _ chars as possible ... but, let me > > know. > > j. > > > > > > -- > > "So long, and thanks for all the fish" > > > > Jeff Wood > > > > _______________________________________________ > > 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 > -- "So long, and thanks for all the fish" Jeff Wood From lisa.crispin at gmail.com Wed Aug 24 15:06:57 2005 From: lisa.crispin at gmail.com (Lisa Crispin) Date: Wed, 24 Aug 2005 13:06:57 -0600 Subject: [Wtr-general] Re: How to click a javascript alert button Message-ID: <63915d6a0508241206630a4bf7@mail.gmail.com> I did look at dialog.rb, but my ruby/watir/general programming language knowledge is not sufficient to understand how to write the script to click a javascript alert button. Can anyone provide a more detailed explanation? Is there any doc on 'autoit' that might help me? thanks Lisa Message: 3 Date: Tue, 23 Aug 2005 00:49:24 -0500 From: Bret Pettichord Subject: Re: [Wtr-general] How to click a javascript alert button To: wtr-general at rubyforge.org Message-ID: <5.1.0.14.2.20050823004732.03015d08 at 127.0.0.1> Content-Type: text/plain; charset="us-ascii"; format=flowed This is the hardest thing to do with Watir right now, and out top priority to fix. You might want to look at watir/dialog.rb in HEAD for a new way to handle this -- see dialog_tests.rb for examples on how to use this. What is HEAD -- this is our CVS repository. At 02:44 PM 8/22/2005, Lisa Crispin wrote: >Our app has some buttons that, when clicked, pop up a Javascript alert >and want a 'yes' or 'ok' response to continue and do the function that >they do. I found some suggestions for how to do this with Watir but >none of 'em worked. For example I tried this one: > Thread.new { sleep 0.1; WindowHelper.new.push_alert_button } > $ie.link(:id, "whatever").click #this causes an Alert() >Unfortunately I've forgotten the other one I tried and can't find it >now (this was Friday, I've had a whole weekend to forget). > >I found some emails with references to AutoIt, and tried researching >that but the emails were too cryptic for me. Is there a way to click >a button on a Javascript popup alert? >thanks >Lisa From lisa.crispin at gmail.com Wed Aug 24 15:11:06 2005 From: lisa.crispin at gmail.com (Lisa Crispin) Date: Wed, 24 Aug 2005 13:11:06 -0600 Subject: [Wtr-general] Problem with running tests in a suite Message-ID: <63915d6a05082412111ffbf549@mail.gmail.com> If we have really small scripts/test cases, they run fine in a suite. But as we add code to them, we start having a problem where the first IE browser window does not shut down, and the second script errors out because there was a window already open. As the scripts get larger, this happens more consistently. We're working around this by putting in sleeps, but that seems like a hack and potentially unreliable. What am I missing here? One of my Java programmer coworkers who knows some Ruby looked at it with me, but couldn't come up with any other solution. Here is what my suite looks like. Maybe there's a better way to do the suite? $:.push("../lib") $:.push("../scripts/simple") require 'test/unit' require 'Payroll/tc_manage_groups' require 'Payroll/tc_create_payroll' thanks, Lisa From jeff.darklight at gmail.com Wed Aug 24 15:18:30 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 24 Aug 2005 12:18:30 -0700 Subject: [Wtr-general] Problem with running tests in a suite In-Reply-To: <63915d6a05082412111ffbf549@mail.gmail.com> References: <63915d6a05082412111ffbf549@mail.gmail.com> Message-ID: add a setup function to your test case to create a new instance for each test then, add a teardown function and force the browser to go away. ( ie.quit ) that should take care of things... On 8/24/05, Lisa Crispin wrote: > If we have really small scripts/test cases, they run fine in a suite. > But as we add code to them, we start having a problem where the first > IE browser window does not shut down, and the second script errors out > because there was a window already open. As the scripts get larger, > this happens more consistently. > > We're working around this by putting in sleeps, but that seems like a > hack and potentially unreliable. What am I missing here? One of my > Java programmer coworkers who knows some Ruby looked at it with me, > but couldn't come up with any other solution. > > Here is what my suite looks like. Maybe there's a better way to do the suite? > > $:.push("../lib") > $:.push("../scripts/simple") > > require 'test/unit' > require 'Payroll/tc_manage_groups' > require 'Payroll/tc_create_payroll' > > thanks, > Lisa > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "So long, and thanks for all the fish" Jeff Wood From saudaziz at gmail.com Wed Aug 24 15:37:23 2005 From: saudaziz at gmail.com (saud aziz) Date: Wed, 24 Aug 2005 12:37:23 -0700 Subject: [Wtr-general] recording of scripts for watir In-Reply-To: References: Message-ID: <24d0cb3805082412374ce25723@mail.gmail.com> Thats awesome work from Scott. Off i go to extend it ;) On 8/23/05, Jan.Montano at thomson.com wrote: > > ahh ok. Thanks! > > -----Original Message----- > *From:* wtr-general-bounces at rubyforge.org [mailto: > wtr-general-bounces at rubyforge.org]*On Behalf Of *Tim Feltham > *Sent:* Wednesday, August 24, 2005 9:12 AM > *To:* wtr-general at rubyforge.org > *Subject:* RE: [Wtr-general] recording of scripts for watir > > nearly, sort of. > There is work on something called WatirMaker, but its going to be more of > a tool to base the scripts on. > > ------------------------------ > *From:* wtr-general-bounces at rubyforge.org on behalf of > Jan.Montano at thomson.com > *Sent:* Wed 24/08/2005 1:07 p.m. > *To:* wtr-general at rubyforge.org > *Subject:* [Wtr-general] recording of scripts for watir > > Hi! Is there a functionality or tool in watir that could records actions > taken navigating a site and then automatically translating it into watir > script? just like in microsoft application center test? > > _______________________________________________ > 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 > > > -- "..man is a human being, not because of his physical powers for physically the camel is his superior; not because of his size for the elephant is larger; not because of his courage for the lion is more courageous; not because of his appetite for the ox has the greater; not because of coitus for the least of the birds is more virile than he, but rather by virtue of his noble aims and ideals. [As a matter of fact] he was only created to know." (Al- Ghazali; The book of Knowledge, Section 1) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050824/32042083/attachment.html From noreply at rubyforge.org Wed Aug 24 19:50:44 2005 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 24 Aug 2005 19:50:44 -0400 Subject: [Wtr-general] [ wtr-Support Requests-2303 ] get the inner text from a
 tag
Message-ID: <200508242350.j7ONoidP006759@rubyforge.org>

Support Requests item #2303, was opened at 2005-08-24 19:50
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=488&aid=2303&group_id=104

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Nobody (None)
Assigned to: Nobody (None)
Summary: get the inner text from a 
 tag

Initial Comment:
Im trying to get the text from inside a 
 tag that is in a frame. this frame doesn't contain any other HTML but the 
 tag and the text in between. like so...

some text here...
some text here...
some text here...
some text here...
---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=488&aid=2303&group_id=104 From exortech at gmail.com Wed Aug 24 20:00:35 2005 From: exortech at gmail.com (Owen Rogers) Date: Wed, 24 Aug 2005 20:00:35 -0400 Subject: [Wtr-general] Problem with running tests in a suite In-Reply-To: References: <63915d6a05082412111ffbf549@mail.gmail.com> Message-ID: On 24/08/05, Jeff Wood wrote: > add a setup function to your test case to create a new instance for > each test then, add a teardown function and force the browser to go > away. ( ie.quit ) > > that should take care of things... actually, this doesn't quite work. ie.quit/close is an asynchronous call to the ie com server. as a result, the new instance of ie that you create in your setup may connect to a com server that is in the process of shutting down. you can "fix" this with a sleep in your teardown, but it's pretty ugly and unreliable. this is a big problem for watir IHMO. i faced the same problem with a testing wrapper that i wrote for IE in C#. can't remember if i managed to fix it or not. cheers, owen. -- Owen Rogers | http://dotnetjunkies.com/weblog/exortech | CruiseControl.NET - http://ccnet.thoughtworks.com From els_lists at firepoolconsulting.com Wed Aug 24 20:03:25 2005 From: els_lists at firepoolconsulting.com (Edmund Schweppe) Date: Wed, 24 Aug 2005 20:03:25 -0400 Subject: [Wtr-general] Problem with running tests in a suite In-Reply-To: <63915d6a05082412111ffbf549@mail.gmail.com> References: <63915d6a05082412111ffbf549@mail.gmail.com> Message-ID: <430D0ACD.8080104@firepoolconsulting.com> Lisa Crispin wrote: > If we have really small scripts/test cases, they run fine in a suite. > But as we add code to them, we start having a problem where the first > IE browser window does not shut down, and the second script errors out > because there was a window already open. As the scripts get larger, > this happens more consistently. I ran into a similar issue, once I had more than a few tests in the suite. The fix I found was to make sure I always got rid of the old IE instance in the teardown: def setup @ie = Watir::IE::new() @ie.goto(@startingURL) end def teardown if (@ie) @ie.close # needed to ensure that IE process doesn't get # confused by being immediately restarted sleep(2) end end I had to put the sleep(2) in teardown to make sure that iexplore.exe had a chance to do its own internal cleanup before launching a new IE instance. From jeff.darklight at gmail.com Wed Aug 24 22:22:42 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 24 Aug 2005 19:22:42 -0700 Subject: [Wtr-general] watir/dialog In-Reply-To: <5.1.0.14.2.20050823152941.03059720@127.0.0.1> References: <5.1.0.14.2.20050823152941.03059720@127.0.0.1> Message-ID: <430D2B72.9020501@gmail.com> Bret Pettichord wrote: > It has not yet been released. Unlike previous releases, 1.4.1 did not > include everything in HEAD. > > Bret > > At 09:46 AM 8/23/2005, Zeljko Filipin wrote: > >> Is watir/dialog removed from new version? I just installed watir gem, >> and >> both remote_eval and watir/dialog seem to be missing (or am I missing >> something)? >> I recently moved to remote_eval for dealing with javascript pop up >> windows. >> >> Zeljko >> >> _______________________________________________ >> Wtr-general mailing list >> Wtr-general at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-general > > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > Bret, Do you have any examples using the new remote_eval stuff? j. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050824/40395500/attachment.html From bret at pettichord.com Thu Aug 25 00:21:25 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 24 Aug 2005 23:21:25 -0500 Subject: [Wtr-general] Question... In-Reply-To: References: <3f3d96d3f3cbe8.3f3cbe83f3d96d@shaw.ca> <3f3d96d3f3cbe8.3f3cbe83f3d96d@shaw.ca> Message-ID: <5.1.0.14.2.20050824232053.032680a8@127.0.0.1> At 11:21 AM 8/24/2005, Jeff Wood wrote: >darn, but, ok. with time you will thank me. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Aug 25 00:26:17 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 24 Aug 2005 23:26:17 -0500 Subject: [Wtr-general] Re: How to click a javascript alert button In-Reply-To: <63915d6a0508241206630a4bf7@mail.gmail.com> Message-ID: <5.1.0.14.2.20050824232213.0327c580@127.0.0.1> When confused, check the unit test. From dialog_test.rb: def test_confirm_ok $ie.remote_eval <<-END button(:value, 'confirm').click END assert dialog.exists? dialog.button('OK').click assert_equal "You pressed the Confirm and OK button!", $ie.text_field(:id, 'testResult').value end At 02:06 PM 8/24/2005, Lisa Crispin wrote: >I did look at dialog.rb, but my ruby/watir/general programming >language knowledge is not sufficient to understand how to write the >script to click a javascript alert button. Can anyone provide a more >detailed explanation? Is there any doc on 'autoit' that might help >me? >thanks >Lisa > >Message: 3 >Date: Tue, 23 Aug 2005 00:49:24 -0500 >From: Bret Pettichord >Subject: Re: [Wtr-general] How to click a javascript alert button >To: wtr-general at rubyforge.org >Message-ID: <5.1.0.14.2.20050823004732.03015d08 at 127.0.0.1> >Content-Type: text/plain; charset="us-ascii"; format=flowed > >This is the hardest thing to do with Watir right now, and out top priority >to fix. > >You might want to look at watir/dialog.rb in HEAD for a new way to handle >this -- see dialog_tests.rb for examples on how to use this. > >What is HEAD -- this is our CVS repository. > >At 02:44 PM 8/22/2005, Lisa Crispin wrote: > >Our app has some buttons that, when clicked, pop up a Javascript alert > >and want a 'yes' or 'ok' response to continue and do the function that > >they do. I found some suggestions for how to do this with Watir but > >none of 'em worked. For example I tried this one: > > Thread.new { sleep 0.1; WindowHelper.new.push_alert_button } > > $ie.link(:id, "whatever").click #this causes an Alert() > >Unfortunately I've forgotten the other one I tried and can't find it > >now (this was Friday, I've had a whole weekend to forget). > > > >I found some emails with references to AutoIt, and tried researching > >that but the emails were too cryptic for me. Is there a way to click > >a button on a Javascript popup alert? > >thanks > >Lisa > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Aug 25 00:27:53 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 24 Aug 2005 23:27:53 -0500 Subject: [Wtr-general] Problem with running tests in a suite In-Reply-To: <63915d6a05082412111ffbf549@mail.gmail.com> Message-ID: <5.1.0.14.2.20050824232734.0327c238@127.0.0.1> At 02:11 PM 8/24/2005, Lisa Crispin wrote: >If we have really small scripts/test cases, they run fine in a suite. >But as we add code to them, we start having a problem where the first >IE browser window does not shut down, and the second script errors out >because there was a window already open. It sounds like you are seeing two errors. What are they? _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Aug 25 00:31:01 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 24 Aug 2005 23:31:01 -0500 Subject: [Wtr-general] Wet or Watir Message-ID: <5.1.0.14.2.20050824232836.03278098@127.0.0.1> Have you looked at both WET and Watir and then chosen to use Watir? Why? Why shouldn't we just be encouraging everyone to use WET? This is a serious question. Is there anything that you can do with Watir that WET can't do? Bret _____________________ Bret Pettichord www.pettichord.com From jkohl at telusplanet.net Thu Aug 25 00:47:27 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Wed, 24 Aug 2005 22:47:27 -0600 Subject: [Wtr-general] Question... In-Reply-To: <5.1.0.14.2.20050824232053.032680a8@127.0.0.1> Message-ID: <20050825044801.ENTL29056.priv-edtnes27.telusplanet.net@tintin> > with time you will thank me. This is true. :) From bret at pettichord.com Thu Aug 25 00:50:05 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 24 Aug 2005 23:50:05 -0500 Subject: [Wtr-general] [ wtr-Support Requests-2303 ] get the inner text from a
 tag
In-Reply-To: <200508242350.j7ONoidP006759@rubyforge.org>
Message-ID: <5.1.0.14.2.20050824234830.0329bba8@127.0.0.1>

Anyone want to help this guy out?

All you have to do is look at the code for P and Span and do the same thing 
to create a Pre.

It is a couple lines of Ruby.

Any takers?

Bret

At 06:50 PM 8/24/2005, noreply at rubyforge.org wrote:
>Support Requests item #2303, was opened at 2005-08-24 19:50
>You can respond by visiting:
>http://rubyforge.org/tracker/?func=detail&atid=488&aid=2303&group_id=104
>
>Category: None
>Group: None
>Status: Open
>Resolution: None
>Priority: 3
>Submitted By: Nobody (None)
>Assigned to: Nobody (None)
>Summary: get the inner text from a 
 tag
>
>Initial Comment:
>Im trying to get the text from inside a 
 tag that is in a frame. this 
>frame doesn't contain any other HTML but the 
 tag and the text in 
>between. like so...
>
>
>some text here...
>some text here...
>some text here...
>some text here...
>
_____________________ Bret Pettichord www.pettichord.com From sathish.chandrasekaran at tatainfotech.com Thu Aug 25 01:21:31 2005 From: sathish.chandrasekaran at tatainfotech.com (Sathish Chandrasekaran) Date: Thu, 25 Aug 2005 10:51:31 +0530 Subject: [Wtr-general] WATIR Tools queries Message-ID: <005401c5a934$da372dd0$370b7aa3@PC30> Hi iam using your tool for automating a java application. I'd like to know whether the following things are possible, and if yes then how? 1> I have a form with 3 text field and a select box( i.e. i choose an option from a combo box ,click the ">>" , and the chosen option moves to the adjacent combo box). I need to get all this data from a file i.e, i populate a excel sheet ,transfer it into a csv and then automate my form by filling in around 100 records 1 after the other. if i read data from a file for a select box the change is not reflected and the application just stops . how do i do this? 2> If i need to run 10 test cases then how do i write the ruby script ? shoud i write the test cases linearly 1 after the other? or should i write different cases in diff ruby progs? 3> How to include files into a ruby prog. for eg: in c programming, i just have to write #include.....how can the same effect be achieved in ruby? Regards, Nishita Acharya India -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050825/621153d7/attachment.html From saudaziz at gmail.com Thu Aug 25 01:12:05 2005 From: saudaziz at gmail.com (saud aziz) Date: Wed, 24 Aug 2005 22:12:05 -0700 Subject: [Wtr-general] Any intellisense IDE for Ruby? Also WatirMaker rocks.. Message-ID: <24d0cb3805082422125dfeb663@mail.gmail.com> I was actually checking out all the functions that Watir provides that i could use to interact with DOM (for now stuff like id, name, src, etc.) to add functionality to detect and write scripts using watirmaker and thought of checking out WET as well.... i dunno much thus far about it but it looks a bit clean and better to me. As for WatirMaker, thanks for letting me know about it. Since most of stuff i work on constitutes manual testing, for now, i have actually added another control to write out text for repro steps in it, now if i spot something i can just copy/dump "Repro steps" in english in my bug report.. oh well a bit too cheezy but good start on that too, i guess... Another thing i might add is functionality to link variables to excel columns to to test out different cases... For now i want to know if there is any IDE for Ruby that provides intellisense? Ecllipse plug-in maybe anyone...? Any help is much appreciated. Saud -- "..man is a human being, not because of his physical powers for physically the camel is his superior; not because of his size for the elephant is larger; not because of his courage for the lion is more courageous; not because of his appetite for the ox has the greater; not because of coitus for the least of the birds is more virile than he, but rather by virtue of his noble aims and ideals. [As a matter of fact] he was only created to know." (Al- Ghazali; The book of Knowledge, Section 1) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050824/fdf80556/attachment.html From Jan.Montano at thomson.com Thu Aug 25 02:36:10 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Thu, 25 Aug 2005 14:36:10 +0800 Subject: [Wtr-general] NUnitASP VS WATIR Message-ID: hey! What's the difference between NUnitASP and Watir if i may ask... what could watir do, that NUnitASP could not. From Jan.Montano at thomson.com Thu Aug 25 02:45:30 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Thu, 25 Aug 2005 14:45:30 +0800 Subject: [Wtr-general] NUnitASP VS WATIR Message-ID: considering that they are testing a web app done in .NET. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Montano, Jan (Corp,IB&IM) Sent: Thursday, August 25, 2005 2:36 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] NUnitASP VS WATIR hey! What's the difference between NUnitASP and Watir if i may ask... what could watir do, that NUnitASP could not. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From saudaziz at gmail.com Thu Aug 25 02:47:35 2005 From: saudaziz at gmail.com (saud aziz) Date: Wed, 24 Aug 2005 23:47:35 -0700 Subject: [Wtr-general] NUnitASP VS WATIR In-Reply-To: References: Message-ID: <24d0cb38050824234737307260@mail.gmail.com> I believe you need to have .dll file to run NUnitASP. With Watir you don't have to have any access to source code of application to run it.. Also, as its' site explains: "NUnitAsp is for unit testing ASP.NET code-behind only. It's meant for programmers, not QA teams, and it's not very good for QA-style acceptance tests. It only tests server-side logic. JavaScript and other client-side code is ignored. But if you're using ASP.NET, it's an essential part of your programmers' toolset."( http://nunitasp.sourceforge.net/) On 8/24/05, Jan.Montano at thomson.com wrote: > > hey! What's the difference between NUnitASP and Watir if i may ask... > > > what could watir do, that NUnitASP could not. > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "..man is a human being, not because of his physical powers for physically the camel is his superior; not because of his size for the elephant is larger; not because of his courage for the lion is more courageous; not because of his appetite for the ox has the greater; not because of coitus for the least of the birds is more virile than he, but rather by virtue of his noble aims and ideals. [As a matter of fact] he was only created to know." (Al- Ghazali; The book of Knowledge, Section 1) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050824/1500960a/attachment.html From Jan.Montano at thomson.com Thu Aug 25 04:06:51 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Thu, 25 Aug 2005 16:06:51 +0800 Subject: [Wtr-general] NUnitASP VS WATIR Message-ID: I guess you're right. Thanks! -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of saud aziz Sent: Thursday, August 25, 2005 2:48 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] NUnitASP VS WATIR I believe you need to have .dll file to run NUnitASP. With Watir you don't have to have any access to source code of application to run it.. Also, as its' site explains: "NUnitAsp is for unit testing ASP.NET code-behind only. It's meant for programmers, not QA teams, and it's not very good for QA-style acceptance tests. It only tests server-side logic. JavaScript and other client-side code is ignored. But if you're using ASP.NET, it's an essential part of your programmers' toolset."( http://nunitasp.sourceforge.net/) On 8/24/05, Jan.Montano at thomson.com < Jan.Montano at thomson.com> wrote: hey! What's the difference between NUnitASP and Watir if i may ask... what could watir do, that NUnitASP could not. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -- "..man is a human being, not because of his physical powers for physically the camel is his superior; not because of his size for the elephant is larger; not because of his courage for the lion is more courageous; not because of his appetite for the ox has the greater; not because of coitus for the least of the birds is more virile than he, but rather by virtue of his noble aims and ideals. [As a matter of fact] he was only created to know." (Al- Ghazali; The book of Knowledge, Section 1) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050825/810dd842/attachment.html From andy__s at hotmail.com Thu Aug 25 06:39:58 2005 From: andy__s at hotmail.com (Andy Sipe) Date: Thu, 25 Aug 2005 06:39:58 -0400 Subject: [Wtr-general] Problem with running tests in a suite In-Reply-To: Message-ID: An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050825/29445b0d/attachment.html From nishita.acharya at tatainfotech.com Thu Aug 25 07:26:23 2005 From: nishita.acharya at tatainfotech.com (Nishita Acharya) Date: Thu, 25 Aug 2005 16:56:23 +0530 Subject: [Wtr-general] reading from a file Message-ID: <01d601c5a967$d2ca0df0$380d7aa3@PC131> hello, The following stmts chooses "canadaEnglish" from the drop down list.Now thsi string has been hard coded..i want to know how the same string can be read frm a csv(comma separated variable) file. #CODE puts 'Step 2: Select Canada from the Top Stories drop-down list' $ie.select_list( :index , 1).select("Canada English") puts ' Action: selected Canada from the drop-down list.' #END OF CODE Regards, Nishita Acharya Bangalore. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050825/3e7ea1d8/attachment.html From second_one at yahoo.com Thu Aug 25 08:00:55 2005 From: second_one at yahoo.com (Tonny Brown) Date: Thu, 25 Aug 2005 05:00:55 -0700 (PDT) Subject: [Wtr-general] Writing values to a file Message-ID: <20050825120055.30548.qmail@web30409.mail.mud.yahoo.com> Hi there, I was wondering how i can write some values to a file? t1=Time.now t2=3 t3=t1 + t2 puts t1 puts t3 f = File.new("testfile.txt", "w") How am I supposed to write the values of t1 and t3 to the file testfile.txt? thanks a lot ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs From shaorobics at gmail.com Thu Aug 25 08:07:06 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Thu, 25 Aug 2005 08:07:06 -0400 Subject: [Wtr-general] Writing values to a file In-Reply-To: <20050825120055.30548.qmail@web30409.mail.mud.yahoo.com> References: <20050825120055.30548.qmail@web30409.mail.mud.yahoo.com> Message-ID: <593b9ae80508250507cd01c97@mail.gmail.com> I believe it would be just f.write(t1 + "\n") f.write(t3 + "\n") the "\n" puts the next write on a new line From second_one at yahoo.com Thu Aug 25 08:20:13 2005 From: second_one at yahoo.com (Tonny Brown) Date: Thu, 25 Aug 2005 05:20:13 -0700 (PDT) Subject: [Wtr-general] Writing values to a file In-Reply-To: <20050825120055.30548.qmail@web30409.mail.mud.yahoo.com> Message-ID: <20050825122014.91182.qmail@web30402.mail.mud.yahoo.com> Hmm almost there but I get the following error: '+': string can't be coerced into float (TypeError) it has to do with the + in f.write(t3 + "\n") __________________________________ Do you Yahoo!? Yahoo! Mail - You care about security. So do we. http://promotions.yahoo.com/new_mail From shaorobics at gmail.com Thu Aug 25 08:23:18 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Thu, 25 Aug 2005 08:23:18 -0400 Subject: [Wtr-general] Writing values to a file In-Reply-To: <20050825122014.91182.qmail@web30402.mail.mud.yahoo.com> References: <20050825120055.30548.qmail@web30409.mail.mud.yahoo.com> <20050825122014.91182.qmail@web30402.mail.mud.yahoo.com> Message-ID: <593b9ae8050825052324dc12fb@mail.gmail.com> try: f.write(t1.to_s + "\n") From shaorobics at gmail.com Thu Aug 25 08:23:55 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Thu, 25 Aug 2005 08:23:55 -0400 Subject: [Wtr-general] Writing values to a file In-Reply-To: <593b9ae8050825052324dc12fb@mail.gmail.com> References: <20050825120055.30548.qmail@web30409.mail.mud.yahoo.com> <20050825122014.91182.qmail@web30402.mail.mud.yahoo.com> <593b9ae8050825052324dc12fb@mail.gmail.com> Message-ID: <593b9ae805082505231ccf2476@mail.gmail.com> or f.write(t3.to_s + "\n") rather if t3 is the line that's giving you trouble From second_one at yahoo.com Thu Aug 25 08:37:43 2005 From: second_one at yahoo.com (Tonny Brown) Date: Thu, 25 Aug 2005 05:37:43 -0700 (PDT) Subject: [Wtr-general] Writing values to a file In-Reply-To: <593b9ae805082505231ccf2476@mail.gmail.com> Message-ID: <20050825123743.57725.qmail@web30413.mail.mud.yahoo.com> thanks. all done. though i was thinking that if i wanted to update the text file and NOT replace it, I could not use the f.write command. Is that right? i.e. if i want to keep a log of the t1 and t3 values for a period of 1 minute, getting the values every 10 seconds, the f.write command cannot be usefeul because it will overwrite the inital values with the refreshed ones within the text file. Which command should be used in order to have in the text file all the values taken in the last 1 minute? thanks a lot --- Shao Kang Tat wrote: > or > > f.write(t3.to_s + "\n") > > rather if t3 is the line that's giving you trouble > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From shaorobics at gmail.com Thu Aug 25 09:27:56 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Thu, 25 Aug 2005 09:27:56 -0400 Subject: [Wtr-general] Writing values to a file In-Reply-To: <20050825123743.57725.qmail@web30413.mail.mud.yahoo.com> References: <593b9ae805082505231ccf2476@mail.gmail.com> <20050825123743.57725.qmail@web30413.mail.mud.yahoo.com> Message-ID: <593b9ae805082506272582f39b@mail.gmail.com> Well if you create your file and open it, you can just continue writing to it no problem. It's when you create your file, close it for some reason then open it again later on that you might over write it. But in that case you just open it in append mode so nothing gets overwritten. Take a look at http://www.rubycentral.com/book/ref_c_file.html From bret at pettichord.com Thu Aug 25 12:09:58 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 25 Aug 2005 11:09:58 -0500 Subject: [Wtr-general] watir/dialog In-Reply-To: <430D2B72.9020501@gmail.com> References: <5.1.0.14.2.20050823152941.03059720@127.0.0.1> <5.1.0.14.2.20050823152941.03059720@127.0.0.1> Message-ID: <5.1.0.14.2.20050825110947.032b4d08@127.0.0.1> At 09:22 PM 8/24/2005, Jeff Wood wrote: >Do you have any examples using the new remote_eval stuff? In the unit tests _____________________ Bret Pettichord www.pettichord.com From jkohl at telusplanet.net Thu Aug 25 12:55:27 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Thu, 25 Aug 2005 10:55:27 -0600 Subject: [Wtr-general] reading from a file In-Reply-To: <01d601c5a967$d2ca0df0$380d7aa3@PC131> Message-ID: <20050825165607.LGCZ19174.priv-edtnes56.telusplanet.net@tintin> You can use the Ruby CSV library to access data from a delimited file. Read in a particular value, store it in a variable, and then use that variable in place of the hardcoded value. -Jonathan _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Nishita Acharya Sent: August 25, 2005 5:26 AM To: Wtr-general at rubyforge.org Subject: [Wtr-general] reading from a file hello, The following stmts chooses "canadaEnglish" from the drop down list.Now thsi string has been hard coded..i want to know how the same string can be read frm a csv(comma separated variable) file. #CODE puts 'Step 2: Select Canada from the Top Stories drop-down list' $ie.select_list( :index , 1).select("Canada English") puts ' Action: selected Canada from the drop-down list.' #END OF CODE Regards, Nishita Acharya Bangalore. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050825/9ddd7e2a/attachment.html From jkohl at telusplanet.net Thu Aug 25 12:59:22 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Thu, 25 Aug 2005 10:59:22 -0600 Subject: [Wtr-general] reading from a file In-Reply-To: <20050825165607.LGCZ19174.priv-edtnes56.telusplanet.net@tintin> Message-ID: <20050825170001.JXRJ11076.priv-edtnes57.telusplanet.net@tintin> Here is the RDoc for CSV. I found it really easy to follow. The only problem is if you have double quotes in some of your CSV data it throws things off. I swapped them out (like back in the day with SQL Server) and back in when needed. http://www.ruby-doc.org/stdlib/libdoc/csv/rdoc/ _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jonathan Kohl Sent: August 25, 2005 10:55 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] reading from a file You can use the Ruby CSV library to access data from a delimited file. Read in a particular value, store it in a variable, and then use that variable in place of the hardcoded value. -Jonathan _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Nishita Acharya Sent: August 25, 2005 5:26 AM To: Wtr-general at rubyforge.org Subject: [Wtr-general] reading from a file hello, The following stmts chooses "canadaEnglish" from the drop down list.Now thsi string has been hard coded..i want to know how the same string can be read frm a csv(comma separated variable) file. #CODE puts 'Step 2: Select Canada from the Top Stories drop-down list' $ie.select_list( :index , 1).select("Canada English") puts ' Action: selected Canada from the drop-down list.' #END OF CODE Regards, Nishita Acharya Bangalore. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050825/a7ad41c5/attachment.html From lisa.crispin at gmail.com Thu Aug 25 13:04:07 2005 From: lisa.crispin at gmail.com (Lisa Crispin) Date: Thu, 25 Aug 2005 11:04:07 -0600 Subject: [Wtr-general] Re: Wtr-general Digest, Vol 21, Issue 74 In-Reply-To: <200508250643.j7P6hVcT016490@rubyforge.org> References: <200508250643.j7P6hVcT016490@rubyforge.org> Message-ID: <63915d6a050825100437991d24@mail.gmail.com> > Message: 3 > Date: Wed, 24 Aug 2005 23:27:53 -0500 > From: Bret Pettichord > Subject: Re: [Wtr-general] Problem with running tests in a suite > To: wtr-general at rubyforge.org > Message-ID: <5.1.0.14.2.20050824232734.0327c238 at 127.0.0.1> > Content-Type: text/plain; charset="us-ascii"; format=flowed > > At 02:11 PM 8/24/2005, Lisa Crispin wrote: > >If we have really small scripts/test cases, they run fine in a suite. > >But as we add code to them, we start having a problem where the first > >IE browser window does not shut down, and the second script errors out > >because there was a window already open. > > It sounds like you are seeing two errors. What are they? > Here is the output. Some of it is from the scripts. If I add sleep 5 to the second script, it works. Loaded suite ts_payroll_tests Started 3756 => Drake, Robert P. Current page number = 1 Total pages = 1 .url=http://shaggy:80/control.jsp?fid=2 E Finished in 14.329 seconds. 1) Error: test_manage_groups(TC_ManageGroups): Watir::Exception::UnknownObjectException: Unable to locate object, using text an d site login c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in `assert_exists' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2009:in `click' ../lib/Login/Login.rb:24:in `login' ../lib/Login/Login.rb:40:in `fast401k_login' ../lib/Login/Login.rb:69:in `login_as_sponsor_by_plan_name' ../scripts/simple/Payroll/tc_manage_groups.rb:47:in `test_manage_groups' 2 tests, 6 assertions, 0 failures, 1 errors From Sean.Gallagher at ticketmaster.com Thu Aug 25 16:20:54 2005 From: Sean.Gallagher at ticketmaster.com (Sean Gallagher) Date: Thu, 25 Aug 2005 13:20:54 -0700 Subject: [Wtr-general] Writing values to a file Message-ID: <71D28C8451BFD5119B2B00508BE26E6409E11A97@pasmail3.office.tmcs> f = File.new("testfile.txt", "a") f.puts t1.to_s f.puts t3.to_s -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tonny Brown Sent: Thursday, August 25, 2005 5:01 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Writing values to a file Hi there, I was wondering how i can write some values to a file? t1=Time.now t2=3 t3=t1 + t2 puts t1 puts t3 f = File.new("testfile.txt", "w") How am I supposed to write the values of t1 and t3 to the file testfile.txt? thanks a lot ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From kingsley at icecode.org Thu Aug 25 16:31:22 2005 From: kingsley at icecode.org (Kingsley) Date: Thu, 25 Aug 2005 21:31:22 +0100 Subject: [Wtr-general] WATIR Tools queries In-Reply-To: <005401c5a934$da372dd0$370b7aa3@PC30> Message-ID: <001401c5a9b3$f50e4380$0600a8c0@Mercury> Hi You might find this script useful for reading from either a csv file or an excel spreadsheet Thanks Kingsley -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Sathish Chandrasekaran Sent: 25 August 2005 06:22 To: wtr-general at rubyforge.org Cc: Nishita Acharya Subject: [Wtr-general] WATIR Tools queries Hi iam using your tool for automating a java application. I'd like to know whether the following things are possible, and if yes then how? 1> I have a form with 3 text field and a select box( i.e. i choose an option from a combo box ,click the ">>" , and the chosen option moves to the adjacent combo box). I need to get all this data from a file i.e, i populate a excel sheet ,transfer it into a csv and then automate my form by filling in around 100 records 1 after the other. if i read data from a file for a select box the change is not reflected and the application just stops . how do i do this? 2> If i need to run 10 test cases then how do i write the ruby script ? shoud i write the test cases linearly 1 after the other? or should i write different cases in diff ruby progs? 3> How to include files into a ruby prog. for eg: in c programming, i just have to write #include.....how can the same effect be achieved in ruby? Regards, Nishita Acharya India -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050825/8eec2ede/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: datahandler.rb Type: application/octet-stream Size: 2489 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050825/8eec2ede/attachment.obj From kingsley at icecode.org Thu Aug 25 16:36:43 2005 From: kingsley at icecode.org (Kingsley) Date: Thu, 25 Aug 2005 21:36:43 +0100 Subject: [Wtr-general] Writing values to a file In-Reply-To: <71D28C8451BFD5119B2B00508BE26E6409E11A97@pasmail3.office.tmcs> Message-ID: <001c01c5a9b4$b430c670$0600a8c0@Mercury> If you use File.open you can put the code in a block also without having to close the file after File.open("testfile.txt", "w"){|f| f.puts t1,t2} -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Sean Gallagher Sent: 25 August 2005 21:21 To: 'wtr-general at rubyforge.org' Subject: RE: [Wtr-general] Writing values to a file f = File.new("testfile.txt", "a") f.puts t1.to_s f.puts t3.to_s -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tonny Brown Sent: Thursday, August 25, 2005 5:01 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Writing values to a file Hi there, I was wondering how i can write some values to a file? t1=Time.now t2=3 t3=t1 + t2 puts t1 puts t3 f = File.new("testfile.txt", "w") How am I supposed to write the values of t1 and t3 to the file testfile.txt? thanks a lot ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs _______________________________________________ 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 lisa.crispin at gmail.com Thu Aug 25 19:57:53 2005 From: lisa.crispin at gmail.com (Lisa Crispin) Date: Thu, 25 Aug 2005 17:57:53 -0600 Subject: [Wtr-general] Re: Wtr-general Digest, Vol 21, Issue 74 In-Reply-To: <200508250643.j7P6hVcT016490@rubyforge.org> References: <200508250643.j7P6hVcT016490@rubyforge.org> Message-ID: <63915d6a050825165758d99502@mail.gmail.com> Since I'm not a programmer, or apparently not even a very smart tester, it didn't occur to me even to look for a unit test, sorry! ;-> However, I did study your example and make an attempt. It is still not working and I hope maybe someone can help if I post more information. I've had two smart coworkers who know some ruby try to get this working, with no success. (I don't want anyone to think we aren't trying!) Here is what I think is the relevant source code we have for the dialog button: id="deleteLink1" onclick="javascript: if (window.confirm('Are you sure you want to delete \'Dakota Group4259\'?')) Here is what I am trying, please see the comments within this: ie.link(:id, "deleteLink1").click # When we uncomment this block of code and comment out the previous line, we don't get the dialog popup at all # ie.remote_eval <<-END # The ie.link is what we really do to get the dialog window to come up # ie.link(:id, "deleteLink1").click # Bret's example has this, but we don't hvae a button named confirm so we commented it out: button(:value, 'confirm').click # END # This assert always fails if we have the previous block uncommented # assert dialog.exists? dialog.button('OK').click (the last line is the line that gets the error) Here is the error I get. 1) Error: test_manage_groups(TC_ManageGroups): Watir::Exception::UnknownObjectException: c:/ruby/lib/ruby/site_ruby/1.8/watir/dialog.rb:34:in `click' C:/java/eplan70/src/watir/scripts/simple/Payroll/tc_manage_groups.rb:97:in test_manage_groups' Can anyone offer any pointers, or a bit of working code that clicks a javascript alert button on some public site that I can use as an example? Thanks very much. We are getting some traction with Watir, but we have lots of these alert buttons (which is one of the reasons we are trying Watir; our Canoo WebTest scripts also cannot click the javascript alerts), and we will be severely limited if we can't click them. -- Lisa > Message: 2 > Date: Wed, 24 Aug 2005 23:26:17 -0500 > From: Bret Pettichord > Subject: Re: [Wtr-general] Re: How to click a javascript alert button > To: wtr-general at rubyforge.org > Message-ID: <5.1.0.14.2.20050824232213.0327c580 at 127.0.0.1> > Content-Type: text/plain; charset="us-ascii"; format=flowed > > When confused, check the unit test. > > From dialog_test.rb: > > def test_confirm_ok > $ie.remote_eval <<-END > button(:value, 'confirm').click > END > assert dialog.exists? > dialog.button('OK').click > assert_equal "You pressed the Confirm and OK button!", > $ie.text_field(:id, 'testResult').value > end > > > At 02:06 PM 8/24/2005, Lisa Crispin wrote: > >I did look at dialog.rb, but my ruby/watir/general programming > >language knowledge is not sufficient to understand how to write the > >script to click a javascript alert button. Can anyone provide a more > >detailed explanation? Is there any doc on 'autoit' that might help > >me? > >thanks > >Lisa > > From carl.l.shaulis at convergys.com Thu Aug 25 20:00:39 2005 From: carl.l.shaulis at convergys.com (carl.l.shaulis at convergys.com) Date: Thu, 25 Aug 2005 19:00:39 -0500 Subject: [Wtr-general] Carl L Shaulis is out of the office. Message-ID: I will be out of the office starting 08/25/2005 and will not return until 08/29/2005. I will respond to your message when I return. -- "NOTICE: The information contained in this electronic mail transmission is intended by Convergys Corporation for the use of the named individual or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone (collect), so that the sender's address records can be corrected." From noreply at rubyforge.org Thu Aug 25 20:46:34 2005 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 25 Aug 2005 19:46:34 -0500 Subject: [Wtr-general] [ wtr-Feature Requests-2310 ] watir home page should have search box Message-ID: <200508260046.j7Q0kYbF011829@rubyforge.org> Feature Requests item #2310, was opened at 2005-08-25 19:46 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=490&aid=2310&group_id=104 Category: Website Group: None Status: Open Resolution: None Priority: 3 Submitted By: Bret Pettichord (bret) Assigned to: Kingsley Hendrickse (dragonkh) Summary: watir home page should have search box Initial Comment: No one knows how to search our mail archives. We should add a link to search them on our home page -- using google. Maybe we should also have an option to search our online documentation. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=490&aid=2310&group_id=104 From jeff.darklight at gmail.com Fri Aug 26 00:05:53 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Thu, 25 Aug 2005 21:05:53 -0700 Subject: [Wtr-general] [ wtr-Support Requests-2303 ] get the inner text from a
 tag
In-Reply-To: <5.1.0.14.2.20050824234830.0329bba8@127.0.0.1>
References: <5.1.0.14.2.20050824234830.0329bba8@127.0.0.1>
Message-ID: <430E9521.1000402@gmail.com>

Bret Pettichord wrote:

> Anyone want to help this guy out?
>
> All you have to do is look at the code for P and Span and do the same 
> thing to create a Pre.
>
> It is a couple lines of Ruby.
>
> Any takers?
>
> Bret
>
> At 06:50 PM 8/24/2005, noreply at rubyforge.org wrote:
>
>> Support Requests item #2303, was opened at 2005-08-24 19:50
>> You can respond by visiting:
>> http://rubyforge.org/tracker/?func=detail&atid=488&aid=2303&group_id=104
>>
>> Category: None
>> Group: None
>> Status: Open
>> Resolution: None
>> Priority: 3
>> Submitted By: Nobody (None)
>> Assigned to: Nobody (None)
>> Summary: get the inner text from a 
 tag
>>
>> Initial Comment:
>> Im trying to get the text from inside a 
 tag that is in a frame. 
>> this frame doesn't contain any other HTML but the 
 tag and the 
>> text in between. like so...
>>
>> 
>> some text here...
>> some text here...
>> some text here...
>> some text here...
>> 
> > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > Bret, I've already got the code written, you just gotta add me to the project... my login is programr Haven't added any unit tests yet. j. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050825/a3c6d0dd/attachment.html From jeff.darklight at gmail.com Fri Aug 26 00:26:59 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Thu, 25 Aug 2005 21:26:59 -0700 Subject: [Wtr-general] [ wtr-Support Requests-2303 ] get the inner text from a
 tag
In-Reply-To: <5.1.0.14.2.20050824234830.0329bba8@127.0.0.1>
References: <5.1.0.14.2.20050824234830.0329bba8@127.0.0.1>
Message-ID: <430E9A13.1050208@gmail.com>

Bret Pettichord wrote:

> Anyone want to help this guy out?
>
> All you have to do is look at the code for P and Span and do the same 
> thing to create a Pre.
>
> It is a couple lines of Ruby.
>
> Any takers?
>
> Bret
>
> At 06:50 PM 8/24/2005, noreply at rubyforge.org wrote:
>
>> Support Requests item #2303, was opened at 2005-08-24 19:50
>> You can respond by visiting:
>> http://rubyforge.org/tracker/?func=detail&atid=488&aid=2303&group_id=104
>>
>> Category: None
>> Group: None
>> Status: Open
>> Resolution: None
>> Priority: 3
>> Submitted By: Nobody (None)
>> Assigned to: Nobody (None)
>> Summary: get the inner text from a 
 tag
>>
>> Initial Comment:
>> Im trying to get the text from inside a 
 tag that is in a frame. 
>> this frame doesn't contain any other HTML but the 
 tag and the 
>> text in between. like so...
>>
>> 
>> some text here...
>> some text here...
>> some text here...
>> some text here...
>> 
> > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > Even got a sample page and a few test cases ... innerText tests, exists tests ... find by :id & :index ... didn't try any for :name ... Just gotta give me the word ... j. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050825/70641799/attachment.html From kingsley at icecode.org Fri Aug 26 02:47:07 2005 From: kingsley at icecode.org (Kingsley) Date: Fri, 26 Aug 2005 07:47:07 +0100 Subject: [Wtr-general] New Watir1.4.1 Installer - problems and assistance In-Reply-To: <20050825165607.LGCZ19174.priv-edtnes56.telusplanet.net@tintin> Message-ID: <001001c5aa09$fa4af090$0600a8c0@Mercury> Hi I have had a few reports of problems when installing the new watir1.4.1 exe installer. If you had a problem please let me know stating the following: 1. When you install and get an error about unable to find watir/ please click on the show details button and tell me if the first line contains rubyw -e 2. Which version of the OS are you using? Win2k, XP etc 3. Do you have a standard one click install of Ruby - in the default location - and is ruby on your path Thanks Kingsley -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050826/e5b1776a/attachment.html From Jan.Montano at thomson.com Fri Aug 26 04:18:15 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Fri, 26 Aug 2005 16:18:15 +0800 Subject: [Wtr-general] how to determine if checkbox is disabled Message-ID: What's the best approach to know if a checkbox is disabled or not? I could try to set it then just catch the error. but is there a method or something? I'm using this site for reference http://wtr.rubyforge.org/rdoc/classes/Watir/ but it seems this is outdated. Is there any other link just like the one above? Thanks in advance. From zeljko.filipin at gmail.com Fri Aug 26 04:43:06 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 26 Aug 2005 10:43:06 +0200 Subject: [Wtr-general] how to determine if checkbox is disabled In-Reply-To: References: Message-ID: ie.checkbox(:id, "check_box_id").disabled will return false if not disabled, true if disabled (works also for other page elements that can be disabled). Checking already checked check box does not raise error, just checks it again (also unchecking already unchecked check box - just unchecks it again). Zeljko 2005/8/26, Jan.Montano at thomson.com : > What's the best approach to know if a checkbox is disabled or not? > I could try to set it then just catch the error. but is there a method or something? > > I'm using this site for reference http://wtr.rubyforge.org/rdoc/classes/Watir/ > but it seems this is outdated. > > Is there any other link just like the one above? Thanks in advance. > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From phillipsic at gmail.com Fri Aug 26 05:37:02 2005 From: phillipsic at gmail.com (Ian Phillips) Date: Fri, 26 Aug 2005 11:37:02 +0200 Subject: [Wtr-general] Passing data between scirpts? Message-ID: Hi. Just started using WATIR and have hit this problem. I need to pass a variable or have a global variable so that all my scripts have access to it. Is this possible? I have a port number that can change each time I start my app so I want to be able to change this value in one place. Any helps or links would be useful. Thanks Ian Phillips From zeljko.filipin at gmail.com Fri Aug 26 05:44:35 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 26 Aug 2005 11:44:35 +0200 Subject: [Wtr-general] Passing data between scirpts? In-Reply-To: References: Message-ID: Global variable is any variable that starts with $ (like $my_global_variable). Zeljko 2005/8/26, Ian Phillips : > Hi. > > Just started using WATIR and have hit this problem. I need to pass a > variable or have a global variable so that all my scripts have access > to it. Is this possible? > > I have a port number that can change each time I start my app so I > want to be able to change this value in one place. > > Any helps or links would be useful. > > Thanks > > Ian Phillips > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From nishita.acharya at tatainfotech.com Fri Aug 26 08:04:40 2005 From: nishita.acharya at tatainfotech.com (Nishita Acharya) Date: Fri, 26 Aug 2005 17:34:40 +0530 Subject: [Wtr-general] more queries Message-ID: <01b801c5aa36$569ddf70$380d7aa3@PC131> hello, thanks for replying . but i want to know 1>how data can be read into a variable.Incase i have a combo box which has values>> Active,Inactive,Suspended,Confirmed. If i have to hard code it then the code will look like this: $ie.select_list( :name ,"body:adminView:form3:lstStatus").select("Inactive") I have a .txt file from which am reading Inactive then how do i do it? my text looks like this /* exp.txt data1 data2 Inactive */ i tried this: a=IO.readlines("exp.txt") i=a.length j=0 loop do #read data 1...it is text field j++ #read data 2...it is text field j++ c=a.gets j++ c=a[j] $ie.select_list( :name ,"body:adminView:form3:lstStatus").select(c) break if j>= i end i get this error 1) Error: test_print_assertion(TC_qual_assert): Watir::Exception::NoValueFoundException: No option with text of Inactive in this select element 2> if doing the above isnt possible then i want to know how it can be read from a csv and then broken into diff fields and read separately eg: data1,data2,Inactive-------is my csv 3> give me the code for dealing with javascript alert boxes plz reply as soon as possible am stuck up here and cant seem to continue Regards, Nishita Acharya Bangalore. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050826/203b752d/attachment.html From kingsley at icecode.org Fri Aug 26 11:36:44 2005 From: kingsley at icecode.org (Kingsley Hendrickse) Date: Fri, 26 Aug 2005 16:36:44 +0100 (BST) Subject: [Wtr-general] more queries In-Reply-To: <01b801c5aa36$569ddf70$380d7aa3@PC131> References: <01b801c5aa36$569ddf70$380d7aa3@PC131> Message-ID: <34485.213.86.187.153.1125070604.squirrel@213.86.187.153> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Read your text from the text file: textfile: data1 data2 Inactive data = File.readlines("textfile.txt") $ie.select_list( :name ,"body:adminView:form3:lstStatus").select(data[2]) Line 1 of your text file is data1, ruby starts counting at 0 - so line 3 of your text file is read into the array data at position 2 - ---- You can also do this with the datahandler.rb I mailed You would put your data like this: CheckBoxStatus Inactive require 'datahandler' d = DataHandler.new("data.csv") inactive = d.data[0].CheckBoxStatus $ie.select_list( :name ,"body:adminView:form3:lstStatus").select(inactive) Hope that helps Thanks Kingsley > > hello, > thanks for replying . but i want to know > 1>how data can be read into a variable.Incase i have a combo box which > has values>> > Active,Inactive,Suspended,Confirmed. > If i have to hard code it then the code will look like this: > > $ie.select_list( :name > ,"body:adminView:form3:lstStatus").select("Inactive") > > I have a .txt file from which am reading Inactive then how do i do > it? > my text looks like this > > /* exp.txt > data1 > data2 > Inactive */ > > i tried this: > a=IO.readlines("exp.txt") > i=a.length > j=0 > loop do > #read data 1...it is text field > j++ > #read data 2...it is text field > j++ > c=a.gets > j++ > c=a[j] > $ie.select_list( :name > ,"body:adminView:form3:lstStatus").select(c) > break if j>= i > end > i get this error > > 1) Error: > test_print_assertion(TC_qual_assert): > Watir::Exception::NoValueFoundException: No option with text of Inactive > in this select element > > > 2> if doing the above isnt possible then i want to know how it can be read > from a csv and then broken into diff fields and read separately > eg: > data1,data2,Inactive-------is my csv > 3> give me the code for dealing with javascript alert boxes > > plz reply as soon as possible am stuck up here and cant seem to continue > Regards, > > Nishita Acharya > Bangalore. > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFDDzb8Z8AEccynd5gRAmvcAJ0Yr5hMcbV1py6UwXnpjD5i+83BSQCgnU61 Wfu2bpscXn5VBj8j27Ucmfk= =5GQb -----END PGP SIGNATURE----- From noreply at rubyforge.org Fri Aug 26 11:32:22 2005 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 26 Aug 2005 11:32:22 -0400 Subject: [Wtr-general] [ wtr-Feature Requests-2320 ] Homepage too wide Message-ID: <200508261532.j7QFWMB2018411@rubyforge.org> Feature Requests item #2320, was opened at 2005-08-26 11:32 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=490&aid=2320&group_id=104 Category: Website Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Jonathan Kohl (jonathankohl) Summary: Homepage too wide Initial Comment: The Watir homepage is set to a width of 150px + 946px, fixed. This is really annoying, as the page requires right/left scrolling even with the window fully maximized (at least on my 17" monitor with screen area set to 1152x864; even worse on my 12" iBook). Suggest using a standard page width or use a % width to allow the page to resize. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=490&aid=2320&group_id=104 From java_cplus at yahoo.com Fri Aug 26 13:41:45 2005 From: java_cplus at yahoo.com (Murtaza Lokhandwala) Date: Fri, 26 Aug 2005 10:41:45 -0700 (PDT) Subject: [Wtr-general] Help : new to Watir Message-ID: <20050826174145.48989.qmail@web80108.mail.yahoo.com> Hi Everybody, I started using WATIR to write my first web application test script two ago. -- The web page I am testing has approximately 6 input boxes and 7 drop down boxes for each record. And I am displaying 10 records per page. To view more user have to use 'Next >>' or '<< Previous' buttons. I started with hard coded values to have a feel of WATIR. The script is working but I was planning to use it to load the web server / database by creating 200 sessions. And each session creating 1 form having approx 50 transactions. Using the script I created couple of forms but each form is taking approximately 12-14 min for 20 transactions. I am attaching the script for the review. Please help me me in making the script more efficient. Because the test case I am handling needs 200 such sessions. Thank you very much. Murtaza __________________________________ Yahoo! Mail for Mobile Take Yahoo! Mail with you! Check email on your mobile phone. http://mobile.yahoo.com/learn/mail -------------- next part -------------- A non-text attachment was scrubbed... Name: etime_script.rb Type: application/octet-stream Size: 2879 bytes Desc: 2491484058-etime_script.rb Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050826/0f886d69/attachment.obj From kingsley at icecode.org Fri Aug 26 15:07:51 2005 From: kingsley at icecode.org (Kingsley) Date: Fri, 26 Aug 2005 20:07:51 +0100 Subject: [Wtr-general] Passing data between scirpts? In-Reply-To: Message-ID: <000601c5aa71$77b9aa50$0600a8c0@Mercury> Or a class variable @@var -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 26 August 2005 10:45 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Passing data between scirpts? Global variable is any variable that starts with $ (like $my_global_variable). Zeljko 2005/8/26, Ian Phillips : > Hi. > > Just started using WATIR and have hit this problem. I need to pass a > variable or have a global variable so that all my scripts have access > to it. Is this possible? > > I have a port number that can change each time I start my app so I > want to be able to change this value in one place. > > Any helps or links would be useful. > > Thanks > > Ian Phillips > > _______________________________________________ > 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 jeff.darklight at gmail.com Fri Aug 26 16:14:58 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Fri, 26 Aug 2005 13:14:58 -0700 Subject: [Wtr-general] Help : new to Watir In-Reply-To: <20050826174145.48989.qmail@web80108.mail.yahoo.com> References: <20050826174145.48989.qmail@web80108.mail.yahoo.com> Message-ID: It sounds like you are doing load testing which is not what I think WATiR is intended for. WATiR is meant for functional/procedural testing. If you are simply wanting to load/perf-test large quantities of simultaneous sessions on the system ... That would possibly be better suited for simple HTTP calls directly... ( like using uri-open or wget and/or curl ) That's my $0.02 ... YMMV j. On 8/26/05, Murtaza Lokhandwala wrote: > Hi Everybody, > > I started using WATIR to write my first web > application test script two ago. > > -- The web page I am testing has approximately 6 input > boxes and 7 drop down boxes for each record. And I am > displaying 10 records per page. To view more user have > to use 'Next >>' or '<< Previous' buttons. > > I started with hard coded values to have a feel of > WATIR. The script is working but I was planning to use > it to load the web server / database by creating 200 > sessions. And each session creating 1 form having > approx 50 transactions. > > Using the script I created couple of forms but each > form is taking approximately 12-14 min for 20 > transactions. > > I am attaching the script for the review. Please help > me me in making the script more efficient. Because the > test case I am handling needs 200 such sessions. > > Thank you very much. > > Murtaza > > > > __________________________________ > Yahoo! Mail for Mobile > Take Yahoo! Mail with you! Check email on your mobile phone. > http://mobile.yahoo.com/learn/mail > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > > -- "So long, and thanks for all the fish" Jeff Wood From jkohl at telusplanet.net Fri Aug 26 16:55:19 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Fri, 26 Aug 2005 14:55:19 -0600 Subject: [Wtr-general] Passing data between scirpts? In-Reply-To: <000601c5aa71$77b9aa50$0600a8c0@Mercury> Message-ID: <20050826205600.XOAS15690.priv-edtnes56.telusplanet.net@tintin> +1 Use extreme caution with global variables. :) -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Kingsley > Sent: August 26, 2005 1:08 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Passing data between scirpts? > > Or a class variable @@var > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin > Sent: 26 August 2005 10:45 > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] Passing data between scirpts? > > Global variable is any variable that starts with $ (like > $my_global_variable). > > Zeljko > > 2005/8/26, Ian Phillips : > > Hi. > > > > Just started using WATIR and have hit this problem. I need > to pass a > > variable or have a global variable so that all my scripts > have access > > to it. Is this possible? > > > > I have a port number that can change each time I start my app so I > > want to be able to change this value in one place. > > > > Any helps or links would be useful. > > > > Thanks > > > > Ian Phillips > > > > _______________________________________________ > > 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 jeff.darklight at gmail.com Fri Aug 26 17:46:41 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Fri, 26 Aug 2005 14:46:41 -0700 Subject: [Wtr-general] Passing data between scirpts? In-Reply-To: <20050826205600.XOAS15690.priv-edtnes56.telusplanet.net@tintin> References: <000601c5aa71$77b9aa50$0600a8c0@Mercury> <20050826205600.XOAS15690.priv-edtnes56.telusplanet.net@tintin> Message-ID: There is usually a clean way to build something into an object instead of simply blasting things to a global variable. If all of your tests are within a single TestCase object, then you can easily use instance variables for that class ( @blah ) and then all of the methods within that instance object will have access. Beyond that, if you have multiple separate TestCase objects then you either need to use something like a global ( even if that global is simply an object to hold your real globals ... still not the recommended solution ... globals are almost always sloppy ) or maybe serialize your values out to environment variables or a properties file and have each class load it... ( Think YAML! ) Those are the options I would use... Hope that helps. j. On 8/26/05, Jonathan Kohl wrote: > +1 > > Use extreme caution with global variables. :) > > -Jonathan > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Kingsley > > Sent: August 26, 2005 1:08 PM > > To: wtr-general at rubyforge.org > > Subject: RE: [Wtr-general] Passing data between scirpts? > > > > Or a class variable @@var > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin > > Sent: 26 August 2005 10:45 > > To: wtr-general at rubyforge.org > > Subject: Re: [Wtr-general] Passing data between scirpts? > > > > Global variable is any variable that starts with $ (like > > $my_global_variable). > > > > Zeljko > > > > 2005/8/26, Ian Phillips : > > > Hi. > > > > > > Just started using WATIR and have hit this problem. I need > > to pass a > > > variable or have a global variable so that all my scripts > > have access > > > to it. Is this possible? > > > > > > I have a port number that can change each time I start my app so I > > > want to be able to change this value in one place. > > > > > > Any helps or links would be useful. > > > > > > Thanks > > > > > > Ian Phillips > > > > > > _______________________________________________ > > > 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 > -- "So long, and thanks for all the fish" Jeff Wood From tuyet.ctn at mscibarra.com Fri Aug 26 20:12:37 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Fri, 26 Aug 2005 17:12:37 -0700 Subject: [Wtr-general] WAIT statement didn't wait? Message-ID: Just so you know, this doesn't do what you think: ie.frame("main").frame("sidebar").wait("analysisSidebarTabContent") It's actually the same as ie.frame("main").frame("sidebar").wait(true) Hmm! So the statement I used is actually is checking to see if the "sidebar" is there and NOT the "analysisSideBarTabContent"? Should I use this then for the analysisSideBarTabContent? ie.frame("main").frame("sidebar").frame("analysisSidebarTabContent").wait(tr ue) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050826/90708bf2/attachment.html From paul.rogers at shaw.ca Fri Aug 26 22:38:21 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 26 Aug 2005 20:38:21 -0600 Subject: [Wtr-general] unittest failures in head Message-ID: <4333d9e4330239.43302394333d9e@shaw.ca> The first time I ran ( all_tests.rb), somethig went wrong about the time the screen capture tests ran - IE closed and every test after that failed. Second time I got this: 1) Error: test_table_from_element(TC_Tables): NoMethodError: undefined method `parentElement' for nil:NilClass c:/watir_cvs/watir/unittests/../watir.rb:2290:in `create_from_element' c:/watir_cvs/watir/unittests/../unittests/table_test.rb:175:in `test_table_from_element' 192 tests, 1081 assertions, 0 failures, 1 errors I get the same error in core_test.rb Paul From Jan.Montano at thomson.com Sun Aug 28 21:56:17 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Mon, 29 Aug 2005 09:56:17 +0800 Subject: [Wtr-general] how to determine if checkbox is disabled Message-ID: even if setting a disabled checkbox? -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Zeljko Filipin Sent: Friday, August 26, 2005 4:43 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] how to determine if checkbox is disabled ie.checkbox(:id, "check_box_id").disabled will return false if not disabled, true if disabled (works also for other page elements that can be disabled). Checking already checked check box does not raise error, just checks it again (also unchecking already unchecked check box - just unchecks it again). Zeljko 2005/8/26, Jan.Montano at thomson.com : > What's the best approach to know if a checkbox is disabled or not? > I could try to set it then just catch the error. but is there a method or something? > > I'm using this site for reference http://wtr.rubyforge.org/rdoc/classes/Watir/ > but it seems this is outdated. > > Is there any other link just like the one above? Thanks in advance. > > _______________________________________________ > 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 singh_angrez at rediffmail.com Sun Aug 28 23:54:16 2005 From: singh_angrez at rediffmail.com (Angrez Singh) Date: 29 Aug 2005 03:54:16 -0000 Subject: [Wtr-general] finding text in a cell that contains a specified image? Message-ID: <20050829035416.4961.qmail@webmail29.rediffmail.com> Hi Bret, Yes, we can provide the unittests once we are ready for the release, which we'll be doing very soon. We had modified the 'watir.rb' for adding the XPath support. So we need the latest 'watir.rb' so that we can do the neccessary changes. Regards, Angrez On Wed, 24 Aug 2005 Bret Pettichord wrote : >At 09:04 AM 8/23/2005, Angrez Singh wrote: >>We have been working on Watir to add XPath support for elements that can't (easily) be accessed using the attributes that are provided by Watir, but can be structurally addressed. A test version of that is ready which we have been testing and using internally; we plan to make it available to the larger Watir community if Bret, Paul et al think that it would be helpful. We had originally planned to do some more testing but if people might find it useful to have it available earlier we'll do it sooner. > >This sounds interesting and useful. Can you also give us unit tests? > > >_____________________ > Bret Pettichord > www.pettichord.com > >_______________________________________________ >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/20050829/71804071/attachment.html From noreply at rubyforge.org Sun Aug 28 23:56:02 2005 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 28 Aug 2005 23:56:02 -0400 Subject: [Wtr-general] [ wtr-Bugs-2329 ] Error with XML data and link inside DIV tag Message-ID: <200508290356.j7T3u2Yf020590@rubyforge.org> Bugs item #2329, was opened at 2005-08-28 23:56 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=487&aid=2329&group_id=104 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: Error with XML data and link inside DIV tag Initial Comment: When accessing a link inside a DIV tag, where the link is associated with an XML data island (is this what they're called?), Watir generates an error when trying to call the click method. This error appeared in version 1.3. Initially I thought it was related to nested frames, but it seems to be related to a link in a DIV, or related to the XML data embedded in the page. This code: require 'Watir' include Watir $ie=IE.attach(:title,"Test") $ie.showLinks #(links are shown) $ie.link(:text,"Create").click #(returns an error) Generates this error: WIN32OLERuntimeError: tags OLE error code:80020003 in HRESULT error code:0x80020003 Member not found. from d:/ruby/lib/ruby/site_ruby/1.8/Watir.rb:969:in `method_missing' from d:/ruby/lib/ruby/site_ruby/1.8/Watir.rb:969:in `getLink' from d:/ruby/lib/ruby/site_ruby/1.8/Watir.rb:3148:in `initialize' from d:/ruby/lib/ruby/site_ruby/1.8/Watir.rb:537:in `new' from d:/ruby/lib/ruby/site_ruby/1.8/Watir.rb:537:in `link' from (irb):7 from : Find the sample HTML in the attachment. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=487&aid=2329&group_id=104 From saudaziz at gmail.com Mon Aug 29 01:16:41 2005 From: saudaziz at gmail.com (saud aziz) Date: Sun, 28 Aug 2005 22:16:41 -0700 Subject: [Wtr-general] how to determine if checkbox is disabled In-Reply-To: References: Message-ID: <24d0cb380508282216ca42b3b@mail.gmail.com> set() This method sets the radio list item or check box. Raises UnknownObjectException if its unable to locate an object *ObjectDisabledException if the object is disabled* http://wtr.rubyforge.org/rdoc/classes/Watir/RadioCheckCommon.html#M000109 On 8/28/05, Jan.Montano at thomson.com wrote: > > even if setting a disabled checkbox? > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto: > wtr-general-bounces at rubyforge.org]On Behalf Of Zeljko Filipin > Sent: Friday, August 26, 2005 4:43 PM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] how to determine if checkbox is disabled > > > ie.checkbox(:id, "check_box_id").disabled > > will return false if not disabled, true if disabled (works also for > other page elements that can be disabled). > > Checking already checked check box does not raise error, just checks > it again (also unchecking already unchecked check box - just unchecks > it again). > > Zeljko > > 2005/8/26, Jan.Montano at thomson.com : > > What's the best approach to know if a checkbox is disabled or not? > > I could try to set it then just catch the error. but is there a method > or something? > > > > I'm using this site for reference > http://wtr.rubyforge.org/rdoc/classes/Watir/ > > but it seems this is outdated. > > > > Is there any other link just like the one above? Thanks in advance. > > > > _______________________________________________ > > 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 > -- "..man is a human being, not because of his physical powers for physically the camel is his superior; not because of his size for the elephant is larger; not because of his courage for the lion is more courageous; not because of his appetite for the ox has the greater; not because of coitus for the least of the birds is more virile than he, but rather by virtue of his noble aims and ideals. [As a matter of fact] he was only created to know." (Al- Ghazali; The book of Knowledge, Section 1) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050828/02148be2/attachment.html From Leon.Ouretski at au.ey.com Mon Aug 29 01:39:41 2005 From: Leon.Ouretski at au.ey.com (Leon.Ouretski at au.ey.com) Date: Mon, 29 Aug 2005 15:39:41 +1000 Subject: [Wtr-general] Key / value pairs. Message-ID: This email is to be read subject to the disclaimer below. Hello all, I'm new to Watirr (and Ruby), so forgive me if the question is rather simplistic... What I'd like to do, is to have a configuration file (eg. config.txt), which would have a number of key/value pairs, such as "UserName=user", which would be read by a test script to, for example, log into a page. Hence, what I need, is a method to read each line in a given file; strip off the comments (if exist; denoted by #); find the pair based on the key (ie. UserName) and get the value (ie. user) and store it in a variable. Any help would be greatly appreciated. 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/20050829/dca19ea7/attachment.html From phillipsic at gmail.com Mon Aug 29 02:41:54 2005 From: phillipsic at gmail.com (Ian Phillips) Date: Mon, 29 Aug 2005 08:41:54 +0200 Subject: [Wtr-general] Passing data between scirpts? In-Reply-To: References: <000601c5aa71$77b9aa50$0600a8c0@Mercury> <20050826205600.XOAS15690.priv-edtnes56.telusplanet.net@tintin> Message-ID: Hi. Thanks for the suggestions. I have only just started with WATiR so still feeling my way into it. OO is a bit of a new thing for me and I need to get some thing up and running quickly to demostrate the benefit of automation. I have started with a driver script to call my test scripts. In the driver script I have set up the environment variables (servers, port number) for all the called scripts to use. Where is the usual place for Watir people to store test and envionrment data? Thank for the help. Ian On 8/26/05, Jeff Wood wrote: > There is usually a clean way to build something into an object instead > of simply blasting things to a global variable. > > If all of your tests are within a single TestCase object, then you can > easily use instance variables for that class ( @blah ) and then all of > the methods within that instance object will have access. > > Beyond that, if you have multiple separate TestCase objects then you > either need to use something like a global ( even if that global is > simply an object to hold your real globals ... still not the > recommended solution ... globals are almost always sloppy ) or maybe > serialize your values out to environment variables or a properties > file and have each class load it... ( Think YAML! ) > > Those are the options I would use... Hope that helps. > From ati.ozgur at gmail.com Mon Aug 29 03:29:52 2005 From: ati.ozgur at gmail.com (Atilla Ozgur) Date: Mon, 29 Aug 2005 10:29:52 +0300 Subject: [Wtr-general] Key / value pairs. In-Reply-To: References: Message-ID: I think this question answered before. You can search archives. But I added this to wiki FAQ. I also give wiki text here. Q. What I'd like to do, is to have a configuration file (eg. config.txt), which would have a number of key/value pairs, such as "UserName=user", which would be read by a test script to, for example, log into a page. A. You can use ruby file for this. i.e $user_name = 'atilla' $last_name = 'ozgur' save this as initialValues.rb then in your script you can require initialValues.rb classes and variables is ready for your use. Do not forget that these are global variables. Maybe a class and class variables would be more suitable for this. They will be more encapsulated in that way. class initialValues @@user_name = 'atilla' @@last_name = 'ozgur' end Note: A variable prefixed with two at signs is a class variable, accessible within both instance and class methods of the class. Then you can use them as. initialValues.user_name initialValues.last_name this way, related values will have their place. From gui76 at hotmail.com Mon Aug 29 03:34:51 2005 From: gui76 at hotmail.com (Guillaume Insa) Date: Mon, 29 Aug 2005 07:34:51 +0000 Subject: [Wtr-general] Watir and e-mail ? Message-ID: An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050829/853f779a/attachment.html From Jan.Montano at thomson.com Mon Aug 29 03:37:03 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Mon, 29 Aug 2005 15:37:03 +0800 Subject: [Wtr-general] how to determine if checkbox is disabled Message-ID: Thanks! I know it will raise an exception somehow. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of saud aziz Sent: Monday, August 29, 2005 1:17 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] how to determine if checkbox is disabled set() This method sets the radio list item or check box. Raises UnknownObjectException if its unable to locate an object ObjectDisabledException if the object is disabled http://wtr.rubyforge.org/rdoc/classes/Watir/RadioCheckCommon.html#M000109 On 8/28/05, Jan.Montano at thomson.com < Jan.Montano at thomson.com> wrote: even if setting a disabled checkbox? -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto: wtr-general-bounces at rubyforge.org]On Behalf Of Zeljko Filipin Sent: Friday, August 26, 2005 4:43 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] how to determine if checkbox is disabled ie.checkbox(:id, "check_box_id").disabled will return false if not disabled, true if disabled (works also for other page elements that can be disabled). Checking already checked check box does not raise error, just checks it again (also unchecking already unchecked check box - just unchecks it again). Zeljko 2005/8/26, Jan.Montano at thomson.com < Jan.Montano at thomson.com>: > What's the best approach to know if a checkbox is disabled or not? > I could try to set it then just catch the error. but is there a method or something? > > I'm using this site for reference http://wtr.rubyforge.org/rdoc/classes/Watir/ > but it seems this is outdated. > > Is there any other link just like the one above? Thanks in advance. > > _______________________________________________ > 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 -- "..man is a human being, not because of his physical powers for physically the camel is his superior; not because of his size for the elephant is larger; not because of his courage for the lion is more courageous; not because of his appetite for the ox has the greater; not because of coitus for the least of the birds is more virile than he, but rather by virtue of his noble aims and ideals. [As a matter of fact] he was only created to know." (Al- Ghazali; The book of Knowledge, Section 1) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050829/d15cdb42/attachment.html From Chris_Ellis at au.ey.com Mon Aug 29 03:49:16 2005 From: Chris_Ellis at au.ey.com (Chris_Ellis at au.ey.com) Date: Mon, 29 Aug 2005 17:49:16 +1000 Subject: [Wtr-general] Chris Ellis is out of the office. Message-ID: This email is to be read subject to the disclaimer below. I will be out of the office starting 29/08/2005 and will not return until 05/09/2005. I will respond to your message when I return. If you have any questions regarding TI please direct them to Jim Edwards or Amy Holden, Otherwise I'll answer you when I return -------------------- 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 From nishita.acharya at tatainfotech.com Mon Aug 29 06:09:58 2005 From: nishita.acharya at tatainfotech.com (Nishita Acharya) Date: Mon, 29 Aug 2005 15:39:58 +0530 Subject: [Wtr-general] re:re:more queries Message-ID: <012b01c5ac81$cf764340$380d7aa3@PC131> hello Kingsley Hendrickse, thank you for sending me the program (datahandler.rb)regarding reading frm a csv file.It's working fine for me now. Thanks a lot. Regards, Nishita Acharya Bangalore. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050829/b4ec4c69/attachment.html From sirella.maesah at gmail.com Mon Aug 29 08:32:05 2005 From: sirella.maesah at gmail.com (Stephanie Mayfield) Date: Mon, 29 Aug 2005 09:32:05 -0300 Subject: [Wtr-general] Undefined method getObject when attempting to do a set on a text field. Message-ID: <71ef6790050829053218be6dbb@mail.gmail.com> I apologize in advance if this question has already been asked. I'm new to the list and the hunting and pecking in the archives didn't turn up an answer. (Aside: is there a search engine on the archives?) My problem is I'm getting an error when attempting to do a very simple assignment to a text field. require 'WET' include WET ie=Browser.new() ie.goto "http://" ie.show_all_objects puts "username object exists: " + ie.TextField("name:=username").to_s ie.TextField("name:=username").set('first.last') My output confirms that the username field does in fact exist on the page: username object exists: WebEdit(name:=username) But then I get this exception: D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3205:in `locate': undefined method `getObject' for nil:NilClass (NoMethodError) from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1766:in `assert_exists' from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3368:in `set' from D:/ruby/lib/ruby/site_ruby/1.8/qantom/webobjects/WebEdit.rb:59:in `set' from D:/ruby/myRuby/AdminTest/simple.rb:9 I'm not sure if this is a WET issue or a Watir issue. What I'm running on is: - Win XP - Watir v1.4 - WET v0.5.1 (for water v1.4, doesn't include the optional component) Watir by itself access the website just fine, however I have JavaScript pop-ups so I'm attempting to use WET to access those. The URL and username do not contain any extended characters. Assistance is greatly appreciated! -- Steph Homepage: www.maesah.ca From raghu at qantom.com Mon Aug 29 09:19:22 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Mon, 29 Aug 2005 18:49:22 +0530 Subject: [Wtr-general] Undefined method getObject when attempting to do a set on a text field. In-Reply-To: <71ef6790050829053218be6dbb@mail.gmail.com> References: <71ef6790050829053218be6dbb@mail.gmail.com> Message-ID: <43130B5A.4090409@qantom.com> Hi Stephanie, Are you using a released version of Watir 1.4 or something off the SCM repository? I was trying to locate the source of the problem from your stack trace: from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1766:in `assert_exists' from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3368:in `set' and in the version(s) of Watir1.4 that I have, I could not find neither assert_exists method in line number 1766 nor 'set' method at 3368. If you are using a version from the SCM could you tell me the exact revision number so that I could check the same version out here and try it. Thanks Raghu Stephanie Mayfield wrote: >I apologize in advance if this question has already been asked. I'm >new to the list and the hunting and pecking in the archives didn't >turn up an answer. (Aside: is there a search engine on the archives?) > >My problem is I'm getting an error when attempting to do a very simple >assignment to a text field. > >require 'WET' >include WET > >ie=Browser.new() >ie.goto "http://" >ie.show_all_objects > >puts "username object exists: " + ie.TextField("name:=username").to_s >ie.TextField("name:=username").set('first.last') > > >My output confirms that the username field does in fact exist on the page: > >username object exists: WebEdit(name:=username) > >But then I get this exception: > > >D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3205:in `locate': undefined >method `getObject' for nil:NilClass (NoMethodError) > from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1766:in `assert_exists' > from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3368:in `set' > from D:/ruby/lib/ruby/site_ruby/1.8/qantom/webobjects/WebEdit.rb:59:in `set' > from D:/ruby/myRuby/AdminTest/simple.rb:9 > >I'm not sure if this is a WET issue or a Watir issue. What I'm running on is: >- Win XP >- Watir v1.4 >- WET v0.5.1 (for water v1.4, doesn't include the optional component) > >Watir by itself access the website just fine, however I have >JavaScript pop-ups so I'm attempting to use WET to access those. > >The URL and username do not contain any extended characters. > >Assistance is greatly appreciated! > > > -- Qantom Software http://www.qantom.com Ph : 26799269 Xtn. 125 sip : raghu at sip411.com -- From sirella.maesah at gmail.com Mon Aug 29 09:23:17 2005 From: sirella.maesah at gmail.com (Stephanie Mayfield) Date: Mon, 29 Aug 2005 10:23:17 -0300 Subject: [Wtr-general] Undefined method getObject when attempting to do a set on a text field. In-Reply-To: <43130B5A.4090409@qantom.com> References: <71ef6790050829053218be6dbb@mail.gmail.com> <43130B5A.4090409@qantom.com> Message-ID: <71ef679005082906236f27dca4@mail.gmail.com> Raghu, I installed 1.4 originally then I overwrote that installation via the gem. The gem is listed as 1.4.1. Thanks for looking into this! Steph On 8/29/05, Raghu Venkataramana wrote: > Hi Stephanie, > > Are you using a released version of Watir 1.4 or something off the SCM > repository? > > I was trying to locate the source of the problem from your stack trace: > > from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1766:in `assert_exists' > from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3368:in `set' > > and in the version(s) of Watir1.4 that I have, I could not find neither > assert_exists method in line number 1766 nor 'set' method at 3368. If you > are using a version from the SCM could you tell me the exact revision number > so that I could check the same version out here and try it. > > Thanks > Raghu > > > > > Stephanie Mayfield wrote: > > >I apologize in advance if this question has already been asked. I'm > >new to the list and the hunting and pecking in the archives didn't > >turn up an answer. (Aside: is there a search engine on the archives?) > > > >My problem is I'm getting an error when attempting to do a very simple > >assignment to a text field. > > > >require 'WET' > >include WET > > > >ie=Browser.new() > >ie.goto "http://" > >ie.show_all_objects > > > >puts "username object exists: " + ie.TextField("name:=username").to_s > >ie.TextField("name:=username").set('first.last') > > > > > >My output confirms that the username field does in fact exist on the page: > > > >username object exists: WebEdit(name:=username) > > > >But then I get this exception: > > > > > >D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3205:in `locate': undefined > >method `getObject' for nil:NilClass (NoMethodError) > > from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1766:in `assert_exists' > > from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3368:in `set' > > from D:/ruby/lib/ruby/site_ruby/1.8/qantom/webobjects/WebEdit.rb:59:in `set' > > from D:/ruby/myRuby/AdminTest/simple.rb:9 > > > >I'm not sure if this is a WET issue or a Watir issue. What I'm running on is: > >- Win XP > >- Watir v1.4 > >- WET v0.5.1 (for water v1.4, doesn't include the optional component) > > > >Watir by itself access the website just fine, however I have > >JavaScript pop-ups so I'm attempting to use WET to access those. > > > >The URL and username do not contain any extended characters. > > > >Assistance is greatly appreciated! > > > > > > > > > -- > Qantom Software > > http://www.qantom.com > Ph : 26799269 Xtn. 125 > sip : raghu at sip411.com > -- > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- Steph Homepage: www.maesah.ca From phillipsic at gmail.com Mon Aug 29 09:48:11 2005 From: phillipsic at gmail.com (Ian Phillips) Date: Mon, 29 Aug 2005 15:48:11 +0200 Subject: [Wtr-general] Clicking OK in MS Explorer Popup window Message-ID: Hi. I am deleting an item in my application and I have a 'Microsoft Internet Explorer' popup window with Ok and Cancel. I am unable to click the OK button. This is what I have tried so far: 1. ie = Watir::IE.attach(:title, /Microsoft Internet Explorer/) ie.button(:value, "OK").click 2. require 'watir\winClicker.rb' w.clickWindowsButton("Microsoft Internet Explorer" , "&OK" ) But neither work. Where am I going wrong? Thanks Ian From raghu at qantom.com Mon Aug 29 11:45:22 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Mon, 29 Aug 2005 21:15:22 +0530 Subject: [Wtr-general] Undefined method getObject when attempting to do a set on a text field. In-Reply-To: <71ef679005082906236f27dca4@mail.gmail.com> References: <71ef6790050829053218be6dbb@mail.gmail.com> <43130B5A.4090409@qantom.com> <71ef679005082906236f27dca4@mail.gmail.com> Message-ID: <43132D92.4030801@qantom.com> Hi Stephanie, This is getting intersting. I just did a gem install of watir myself, but still couldn't find the method 'locate' as shown by: D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3205:in `locate': undefined However I got the latest version HEAD version from cvs repository and that version _does_ have the locate method that is giving you the trouble. I took a quick look at that code and unfortunately wet's current version wont work with that implementation. For the current version of WET you need to make sure that you use the version that got installed off from the gem and not the CVS version. Your best bet may be to simply copy the Watir.rb from d:\ruby\lib\ruby\gems\1.8\gems\watir-1.4.1.rb to D:/ruby/lib/ruby/site_ruby/1.8/watir.rb Thanks Raghu Stephanie Mayfield wrote: >Raghu, > >I installed 1.4 originally then I overwrote that installation via the >gem. The gem is listed as 1.4.1. >Thanks for looking into this! > >Steph > > >On 8/29/05, Raghu Venkataramana wrote: > > >>Hi Stephanie, >> >>Are you using a released version of Watir 1.4 or something off the SCM >>repository? >> >>I was trying to locate the source of the problem from your stack trace: >> >> from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1766:in `assert_exists' >> from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3368:in `set' >> >>and in the version(s) of Watir1.4 that I have, I could not find neither >>assert_exists method in line number 1766 nor 'set' method at 3368. If you >>are using a version from the SCM could you tell me the exact revision number >>so that I could check the same version out here and try it. >> >>Thanks >>Raghu >> >> >> >> >>Stephanie Mayfield wrote: >> >> >> >>>I apologize in advance if this question has already been asked. I'm >>>new to the list and the hunting and pecking in the archives didn't >>>turn up an answer. (Aside: is there a search engine on the archives?) >>> >>>My problem is I'm getting an error when attempting to do a very simple >>>assignment to a text field. >>> >>>require 'WET' >>>include WET >>> >>>ie=Browser.new() >>>ie.goto "http://" >>>ie.show_all_objects >>> >>>puts "username object exists: " + ie.TextField("name:=username").to_s >>>ie.TextField("name:=username").set('first.last') >>> >>> >>>My output confirms that the username field does in fact exist on the page: >>> >>>username object exists: WebEdit(name:=username) >>> >>>But then I get this exception: >>> >>> >>>D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3205:in `locate': undefined >>>method `getObject' for nil:NilClass (NoMethodError) >>> from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1766:in `assert_exists' >>> from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3368:in `set' >>> from D:/ruby/lib/ruby/site_ruby/1.8/qantom/webobjects/WebEdit.rb:59:in `set' >>> from D:/ruby/myRuby/AdminTest/simple.rb:9 >>> >>>I'm not sure if this is a WET issue or a Watir issue. What I'm running on is: >>>- Win XP >>>- Watir v1.4 >>>- WET v0.5.1 (for water v1.4, doesn't include the optional component) >>> >>>Watir by itself access the website just fine, however I have >>>JavaScript pop-ups so I'm attempting to use WET to access those. >>> >>>The URL and username do not contain any extended characters. >>> >>>Assistance is greatly appreciated! >>> >>> >>> >>> >>> >>-- >>Qantom Software >> >>http://www.qantom.com >>Ph : 26799269 Xtn. 125 >>sip : raghu at sip411.com >>-- >> >>_______________________________________________ >>Wtr-general mailing list >>Wtr-general at rubyforge.org >>http://rubyforge.org/mailman/listinfo/wtr-general >> >> >> > > > > -- Qantom Software http://www.qantom.com Ph : 26799269 Xtn. 125 sip : raghu at sip411.com -- From sirella.maesah at gmail.com Mon Aug 29 13:27:13 2005 From: sirella.maesah at gmail.com (Stephanie Mayfield) Date: Mon, 29 Aug 2005 14:27:13 -0300 Subject: [Wtr-general] Undefined method getObject when attempting to do a set on a text field. In-Reply-To: <43132D92.4030801@qantom.com> References: <71ef6790050829053218be6dbb@mail.gmail.com> <43130B5A.4090409@qantom.com> <71ef679005082906236f27dca4@mail.gmail.com> <43132D92.4030801@qantom.com> Message-ID: <71ef679005082910271a0cbaf0@mail.gmail.com> Raghu, My simple case works! But I had to replace all the .rb files from the gem, not just the watir one. I have no idea how I got the CVS version of Watir installed. Thanks so much for the help! Steph On 8/29/05, Raghu Venkataramana wrote: > Hi Stephanie, > > This is getting intersting. I just did a gem install of watir myself, > but still > couldn't find the method 'locate' as shown by: > > D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3205:in > `locate': undefined > > However I got the latest version HEAD version from cvs > repository and that version _does_ have the locate method > that is giving you the trouble. I took a quick look at that > code and unfortunately wet's current version wont work > with that implementation. For the current version of WET > you need to make sure that you use the version that got > installed off from the gem and not the CVS version. > > Your best bet may be to simply copy the Watir.rb from > d:\ruby\lib\ruby\gems\1.8\gems\watir-1.4.1.rb to > D:/ruby/lib/ruby/site_ruby/1.8/watir.rb > > Thanks > Raghu > > > > > > Stephanie Mayfield wrote: > > >Raghu, > > > >I installed 1.4 originally then I overwrote that installation via the > >gem. The gem is listed as 1.4.1. > >Thanks for looking into this! > > > >Steph > > > > > >On 8/29/05, Raghu Venkataramana wrote: > > > > > >>Hi Stephanie, > >> > >>Are you using a released version of Watir 1.4 or something off the SCM > >>repository? > >> > >>I was trying to locate the source of the problem from your stack trace: > >> > >> from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1766:in `assert_exists' > >> from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3368:in `set' > >> > >>and in the version(s) of Watir1.4 that I have, I could not find neither > >>assert_exists method in line number 1766 nor 'set' method at 3368. If you > >>are using a version from the SCM could you tell me the exact revision number > >>so that I could check the same version out here and try it. > >> > >>Thanks > >>Raghu > >> > >> > >> > >> > >>Stephanie Mayfield wrote: > >> > >> > >> > >>>I apologize in advance if this question has already been asked. I'm > >>>new to the list and the hunting and pecking in the archives didn't > >>>turn up an answer. (Aside: is there a search engine on the archives?) > >>> > >>>My problem is I'm getting an error when attempting to do a very simple > >>>assignment to a text field. > >>> > >>>require 'WET' > >>>include WET > >>> > >>>ie=Browser.new() > >>>ie.goto "http://" > >>>ie.show_all_objects > >>> > >>>puts "username object exists: " + ie.TextField("name:=username").to_s > >>>ie.TextField("name:=username").set('first.last') > >>> > >>> > >>>My output confirms that the username field does in fact exist on the page: > >>> > >>>username object exists: WebEdit(name:=username) > >>> > >>>But then I get this exception: > >>> > >>> > >>>D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3205:in `locate': undefined > >>>method `getObject' for nil:NilClass (NoMethodError) > >>> from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1766:in `assert_exists' > >>> from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3368:in `set' > >>> from D:/ruby/lib/ruby/site_ruby/1.8/qantom/webobjects/WebEdit.rb:59:in `set' > >>> from D:/ruby/myRuby/AdminTest/simple.rb:9 > >>> > >>>I'm not sure if this is a WET issue or a Watir issue. What I'm running on is: > >>>- Win XP > >>>- Watir v1.4 > >>>- WET v0.5.1 (for water v1.4, doesn't include the optional component) > >>> > >>>Watir by itself access the website just fine, however I have > >>>JavaScript pop-ups so I'm attempting to use WET to access those. > >>> > >>>The URL and username do not contain any extended characters. > >>> > >>>Assistance is greatly appreciated! > >>> > >>> > >>> > >>> > >>> > >>-- > >>Qantom Software > >> > >>http://www.qantom.com > >>Ph : 26799269 Xtn. 125 > >>sip : raghu at sip411.com > >>-- > >> > >>_______________________________________________ > >>Wtr-general mailing list > >>Wtr-general at rubyforge.org > >>http://rubyforge.org/mailman/listinfo/wtr-general > >> > >> > >> > > > > > > > > > > > -- > Qantom Software > > http://www.qantom.com > Ph : 26799269 Xtn. 125 > sip : raghu at sip411.com > -- > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- Steph Homepage: www.maesah.ca From Ben.Torres at rhi.com Mon Aug 29 13:40:27 2005 From: Ben.Torres at rhi.com (Torres, Ben (HQP)) Date: Mon, 29 Aug 2005 10:40:27 -0700 Subject: [Wtr-general] Consolidate scripts into a master test plan Message-ID: <1641BB0AA7287848817A63C3EE9677D5079EC306@hqp-ex-mb05.na.msds.rhi.com> Hi, I've been writing a test script for each individual test case. How do I consolidate all my test scripts into a master test script so all I would need to execute is the master test script? Will I need to make each testcase a function? Thanks, Ben From jeff.darklight at gmail.com Mon Aug 29 15:17:59 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Mon, 29 Aug 2005 12:17:59 -0700 Subject: [Wtr-general] Consolidate scripts into a master test plan In-Reply-To: <1641BB0AA7287848817A63C3EE9677D5079EC306@hqp-ex-mb05.na.msds.rhi.com> References: <1641BB0AA7287848817A63C3EE9677D5079EC306@hqp-ex-mb05.na.msds.rhi.com> Message-ID: There are a number of ways you can do it. You should use the Ruby Test::Unit framework. >From there, you can either wrap each of your existing test scripts with a function and have one test case object that contains all of them Or you can build a separate class to wrap each of your scripts and then build a TestSuite object to call all of those ... Either one works, it really depends on the size of your scripts and how much of the functionality of those tests is duplicated, because wrapping multiple of those in the same TestCase object would then allow you to break out that functionality and therefore not repeat yourself. Hope that made sense... Ask if you need more detail. j. On 8/29/05, Torres, Ben (HQP) wrote: > Hi, > > I've been writing a test script for each individual test case. How do I > consolidate all my test scripts into a master test script so all I would > need to execute is the master test script? Will I need to make each > testcase a function? > > Thanks, > Ben > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "So long, and thanks for all the fish" Jeff Wood From kingsley at icecode.org Mon Aug 29 18:37:28 2005 From: kingsley at icecode.org (Kingsley) Date: Mon, 29 Aug 2005 23:37:28 +0100 Subject: [Wtr-general] Key / value pairs. In-Reply-To: Message-ID: <000a01c5acea$3c9aa660$0600a8c0@Mercury> Hi You might find this useful: class MissingConfigurationFile < ArgumentError ; end class MyConfig MyConfig = Struct.new("MyConfig", :property, :value) def initialize(config_file) begin @config = File.readlines(config_file) rescue raise MissingConfigurationFile, "Can't find config file" end end def parse_config_file rem_array = [] prop_array = [] @config.each do |line| if line.match(/^#/) rem_array << line else unless line.match(/^\n$/) then prop_array << line.chomp end end end return prop_array - rem_array end def properties config_hash = {} parse_config_file.each do |data| split = data.split("=") property = split[0].gsub(/\s*/, "") value = split[1].gsub(/$\s*/, "").gsub(/^\s*/, "") config_hash.store(property,MyConfig.new(property, value)) end return config_hash end end myConfig = MyConfig.new("config.txt").properties config_option_name = myConfig['OPTION_NAME].property config_option_value = myConfig['OPTION_NAME'].value config.txt # Lines with a # are ignored OPTION_NAME = put some value here OPTION_2 = more options Hope it's useful Thanks Kingsley -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Leon.Ouretski at au.ey.com Sent: 29 August 2005 06:40 To: wtr-general at rubyforge.org Subject: [Wtr-general] Key / value pairs. This email is to be read subject to the disclaimer below. Hello all, I'm new to Watirr (and Ruby), so forgive me if the question is rather simplistic... What I'd like to do, is to have a configuration file (eg. config.txt), which would have a number of key/value pairs, such as "UserName=user", which would be read by a test script to, for example, log into a page. Hence, what I need, is a method to read each line in a given file; strip off the comments (if exist; denoted by #); find the pair based on the key (ie. UserName) and get the value (ie. user) and store it in a variable. Any help would be greatly appreciated. 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/20050829/534bad57/attachment.html From jeff.darklight at gmail.com Mon Aug 29 19:10:29 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Mon, 29 Aug 2005 16:10:29 -0700 Subject: [Wtr-general] Key / value pairs. In-Reply-To: <000a01c5acea$3c9aa660$0600a8c0@Mercury> References: <000a01c5acea$3c9aa660$0600a8c0@Mercury> Message-ID: That's one way to do it ... Another is to use YAML which has a pretty heavy following with the Ruby community in general... So, the following would do the same ... You can simply use a hash to store things... Here's a quick script to load up a sample --SCRIPT-- require 'yaml' config = Hash.new config["username"] = "joe" config["password"] = "pass" config["foo"] = "bar" config["baz"] = 5 config["zoo"] = [ 1, 2, 3, 4, 5 ] File.open( "config.yaml", "w" ) { |file| file << config.to_yaml } --SCRIPT-- Then in your normal script you can get to this as simply as: --SCRIPT-- require 'yaml' config = YAML.load( File.new( 'config.yaml' ) ) config.each_pair { |key,value| puts "#{ key } -- #{ value }" } --SCRIPT-- It's that easy ... YAML is pretty cool. Hope that helps. j. On 8/29/05, Kingsley wrote: > > > > Hi > > > > You might find this useful: > > > > class MissingConfigurationFile < ArgumentError ; end > > > > class MyConfig > > > > MyConfig = Struct.new("MyConfig", :property, :value) > > > > def initialize(config_file) > > begin > > @config = File.readlines(config_file) > > rescue > > raise MissingConfigurationFile, "Can't find config file" > > end > > end > > > > def parse_config_file > > rem_array = [] > > prop_array = [] > > @config.each do |line| > > if line.match(/^#/) > > rem_array << line > > else > > unless line.match(/^\n$/) then prop_array << line.chomp end > > end > > end > > return prop_array - rem_array > > end > > > > def properties > > config_hash = {} > > parse_config_file.each do |data| > > split = data.split("=") > > property = split[0].gsub(/\s*/, "") > > value = split[1].gsub(/$\s*/, "").gsub(/^\s*/, "") > > config_hash.store(property,MyConfig.new(property, value)) > > end > > return config_hash > > end > > > > end > > > > myConfig = MyConfig.new("config.txt").properties > > config_option_name = myConfig['OPTION_NAME].property > > config_option_value = myConfig['OPTION_NAME'].value > > > > config.txt > > > > # Lines with a # are ignored > > OPTION_NAME = put some value here > > OPTION_2 = more options > > > > Hope it's useful > > > > Thanks > > > > Kingsley > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of > Leon.Ouretski at au.ey.com > Sent: 29 August 2005 06:40 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Key / value pairs. > > > > This email is to be read subject to the disclaimer below. > > > Hello all, > > I'm new to Watirr (and Ruby), so forgive me if the question is rather > simplistic... > > What I'd like to do, is to have a configuration file (eg. config.txt), > which would have a number of key/value pairs, such as "UserName=user", which > would be read by a test script to, for example, log into a page. Hence, what > I need, is a method to read each line in a given file; strip off the > comments (if exist; denoted by #); find the pair based on the key (ie. > UserName) and get the value (ie. user) and store it in a variable. > > Any help would be greatly appreciated. > > 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 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > -- "So long, and thanks for all the fish" Jeff Wood From PGarigue at EXTEND.COM Mon Aug 29 19:30:21 2005 From: PGarigue at EXTEND.COM (Pierre Garigue) Date: Mon, 29 Aug 2005 19:30:21 -0400 Subject: [Wtr-general] Key / value pairs. Message-ID: I'm going to be using YAML to keep values that will be use to fill very very long forms. Once of the nice things about YAML is that is supports comments. Since I'm writing the YAML by hand, I need to validate the YAML before I use it. The way I do it is to run the following file in SciTE an then look at the error reported. ---my code starts---- require 'yaml' require 'pp' tree = YAML::load( File.open( 'file.yml' )) #print the yaml file puts "\nthis is the yaml\n" puts tree.to_yaml #the structure produced puts "\nthis is the stucture from this yaml\n\n" pp tree ---end of code------- Anyone know a better tool to parses YAML and gives error message? -Pierre Garigue -----Original Message----- From: Jeff Wood [mailto:jeff.darklight at gmail.com] Sent: Monday, August 29, 2005 7:10 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Key / value pairs. That's one way to do it ... Another is to use YAML which has a pretty heavy following with the Ruby community in general... So, the following would do the same ... You can simply use a hash to store things... Here's a quick script to load up a sample --SCRIPT-- require 'yaml' config = Hash.new config["username"] = "joe" config["password"] = "pass" config["foo"] = "bar" config["baz"] = 5 config["zoo"] = [ 1, 2, 3, 4, 5 ] File.open( "config.yaml", "w" ) { |file| file << config.to_yaml } --SCRIPT-- Then in your normal script you can get to this as simply as: --SCRIPT-- require 'yaml' config = YAML.load( File.new( 'config.yaml' ) ) config.each_pair { |key,value| puts "#{ key } -- #{ value }" } --SCRIPT-- It's that easy ... YAML is pretty cool. Hope that helps. j. On 8/29/05, Kingsley wrote: > > > > Hi > > > > You might find this useful: > > > > class MissingConfigurationFile < ArgumentError ; end > > > > class MyConfig > > > > MyConfig = Struct.new("MyConfig", :property, :value) > > > > def initialize(config_file) > > begin > > @config = File.readlines(config_file) > > rescue > > raise MissingConfigurationFile, "Can't find config file" > > end > > end > > > > def parse_config_file > > rem_array = [] > > prop_array = [] > > @config.each do |line| > > if line.match(/^#/) > > rem_array << line > > else > > unless line.match(/^\n$/) then prop_array << line.chomp end > > end > > end > > return prop_array - rem_array > > end > > > > def properties > > config_hash = {} > > parse_config_file.each do |data| > > split = data.split("=") > > property = split[0].gsub(/\s*/, "") > > value = split[1].gsub(/$\s*/, "").gsub(/^\s*/, "") > > config_hash.store(property,MyConfig.new(property, value)) > > end > > return config_hash > > end > > > > end > > > > myConfig = MyConfig.new("config.txt").properties > > config_option_name = myConfig['OPTION_NAME].property > > config_option_value = myConfig['OPTION_NAME'].value > > > > config.txt > > > > # Lines with a # are ignored > > OPTION_NAME = put some value here > > OPTION_2 = more options > > > > Hope it's useful > > > > Thanks > > > > Kingsley > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of > Leon.Ouretski at au.ey.com > Sent: 29 August 2005 06:40 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Key / value pairs. > > > > This email is to be read subject to the disclaimer below. > > > Hello all, > > I'm new to Watirr (and Ruby), so forgive me if the question is rather > simplistic... > > What I'd like to do, is to have a configuration file (eg. config.txt), > which would have a number of key/value pairs, such as "UserName=user", which > would be read by a test script to, for example, log into a page. Hence, what > I need, is a method to read each line in a given file; strip off the > comments (if exist; denoted by #); find the pair based on the key (ie. > UserName) and get the value (ie. user) and store it in a variable. > > Any help would be greatly appreciated. > > 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 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > -- "So long, and thanks for all the fish" Jeff Wood _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Mon Aug 29 23:58:34 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 29 Aug 2005 22:58:34 -0500 Subject: [Wtr-general] Undefined method getObject when attempting to do a set on a text field. In-Reply-To: <43132D92.4030801@qantom.com> References: <71ef679005082906236f27dca4@mail.gmail.com> <71ef6790050829053218be6dbb@mail.gmail.com> <43130B5A.4090409@qantom.com> <71ef679005082906236f27dca4@mail.gmail.com> Message-ID: <5.1.0.14.2.20050829225441.02dc0e18@127.0.0.1> I'm pretty sure than none of the Watir releases included the 'locate' method -- that is only in head. When we created the 1.4.1 release, we were careful to only include minor fixes and updates that we were pretty sure would not break WET (for 1.4). It may be worth noting that the regular installers (either the old 1.4 and earlier or the new 1.4.1 one-click installer) install watir into a different location than the gem. I do not know what happens if watir is installed both ways. I suspect that one would overrule the other, but i don't know which. The best bet is to uninstall one version of Watir before installing a new version. Both of the installers for 1.4.1 have uninstall options. (Prior to that we didn't.) Bret At 10:45 AM 8/29/2005, Raghu Venkataramana wrote: >Hi Stephanie, > >This is getting intersting. I just did a gem install of watir myself, but >still >couldn't find the method 'locate' as shown by: > >D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3205:in `locate': undefined > >However I got the latest version HEAD version from cvs >repository and that version _does_ have the locate method >that is giving you the trouble. I took a quick look at that code and >unfortunately wet's current version wont work with that implementation. >For the current version of WET you need to make sure that you use the >version that got installed off from the gem and not the CVS version. >Your best bet may be to simply copy the Watir.rb from >d:\ruby\lib\ruby\gems\1.8\gems\watir-1.4.1.rb to >D:/ruby/lib/ruby/site_ruby/1.8/watir.rb >Thanks >Raghu > > > > > >Stephanie Mayfield wrote: > >>Raghu, >> >>I installed 1.4 originally then I overwrote that installation via the >>gem. The gem is listed as 1.4.1. >>Thanks for looking into this! >> >>Steph >> >> >>On 8/29/05, Raghu Venkataramana wrote: >> >> >>>Hi Stephanie, >>> >>>Are you using a released version of Watir 1.4 or something off the SCM >>>repository? >>> >>>I was trying to locate the source of the problem from your stack trace: >>> >>> from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1766:in `assert_exists' >>> from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3368:in `set' >>> >>>and in the version(s) of Watir1.4 that I have, I could not find neither >>>assert_exists method in line number 1766 nor 'set' method at 3368. If you >>>are using a version from the SCM could you tell me the exact revision number >>>so that I could check the same version out here and try it. >>> >>>Thanks >>>Raghu >>> >>> >>> >>> >>>Stephanie Mayfield wrote: >>> >>> >>> >>>>I apologize in advance if this question has already been asked. I'm >>>>new to the list and the hunting and pecking in the archives didn't >>>>turn up an answer. (Aside: is there a search engine on the archives?) >>>> >>>>My problem is I'm getting an error when attempting to do a very simple >>>>assignment to a text field. >>>> >>>>require 'WET' >>>>include WET >>>> >>>>ie=Browser.new() >>>>ie.goto "http://" >>>>ie.show_all_objects >>>> >>>>puts "username object exists: " + ie.TextField("name:=username").to_s >>>>ie.TextField("name:=username").set('first.last') >>>> >>>> >>>>My output confirms that the username field does in fact exist on the page: >>>> >>>>username object exists: WebEdit(name:=username) >>>> >>>>But then I get this exception: >>>> >>>> >>>>D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3205:in `locate': undefined >>>>method `getObject' for nil:NilClass (NoMethodError) >>>> from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1766:in `assert_exists' >>>> from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3368:in `set' >>>> from >>>> D:/ruby/lib/ruby/site_ruby/1.8/qantom/webobjects/WebEdit.rb:59:in `set' >>>> from D:/ruby/myRuby/AdminTest/simple.rb:9 >>>> >>>>I'm not sure if this is a WET issue or a Watir issue. What I'm running >>>>on is: >>>>- Win XP >>>>- Watir v1.4 >>>>- WET v0.5.1 (for water v1.4, doesn't include the optional component) >>>> >>>>Watir by itself access the website just fine, however I have >>>>JavaScript pop-ups so I'm attempting to use WET to access those. >>>> >>>>The URL and username do not contain any extended characters. >>>> >>>>Assistance is greatly appreciated! >>>> >>>> >>>> >>>> >>>-- >>>Qantom Software >>> >>>http://www.qantom.com >>>Ph : 26799269 Xtn. 125 >>>sip : raghu at sip411.com >>>-- >>> >>>_______________________________________________ >>>Wtr-general mailing list >>>Wtr-general at rubyforge.org >>>http://rubyforge.org/mailman/listinfo/wtr-general >>> >>> >> >> >> > > >-- >Qantom Software > >http://www.qantom.com >Ph : 26799269 Xtn. 125 >sip : raghu at sip411.com >-- > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Tue Aug 30 00:18:21 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 29 Aug 2005 23:18:21 -0500 Subject: [Wtr-general] Re: [ wtr-Feature Requests-1371 ] methods for visible/hidden In-Reply-To: <200508262339.j7QNd2bq022072@rubyforge.org> Message-ID: <5.1.0.14.2.20050829231206.02dc4c98@127.0.0.1> Ron made this helpful comment to a recent feature request: >Comment By: Ron Evans (greatbignoise) >Date: 2005-08-26 19:19 > >Message: >Try adding this code to the ObjectActions class: > > # This method checks to see if a control is visible or not > # raises: UnknownObjectException if the object is not found > def visible? > object_exist_check > return false if @o.style.visibility == "hidden" > return true > end > > >You can then use an assert like the following: >assert(@ie.text_field(:id, "Text2").visible?) I just wanted to point out that one of the great things about Ruby is that you can implement suggestions like this without actually changing watir.rb. Thus: class ObjectActions def visible? object_exist_check return false if @o.style.visibility == "hidden" return true end end You can load this code and add the feature right away. You don't have to patch watir.rb or wait for us to include it in a release. (If you look in watir.rb, you'll see that we actually add methods to the String and Regexp classes ourselves.) This is one of the few features of Ruby that put it way ahead of what you can do in Python. The technical description of this feature is 'classes are always open.' (Actually you *can* freeze classes in Ruby, but i've never seen it done.) (Also note that the ObjectActions class was renamed as Elements in 1.4) Bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Tue Aug 30 00:46:54 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 29 Aug 2005 23:46:54 -0500 Subject: [Wtr-general] unittest failures in head In-Reply-To: <4333d9e4330239.43302394333d9e@shaw.ca> Message-ID: <5.1.0.14.2.20050829234617.02dd08a0@127.0.0.1> At 09:38 PM 8/26/2005, Paul Rogers wrote: >The first time I ran ( all_tests.rb), somethig went wrong about the time >the screen capture tests ran - IE closed and every test after that failed. This also happens to me. >Second time I got this: > > 1) Error: >test_table_from_element(TC_Tables): >NoMethodError: undefined method `parentElement' for nil:NilClass > c:/watir_cvs/watir/unittests/../watir.rb:2290:in `create_from_element' > c:/watir_cvs/watir/unittests/../unittests/table_test.rb:175:in > `test_table_from_element' > >192 tests, 1081 assertions, 0 failures, 1 errors Fixed in head. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Tue Aug 30 01:01:12 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 30 Aug 2005 00:01:12 -0500 Subject: [Wtr-general] Watir attracts Ruby Newbies Message-ID: <5.1.0.14.2.20050829234743.02b794b0@127.0.0.1> Watir is rapidly attracting users. (We pronounce it 'water'.) Many of our users are new to Ruby and even new to object-oriented languages. In fact, they can't tell where Watir ends and Ruby begins. Thus, they end up asking lots of questions to the Watir mailing list (wtr-general at rubyforge.org) that are really just Ruby questions. I gave a presentation of Watir's precursor at the Ruby Conference 2003 in Austin. At that time, i said that we were using Ruby as our scripting language because it was intuitive and easy to learn for non-programmers. But now they are wanting to read data from spreadsheets or csv files or initialization files. Or they want to create libraries. Or they want help with Test::Unit. I consider myself middling in my Ruby skills. I've heard meta-classes explained at least three times and still don't understand them. But i'm one of the more knowledgable people on the list. We could use your help. If you are interested in helping new users learn how to use Ruby, please consider joining our mailing list. (Or you could just help Brian with his book.) Oh, and BTW, we now have a gem for Watir ('gem install watir'). It has unit tests and rdoc. And yes, Watir only works on Windows and only with Internet Explorer. I offer apologies to the OSS gods. http://wtr.rubyforge.org/ Bret _____________________ Bret Pettichord www.pettichord.com From jeff.darklight at gmail.com Tue Aug 30 01:21:09 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Mon, 29 Aug 2005 22:21:09 -0700 Subject: [Wtr-general] Watir attracts Ruby Newbies In-Reply-To: <5.1.0.14.2.20050829234743.02b794b0@127.0.0.1> References: <5.1.0.14.2.20050829234743.02b794b0@127.0.0.1> Message-ID: <4313ECC5.8090808@gmail.com> Bret Pettichord wrote: > Watir is rapidly attracting users. (We pronounce it 'water'.) > > Many of our users are new to Ruby and even new to object-oriented > languages. > > In fact, they can't tell where Watir ends and Ruby begins. Thus, they > end up asking lots of questions to the Watir mailing list > (wtr-general at rubyforge.org) that are really just Ruby questions. > > I gave a presentation of Watir's precursor at the Ruby Conference 2003 > in Austin. At that time, i said that we were using Ruby as our > scripting language because it was intuitive and easy to learn for > non-programmers. > > But now they are wanting to read data from spreadsheets or csv files > or initialization files. Or they want to create libraries. Or they > want help with Test::Unit. > > I consider myself middling in my Ruby skills. I've heard meta-classes > explained at least three times and still don't understand them. But > i'm one of the more knowledgable people on the list. > > We could use your help. If you are interested in helping new users > learn how to use Ruby, please consider joining our mailing list. (Or > you could just help Brian with his book.) > > Oh, and BTW, we now have a gem for Watir ('gem install watir'). It has > unit tests and rdoc. And yes, Watir only works on Windows and only > with Internet Explorer. I offer apologies to the OSS gods. > > http://wtr.rubyforge.org/ > > Bret > > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > That's why I'm here... I'm here for whatever I'm needed for. j. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050829/8c0369ac/attachment.html From bret at pettichord.com Tue Aug 30 01:24:14 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 30 Aug 2005 00:24:14 -0500 Subject: [Wtr-general] Help : new to Watir In-Reply-To: References: <20050826174145.48989.qmail@web80108.mail.yahoo.com> <20050826174145.48989.qmail@web80108.mail.yahoo.com> Message-ID: <5.1.0.14.2.20050830002231.01bdde00@127.0.0.1> You can run watir with the -b switch to make it faster. We are also working on other methods to improve performance. But 200 sessions is a lot for watir. Most boxes cannot support that many instances of IE, whether you are using watir or just creating IE sessions manually. So i agree with Jeff. At 03:14 PM 8/26/2005, Jeff Wood wrote: >It sounds like you are doing load testing which is not what I think >WATiR is intended for. > >WATiR is meant for functional/procedural testing. > >If you are simply wanting to load/perf-test large quantities of >simultaneous sessions on the system ... That would possibly be better >suited for simple HTTP calls directly... ( like using uri-open or wget >and/or curl ) > >That's my $0.02 ... YMMV > >j. > >On 8/26/05, Murtaza Lokhandwala wrote: > > Hi Everybody, > > > > I started using WATIR to write my first web > > application test script two ago. > > > > -- The web page I am testing has approximately 6 input > > boxes and 7 drop down boxes for each record. And I am > > displaying 10 records per page. To view more user have > > to use 'Next >>' or '<< Previous' buttons. > > > > I started with hard coded values to have a feel of > > WATIR. The script is working but I was planning to use > > it to load the web server / database by creating 200 > > sessions. And each session creating 1 form having > > approx 50 transactions. > > > > Using the script I created couple of forms but each > > form is taking approximately 12-14 min for 20 > > transactions. > > > > I am attaching the script for the review. Please help > > me me in making the script more efficient. Because the > > test case I am handling needs 200 such sessions. > > > > Thank you very much. > > > > Murtaza > > > > > > > > __________________________________ > > Yahoo! Mail for Mobile > > Take Yahoo! Mail with you! Check email on your mobile phone. > > http://mobile.yahoo.com/learn/mail > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > >-- >"So long, and thanks for all the fish" > >Jeff Wood > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Tue Aug 30 01:28:00 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 30 Aug 2005 00:28:00 -0500 Subject: [Wtr-general] Consolidate scripts into a master test plan In-Reply-To: References: <1641BB0AA7287848817A63C3EE9677D5079EC306@hqp-ex-mb05.na.msds.rhi.com> <1641BB0AA7287848817A63C3EE9677D5079EC306@hqp-ex-mb05.na.msds.rhi.com> Message-ID: <5.1.0.14.2.20050830002544.02b77db8@127.0.0.1> Here is some code that i've written. I'm trying to create a suite.rb that could automatically run plain ruby scripts in the Test::Unit framework. I think this would help a lot of the users who find Test::Unit confusing. But i can't quite get the script to run correctly. Any hints? It's an easy problem, until you try to make assertions work. class TestSuite < Test::Unit::TestCase @binding = binding require 'test/unit/assertions' include Test::Unit::Assertions def test_lab5_1 script = File.read('lab5_1.rb') class_eval(script, @binding, 'lab5_1.rb') end end At 02:17 PM 8/29/2005, Jeff Wood wrote: >There are a number of ways you can do it. > >You should use the Ruby Test::Unit framework. > > >From there, you can either wrap each of your existing test scripts >with a function and have one test case object that contains all of >them > >Or you can build a separate class to wrap each of your scripts and >then build a TestSuite object to call all of those ... > >Either one works, it really depends on the size of your scripts and >how much of the functionality of those tests is duplicated, because >wrapping multiple of those in the same TestCase object would then >allow you to break out that functionality and therefore not repeat >yourself. > >Hope that made sense... Ask if you need more detail. > >j. > >On 8/29/05, Torres, Ben (HQP) wrote: > > Hi, > > > > I've been writing a test script for each individual test case. How do I > > consolidate all my test scripts into a master test script so all I would > > need to execute is the master test script? Will I need to make each > > testcase a function? > > > > Thanks, > > Ben > > > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > >-- >"So long, and thanks for all the fish" > >Jeff Wood > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From noreply at rubyforge.org Tue Aug 30 01:24:49 2005 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 30 Aug 2005 00:24:49 -0500 Subject: [Wtr-general] [ wtr-Stories-2338 ] rdoc on website needs update Message-ID: <200508300524.j7U5Onk8019257@rubyforge.org> Stories item #2338, was opened at 2005-08-30 00:24 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1999&aid=2338&group_id=104 Category: Website Group: None Status: Open Resolution: None Priority: 3 Submitted By: Bret Pettichord (bret) Assigned to: Nobody (None) Summary: rdoc on website needs update Initial Comment: I'm using this site for reference http://wtr.rubyforge.org/rdoc/classes/Watir/ but it seems this is outdated. -- Is currently at 1.2. Should be 1.4.1. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1999&aid=2338&group_id=104 From noreply at rubyforge.org Tue Aug 30 01:39:21 2005 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 30 Aug 2005 00:39:21 -0500 Subject: [Wtr-general] [ wtr-Bugs-2339 ] ie.close returns before object is shutdown. this can cause errors with next ie.new Message-ID: <200508300539.j7U5dLkI028809@rubyforge.org> Bugs item #2339, was opened at 2005-08-30 00:39 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=487&aid=2339&group_id=104 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Bret Pettichord (bret) Assigned to: Nobody (None) Summary: ie.close returns before object is shutdown. this can cause errors with next ie.new Initial Comment: On 24/08/05, Jeff Wood wrote: > add a setup function to your test case to create a new instance for > each test then, add a teardown function and force the browser to go > away. ( ie.quit ) > > that should take care of things... actually, this doesn't quite work. ie.quit/close is an asynchronous call to the ie com server. as a result, the new instance of ie that you create in your setup may connect to a com server that is in the process of shutting down. you can "fix" this with a sleep in your teardown, but it's pretty ugly and unreliable. this is a big problem for watir IHMO. i faced the same problem with a testing wrapper that i wrote for IE in C#. can't remember if i managed to fix it or not. cheers, owen. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=487&aid=2339&group_id=104 From bret at pettichord.com Tue Aug 30 01:52:07 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 30 Aug 2005 00:52:07 -0500 Subject: [Wtr-general] Problem with running tests in a suite In-Reply-To: References: <63915d6a05082412111ffbf549@mail.gmail.com> Message-ID: <5.1.0.14.2.20050830004604.02e1f1a0@127.0.0.1> At 07:00 PM 8/24/2005, Owen Rogers wrote: >ie.quit/close is an asynchronous >call to the ie com server. as a result, the new instance of ie that >you create in your setup may connect to a com server that is in the >process of shutting down. you can "fix" this with a sleep in your >teardown, but it's pretty ugly and unreliable. this is a big problem >for watir IHMO. i faced the same problem with a testing wrapper that >i wrote for IE in C#. can't remember if i managed to fix it or not. >cheers, >owen. I remember complaining about this problem to Chris Morris when i was just a user of his IE Controller. I think he fixed it. Someone want to check the history of that project. Chris? Maybe the answer is to avoid shutting down the COM server until you are done running tests. One way would be to reuse the same client with your tests. That is what we do with the Watir unit tests. Another would be create an invisible ie at the beginning and not shut it down in the end. If we have one client reference, closing other ie instances won't also shutdown the server. Bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Tue Aug 30 01:42:44 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 30 Aug 2005 00:42:44 -0500 Subject: [Wtr-general] Any intellisense IDE for Ruby? Also WatirMaker rocks.. In-Reply-To: <24d0cb3805082422125dfeb663@mail.gmail.com> Message-ID: <5.1.0.14.2.20050830004231.02dfa680@127.0.0.1> At 12:12 AM 8/25/2005, saud aziz wrote: >For now i want to know if there is any IDE for Ruby that provides >intellisense? Ecllipse plug-in maybe anyone...? No. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Tue Aug 30 02:02:08 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 30 Aug 2005 01:02:08 -0500 Subject: [Wtr-general] Problem with running tests in a suite Message-ID: <5.1.0.14.2.20050830005355.02e25430@127.0.0.1> For IE Controller: http://rubyforge.org/frs/shownotes.php?release_id=241 * Added fix for the RPC intermittent bug that would occur of an instance of ie/iec was created too soon after a previous one was killed. Code change to def initialize(): # creating a new IE instance immediately after quiting a previous one # causes intermittent RPC unavailable errors and other weirdness. # Make sure to wait 1 second after eating before swimming... until (Time.now - @@closed_last) > 1; sleep 0.1; end if @@closed_last immediate preceeds: @ie = WIN32OLE.new('InternetExplorer.Application') Any reason we shouldn't add this code to Watir? ----- I remember complaining about this problem to Chris Morris when i was just a user of his IE Controller. I think he fixed it. Someone want to check the history of that project. Chris? Maybe the answer is to avoid shutting down the COM server until you are done running tests. One way would be to reuse the same client with your tests. That is what we do with the Watir unit tests. Another would be create an invisible ie at the beginning and not shut it down in the end. If we have one client reference, closing other ie instances won't also shutdown the server. Bret _____________________ Bret Pettichord www.pettichord.com From kingsley at icecode.org Tue Aug 30 02:19:45 2005 From: kingsley at icecode.org (Kingsley) Date: Tue, 30 Aug 2005 07:19:45 +0100 Subject: [Wtr-general] Key / value pairs. In-Reply-To: Message-ID: <000501c5ad2a$d13af1e0$0600a8c0@Mercury> That's pretty cool Looks YAML is the way forward there Cheers Kingsley -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood Sent: 30 August 2005 00:10 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Key / value pairs. That's one way to do it ... Another is to use YAML which has a pretty heavy following with the Ruby community in general... So, the following would do the same ... You can simply use a hash to store things... Here's a quick script to load up a sample --SCRIPT-- require 'yaml' config = Hash.new config["username"] = "joe" config["password"] = "pass" config["foo"] = "bar" config["baz"] = 5 config["zoo"] = [ 1, 2, 3, 4, 5 ] File.open( "config.yaml", "w" ) { |file| file << config.to_yaml } --SCRIPT-- Then in your normal script you can get to this as simply as: --SCRIPT-- require 'yaml' config = YAML.load( File.new( 'config.yaml' ) ) config.each_pair { |key,value| puts "#{ key } -- #{ value }" } --SCRIPT-- It's that easy ... YAML is pretty cool. Hope that helps. j. On 8/29/05, Kingsley wrote: > > > > Hi > > > > You might find this useful: > > > > class MissingConfigurationFile < ArgumentError ; end > > > > class MyConfig > > > > MyConfig = Struct.new("MyConfig", :property, :value) > > > > def initialize(config_file) > > begin > > @config = File.readlines(config_file) > > rescue > > raise MissingConfigurationFile, "Can't find config file" > > end > > end > > > > def parse_config_file > > rem_array = [] > > prop_array = [] > > @config.each do |line| > > if line.match(/^#/) > > rem_array << line > > else > > unless line.match(/^\n$/) then prop_array << line.chomp end > > end > > end > > return prop_array - rem_array > > end > > > > def properties > > config_hash = {} > > parse_config_file.each do |data| > > split = data.split("=") > > property = split[0].gsub(/\s*/, "") > > value = split[1].gsub(/$\s*/, "").gsub(/^\s*/, "") > > config_hash.store(property,MyConfig.new(property, value)) > > end > > return config_hash > > end > > > > end > > > > myConfig = MyConfig.new("config.txt").properties > > config_option_name = myConfig['OPTION_NAME].property > > config_option_value = myConfig['OPTION_NAME'].value > > > > config.txt > > > > # Lines with a # are ignored > > OPTION_NAME = put some value here > > OPTION_2 = more options > > > > Hope it's useful > > > > Thanks > > > > Kingsley > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of > Leon.Ouretski at au.ey.com > Sent: 29 August 2005 06:40 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Key / value pairs. > > > > This email is to be read subject to the disclaimer below. > > > Hello all, > > I'm new to Watirr (and Ruby), so forgive me if the question is rather > simplistic... > > What I'd like to do, is to have a configuration file (eg. config.txt), > which would have a number of key/value pairs, such as "UserName=user", which > would be read by a test script to, for example, log into a page. Hence, what > I need, is a method to read each line in a given file; strip off the > comments (if exist; denoted by #); find the pair based on the key (ie. > UserName) and get the value (ie. user) and store it in a variable. > > Any help would be greatly appreciated. > > 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 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > -- "So long, and thanks for all the fish" Jeff Wood _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From phillipsic at gmail.com Tue Aug 30 03:16:14 2005 From: phillipsic at gmail.com (Ian Phillips) Date: Tue, 30 Aug 2005 09:16:14 +0200 Subject: [Wtr-general] Can't attach to popup Message-ID: Hi I have the following popup window: Window [007b052c] Title [Microsoft Internet Explorer] ClassName [#32770] Thread ID [00000b9c] Process ID [00000c18] Size [width=305, height=126] Parent Window [0036041c] Title [Kabira Order Processing - Microsoft Internet Explorer] ClassName [IEFrame] Thread ID [00000b9c] Process ID [00000c18] Owner Window [0036041c] Title [Kabira Order Processing - Microsoft Internet Explorer] ClassName [IEFrame] Thread ID [00000b9c] Process ID [00000c18] Belongs to [0036041c] Title [Kabira Order Processing - Microsoft Internet Explorer] ClassName [IEFrame] Thread ID [00000b9c] Process ID [00000c18] I have tried to the following but it does not work: new_window = Watir::IE.attach(:title, /Kabira Order Processing - Microsoft Internet Explorer/) I get the following message: c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1208:in `attach_browser_window': Unable to locate a window with title of (?-mix:Kabira Order Processing - Microsoft Inte rnet Explorer) (Watir::Exception::NoMatchingWindowFoundException) from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1111:in `attach_init' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1104:in `attach' from ./CreateNewGroup_tst.rb:77 from C:/watir/KPSA_Tests/TestDriver.rb:39:in `load' from C:/watir/KPSA_Tests/TestDriver.rb:39 How can I attach to this window? Thanks Ian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050830/758634aa/attachment.html From nishita.acharya at tatainfotech.com Tue Aug 30 03:27:29 2005 From: nishita.acharya at tatainfotech.com (Nishita Acharya) Date: Tue, 30 Aug 2005 12:57:29 +0530 Subject: [Wtr-general] re:cliccking ok in MS explorer Message-ID: <001b01c5ad34$474b9ed0$950d7aa3@PC131> Glacierhi Ian, i came across the same prob. This should help u:- 1.. There is a prog called popups_test.rb in unitests 2.. include this code frm that prog in ur current prog def startClicker( button , waitTime = 0.5) 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 3. Wherever necessary wirte this startClicker("OK") $ie.button(:value,"button_value").click Regards, Nishita Acharya Bangalore. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050830/6399406a/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 2743 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050830/6399406a/attachment.jpe From phillipsic at gmail.com Tue Aug 30 03:47:55 2005 From: phillipsic at gmail.com (Ian Phillips) Date: Tue, 30 Aug 2005 09:47:55 +0200 Subject: [Wtr-general] re:cliccking ok in MS explorer In-Reply-To: <001b01c5ad34$474b9ed0$950d7aa3@PC131> References: <001b01c5ad34$474b9ed0$950d7aa3@PC131> Message-ID: HI Nishita. I have added the code as it is but it does not find the window. Do I need to change anything the the code you supplied? My test just stops when the popup window appears. Any ideas? Thanks for the help Ian On 8/30/05, Nishita Acharya wrote: > > hi Ian, > i came across the same prob. This should help u:- > > 1. There is a prog called popups_test.rb in unitests > 2. include this code frm that prog in ur current prog > > def startClicker( button , waitTime = 0.5) > 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 > 3. Wherever necessary wirte this > startClicker("OK") > $ie.button(:value,"button_value").click > * Regards, > > Nishita Acharya > Bangalore. > * > > > _______________________________________________ > 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/20050830/07098107/attachment.html From ganapathi.raj at celstream.com Tue Aug 30 05:17:48 2005 From: ganapathi.raj at celstream.com (Ganapathi Raj) Date: Tue, 30 Aug 2005 14:47:48 +0530 Subject: [Wtr-general] Swing Testing Message-ID: Hi All, Is it possible to simulate(Test) the Swing Application through Watir. Cheers Gan This message is free from Virus - IMSS -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050830/46adf3bd/attachment.html From Mike.Harris at kalido.com Tue Aug 30 05:38:57 2005 From: Mike.Harris at kalido.com (Mike Harris) Date: Tue, 30 Aug 2005 10:38:57 +0100 Subject: [Wtr-general] Connecting to a second window Message-ID: I have just started to use Watir and am trying to connect to a new window using this code, but I fail to goto the link. Can you please give me some advice about why this may be failing. Thanks def test_03_ViewAbout puts "Test 3...View About" goToSignOnPage() login() begin statusMessage="Invoking About" aboutlink=$ie.getLink(:text,"About") statusMessage="goto link failed" puts("goto link failed") $ie.goto(aboutlink.href) puts("attach failed") statusMessage="attach failed" $ieAbout = IE.attach(:title, /About KALIDO MDM/) statusMessage="assert failed" assert($ieAbout.title=="About KALIDO MDM","Failed to invoke About") statusMessage="close failed" $ieAbout.close rescue errorstring ="Failed while " + statusMessage failTest(3,errorstring) end end Mike Harris From zeljko.filipin at gmail.com Tue Aug 30 05:43:51 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 30 Aug 2005 11:43:51 +0200 Subject: [Wtr-general] Connecting to a second window In-Reply-To: Message-ID: <43142a30.422ca9d5.27fe.ffffce56@mx.gmail.com> In which line does your script fail (goto or attach)? What error message do you get? Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Mike Harris Sent: Tuesday, August 30, 2005 11:39 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Connecting to a second window I have just started to use Watir and am trying to connect to a new window using this code, but I fail to goto the link. Can you please give me some advice about why this may be failing. Thanks def test_03_ViewAbout puts "Test 3...View About" goToSignOnPage() login() begin statusMessage="Invoking About" aboutlink=$ie.getLink(:text,"About") statusMessage="goto link failed" puts("goto link failed") $ie.goto(aboutlink.href) puts("attach failed") statusMessage="attach failed" $ieAbout = IE.attach(:title, /About KALIDO MDM/) statusMessage="assert failed" assert($ieAbout.title=="About KALIDO MDM","Failed to invoke About") statusMessage="close failed" $ieAbout.close rescue errorstring ="Failed while " + statusMessage failTest(3,errorstring) end end Mike Harris _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Mike.Harris at kalido.com Tue Aug 30 05:52:32 2005 From: Mike.Harris at kalido.com (Mike Harris) Date: Tue, 30 Aug 2005 10:52:32 +0100 Subject: [Wtr-general] Connecting to a second window Message-ID: The last line put to the command console is attach failed. So I assume that it is the attach that has failed -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 30 August 2005 10:44 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Connecting to a second window In which line does your script fail (goto or attach)? What error message do you get? Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Mike Harris Sent: Tuesday, August 30, 2005 11:39 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Connecting to a second window I have just started to use Watir and am trying to connect to a new window using this code, but I fail to goto the link. Can you please give me some advice about why this may be failing. Thanks def test_03_ViewAbout puts "Test 3...View About" goToSignOnPage() login() begin statusMessage="Invoking About" aboutlink=$ie.getLink(:text,"About") statusMessage="goto link failed" puts("goto link failed") $ie.goto(aboutlink.href) puts("attach failed") statusMessage="attach failed" $ieAbout = IE.attach(:title, /About KALIDO MDM/) statusMessage="assert failed" assert($ieAbout.title=="About KALIDO MDM","Failed to invoke About") statusMessage="close failed" $ieAbout.close rescue errorstring ="Failed while " + statusMessage failTest(3,errorstring) end end Mike Harris _______________________________________________ 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 zeljko.filipin at gmail.com Tue Aug 30 05:57:07 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 30 Aug 2005 11:57:07 +0200 Subject: [Wtr-general] Connecting to a second window In-Reply-To: Message-ID: <43142d4c.6240479b.43d0.ffffa890@mx.gmail.com> Try this $ieAbout = Watir::IE.attach(:title, /About KALIDO MDM/) instead of $ieAbout = IE.attach(:title, /About KALIDO MDM/) Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Mike Harris Sent: Tuesday, August 30, 2005 11:53 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Connecting to a second window The last line put to the command console is attach failed. So I assume that it is the attach that has failed -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 30 August 2005 10:44 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Connecting to a second window In which line does your script fail (goto or attach)? What error message do you get? Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Mike Harris Sent: Tuesday, August 30, 2005 11:39 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Connecting to a second window I have just started to use Watir and am trying to connect to a new window using this code, but I fail to goto the link. Can you please give me some advice about why this may be failing. Thanks def test_03_ViewAbout puts "Test 3...View About" goToSignOnPage() login() begin statusMessage="Invoking About" aboutlink=$ie.getLink(:text,"About") statusMessage="goto link failed" puts("goto link failed") $ie.goto(aboutlink.href) puts("attach failed") statusMessage="attach failed" $ieAbout = IE.attach(:title, /About KALIDO MDM/) statusMessage="assert failed" assert($ieAbout.title=="About KALIDO MDM","Failed to invoke About") statusMessage="close failed" $ieAbout.close rescue errorstring ="Failed while " + statusMessage failTest(3,errorstring) end end Mike Harris _______________________________________________ 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 huemach at Cybersoft-VN.com Tue Aug 30 06:26:05 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Tue, 30 Aug 2005 17:26:05 +0700 Subject: [Wtr-general] Is Watir suitable for Web app (.Net Framework)? Message-ID: <99DF6C0285C2CE4C99F02D7838571966018C805E@hue.cybersoft-vn.com> Dear All, I just finished the web automation test use Watir. Now I have new web project (base on .Net framework) may be use C# or ASP.net. I would like to know is Watir suitable for it. Thank you and best regards, Hue Mach From dave at burt.id.au Tue Aug 30 06:37:13 2005 From: dave at burt.id.au (Dave Burt) Date: Tue, 30 Aug 2005 20:37:13 +1000 Subject: [Wtr-general] Is Watir suitable for Web app (.Net Framework)? References: <99DF6C0285C2CE4C99F02D7838571966018C805E@hue.cybersoft-vn.com> Message-ID: <003b01c5ad4e$c9623cc0$6402a8c0@telperion> Hue Mach Dieu wrote: > Dear All, > I just finished the web automation test use Watir. > Now I have new web project (base on .Net framework) may be use C# or > ASP.net. > > I would like to know is Watir suitable for it. Watir drives IE. It's suitable for testing any application that uses IE as a client. It will only test that level - as if a user is accessing the app with IE. You probably want unit tests in .NET as well, to test lower level stuff, functions, classes, etc. Use NUnit for that. Cheers, Dave From nishita.acharya at tatainfotech.com Tue Aug 30 06:52:42 2005 From: nishita.acharya at tatainfotech.com (Nishita Acharya) Date: Tue, 30 Aug 2005 16:22:42 +0530 Subject: [Wtr-general] popups Message-ID: <004101c5ad50$f43a2f50$950d7aa3@PC131> hi, i am attaching a prog that i tried initially for popups....Hope it will be of some help Regards, Nishita Acharya Associate System Engg Tata Infotech Bangalore. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050830/cac002ab/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: test1.rb Type: application/octet-stream Size: 994 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050830/cac002ab/attachment.obj From Mike.Harris at kalido.com Tue Aug 30 07:18:45 2005 From: Mike.Harris at kalido.com (Mike Harris) Date: Tue, 30 Aug 2005 12:18:45 +0100 Subject: [Wtr-general] Connecting to a second window Message-ID: Thanks.I tried that and still had the same problem. I have just noticed that when I hover over the link with the mouse the path to the page for the second window is displayed in the status bar, but this does not include the name of the file. I am wondering if this is the problem. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 30 August 2005 10:57 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Connecting to a second window Try this $ieAbout = Watir::IE.attach(:title, /About KALIDO MDM/) instead of $ieAbout = IE.attach(:title, /About KALIDO MDM/) Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Mike Harris Sent: Tuesday, August 30, 2005 11:53 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Connecting to a second window The last line put to the command console is attach failed. So I assume that it is the attach that has failed -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 30 August 2005 10:44 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Connecting to a second window In which line does your script fail (goto or attach)? What error message do you get? Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Mike Harris Sent: Tuesday, August 30, 2005 11:39 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Connecting to a second window I have just started to use Watir and am trying to connect to a new window using this code, but I fail to goto the link. Can you please give me some advice about why this may be failing. Thanks def test_03_ViewAbout puts "Test 3...View About" goToSignOnPage() login() begin statusMessage="Invoking About" aboutlink=$ie.getLink(:text,"About") statusMessage="goto link failed" puts("goto link failed") $ie.goto(aboutlink.href) puts("attach failed") statusMessage="attach failed" $ieAbout = IE.attach(:title, /About KALIDO MDM/) statusMessage="assert failed" assert($ieAbout.title=="About KALIDO MDM","Failed to invoke About") statusMessage="close failed" $ieAbout.close rescue errorstring ="Failed while " + statusMessage failTest(3,errorstring) end end Mike Harris _______________________________________________ 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 phillipsic at gmail.com Tue Aug 30 07:21:41 2005 From: phillipsic at gmail.com (Ian Phillips) Date: Tue, 30 Aug 2005 13:21:41 +0200 Subject: [Wtr-general] popups In-Reply-To: <004101c5ad50$f43a2f50$950d7aa3@PC131> References: <004101c5ad50$f43a2f50$950d7aa3@PC131> Message-ID: Thanks Nishita, I have now worked out what I was doing wrong. I was place the startClicker in the wrong place. Thanks for all the help Ian On 8/30/05, Nishita Acharya wrote: > > hi, > i am attaching a prog that i tried initially for popups....Hope it will > be of some help > * Regards, > > Nishita Acharya > Associate System Engg > Tata Infotech > Bangalore. > * > > _______________________________________________ > 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/20050830/9f74e48d/attachment.html From Kiruthika.Subramanian at honeywell.com Tue Aug 30 09:00:23 2005 From: Kiruthika.Subramanian at honeywell.com (Subramanian, Kiruthika (IE10)) Date: Tue, 30 Aug 2005 06:00:23 -0700 Subject: [Wtr-general] RE: Wtr-general Digest, Vol 21, Issue 85 Message-ID: <77ED2BF75D59D1439F90412CC5B1097423A445A9@ie10-sahara.hiso.honeywell.com> I am trying to evaluate a performance tool for my application. 1. The architecture -> front-end designed with Access forms. Back-end is SQL server. The front-end talks to the backed through OLEDB. 2. Objective is to determine the response time of every sub-form, controls, etc..... Would like to know some tools for the same. Thanks, Kiruthika This e-mail, and any attachments thereto, are intended only for use by the addressee(s) named herein and contain Honeywell confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying which amounts to misappropriation of this e-mail and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify me and permanently delete the original and any copy of any e-mail and any printout thereof -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of wtr-general-request at rubyforge.org Sent: Tuesday, August 30, 2005 3:20 PM To: wtr-general at rubyforge.org Subject: Wtr-general Digest, Vol 21, Issue 85 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:cliccking ok in MS explorer (Nishita Acharya) 2. Re: re:cliccking ok in MS explorer (Ian Phillips) 3. Swing Testing (Ganapathi Raj) 4. Connecting to a second window (Mike Harris) 5. RE: Connecting to a second window (Zeljko Filipin) 6. RE: Connecting to a second window (Mike Harris) 7. RE: Connecting to a second window (Zeljko Filipin) ---------------------------------------------------------------------- Message: 1 Date: Tue, 30 Aug 2005 12:57:29 +0530 From: "Nishita Acharya" Subject: [Wtr-general] re:cliccking ok in MS explorer To: Message-ID: <001b01c5ad34$474b9ed0$950d7aa3 at PC131> Content-Type: text/plain; charset="windows-1252" Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 2743 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050830/6399406a/att achment-0001.jpg ------------------------------ Message: 2 Date: Tue, 30 Aug 2005 09:47:55 +0200 From: Ian Phillips Subject: Re: [Wtr-general] re:cliccking ok in MS explorer To: wtr-general at rubyforge.org Message-ID: Content-Type: text/plain; charset="iso-8859-1" HI Nishita. I have added the code as it is but it does not find the window. Do I need to change anything the the code you supplied? My test just stops when the popup window appears. Any ideas? Thanks for the help Ian On 8/30/05, Nishita Acharya wrote: > > hi Ian, > i came across the same prob. This should help u:- > > 1. There is a prog called popups_test.rb in unitests > 2. include this code frm that prog in ur current prog > > def startClicker( button , waitTime = 0.5) > 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 > 3. Wherever necessary wirte this > startClicker("OK") > $ie.button(:value,"button_value").click > * Regards, > > Nishita Acharya > Bangalore. > * > > > _______________________________________________ > 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/20050830/07098107/att achment-0001.htm ------------------------------ Message: 3 Date: Tue, 30 Aug 2005 14:47:48 +0530 From: "Ganapathi Raj" Subject: [Wtr-general] Swing Testing To: Message-ID: Content-Type: text/plain; charset="iso-8859-1" Hi All, Is it possible to simulate(Test) the Swing Application through Watir. Cheers Gan This message is free from Virus - IMSS -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050830/46adf3bd/att achment-0001.htm ------------------------------ Message: 4 Date: Tue, 30 Aug 2005 10:38:57 +0100 From: "Mike Harris" Subject: [Wtr-general] Connecting to a second window To: Message-ID: Content-Type: text/plain; charset="us-ascii" I have just started to use Watir and am trying to connect to a new window using this code, but I fail to goto the link. Can you please give me some advice about why this may be failing. Thanks def test_03_ViewAbout puts "Test 3...View About" goToSignOnPage() login() begin statusMessage="Invoking About" aboutlink=$ie.getLink(:text,"About") statusMessage="goto link failed" puts("goto link failed") $ie.goto(aboutlink.href) puts("attach failed") statusMessage="attach failed" $ieAbout = IE.attach(:title, /About KALIDO MDM/) statusMessage="assert failed" assert($ieAbout.title=="About KALIDO MDM","Failed to invoke About") statusMessage="close failed" $ieAbout.close rescue errorstring ="Failed while " + statusMessage failTest(3,errorstring) end end Mike Harris ------------------------------ Message: 5 Date: Tue, 30 Aug 2005 11:43:51 +0200 From: "Zeljko Filipin" Subject: RE: [Wtr-general] Connecting to a second window To: Message-ID: <43142a30.422ca9d5.27fe.ffffce56 at mx.gmail.com> Content-Type: text/plain; charset="us-ascii" In which line does your script fail (goto or attach)? What error message do you get? Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Mike Harris Sent: Tuesday, August 30, 2005 11:39 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Connecting to a second window I have just started to use Watir and am trying to connect to a new window using this code, but I fail to goto the link. Can you please give me some advice about why this may be failing. Thanks def test_03_ViewAbout puts "Test 3...View About" goToSignOnPage() login() begin statusMessage="Invoking About" aboutlink=$ie.getLink(:text,"About") statusMessage="goto link failed" puts("goto link failed") $ie.goto(aboutlink.href) puts("attach failed") statusMessage="attach failed" $ieAbout = IE.attach(:title, /About KALIDO MDM/) statusMessage="assert failed" assert($ieAbout.title=="About KALIDO MDM","Failed to invoke About") statusMessage="close failed" $ieAbout.close rescue errorstring ="Failed while " + statusMessage failTest(3,errorstring) end end Mike Harris _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ------------------------------ Message: 6 Date: Tue, 30 Aug 2005 10:52:32 +0100 From: "Mike Harris" Subject: RE: [Wtr-general] Connecting to a second window To: Message-ID: Content-Type: text/plain; charset="us-ascii" The last line put to the command console is attach failed. So I assume that it is the attach that has failed -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 30 August 2005 10:44 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Connecting to a second window In which line does your script fail (goto or attach)? What error message do you get? Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Mike Harris Sent: Tuesday, August 30, 2005 11:39 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Connecting to a second window I have just started to use Watir and am trying to connect to a new window using this code, but I fail to goto the link. Can you please give me some advice about why this may be failing. Thanks def test_03_ViewAbout puts "Test 3...View About" goToSignOnPage() login() begin statusMessage="Invoking About" aboutlink=$ie.getLink(:text,"About") statusMessage="goto link failed" puts("goto link failed") $ie.goto(aboutlink.href) puts("attach failed") statusMessage="attach failed" $ieAbout = IE.attach(:title, /About KALIDO MDM/) statusMessage="assert failed" assert($ieAbout.title=="About KALIDO MDM","Failed to invoke About") statusMessage="close failed" $ieAbout.close rescue errorstring ="Failed while " + statusMessage failTest(3,errorstring) end end Mike Harris _______________________________________________ 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 ------------------------------ Message: 7 Date: Tue, 30 Aug 2005 11:57:07 +0200 From: "Zeljko Filipin" Subject: RE: [Wtr-general] Connecting to a second window To: Message-ID: <43142d4c.6240479b.43d0.ffffa890 at mx.gmail.com> Content-Type: text/plain; charset="us-ascii" Try this $ieAbout = Watir::IE.attach(:title, /About KALIDO MDM/) instead of $ieAbout = IE.attach(:title, /About KALIDO MDM/) Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Mike Harris Sent: Tuesday, August 30, 2005 11:53 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Connecting to a second window The last line put to the command console is attach failed. So I assume that it is the attach that has failed -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 30 August 2005 10:44 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Connecting to a second window In which line does your script fail (goto or attach)? What error message do you get? Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Mike Harris Sent: Tuesday, August 30, 2005 11:39 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Connecting to a second window I have just started to use Watir and am trying to connect to a new window using this code, but I fail to goto the link. Can you please give me some advice about why this may be failing. Thanks def test_03_ViewAbout puts "Test 3...View About" goToSignOnPage() login() begin statusMessage="Invoking About" aboutlink=$ie.getLink(:text,"About") statusMessage="goto link failed" puts("goto link failed") $ie.goto(aboutlink.href) puts("attach failed") statusMessage="attach failed" $ieAbout = IE.attach(:title, /About KALIDO MDM/) statusMessage="assert failed" assert($ieAbout.title=="About KALIDO MDM","Failed to invoke About") statusMessage="close failed" $ieAbout.close rescue errorstring ="Failed while " + statusMessage failTest(3,errorstring) end end Mike Harris _______________________________________________ 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 End of Wtr-general Digest, Vol 21, Issue 85 ******************************************* From carl.l.shaulis at convergys.com Tue Aug 30 09:34:25 2005 From: carl.l.shaulis at convergys.com (carl.l.shaulis at convergys.com) Date: Tue, 30 Aug 2005 08:34:25 -0500 Subject: [Wtr-general] Problems with Assert method Message-ID: Good morning WATIR experts, I apologize for such an elementary post, but I am having difficulty getting the assert methods to function. I believe my issue is fundamental. Is it how I am attempting to use assertions? Is it path or environment related? We have been able to write some really nice WATIR scripts, but I believe in order for our testing to be more successful we need the unit tests methods working. Any suggestions would be greatly appreciated. You will find code and results below. I am using Eclipse to do this development. Thanks in advance for your consideration. Carl Here is my simplified code: # feature tests for Text Fields # revision: $Revision: 1.26 $ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require '/Apps/watir_bonus/unitTests/setup' class TC_Fields < Test::Unit::TestCase include Watir def setup puts "Set URL variable" test_site = 'http://www.yahoo.com' puts "Start New Browser" ie = IE.new puts "Setup: go to the test site: " + test_site ie.goto(test_site) #puts "Assertion Test in Position A" #assert($ie.text_field(:id, "v1").exists?) end def Test1 puts "Assertion Test in Position B" assert($ie.text_field(:id, "v1").exists?) end end This is the result if I place the assertion in position A. Loaded suite C:/Apps/PowerSeller Test Scripts/carl_textfields_test Started Set URL variable Start New Browser Setup: go to the test site: http://www.yahoo.com Assertion Test E Finished in 1.101 seconds. 1) Error: default_test(TC_Fields): WIN32OLERuntimeError: document OLE error code:80004005 in HRESULT error code:0x80020009 Exception occurred. C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:1400:in `method_missing' C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:1400:in `getDocument' C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:721:in `getContainerContents' C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:743:in `getObject' C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:3471:in `initialize' C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:368:in `new' C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:368:in `text_field' C:/Apps/PowerSeller Test Scripts/carl_textfields_test.rb:25:in `setup' 1 tests, 0 assertions, 0 failures, 1 errors This is the result if I place the assertion in position B. Loaded suite C:/Apps/PowerSeller Test Scripts/carl_textfields_test Started Set URL variable Start New Browser Setup: go to the test site: http://www.yahoo.com F Finished in 1.162 seconds. 1) Failure: default_test(TC_Fields) [C:/Apps/ruby/lib/ruby/1.8/test/unit/assertions.rb:30:in `assert_block' C:/Apps/ruby/lib/ruby/1.8/test/unit/assertions.rb:28:in `_wrap_assertion' C:/Apps/ruby/lib/ruby/1.8/test/unit/assertions.rb:28:in `assert_block' C:/Apps/ruby/lib/ruby/1.8/test/unit/assertions.rb:225:in `flunk' C:/Apps/ruby/lib/ruby/1.8/test/unit/testcase.rb:99:in `default_test' C:/Apps/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `__send__' C:/Apps/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `run' C:/Apps/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' C:/Apps/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each' C:/Apps/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' C:/Apps/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' C:/Apps/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each' C:/Apps/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' C:/Apps/ruby/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:44:in `run_suite' C:/Apps/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:65:in `start_mediator' C:/Apps/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:39:in `start' C:/Apps/ruby/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:27:in `run' C:/Apps/ruby/lib/ruby/1.8/test/unit/autorunner.rb:194:in `run' C:/Apps/ruby/lib/ruby/1.8/test/unit/autorunner.rb:14:in `run' C:/Apps/ruby/lib/ruby/1.8/test/unit.rb:285 C:/Apps/ruby/lib/ruby/1.8/test/unit.rb:283]: No tests were specified. 1 tests, 1 assertions, 1 failures, 0 errors -- "NOTICE: The information contained in this electronic mail transmission is intended by Convergys Corporation for the use of the named individual or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone (collect), so that the sender's address records can be corrected." From phillipsic at gmail.com Tue Aug 30 09:51:28 2005 From: phillipsic at gmail.com (Ian Phillips) Date: Tue, 30 Aug 2005 15:51:28 +0200 Subject: [Wtr-general] Problems with Assert method In-Reply-To: References: Message-ID: Hi. I noticed in your assert you have '$ie' but else where you have 'ie'. Could that be the problem? Ian On 8/30/05, carl.l.shaulis at convergys.com wrote: > > > > > > Good morning WATIR experts, > > I apologize for such an elementary post, but I am having difficulty > getting > the assert methods to function. I believe my issue is fundamental. Is it > how I am attempting to use assertions? Is it path or environment related? > > We have been able to write some really nice WATIR scripts, but I believe > in > order for our testing to be more successful we need the unit tests methods > working. > > Any suggestions would be greatly appreciated. You will find code and > results below. I am using Eclipse to do this development. > > Thanks in advance for your consideration. > > Carl > > > > Here is my simplified code: > > # feature tests for Text Fields > # revision: $Revision: 1.26 $ > > $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == > __FILE__ > require '/Apps/watir_bonus/unitTests/setup' > > > class TC_Fields < Test::Unit::TestCase > include Watir > > def setup > > puts "Set URL variable" > test_site = 'http://www.yahoo.com' > > puts "Start New Browser" > ie = IE.new > > > puts "Setup: go to the test site: " + test_site > > ie.goto(test_site) > > #puts "Assertion Test in Position A" > #assert($ie.text_field(:id, "v1").exists?) > > end > > > def Test1 > > puts "Assertion Test in Position B" > assert($ie.text_field(:id, "v1").exists?) > > end > end > > > > This is the result if I place the assertion in position A. > > Loaded suite C:/Apps/PowerSeller Test Scripts/carl_textfields_test > Started > Set URL variable > Start New Browser > Setup: go to the test site: http://www.yahoo.com > Assertion Test > E > Finished in 1.101 seconds. > > 1) Error: > default_test(TC_Fields): > WIN32OLERuntimeError: document > OLE error code:80004005 in > > HRESULT error code:0x80020009 > Exception occurred. > C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:1400:in `method_missing' > C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:1400:in `getDocument' > C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:721:in > `getContainerContents' > C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:743:in `getObject' > C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:3471:in `initialize' > C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:368:in `new' > C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:368:in `text_field' > C:/Apps/PowerSeller Test Scripts/carl_textfields_test.rb:25:in `setup' > > 1 tests, 0 assertions, 0 failures, 1 errors > > This is the result if I place the assertion in position B. > > Loaded suite C:/Apps/PowerSeller Test Scripts/carl_textfields_test > Started > Set URL variable > Start New Browser > Setup: go to the test site: http://www.yahoo.com > F > Finished in 1.162 seconds. > > 1) Failure: > default_test(TC_Fields) > [C:/Apps/ruby/lib/ruby/1.8/test/unit/assertions.rb:30:in `assert_block' > C:/Apps/ruby/lib/ruby/1.8/test/unit/assertions.rb:28:in > `_wrap_assertion' > C:/Apps/ruby/lib/ruby/1.8/test/unit/assertions.rb:28:in `assert_block' > C:/Apps/ruby/lib/ruby/1.8/test/unit/assertions.rb:225:in `flunk' > C:/Apps/ruby/lib/ruby/1.8/test/unit/testcase.rb:99:in `default_test' > C:/Apps/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `__send__' > C:/Apps/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `run' > C:/Apps/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' > C:/Apps/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each' > C:/Apps/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' > C:/Apps/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' > C:/Apps/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each' > C:/Apps/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' > C:/Apps/ruby/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:44:in > `run_suite' > C:/Apps/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:65:in > `start_mediator' > C:/Apps/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:39:in > `start' > C:/Apps/ruby/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:27:in > `run' > C:/Apps/ruby/lib/ruby/1.8/test/unit/autorunner.rb:194:in `run' > C:/Apps/ruby/lib/ruby/1.8/test/unit/autorunner.rb:14:in `run' > C:/Apps/ruby/lib/ruby/1.8/test/unit.rb:285 > C:/Apps/ruby/lib/ruby/1.8/test/unit.rb:283]: > No tests were specified. > > 1 tests, 1 assertions, 1 failures, 0 errors > -- > "NOTICE: The information contained in this electronic mail transmission is > intended by Convergys Corporation for the use of the named individual or > entity to which it is directed and may contain information that is > privileged or otherwise confidential. If you have received this electronic > mail transmission in error, please delete it from your system without > copying or forwarding it, and notify the sender of the error by reply > email > or by telephone (collect), so that the sender's address records can be > corrected." > > _______________________________________________ > 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/20050830/9677188f/attachment.html From zeljko.filipin at gmail.com Tue Aug 30 09:55:31 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 30 Aug 2005 15:55:31 +0200 Subject: [Wtr-general] Problems with Assert method In-Reply-To: Message-ID: <43146531.2207ec17.1402.7d0a@mx.gmail.com> And I noticed that you have def Test1 instead of def test1 Zeljko _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Ian Phillips Sent: Tuesday, August 30, 2005 3:51 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Problems with Assert method Hi. I noticed in your assert you have '$ie' but else where you have 'ie'. Could that be the problem? Ian On 8/30/05, carl.l.shaulis at convergys.com > wrote: Good morning WATIR experts, I apologize for such an elementary post, but I am having difficulty getting the assert methods to function. I believe my issue is fundamental. Is it how I am attempting to use assertions? Is it path or environment related? We have been able to write some really nice WATIR scripts, but I believe in order for our testing to be more successful we need the unit tests methods working. Any suggestions would be greatly appreciated. You will find code and results below. I am using Eclipse to do this development. Thanks in advance for your consideration. Carl Here is my simplified code: # feature tests for Text Fields # revision: $Revision: 1.26 $ $LOAD_PATH.unshift File.join(File.dirname (__FILE__), '..') if $0 == __FILE__ require '/Apps/watir_bonus/unitTests/setup' class TC_Fields < Test::Unit::TestCase include Watir def setup puts "Set URL variable" test_site = 'http://www.yahoo.com' puts "Start New Browser" ie = IE.new puts "Setup: go to the test site: " + test_site ie.goto(test_site) #puts "Assertion Test in Position A" #assert($ie.text_field(:id, "v1").exists?) end def Test1 puts "Assertion Test in Position B" assert($ie.text_field(:id, "v1").exists?) end end This is the result if I place the assertion in position A. Loaded suite C:/Apps/PowerSeller Test Scripts/carl_textfields_test Started Set URL variable Start New Browser Setup: go to the test site: http://www.yahoo.com Assertion Test E Finished in 1.101 seconds. 1) Error: default_test(TC_Fields): WIN32OLERuntimeError: document OLE error code:80004005 in HRESULT error code:0x80020009 Exception occurred. C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:1400:in `method_missing' C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:1400:in `getDocument' C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:721:in `getContainerContents' C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:743:in `getObject' C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:3471:in `initialize' C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:368:in `new' C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:368:in `text_field' C:/Apps/PowerSeller Test Scripts/carl_textfields_test.rb:25:in `setup' 1 tests, 0 assertions, 0 failures, 1 errors This is the result if I place the assertion in position B. Loaded suite C:/Apps/PowerSeller Test Scripts/carl_textfields_test Started Set URL variable Start New Browser Setup: go to the test site: http://www.yahoo.com F Finished in 1.162 seconds. 1) Failure: default_test(TC_Fields) [C:/Apps/ruby/lib/ruby/1.8/test/unit/assertions.rb:30:in `assert_block' C:/Apps/ruby/lib/ruby/1.8/test/unit/assertions.rb:28:in `_wrap_assertion' C:/Apps/ruby/lib/ruby/1.8/test/unit/assertions.rb:28:in `assert_block' C:/Apps/ruby/lib/ruby/1.8/test/unit/assertions.rb:225:in `flunk' C:/Apps/ruby/lib/ruby/1.8/test/unit/testcase.rb:99:in `default_test' C:/Apps/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `__send__' C:/Apps/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `run' C:/Apps/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' C:/Apps/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each' C:/Apps/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' C:/Apps/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' C:/Apps/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each' C:/Apps/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' C:/Apps/ruby/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:44:in `run_suite' C:/Apps/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:65:in `start_mediator' C:/Apps/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:39:in `start' C:/Apps/ruby/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:27:in `run' C:/Apps/ruby/lib/ruby/1.8/test/unit/autorunner.rb:194:in `run' C:/Apps/ruby/lib/ruby/1.8/test/unit/autorunner.rb:14:in `run' C:/Apps/ruby/lib/ruby/1.8/test/unit.rb:285 C:/Apps/ruby/lib/ruby/1.8/test/unit.rb:283]: No tests were specified. 1 tests, 1 assertions, 1 failures, 0 errors -- "NOTICE: The information contained in this electronic mail transmission is intended by Convergys Corporation for the use of the named individual or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone (collect), so that the sender's address records can be corrected." _______________________________________________ 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/20050830/f6459036/attachment.html From phillipsic at gmail.com Tue Aug 30 10:09:03 2005 From: phillipsic at gmail.com (Ian Phillips) Date: Tue, 30 Aug 2005 16:09:03 +0200 Subject: [Wtr-general] assert PASSED and FAILED Message-ID: Hi. I have the following assert below. When this code is executed I get both PASSED and FAILED messages reported?? begin assert($ie.contains_text("TestGroup")) $logger.log("test_CreateGroupTest-TestGroup Found-TestGroup Found-PASSED") $logger.log_results("test_CreateGroupTest", "TestGroup Found", "TestGroup Found", "PASSED") rescue =>e puts("TEST FAILED." + e.message + "\n" + e.backtrace.join("\n")) $logger.log_results("test_CreateGroupTest", "TestGroup Found", "TestGroup NOT Found", "FAILED") end This is the output log test_CreateGroupTest-TestGroup Found-TestGroup Found-PASSED log XML file output: Test case: test_CreateGroupTest input: TestGroup Found expe cted: TestGroup Found status: PASSED TEST FAILED.closed stream ./example_logger1.rb:62:in `write' ./example_logger1.rb:62:in `puts' ./example_logger1.rb:62:in `log_results' ./CreateNewGroup_tst.rb:70:in `test_CreateGroupTest' c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `__send__' c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `run' c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each' c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each' c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' c:/ruby/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:44:in `run_suite' c:/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:65:in `start_mediator' c:/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:39:in `start' c:/ruby/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:27:in `run' c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:194:in `run' c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:14:in `run' c:/ruby/lib/ruby/1.8/test/unit.rb:285 c:/ruby/lib/ruby/1.8/test/unit.rb:283 log XML file output: Test case: test_CreateGroupTest input: TestGroup Found expe cted: TestGroup NOT Found status: FAILED I was assuming I would get one or the other? Ian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050830/c108d155/attachment.html From carl.l.shaulis at convergys.com Tue Aug 30 11:54:55 2005 From: carl.l.shaulis at convergys.com (carl.l.shaulis at convergys.com) Date: Tue, 30 Aug 2005 10:54:55 -0500 Subject: [Wtr-general] Re: Wtr-general Digest, Vol 21, Issue 87 In-Reply-To: <200508301351.j7UDpGcS019686@rubyforge.org> Message-ID: Thanks for your responses! This code is a modified version of the code in textfields_test.rb, so I believe the syntax is accurate. I changed Test1 to test1, which provides the same result. I also removed the $ from the ie and I get this Loaded suite C:/Apps/PowerSeller Test Scripts/carl_textfields_test Started Set URL variable Start New Browser Setup: go to the test site: http://www.yahoo.com Assertion Test in Position B E Finished in 1.082 seconds. 1) Error: test1(TC_Fields): NameError: undefined local variable or method `ie' for # C:/Apps/PowerSeller Test Scripts/carl_textfields_test.rb:33:in `test1' 1 tests, 0 assertions, 0 failures, 1 errors My gut is telling me it is something with my development environment. If someone has a moment please copy and execute this script in your environment. Thanks, Carl From Sean.Gallagher at ticketmaster.com Tue Aug 30 12:45:50 2005 From: Sean.Gallagher at ticketmaster.com (Sean Gallagher) Date: Tue, 30 Aug 2005 09:45:50 -0700 Subject: [Wtr-general] Re: Wtr-general Digest, Vol 21, Issue 87 Message-ID: <71D28C8451BFD5119B2B00508BE26E6409E11AB2@pasmail3.office.tmcs> # you were trying to use an undefined local variable in your test method # here is an example that uses an instance variable for IE # the test runs, but fails -- I don't know what you are looking for :-) require 'watir' require 'test/unit' require 'test/unit/ui/console/testrunner' require 'watir/testUnitAddons' class TC_Fields < Test::Unit::TestCase include Watir def setup puts "Set URL variable" test_site = 'http://www.yahoo.com' puts "Start New Browser" @ie = IE.new puts "Setup: go to the test site: " + test_site @ie.goto(test_site) #puts "Assertion Test in Position A" #assert(@ie.text_field(:id, "v1").exists?) end def test1 puts "Assertion Test in Position B" assert(@ie.text_field(:id, "v1").exists?) end end -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of carl.l.shaulis at convergys.com Sent: Tuesday, August 30, 2005 8:55 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Re: Wtr-general Digest, Vol 21, Issue 87 Thanks for your responses! This code is a modified version of the code in textfields_test.rb, so I believe the syntax is accurate. I changed Test1 to test1, which provides the same result. I also removed the $ from the ie and I get this Loaded suite C:/Apps/PowerSeller Test Scripts/carl_textfields_test Started Set URL variable Start New Browser Setup: go to the test site: http://www.yahoo.com Assertion Test in Position B E Finished in 1.082 seconds. 1) Error: test1(TC_Fields): NameError: undefined local variable or method `ie' for # C:/Apps/PowerSeller Test Scripts/carl_textfields_test.rb:33:in `test1' 1 tests, 0 assertions, 0 failures, 1 errors My gut is telling me it is something with my development environment. If someone has a moment please copy and execute this script in your environment. Thanks, Carl _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Tue Aug 30 12:45:08 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 30 Aug 2005 11:45:08 -0500 Subject: [Wtr-general] assert PASSED and FAILED In-Reply-To: Message-ID: <5.1.0.14.2.20050830114334.02e78628@127.0.0.1> You shouldn't use assert in this situation. Instead: if $ie.contains_text("TestGroup") $logger.log("test_CreateGroupTest-TestGroup Found-TestGroup Found-PASSED") $logger.log_results("test_CreateGroupTest", "TestGroup Found", "TestGroup Found", "PASSED") else puts("TEST FAILED." + e.message + "\n" + e.backtrace.join("\n")) $logger.log_results("test_CreateGroupTest", "TestGroup Found", "TestGroup NOT Found", "FAILED") end At 09:09 AM 8/30/2005, Ian Phillips wrote: >Hi. > >I have the following assert below. When this code is executed I get both >PASSED and FAILED messages reported?? > >begin > assert($ie.contains_text("TestGroup")) > $logger.log("test_CreateGroupTest-TestGroup Found-TestGroup > Found-PASSED") > $logger.log_results("test_CreateGroupTest", "TestGroup Found", > "TestGroup Found", "PASSED") >rescue =>e > puts("TEST FAILED." + e.message + "\n" + e.backtrace.join("\n")) > $logger.log_results("test_CreateGroupTest", "TestGroup Found", > "TestGroup NOT Found", "FAILED") >end > > >This is the output > > >log test_CreateGroupTest-TestGroup Found-TestGroup Found-PASSED >log XML file output: Test case: test_CreateGroupTest input: TestGroup >Found expe >cted: TestGroup Found status: PASSED >TEST FAILED.closed stream >./example_logger1.rb:62:in `write' >./example_logger1.rb:62:in `puts' >./example_logger1.rb:62:in `log_results' >./CreateNewGroup_tst.rb:70:in `test_CreateGroupTest' >c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `__send__' >c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `run' >c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' >c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each' >c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' >c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' >c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each' >c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' >c:/ruby/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:44:in `run_suite' >c:/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:65:in `start_mediator' >c:/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:39:in `start' >c:/ruby/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:27:in `run' >c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:194:in `run' >c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:14:in `run' >c:/ruby/lib/ruby/1.8/test/unit.rb:285 >c:/ruby/lib/ruby/1.8/test/unit.rb:283 >log XML file output: Test case: test_CreateGroupTest input: TestGroup >Found expe >cted: TestGroup NOT Found status: FAILED > > >I was assuming I would get one or the other? > >Ian >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Tue Aug 30 13:14:13 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 30 Aug 2005 12:14:13 -0500 Subject: [Wtr-general] Re: Wtr-general Digest, Vol 21, Issue 87 In-Reply-To: References: <200508301351.j7UDpGcS019686@rubyforge.org> Message-ID: <5.1.0.14.2.20050830121337.02e91ef0@127.0.0.1> ie won't work. that is a local variable. $ie is global and will be valid in all locations. Bret At 10:54 AM 8/30/2005, you wrote: >Thanks for your responses! > >This code is a modified version of the code in textfields_test.rb, so I >believe the syntax is accurate. I changed Test1 to test1, which provides >the same result. I also removed the $ from the ie and I get this > >Loaded suite C:/Apps/PowerSeller Test Scripts/carl_textfields_test >Started >Set URL variable >Start New Browser >Setup: go to the test site: http://www.yahoo.com >Assertion Test in Position B >E >Finished in 1.082 seconds. > > 1) Error: >test1(TC_Fields): >NameError: undefined local variable or method `ie' for ># > C:/Apps/PowerSeller Test Scripts/carl_textfields_test.rb:33:in `test1' > >1 tests, 0 assertions, 0 failures, 1 errors > >My gut is telling me it is something with my development environment. If >someone has a moment please copy and execute this script in your >environment. > >Thanks, > >Carl > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From jhobbsjr at gmail.com Tue Aug 30 14:43:38 2005 From: jhobbsjr at gmail.com (John Hobbs) Date: Tue, 30 Aug 2005 14:43:38 -0400 Subject: [Wtr-general] What is the best way to access a div based on :text? Message-ID: <30078ddb050830114316cec6e2@mail.gmail.com> Does anyone know of a good way to access a div based on text? I havebeen using the following code: ie.div(:index, 13).click Unfortunately, the index may change and it would be better to accessthe div using :text. To do this, I have changed my code to the following: ie.divs.each { |d| if (d.text == "Logout") then d.click break end } I am new to Ruby and was wondering if there is a better way. My codejust doesn't look as nice and clean as ie.div(:index, 13).click. BTW ? Watir is great! How I came to Watir is a long story, but I havebeen using it for a month. I run about 240 test cases a day. I useWatir along with Test::Unit::Report, which produces nice HTML reportsfor management and XML for the metrics folks. John From raghu at qantom.com Tue Aug 30 15:41:07 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Wed, 31 Aug 2005 01:11:07 +0530 Subject: [Wtr-general] What is the best way to access a div based on :text? In-Reply-To: <30078ddb050830114316cec6e2@mail.gmail.com> References: <30078ddb050830114316cec6e2@mail.gmail.com> Message-ID: <4314B653.50604@qantom.com> You may want to take a look at how Wet does it. There is no support as yet in Wet for accessing 'div' elements, but there are ways to do it for similar tags like table, row & cell. You should be able to use the same technique to say, ie.div(:text, "...") Raghu John Hobbs wrote: >Does anyone know of a good way to access a div based on text? I havebeen using the following code: >ie.div(:index, 13).click >Unfortunately, the index may change and it would be better to accessthe div using :text. >To do this, I have changed my code to the following: > ie.divs.each { |d| if (d.text == "Logout") then d.click break end } >I am new to Ruby and was wondering if there is a better way. My codejust doesn't look as nice and clean as ie.div(:index, 13).click. >BTW ? Watir is great! How I came to Watir is a long story, but I havebeen using it for a month. I run about 240 test cases a day. I useWatir along with Test::Unit::Report, which produces nice HTML reportsfor management and XML for the metrics folks. >John >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > From raghu at qantom.com Tue Aug 30 16:29:38 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Wed, 31 Aug 2005 01:59:38 +0530 Subject: [Wtr-general] Watir attracts Ruby Newbies In-Reply-To: <5.1.0.14.2.20050829234743.02b794b0@127.0.0.1> References: <5.1.0.14.2.20050829234743.02b794b0@127.0.0.1> Message-ID: <4314C1B2.9040006@qantom.com> I though I must add a couple great reasons why Watir(+Ruby) makes a lot more sense than those $$$ automation tools. Today while running through our automated scripts that are being developed for a module that iself is under development, many scripts failed due to the fact that some object names changed. Since all my object references are in a centralized Object Repository, it only took me a few minutes to get the script back in order. Prior to Watir, I have not had this much success in having a parallelism in product development with test automation (UI) development. In fact most tool vendors only suggest that the automation should start when the product is stable. The $$$ tool vendor's only weapon against this is a 'record and playback' option. I dont intend to start this war here, but those who have used record and playback know what it's worth. Even if it is not possible to test the UI before complete development, I think it should be possible to start the test automation scripting process with a prototype. This episode takes my memory back to a couple of years where I was in a similar situation and I had to build some extensions to get our product work with a proprietory (and heavily expensive) tool. First, it took me a while and a few support mail exchanges to get them to accept that the tool can't do what I wanted - both in the basic form and their supposed 'advanced scripting mode'. Then when I had to start building an enhancement to workaround the problem, an equal amount of time was spent exchanging questions both with the support folks and the discussion forums to find some useful information about some 'helper' libraries that were shipped along with their product CD. With Watir - no issues. In just over a month, not only did we have a bunch of scripts automated, we built all the enhancements that we needed - Oh - the possibilities of open source! A great tool ! A great community behind it! Raghu Bret Pettichord wrote: > Watir is rapidly attracting users. (We pronounce it 'water'.) > > Many of our users are new to Ruby and even new to object-oriented > languages. > > In fact, they can't tell where Watir ends and Ruby begins. Thus, they > end up asking lots of questions to the Watir mailing list > (wtr-general at rubyforge.org) that are really just Ruby questions. > > I gave a presentation of Watir's precursor at the Ruby Conference 2003 > in Austin. At that time, i said that we were using Ruby as our > scripting language because it was intuitive and easy to learn for > non-programmers. > > But now they are wanting to read data from spreadsheets or csv files > or initialization files. Or they want to create libraries. Or they > want help with Test::Unit. > > I consider myself middling in my Ruby skills. I've heard meta-classes > explained at least three times and still don't understand them. But > i'm one of the more knowledgable people on the list. > > We could use your help. If you are interested in helping new users > learn how to use Ruby, please consider joining our mailing list. (Or > you could just help Brian with his book.) > > Oh, and BTW, we now have a gem for Watir ('gem install watir'). It has > unit tests and rdoc. And yes, Watir only works on Windows and only > with Internet Explorer. I offer apologies to the OSS gods. > > http://wtr.rubyforge.org/ > > Bret > > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From michael.net at gmail.com Tue Aug 30 17:02:37 2005 From: michael.net at gmail.com (Mike) Date: Tue, 30 Aug 2005 17:02:37 -0400 Subject: [Wtr-general] How to open right-click context menu? In-Reply-To: <20050814202943.55494.qmail@web50912.mail.yahoo.com> References: <20050814202943.55494.qmail@web50912.mail.yahoo.com> Message-ID: <86388bc7050830140244dbbc1a@mail.gmail.com> Hi, I'm trying to open a right click context menu and then select an item. Via Watir of course. Any pointers? Ordinarily I might be able to figure this out, but in this case view source is turned off, and just getting to this frame was quite an experience, there are treeviews within frames within frames, and almost nothing had a name or id, I had to use sleeps, indexes, etc. Somehow I got to where I needed to go. But now I can't do this simple thing, open the context menu. Any pointers would be appreciated. Thanks, Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050830/0509476a/attachment.html From paul.rogers at shaw.ca Tue Aug 30 18:14:04 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 30 Aug 2005 16:14:04 -0600 Subject: [Wtr-general] Connecting to a second window Message-ID: <4754a744751bb1.4751bb14754a74@shaw.ca> In your test, I dont see you click the link - you seem to also display 'goto link failed' before going to it. Maybe try this begin statusMessage="Click Link" aboutlink=$ie.link(:text,"About").click statusMessage="attaching to new window" $ieAbout = IE.attach(:title, /About KALIDO MDM/) assert($ieAbout.title=="About KALIDO MDM","Failed to invoke About") rescue errorstring ="Failed while " + statusMessage failTest(3,errorstring) end ----- Original Message ----- From: Mike Harris Date: Tuesday, August 30, 2005 5:18 am Subject: RE: [Wtr-general] Connecting to a second window > Thanks.I tried that and still had the same problem. I have just > noticedthat when I hover over the link with the mouse the path to > the page for > the second window is displayed in the status bar, but this does not > include the name of the file. I am wondering if this is the > problem. > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin > Sent: 30 August 2005 10:57 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Connecting to a second window > > Try this > > $ieAbout = Watir::IE.attach(:title, /About KALIDO MDM/) > > instead of > > $ieAbout = IE.attach(:title, /About KALIDO MDM/) > > Zeljko > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [wtr-general-bounces at rubyforge.org] On Behalf Of Mike Harris > Sent: Tuesday, August 30, 2005 11:53 AM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Connecting to a second window > > The last line put to the command console is attach failed. So I assume > that it is the attach that has failed > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin > Sent: 30 August 2005 10:44 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Connecting to a second window > > In which line does your script fail (goto or attach)? What error > messagedo you get? > > Zeljko > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [wtr-general-bounces at rubyforge.org] On Behalf Of Mike Harris > Sent: Tuesday, August 30, 2005 11:39 AM > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Connecting to a second window > > I have just started to use Watir and am trying to connect to a new > window using this code, but I fail to goto the link. Can you > please give > me some advice about why this may be failing. Thanks def > test_03_ViewAbout > puts "Test 3...View About" > goToSignOnPage() > login() > begin > statusMessage="Invoking About" > aboutlink=$ie.getLink(:text,"About") > statusMessage="goto link failed" > puts("goto link failed") > $ie.goto(aboutlink.href) > puts("attach failed") > statusMessage="attach failed" > $ieAbout = IE.attach(:title, /About KALIDO MDM/) > statusMessage="assert failed" > assert($ieAbout.title=="About KALIDO > MDM","Failed to invoke About") > statusMessage="close failed" > $ieAbout.close > rescue > errorstring ="Failed while " + statusMessage > failTest(3,errorstring) > end > end > > Mike Harris > > _______________________________________________ > 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 > From paul.rogers at shaw.ca Tue Aug 30 18:17:23 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 30 Aug 2005 16:17:23 -0600 Subject: [Wtr-general] How to open right-click context menu? Message-ID: <47566634753446.47534464756663@shaw.ca> you can probably do it usint AutoIt, but I dont think there is a way to do it directly into IE through watir Content-Type: multipart/alternative; boundary="----=_Part_417_993946.1125435757337" ------=_Part_417_993946.1125435757337 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, I'm trying to open a right click context menu and then select an item. Vi= a=20 Watir of course. Any pointers? Ordinarily I might be able to figure this=20 out, but in this case view source is turned off, and just getting to this= =20 frame was quite an experience, there are treeviews within frames within=20 frames, and almost nothing had a name or id, I had to use sleeps, indexes,= =20 etc. Somehow I got to where I needed to go. But now I can't do this simple= =20 thing, open the context menu. Any pointers would be appreciated. Thanks, Mike ------=_Part_417_993946.1125435757337 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
Hi,
 
    I'm trying to open a right click context menu and t= hen select an item.  Via Watir of course.  Any pointers?  Or= dinarily I might be able to figure this out, but in this case view source i= s turned off, and just getting to this frame was quite an experience, there= are treeviews within frames within frames, and almost nothing had a name o= r id, I had to use sleeps, indexes, etc.  Somehow I got to where I nee= ded to go.  But now I can't do this simple thing, open the context men= u.  Any pointers would be appreciated.
 
Thanks,
Mike
------=_Part_417_993946.1125435757337-- -------------- next part -------------- _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Tue Aug 30 19:38:52 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 30 Aug 2005 17:38:52 -0600 Subject: [Wtr-general] Running tests in source code order Message-ID: <47771544775097.47750974777154@shaw.ca> Here is some code that runs tests in source code order. I pretty certain Bret posted how to do this ( by overriding the suite method) but he didnt provide any code. This only works if there is one class that does tests in the file, but Im sure someone can figure out how to fix that # # Example of how to override the suite method of Testcase to run tests in source order # # Only works if there is one class that runs tests require 'test/unit' module Test module Unit class TestCase def self.suite lines = IO.readlines(__FILE__) tests = lines.grep(/^ *(def test)/){ |line| line.strip.gsub('def ' , '') } suite = TestSuite.new(name) tests.each do |this_test| puts "Adding test " + this_test catch(:invalid_test) do suite << new(this_test) end end if (suite.empty?) catch(:invalid_test) do suite << new(:default_test) end end return suite end end end end class Tester I think i've got it. Really. When you click on the one-click installer (watir-1.4.1.exe) IE gives you a choice: 1. Open 2. Save If you choose Open, the install will fail and the installer directory will be blank and you will get an error about \watir\AutoIt.chm. If you choose Save and then install it from there, it will install correctly. Bret _____________________ Bret Pettichord www.pettichord.com From Jan.Montano at thomson.com Tue Aug 30 22:08:35 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Wed, 31 Aug 2005 10:08:35 +0800 Subject: [Wtr-general] Connecting to a second window Message-ID: I'm just curious. Is the second window already there upon running the program? if not maybe you could try putting wait(5) before the attach just to be sure. what's the exact error message? and what's the exact title of the page when you view the source? -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Mike Harris Sent: Tuesday, August 30, 2005 7:19 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Connecting to a second window Thanks.I tried that and still had the same problem. I have just noticed that when I hover over the link with the mouse the path to the page for the second window is displayed in the status bar, but this does not include the name of the file. I am wondering if this is the problem. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 30 August 2005 10:57 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Connecting to a second window Try this $ieAbout = Watir::IE.attach(:title, /About KALIDO MDM/) instead of $ieAbout = IE.attach(:title, /About KALIDO MDM/) Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Mike Harris Sent: Tuesday, August 30, 2005 11:53 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Connecting to a second window The last line put to the command console is attach failed. So I assume that it is the attach that has failed -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 30 August 2005 10:44 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Connecting to a second window In which line does your script fail (goto or attach)? What error message do you get? Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Mike Harris Sent: Tuesday, August 30, 2005 11:39 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Connecting to a second window I have just started to use Watir and am trying to connect to a new window using this code, but I fail to goto the link. Can you please give me some advice about why this may be failing. Thanks def test_03_ViewAbout puts "Test 3...View About" goToSignOnPage() login() begin statusMessage="Invoking About" aboutlink=$ie.getLink(:text,"About") statusMessage="goto link failed" puts("goto link failed") $ie.goto(aboutlink.href) puts("attach failed") statusMessage="attach failed" $ieAbout = IE.attach(:title, /About KALIDO MDM/) statusMessage="assert failed" assert($ieAbout.title=="About KALIDO MDM","Failed to invoke About") statusMessage="close failed" $ieAbout.close rescue errorstring ="Failed while " + statusMessage failTest(3,errorstring) end end Mike Harris _______________________________________________ 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 From Jan.Montano at thomson.com Tue Aug 30 22:14:14 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Wed, 31 Aug 2005 10:14:14 +0800 Subject: [Wtr-general] Problems with Assert method Message-ID: hope this helps. http://www.mail-archive.com/wtr-general at rubyforge.org/msg00858.html try using .exist? instead of .exists? I believe .exists? is deprecated. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of carl.l.shaulis at convergys.com Sent: Tuesday, August 30, 2005 9:34 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Problems with Assert method Good morning WATIR experts, I apologize for such an elementary post, but I am having difficulty getting the assert methods to function. I believe my issue is fundamental. Is it how I am attempting to use assertions? Is it path or environment related? We have been able to write some really nice WATIR scripts, but I believe in order for our testing to be more successful we need the unit tests methods working. Any suggestions would be greatly appreciated. You will find code and results below. I am using Eclipse to do this development. Thanks in advance for your consideration. Carl Here is my simplified code: # feature tests for Text Fields # revision: $Revision: 1.26 $ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require '/Apps/watir_bonus/unitTests/setup' class TC_Fields < Test::Unit::TestCase include Watir def setup puts "Set URL variable" test_site = 'http://www.yahoo.com' puts "Start New Browser" ie = IE.new puts "Setup: go to the test site: " + test_site ie.goto(test_site) #puts "Assertion Test in Position A" #assert($ie.text_field(:id, "v1").exists?) end def Test1 puts "Assertion Test in Position B" assert($ie.text_field(:id, "v1").exists?) end end This is the result if I place the assertion in position A. Loaded suite C:/Apps/PowerSeller Test Scripts/carl_textfields_test Started Set URL variable Start New Browser Setup: go to the test site: http://www.yahoo.com Assertion Test E Finished in 1.101 seconds. 1) Error: default_test(TC_Fields): WIN32OLERuntimeError: document OLE error code:80004005 in HRESULT error code:0x80020009 Exception occurred. C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:1400:in `method_missing' C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:1400:in `getDocument' C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:721:in `getContainerContents' C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:743:in `getObject' C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:3471:in `initialize' C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:368:in `new' C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:368:in `text_field' C:/Apps/PowerSeller Test Scripts/carl_textfields_test.rb:25:in `setup' 1 tests, 0 assertions, 0 failures, 1 errors This is the result if I place the assertion in position B. Loaded suite C:/Apps/PowerSeller Test Scripts/carl_textfields_test Started Set URL variable Start New Browser Setup: go to the test site: http://www.yahoo.com F Finished in 1.162 seconds. 1) Failure: default_test(TC_Fields) [C:/Apps/ruby/lib/ruby/1.8/test/unit/assertions.rb:30:in `assert_block' C:/Apps/ruby/lib/ruby/1.8/test/unit/assertions.rb:28:in `_wrap_assertion' C:/Apps/ruby/lib/ruby/1.8/test/unit/assertions.rb:28:in `assert_block' C:/Apps/ruby/lib/ruby/1.8/test/unit/assertions.rb:225:in `flunk' C:/Apps/ruby/lib/ruby/1.8/test/unit/testcase.rb:99:in `default_test' C:/Apps/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `__send__' C:/Apps/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `run' C:/Apps/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' C:/Apps/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each' C:/Apps/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' C:/Apps/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' C:/Apps/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each' C:/Apps/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' C:/Apps/ruby/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:44:in `run_suite' C:/Apps/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:65:in `start_mediator' C:/Apps/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:39:in `start' C:/Apps/ruby/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:27:in `run' C:/Apps/ruby/lib/ruby/1.8/test/unit/autorunner.rb:194:in `run' C:/Apps/ruby/lib/ruby/1.8/test/unit/autorunner.rb:14:in `run' C:/Apps/ruby/lib/ruby/1.8/test/unit.rb:285 C:/Apps/ruby/lib/ruby/1.8/test/unit.rb:283]: No tests were specified. 1 tests, 1 assertions, 1 failures, 0 errors -- "NOTICE: The information contained in this electronic mail transmission is intended by Convergys Corporation for the use of the named individual or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone (collect), so that the sender's address records can be corrected." _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Tue Aug 30 23:42:05 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 30 Aug 2005 22:42:05 -0500 Subject: [Wtr-general] more queries In-Reply-To: <01b801c5aa36$569ddf70$380d7aa3@PC131> Message-ID: <5.1.0.14.2.20050830223956.02e8ef18@127.0.0.1> There is a strong community of Watir users in Bangalore: at Qantom, ThoughtWorks and Honeywell, to name just a few companies. There is also a strong community of Watir users there. I believe the ruby-india at yahoogroups.com is the place to learn more. Bret At 07:04 AM 8/26/2005, Nishita Acharya wrote: > >hello, > thanks for replying . but i want to know > 1>how data can be read into a variable.Incase i have a combo box > which has values>> > Active,Inactive,Suspended,Confirmed. > If i have to hard code it then the code will look like this: > > $ie.select_list( :name > ,"body:adminView:form3:lstStatus").select("Inactive") > > I have a .txt file from which am reading Inactive then how do i > do it? > my text looks like this > > /* exp.txt > data1 > data2 > Inactive */ > > i tried this: > a=IO.readlines("exp.txt") > i=a.length > j=0 > loop do > #read data 1...it is text field > j++ > > #read data 2...it is text field > j++ > c=a.gets > j++ > c=a[j] > $ie.select_list( :name > ,"body:adminView:form3:lstStatus").select(c) > break if j>= i > end > i get this error > > 1) Error: >test_print_assertion(TC_qual_assert): >Watir::Exception::NoValueFoundException: No option with text of Inactive >in this select element > > >2> if doing the above isnt possible then i want to know how it can be read >from a csv and then broken into diff fields and read separately >eg: > data1,data2,Inactive-------is my csv >3> give me the code for dealing with javascript alert boxes > >plz reply as soon as possible am stuck up here and cant seem to >continue > > >Regards, > >Nishita Acharya >Bangalore. > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From nishita.acharya at tatainfotech.com Wed Aug 31 01:04:06 2005 From: nishita.acharya at tatainfotech.com (Nishita Acharya) Date: Wed, 31 Aug 2005 10:34:06 +0530 Subject: [Wtr-general] re re popups Message-ID: <006501c5ade9$69a1be00$950d7aa3@PC131> hi, did u run the prog which i sent u ??? well if it works fine then it should work fine for any popup.... P.S: never touch your mouse or do anything once the prog starts running...thats probably the reason..well thats all i can say....try this last one time..... Regards, Nishita Acharya Bangalore. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050831/26bcd48b/attachment.html From nishita.acharya at tatainfotech.com Wed Aug 31 01:24:07 2005 From: nishita.acharya at tatainfotech.com (Nishita Acharya) Date: Wed, 31 Aug 2005 10:54:07 +0530 Subject: [Wtr-general] browse option Message-ID: <007801c5adec$35a17cf0$950d7aa3@PC131> hello, i have a browse option in one of the forms.I have automated it to pop the 'choose file' window.but i have to choose a file and open it manually.Can this be automated? The view source contains this
any hints? Regards, Nishita Acharya Bangalore. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050831/68d7157e/attachment.html From raghu at qantom.com Wed Aug 31 01:30:21 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Wed, 31 Aug 2005 11:00:21 +0530 Subject: [Wtr-general] browse option In-Reply-To: <007801c5adec$35a17cf0$950d7aa3@PC131> References: <007801c5adec$35a17cf0$950d7aa3@PC131> Message-ID: <4315406D.50205@qantom.com> Hi Nishita, You could try the WET add-on. This addon handles the popup files quite well. Thanks Raghu Nishita Acharya wrote: > hello, > i have a browse option in one of the forms.I have automated it to > pop the 'choose file' window.but i have to choose a file and open it > manually.Can this be automated? The view source contains this > >
enctype="multipart/form-data"> >
> > any hints? > * > > > Regards, > > /Nishita Acharya > Bangalore./ > > * > >------------------------------------------------------------------------ > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > -- Qantom Software http://www.qantom.com Ph : 26799269 Xtn. 125 sip : raghu at sip411.com -- From bret at pettichord.com Wed Aug 31 00:04:47 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 30 Aug 2005 23:04:47 -0500 Subject: [Wtr-general] WAIT statement didn't wait? In-Reply-To: Message-ID: <5.1.0.14.2.20050830230206.02ec4fa8@127.0.0.1> Actually, ie.wait(true) would do the same thing. Here is the code for Frame#wait: def wait(no_sleep = false) @container.wait(no_sleep) end It simply passes the wait call up to the container of the frame (the ie object). What wait does is wait for the page to finish loading; it automatically checks sub frames. It sounds like what you want to do is wait until a particular object exists. We don't have anything like that in Watir. Bret At 07:12 PM 8/26/2005, Tuyet Cong-Ton-Nu wrote: >Just so you know, this doesn't do what you think: > > ie.frame("main").frame("sidebar").wait("analysisSidebarTabContent") > >It's actually the same as > > ie.frame("main").frame("sidebar").wait(true) > > > > >Hmm! So the statement I used is actually is checking to see if the >sidebar is there and NOT the analysisSideBarTabContent ? > > > >Should I use this then for the analysisSideBarTabContent? > >ie.frame("main").frame("sidebar").frame("analysisSidebarTabContent").wait(true) > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Aug 31 00:22:05 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 30 Aug 2005 23:22:05 -0500 Subject: [Wtr-general] Ruby Questions In-Reply-To: Message-ID: <5.1.0.14.2.20050830231804.02ea1a80@127.0.0.1> We are getting many requests on this list, like that below, which are really questions about Ruby and not specific to Watir. Ruby is a general purpose scripting language and there are a lot more people available to answer such general questions on the ruby-talk at ruby-lang.org mailing list. Such questions are also welcome here, but if your question is not getting answered you may want to ask on the other list. For information on how to subscribe to this list, see http://www.ruby-lang.org/en/20020104.html Bret At 12:39 AM 8/29/2005, Leon.Ouretski at au.ey.com wrote: >Hello all, > >I'm new to Watirr (and Ruby), so forgive me if the question is rather >simplistic... > >What I'd like to do, is to have a configuration file (eg. config.txt), >which would have a number of key/value pairs, such as "UserName=user", >which would be read by a test script to, for example, log into a page. >Hence, what I need, is a method to read each line in a given file; strip >off the comments (if exist; denoted by #); find the pair based on the key >(ie. UserName) and get the value (ie. user) and store it in a variable. > >Any help would be greatly appreciated. > >Regards > >Leon _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Aug 31 00:25:48 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 30 Aug 2005 23:25:48 -0500 Subject: [Wtr-general] Can't attach to popup In-Reply-To: Message-ID: <5.1.0.14.2.20050830232455.02f02de8@127.0.0.1> We don't really have a way to handle this situation. It's a problem. Sorry. Bret At 02:16 AM 8/30/2005, Ian Phillips wrote: >Hi > >I have the following popup window: > >Window [007b052c] > Title [Microsoft Internet Explorer] ClassName [#32770] > Thread ID [00000b9c] Process ID [00000c18] > Size [width=305, height=126] > Parent Window [0036041c] > Title [Kabira Order Processing - Microsoft Internet Explorer] > ClassName [IEFrame] > Thread ID [00000b9c] Process ID [00000c18] > Owner Window [0036041c] > Title [Kabira Order Processing - Microsoft Internet Explorer] > ClassName [IEFrame] > Thread ID [00000b9c] Process ID [00000c18] > Belongs to [0036041c] > Title [Kabira Order Processing - Microsoft Internet Explorer] > ClassName [IEFrame] > Thread ID [00000b9c] Process ID [00000c18] > >I have tried to the following but it does not work: >new_window = Watir::IE.attach(:title, /Kabira Order Processing - Microsoft >Internet Explorer/) > >I get the following message: > >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1208:in `attach_browser_window': >Unable >to locate a window with title of (?-mix:Kabira Order Processing - >Microsoft Inte >rnet Explorer) (Watir::Exception::NoMatchingWindowFoundException) > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1111:in `attach_init' > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1104:in `attach' > from ./CreateNewGroup_tst.rb:77 > from C:/watir/KPSA_Tests/TestDriver.rb:39:in `load' > from C:/watir/KPSA_Tests/TestDriver.rb:39 > >How can I attach to this window? > >Thanks > >Ian > > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Aug 31 00:30:45 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 30 Aug 2005 23:30:45 -0500 Subject: [Wtr-general] Connecting to a second window In-Reply-To: Message-ID: <5.1.0.14.2.20050830232832.02efdc58@127.0.0.1> If this is a modal popup, then you can't attach to it. If you click on the main window, but the popup window stays on top, then it is modal. If it's small, you can try handling it with AutoIt. Sorry folks. Bret At 09:08 PM 8/30/2005, Jan.Montano at thomson.com wrote: >I'm just curious. Is the second window already there upon running the >program? if not maybe you could try putting wait(5) before the attach just >to be sure. > >what's the exact error message? >and what's the exact title of the page when you view the source? > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Mike Harris >Sent: Tuesday, August 30, 2005 7:19 PM >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] Connecting to a second window > > >Thanks.I tried that and still had the same problem. I have just noticed >that when I hover over the link with the mouse the path to the page for >the second window is displayed in the status bar, but this does not >include the name of the file. I am wondering if this is the problem. > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin >Sent: 30 August 2005 10:57 >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] Connecting to a second window > >Try this > >$ieAbout = Watir::IE.attach(:title, /About KALIDO MDM/) > >instead of > >$ieAbout = IE.attach(:title, /About KALIDO MDM/) > >Zeljko > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Mike Harris >Sent: Tuesday, August 30, 2005 11:53 AM >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] Connecting to a second window > >The last line put to the command console is attach failed. So I assume >that it is the attach that has failed > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin >Sent: 30 August 2005 10:44 >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] Connecting to a second window > >In which line does your script fail (goto or attach)? What error message >do you get? > >Zeljko > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Mike Harris >Sent: Tuesday, August 30, 2005 11:39 AM >To: wtr-general at rubyforge.org >Subject: [Wtr-general] Connecting to a second window > >I have just started to use Watir and am trying to connect to a new >window using this code, but I fail to goto the link. Can you please give >me some advice about why this may be failing. Thanks def >test_03_ViewAbout > puts "Test 3...View About" > goToSignOnPage() > login() > begin > statusMessage="Invoking About" > aboutlink=$ie.getLink(:text,"About") > statusMessage="goto link failed" > puts("goto link failed") > $ie.goto(aboutlink.href) > puts("attach failed") > statusMessage="attach failed" > $ieAbout = IE.attach(:title, /About KALIDO MDM/) > statusMessage="assert failed" > assert($ieAbout.title=="About KALIDO >MDM","Failed to invoke About") > statusMessage="close failed" > $ieAbout.close > rescue > errorstring ="Failed while " + statusMessage > failTest(3,errorstring) > end > end > >Mike Harris > >_______________________________________________ >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 > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Aug 31 00:40:17 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 30 Aug 2005 23:40:17 -0500 Subject: [Wtr-general] Running tests in source code order In-Reply-To: <47771544775097.47750974777154@shaw.ca> Message-ID: <5.1.0.14.2.20050830233227.02ef0148@127.0.0.1> A simpler method is simply to embed line numbers in your test names... def test_001_something end def test_002_another_thing end Or, you can simply remove the code that explicitly puts the tests in alphabetical order. Here's the original code: # Rolls up all of the test* methods in the fixture into # one suite, creating a new instance of the fixture for # each method. def self.suite method_names = public_instance_methods(true) tests = method_names.delete_if {|method_name| method_name !~ /^test./} suite = TestSuite.new(name) tests.sort.each do |test| catch(:invalid_test) do suite << new(test) end end if (suite.empty?) catch(:invalid_test) do suite << new(:default_test) end end return suite end Here it is without the sorting behavior: # Rolls up all of the test* methods in the fixture into # one suite, creating a new instance of the fixture for # each method. def self.suite method_names = public_instance_methods(true) tests = method_names.delete_if {|method_name| method_name !~ /^test./} suite = TestSuite.new(name) tests.each do ### change made here |test| catch(:invalid_test) do suite << new(test) end end if (suite.empty?) catch(:invalid_test) do suite << new(:default_test) end end return suite end I haven't tested this change, but i think this will give you the tests in the order you want. At 06:38 PM 8/30/2005, Paul Rogers wrote: >Here is some code that runs tests in source code order. I pretty certain >Bret posted how to do this ( by overriding the suite method) but he didnt >provide any code. > >This only works if there is one class that does tests in the file, but Im >sure someone can figure out how to fix that > > > > ># ># Example of how to override the suite method of Testcase to run tests in >source order ># ># Only works if there is one class that runs tests > > >require 'test/unit' > >module Test > module Unit > class TestCase > def self.suite > > lines = IO.readlines(__FILE__) > tests = lines.grep(/^ *(def test)/){ |line| > line.strip.gsub('def ' , '') } > > suite = TestSuite.new(name) > tests.each do |this_test| > puts "Adding test " + this_test > catch(:invalid_test) do > suite << new(this_test) > end > end > if (suite.empty?) > catch(:invalid_test) do > suite << new(:default_test) > end > end > return suite > end > end > end >end > > >class Tester > def test_020 > puts "020" > end > > def test_030 > puts "030" > end > > def test_100 > puts "100" > end > > def test_010 > puts "010" > end > >end > > > > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Aug 31 02:03:01 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 31 Aug 2005 01:03:01 -0500 Subject: [Wtr-general] Problems with Assert method In-Reply-To: Message-ID: <5.1.0.14.2.20050831005759.02fd4008@127.0.0.1> WRONG WRONG WRONG. The link actually points to a mail message where i said this exist?/exists? advice is wrong. And it is. Bret P.S. As early posts have pointed out the OP's issue actually relates to the use of local variables. At 09:14 PM 8/30/2005, Jan.Montano at thomson.com wrote: >hope this helps. >http://www.mail-archive.com/wtr-general at rubyforge.org/msg00858.html > >try using .exist? instead of .exists? > >I believe .exists? is deprecated. > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org]On Behalf Of >carl.l.shaulis at convergys.com >Sent: Tuesday, August 30, 2005 9:34 PM >To: wtr-general at rubyforge.org >Subject: [Wtr-general] Problems with Assert method > > > > > > >Good morning WATIR experts, > >I apologize for such an elementary post, but I am having difficulty getting >the assert methods to function. I believe my issue is fundamental. Is it >how I am attempting to use assertions? Is it path or environment related? > >We have been able to write some really nice WATIR scripts, but I believe in >order for our testing to be more successful we need the unit tests methods >working. > >Any suggestions would be greatly appreciated. You will find code and >results below. I am using Eclipse to do this development. > >Thanks in advance for your consideration. > >Carl > > > >Here is my simplified code: > ># feature tests for Text Fields ># revision: $Revision: 1.26 $ > >$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == >__FILE__ >require '/Apps/watir_bonus/unitTests/setup' > > >class TC_Fields < Test::Unit::TestCase > include Watir > > def setup > > puts "Set URL variable" > test_site = 'http://www.yahoo.com' > > puts "Start New Browser" > ie = IE.new > > > puts "Setup: go to the test site: " + test_site > > ie.goto(test_site) > > #puts "Assertion Test in Position A" > #assert($ie.text_field(:id, "v1").exists?) > > end > > > def Test1 > > puts "Assertion Test in Position B" > assert($ie.text_field(:id, "v1").exists?) > > end >end > > > >This is the result if I place the assertion in position A. > >Loaded suite C:/Apps/PowerSeller Test Scripts/carl_textfields_test >Started >Set URL variable >Start New Browser >Setup: go to the test site: http://www.yahoo.com >Assertion Test >E >Finished in 1.101 seconds. > > 1) Error: >default_test(TC_Fields): >WIN32OLERuntimeError: document > OLE error code:80004005 in > > HRESULT error code:0x80020009 > Exception occurred. > C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:1400:in `method_missing' > C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:1400:in `getDocument' > C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:721:in >`getContainerContents' > C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:743:in `getObject' > C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:3471:in `initialize' > C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:368:in `new' > C:/Apps/ruby/lib/ruby/site_ruby/1.8/watir.rb:368:in `text_field' > C:/Apps/PowerSeller Test Scripts/carl_textfields_test.rb:25:in `setup' > >1 tests, 0 assertions, 0 failures, 1 errors > >This is the result if I place the assertion in position B. > >Loaded suite C:/Apps/PowerSeller Test Scripts/carl_textfields_test >Started >Set URL variable >Start New Browser >Setup: go to the test site: http://www.yahoo.com >F >Finished in 1.162 seconds. > > 1) Failure: >default_test(TC_Fields) > [C:/Apps/ruby/lib/ruby/1.8/test/unit/assertions.rb:30:in `assert_block' > C:/Apps/ruby/lib/ruby/1.8/test/unit/assertions.rb:28:in >`_wrap_assertion' > C:/Apps/ruby/lib/ruby/1.8/test/unit/assertions.rb:28:in `assert_block' > C:/Apps/ruby/lib/ruby/1.8/test/unit/assertions.rb:225:in `flunk' > C:/Apps/ruby/lib/ruby/1.8/test/unit/testcase.rb:99:in `default_test' > C:/Apps/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `__send__' > C:/Apps/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `run' > C:/Apps/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' > C:/Apps/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each' > C:/Apps/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' > C:/Apps/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' > C:/Apps/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each' > C:/Apps/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' > C:/Apps/ruby/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:44:in >`run_suite' > C:/Apps/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:65:in >`start_mediator' > C:/Apps/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:39:in >`start' > C:/Apps/ruby/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:27:in >`run' > C:/Apps/ruby/lib/ruby/1.8/test/unit/autorunner.rb:194:in `run' > C:/Apps/ruby/lib/ruby/1.8/test/unit/autorunner.rb:14:in `run' > C:/Apps/ruby/lib/ruby/1.8/test/unit.rb:285 > C:/Apps/ruby/lib/ruby/1.8/test/unit.rb:283]: >No tests were specified. > >1 tests, 1 assertions, 1 failures, 0 errors >-- >"NOTICE: The information contained in this electronic mail transmission is >intended by Convergys Corporation for the use of the named individual or >entity to which it is directed and may contain information that is >privileged or otherwise confidential. If you have received this electronic >mail transmission in error, please delete it from your system without >copying or forwarding it, and notify the sender of the error by reply email >or by telephone (collect), so that the sender's address records can be >corrected." > >_______________________________________________ >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 _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Aug 31 02:03:59 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 31 Aug 2005 01:03:59 -0500 Subject: [Wtr-general] browse option In-Reply-To: <007801c5adec$35a17cf0$950d7aa3@PC131> Message-ID: <5.1.0.14.2.20050831010331.02dc6000@127.0.0.1> look at filefield_test.rb At 12:24 AM 8/31/2005, Nishita Acharya wrote: >hello, > i have a browse option in one of the forms.I have automated it to > pop the 'choose file' window.but i have to choose a file and open it > manually.Can this be automated? The view source contains this > >
enctype="multipart/form-data"> >
> >any hints? > > >Regards, > >Nishita Acharya >Bangalore. > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Aug 31 02:04:24 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 31 Aug 2005 01:04:24 -0500 Subject: [Wtr-general] browse option In-Reply-To: <4315406D.50205@qantom.com> References: <007801c5adec$35a17cf0$950d7aa3@PC131> <007801c5adec$35a17cf0$950d7aa3@PC131> Message-ID: <5.1.0.14.2.20050831010412.02e1f1a0@127.0.0.1> At 12:30 AM 8/31/2005, Raghu Venkataramana wrote: >Hi Nishita, > >You could try the WET add-on. This addon handles the popup files quite well. > >Thanks >Raghu Very true. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Aug 31 02:11:00 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 31 Aug 2005 01:11:00 -0500 Subject: [Wtr-general] How to open right-click context menu? In-Reply-To: <86388bc7050830140244dbbc1a@mail.gmail.com> References: <20050814202943.55494.qmail@web50912.mail.yahoo.com> <20050814202943.55494.qmail@web50912.mail.yahoo.com> Message-ID: <5.1.0.14.2.20050831010824.02b794b0@127.0.0.1> At 04:02 PM 8/30/2005, Mike wrote: >but in this case view source is turned off Turn it back on! require 'win32ole' shell = WIN32OLE.new('Shell.Application') windows = shell.windows return unless windows windows.each do |window| next unless window.fullname =~ /iexplore.exe/ window.toolbar = true window.menubar = true window.resizable = true end _____________________ Bret Pettichord www.pettichord.com From phillipsic at gmail.com Wed Aug 31 03:15:47 2005 From: phillipsic at gmail.com (Ian Phillips) Date: Wed, 31 Aug 2005 09:15:47 +0200 Subject: [Wtr-general] assert PASSED and FAILED In-Reply-To: <5.1.0.14.2.20050830114334.02e78628@127.0.0.1> References: <5.1.0.14.2.20050830114334.02e78628@127.0.0.1> Message-ID: Hi. I have followed the documentation at http://wtr.rubyforge.org/watir_user_guide.html and I can not see why I shouldn't use assert?? Are there some rules to using assert? The thing I don't understand is that very similar code in test_logger1.rb works but mine does not. I have not worked out the difference. Thanks Ian On 8/30/05, Bret Pettichord wrote: > > You shouldn't use assert in this situation. Instead: > > if $ie.contains_text("TestGroup") > $logger.log("test_CreateGroupTest-TestGroup Found-TestGroup > Found-PASSED") > $logger.log_results("test_CreateGroupTest", "TestGroup Found", > "TestGroup Found", "PASSED") > else > puts("TEST FAILED." + e.message + "\n" + e.backtrace.join("\n")) > $logger.log_results("test_CreateGroupTest", "TestGroup Found", > "TestGroup NOT Found", "FAILED") > end > > > At 09:09 AM 8/30/2005, Ian Phillips wrote: > >Hi. > > > >I have the following assert below. When this code is executed I get both > >PASSED and FAILED messages reported?? > > > >begin > > assert($ie.contains_text("TestGroup")) > > $logger.log("test_CreateGroupTest-TestGroup Found-TestGroup > > Found-PASSED") > > $logger.log_results("test_CreateGroupTest", "TestGroup Found", > > "TestGroup Found", "PASSED") > >rescue =>e > > puts("TEST FAILED." + e.message + "\n" + e.backtrace.join("\n")) > > $logger.log_results("test_CreateGroupTest", "TestGroup Found", > > "TestGroup NOT Found", "FAILED") > >end > > > > > >This is the output > > > > > >log test_CreateGroupTest-TestGroup Found-TestGroup Found-PASSED > >log XML file output: Test case: test_CreateGroupTest input: TestGroup > >Found expe > >cted: TestGroup Found status: PASSED > >TEST FAILED.closed stream > >./example_logger1.rb:62:in `write' > >./example_logger1.rb:62:in `puts' > >./example_logger1.rb:62:in `log_results' > >./CreateNewGroup_tst.rb:70:in `test_CreateGroupTest' > >c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `__send__' > >c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `run' > >c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' > >c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each' > >c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' > >c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' > >c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each' > >c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' > >c:/ruby/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:44:in `run_suite' > >c:/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:65:in > `start_mediator' > >c:/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:39:in `start' > >c:/ruby/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:27:in `run' > >c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:194:in `run' > >c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:14:in `run' > >c:/ruby/lib/ruby/1.8/test/unit.rb:285 > >c:/ruby/lib/ruby/1.8/test/unit.rb:283 > >log XML file output: Test case: test_CreateGroupTest input: TestGroup > >Found expe > >cted: TestGroup NOT Found status: FAILED > > > > > >I was assuming I would get one or the other? > > > >Ian > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > 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/20050831/cc488ae6/attachment.html From Mike.Harris at kalido.com Wed Aug 31 03:34:16 2005 From: Mike.Harris at kalido.com (Mike Harris) Date: Wed, 31 Aug 2005 08:34:16 +0100 Subject: [Wtr-general] Connecting to a second window Message-ID: Thanks for this. It is a pop up that is invoked using java script. I have been looking for AutoIt in the Watir API, but can not find it. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: 31 August 2005 05:31 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Connecting to a second window If this is a modal popup, then you can't attach to it. If you click on the main window, but the popup window stays on top, then it is modal. If it's small, you can try handling it with AutoIt. Sorry folks. Bret At 09:08 PM 8/30/2005, Jan.Montano at thomson.com wrote: >I'm just curious. Is the second window already there upon running the >program? if not maybe you could try putting wait(5) before the attach >just to be sure. > >what's the exact error message? >and what's the exact title of the page when you view the source? > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Mike Harris >Sent: Tuesday, August 30, 2005 7:19 PM >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] Connecting to a second window > > >Thanks.I tried that and still had the same problem. I have just noticed >that when I hover over the link with the mouse the path to the page for >the second window is displayed in the status bar, but this does not >include the name of the file. I am wondering if this is the problem. > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin >Sent: 30 August 2005 10:57 >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] Connecting to a second window > >Try this > >$ieAbout = Watir::IE.attach(:title, /About KALIDO MDM/) > >instead of > >$ieAbout = IE.attach(:title, /About KALIDO MDM/) > >Zeljko > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Mike Harris >Sent: Tuesday, August 30, 2005 11:53 AM >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] Connecting to a second window > >The last line put to the command console is attach failed. So I assume >that it is the attach that has failed > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin >Sent: 30 August 2005 10:44 >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] Connecting to a second window > >In which line does your script fail (goto or attach)? What error >message do you get? > >Zeljko > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Mike Harris >Sent: Tuesday, August 30, 2005 11:39 AM >To: wtr-general at rubyforge.org >Subject: [Wtr-general] Connecting to a second window > >I have just started to use Watir and am trying to connect to a new >window using this code, but I fail to goto the link. Can you please >give me some advice about why this may be failing. Thanks def >test_03_ViewAbout > puts "Test 3...View About" > goToSignOnPage() > login() > begin > statusMessage="Invoking About" > aboutlink=$ie.getLink(:text,"About") > statusMessage="goto link failed" > puts("goto link failed") > $ie.goto(aboutlink.href) > puts("attach failed") > statusMessage="attach failed" > $ieAbout = IE.attach(:title, /About KALIDO MDM/) > statusMessage="assert failed" > assert($ieAbout.title=="About KALIDO >MDM","Failed to invoke About") > statusMessage="close failed" > $ieAbout.close > rescue > errorstring ="Failed while " + statusMessage > failTest(3,errorstring) > end > end > >Mike Harris > >_______________________________________________ >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 > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Jan.Montano at thomson.com Wed Aug 31 03:43:03 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Wed, 31 Aug 2005 15:43:03 +0800 Subject: [Wtr-general] select box contains? Message-ID: What's the best way to know if a selectbox contains a particular text? P.S. I hope in the near future, there's a good documentation for watir libraries. From dave at burt.id.au Wed Aug 31 04:07:26 2005 From: dave at burt.id.au (Dave Burt) Date: Wed, 31 Aug 2005 18:07:26 +1000 Subject: [Wtr-general] Javascript dialogs - reading and closing Message-ID: <001101c5ae03$079c8400$6402a8c0@telperion> Hi List, I've been using the following script to read and close javascript alert() and confirm() dialogs in Watir. It could fairly easily be extended to deal with file choosers, as I saw someone asking for earlier. To be clear, it will wait a dialog to be shown and close it using the given button, and it can test for certain text in the dialog itself. It lets you do this: require 'js_dialog' assert_js_dialog do @ie.button(:value, "Alert test").click end assert_js_dialog /sample dialog text/, "Cancel" do @ie.button(:value, "Confirm test").click end Code below. Cheers, Dave ----- js_dialog.rb ----- require 'win32ole' # # Use AutoIt to read and close Javascript dialog windows # module JavascriptDialog # # Target javascript dialogs with this window title # WINDOW_TITLE = "Microsoft Internet Explorer" class << self # # Return the text contained in a javascript dialog (e.g. an "alert()") # if such a dialog is present or appears within +wait_seconds+. # def text(wait_seconds = 1) # sleep 0.3 autoit.WinWait(WINDOW_TITLE, nil, wait_seconds) if wait_seconds s = autoit.WinGetText(WINDOW_TITLE) s unless s == "1" end # # Close any active javascript dialog # def close autoit.WinClose WINDOW_TITLE end # # Press the "OK" button on a javascript dialog # def ok autoit.ControlClick(WINDOW_TITLE, "", "OK") end # # Press the "Cancel" button on a javascript dialog # def cancel autoit.ControlClick(WINDOW_TITLE, "", "Cancel") end # # Press the "Yes" button on a javascript dialog # def yes autoit.ControlClick(WINDOW_TITLE, "", "Yes") end # # Press the "No" button on a javascript dialog # def no autoit.ControlClick(WINDOW_TITLE, "", "No") end private # # Return an AutoIt COM object, creating it if it doesn't already # exist # def autoit unless defined? @@autoit @@autoit = WIN32OLE.new("AutoItX3.Control") end @@autoit end end end module Test::Unit::Assertions # # Passes if a Javascript dialog appears within +wait_seconds+ and its # text matches the given (optional) pattern. # # Use like this: # assert_js_dialog do # watir_command_to_make_dialog_appear # end # Or like this: # assert_js_dialog /Text to find in the dialog/, "Cancel" do # watir_command_to_make_dialog_appear # end # def assert_js_dialog(pattern = //, action = "close", message = nil) _wrap_assertion do begin pipe = IO.popen("ruby js_dialog.rb #{action}") yield window_text = pipe.read rescue "" pipe.close unless window_text.empty? assert_block(build_message(message, " not found in JavaScript dialog.", pattern)) do window_text.match(pattern) end else raise Test::Unit::AssertionFailedError.new( build_message(message, "No JavaScript window found.")) end ensure pipe.close if pipe && !pipe.closed? end end end end # test - will close and print the text of an opened javascript dialog if # run as "ruby js_dialog.rb" if $0 == __FILE__ action = ARGV.shift || "close" print JavascriptDialog.text || "" JavascriptDialog.send action end From zeljko.filipin at gmail.com Wed Aug 31 04:32:23 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 31 Aug 2005 10:32:23 +0200 Subject: [Wtr-general] select box contains? In-Reply-To: Message-ID: <43156af1.70e0fad4.25a5.09bc@mx.gmail.com> ie.selectBox(:index,1).getAllContents will return text of all options in select box. I guess it depends how you installed watir (installer, gem), but there is documentation start > All Programs > Watir > API Reference. Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jan.Montano at thomson.com Sent: Wednesday, August 31, 2005 9:43 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] select box contains? What's the best way to know if a selectbox contains a particular text? P.S. I hope in the near future, there's a good documentation for watir libraries. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Jan.Montano at thomson.com Wed Aug 31 04:50:41 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Wed, 31 Aug 2005 16:50:41 +0800 Subject: [Wtr-general] select box contains? Message-ID: Thanks. I guess I just have to traverse the contents. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Zeljko Filipin Sent: Wednesday, August 31, 2005 4:32 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] select box contains? ie.selectBox(:index,1).getAllContents will return text of all options in select box. I guess it depends how you installed watir (installer, gem), but there is documentation start > All Programs > Watir > API Reference. Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jan.Montano at thomson.com Sent: Wednesday, August 31, 2005 9:43 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] select box contains? What's the best way to know if a selectbox contains a particular text? P.S. I hope in the near future, there's a good documentation for watir libraries. _______________________________________________ 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.Harris at kalido.com Wed Aug 31 08:13:06 2005 From: Mike.Harris at kalido.com (Mike Harris) Date: Wed, 31 Aug 2005 13:13:06 +0100 Subject: [Wtr-general] Connecting to a second window Message-ID: The second window is not invoked. The Developer tells me that the link to has been created with java script. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jan.Montano at thomson.com Sent: 31 August 2005 03:09 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Connecting to a second window I'm just curious. Is the second window already there upon running the program? if not maybe you could try putting wait(5) before the attach just to be sure. what's the exact error message? and what's the exact title of the page when you view the source? -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Mike Harris Sent: Tuesday, August 30, 2005 7:19 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Connecting to a second window Thanks.I tried that and still had the same problem. I have just noticed that when I hover over the link with the mouse the path to the page for the second window is displayed in the status bar, but this does not include the name of the file. I am wondering if this is the problem. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 30 August 2005 10:57 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Connecting to a second window Try this $ieAbout = Watir::IE.attach(:title, /About KALIDO MDM/) instead of $ieAbout = IE.attach(:title, /About KALIDO MDM/) Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Mike Harris Sent: Tuesday, August 30, 2005 11:53 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Connecting to a second window The last line put to the command console is attach failed. So I assume that it is the attach that has failed -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 30 August 2005 10:44 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Connecting to a second window In which line does your script fail (goto or attach)? What error message do you get? Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Mike Harris Sent: Tuesday, August 30, 2005 11:39 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Connecting to a second window I have just started to use Watir and am trying to connect to a new window using this code, but I fail to goto the link. Can you please give me some advice about why this may be failing. Thanks def test_03_ViewAbout puts "Test 3...View About" goToSignOnPage() login() begin statusMessage="Invoking About" aboutlink=$ie.getLink(:text,"About") statusMessage="goto link failed" puts("goto link failed") $ie.goto(aboutlink.href) puts("attach failed") statusMessage="attach failed" $ieAbout = IE.attach(:title, /About KALIDO MDM/) statusMessage="assert failed" assert($ieAbout.title=="About KALIDO MDM","Failed to invoke About") statusMessage="close failed" $ieAbout.close rescue errorstring ="Failed while " + statusMessage failTest(3,errorstring) end end Mike Harris _______________________________________________ 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 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Mike.Harris at kalido.com Wed Aug 31 09:49:08 2005 From: Mike.Harris at kalido.com (Mike Harris) Date: Wed, 31 Aug 2005 14:49:08 +0100 Subject: [Wtr-general] WARN -- : runtime error in wait busy Message-ID: When I run my script I get this error returned: .Test 7...Creating a workflow W, [31-Aug-2005 14:02:56#2956] WARN -- : runtime error in wait busy OLE error code:80004005 in HRESULT error code:0x80020009 Exception occurred. How can I find the cause of this runtime error? The Test that returned this error is: puts "Test 7...Creating a workflow" goToSignOnPage() login() actAsSystemParty() workflowName = "My Workflow" workflowsLink = $ie.getLink(:text, "Workflows") begin statusMessage = "Looking for workflows link" $ie.goto(workflowsLink) statusMessage = "Looking for new workflow button" $ie.button(:name, "new").click setupState1(workflowName) setupState2() addEvent(workflowName) rescue failTest(7) puts("Failed while " + statusMessage) end Thanks for your Help Mike Harris From bret at pettichord.com Wed Aug 31 09:10:53 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 31 Aug 2005 08:10:53 -0500 Subject: [Wtr-general] assert PASSED and FAILED In-Reply-To: References: <5.1.0.14.2.20050830114334.02e78628@127.0.0.1> <5.1.0.14.2.20050830114334.02e78628@127.0.0.1> Message-ID: <5.1.0.14.2.20050831080647.011bc3d0@127.0.0.1> I have removed the incorrect and confusing examples from the user guide. Thanks for pointing out the errors: 1. "if assert..." never works. Assert does not return a value. 2. "assert_false" is actually not part of test::unit. Use "assert !" instead. 3. "begin/assert/rescue" is really a bad idea and we will stop suggesting it. I will post the update to the website shortly. In the mean time, the revised doc is attached. Bret At 02:15 AM 8/31/2005, Ian Phillips wrote: >Hi. > >I have followed the documentation at >http://wtr.rubyforge.org/watir_user_guide.html >and I can not see why I shouldn't use assert?? Are there some rules to >using assert? > >The thing I don't understand is that very similar code in test_logger1.rb >works but mine does not. I have not worked out the difference. > >Thanks >Ian _____________________ Bret Pettichord www.pettichord.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050831/a553423b/attachment.html From zeljko.filipin at gmail.com Wed Aug 31 10:58:10 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 31 Aug 2005 16:58:10 +0200 Subject: [Wtr-general] assert PASSED and FAILED In-Reply-To: <5.1.0.14.2.20050831080647.011bc3d0@127.0.0.1> Message-ID: <4315c55f.37605c1e.4287.26ed@mx.gmail.com> Will you describe installation of watir as gem in user guide? I think it is the most simple way. Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Wednesday, August 31, 2005 3:11 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] assert PASSED and FAILED I have removed the incorrect and confusing examples from the user guide. Thanks for pointing out the errors: 1. "if assert..." never works. Assert does not return a value. 2. "assert_false" is actually not part of test::unit. Use "assert !" instead. 3. "begin/assert/rescue" is really a bad idea and we will stop suggesting it. I will post the update to the website shortly. In the mean time, the revised doc is attached. Bret At 02:15 AM 8/31/2005, Ian Phillips wrote: >Hi. > >I have followed the documentation at >http://wtr.rubyforge.org/wa tir_user_guide.html >and I can not see why I shouldn't use assert?? Are there some rules to >using assert? > >The thing I don't understand is that very similar code in test_logger1.rb >works but mine does not. I have not worked out the difference. > >Thanks >Ian _____________________ Bret Pettichord www.pettichord.com From Sean.Gallagher at ticketmaster.com Wed Aug 31 10:58:17 2005 From: Sean.Gallagher at ticketmaster.com (Sean Gallagher) Date: Wed, 31 Aug 2005 07:58:17 -0700 Subject: [Wtr-general] Cygwin Ruby and Watir Message-ID: <71D28C8451BFD5119B2B00508BE26E6409E11ABE@pasmail3.office.tmcs> Is anyone running Watir automation from Cygwin? If so, any advice, issues, etc? Thanks. -sean From christopher.mcmahon at gmail.com Wed Aug 31 11:01:21 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 31 Aug 2005 10:01:21 -0500 Subject: begin/assert/rescue harrmful? Re: [Wtr-general] assert PASSED and FAILED In-Reply-To: <5.1.0.14.2.20050831080647.011bc3d0@127.0.0.1> References: <5.1.0.14.2.20050830114334.02e78628@127.0.0.1> <5.1.0.14.2.20050831080647.011bc3d0@127.0.0.1> Message-ID: <72799cd705083108016d0d10ff@mail.gmail.com> > 3. "begin/assert/rescue" is really a bad idea and we will stop suggesting it. I *like* begin/assert/rescue. It's my friend. Why is it a bad idea? -Chris From phillipsic at gmail.com Wed Aug 31 11:05:24 2005 From: phillipsic at gmail.com (Ian Phillips) Date: Wed, 31 Aug 2005 17:05:24 +0200 Subject: begin/assert/rescue harrmful? Re: [Wtr-general] assert PASSED and FAILED In-Reply-To: <72799cd705083108016d0d10ff@mail.gmail.com> References: <5.1.0.14.2.20050830114334.02e78628@127.0.0.1> <5.1.0.14.2.20050831080647.011bc3d0@127.0.0.1> <72799cd705083108016d0d10ff@mail.gmail.com> Message-ID: For one thing I cannot get it to work. Ian On 8/31/05, Chris McMahon wrote: > > > 3. "begin/assert/rescue" is really a bad idea and we will stop > suggesting it. > > I *like* begin/assert/rescue. It's my friend. Why is it a bad idea? > > -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/20050831/4a6df9b6/attachment.html From bret at pettichord.com Wed Aug 31 11:15:28 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 31 Aug 2005 10:15:28 -0500 Subject: [Wtr-general] breakpoint and scite Message-ID: <5.1.0.14.2.20050831100736.030222c0@127.0.0.1> I often teach ruby to people and usually use scite to do this. It's quick and easy and F5 is very convenient. I also use scite when i am working on lab machines. (Otherwise I use eclipse when i can.) When i use breakpoint with a script that i am running from scite using F5, the irb session shows up in the scite sidebar. I can type at this prompt, and it works, but backspaces and paste don't register. So i have to be a really good typist. (Don't register means that the text looks right, but then i get an error from IRB that shows that it didn't get the pasted text and did get the text i thought had backspaced away.) I realize i can get this to work running from a command shell. But is there a way i can get breakpoint to work in scite? (BTW, if i run IRB from within SCITE, i get the same problem plus whatever i typed is echo'd. So '1+1' displays as '11++11', although i still get a return value of 2. This is a problem that i care less about.) Bret _____________________ Bret Pettichord www.pettichord.com From paul.rogers at shaw.ca Wed Aug 31 11:44:02 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 31 Aug 2005 09:44:02 -0600 Subject: [Wtr-general] Running tests in source code order Message-ID: <4835721482e978.482e9784835721@shaw.ca> unfortunately, I dont think it does. The public_instance_methods method, seems to return methods in a random order (im sure its not random, it just looks random) class Tester def test_020 puts "020" end def test_030 puts "030" end def test_100 puts "100" end def test_010 puts "010" end end puts Tester.public_instance_methods.grep(/test_/).join("\n") gives this: test_030 test_100 test_010 test_020 ----- Original Message ----- From: Bret Pettichord Date: Tuesday, August 30, 2005 10:40 pm Subject: Re: [Wtr-general] Running tests in source code order > A simpler method is simply to embed line numbers in your test names... > > def test_001_something > end > > def test_002_another_thing > end > > Or, you can simply remove the code that explicitly puts the tests > in > alphabetical order. > > Here's the original code: > > # Rolls up all of the test* methods in the fixture into > # one suite, creating a new instance of the fixture for > # each method. > def self.suite > method_names = public_instance_methods(true) > tests = method_names.delete_if {|method_name| method_name > !~ /^test./} > suite = TestSuite.new(name) > tests.sort.each do > |test| > catch(:invalid_test) do > suite << new(test) > end > end > if (suite.empty?) > catch(:invalid_test) do > suite << new(:default_test) > end > end > return suite > end > > Here it is without the sorting behavior: > > # Rolls up all of the test* methods in the fixture into > # one suite, creating a new instance of the fixture for > # each method. > def self.suite > method_names = public_instance_methods(true) > tests = method_names.delete_if {|method_name| method_name > !~ /^test./} > suite = TestSuite.new(name) > tests.each do ### change made here > |test| > catch(:invalid_test) do > suite << new(test) > end > end > if (suite.empty?) > catch(:invalid_test) do > suite << new(:default_test) > end > end > return suite > end > > I haven't tested this change, but i think this will give you the > tests in > the order you want. > > > > > At 06:38 PM 8/30/2005, Paul Rogers wrote: > >Here is some code that runs tests in source code order. I pretty > certain > >Bret posted how to do this ( by overriding the suite method) but > he didnt > >provide any code. > > > >This only works if there is one class that does tests in the > file, but Im > >sure someone can figure out how to fix that > > > > > > > > > ># > ># Example of how to override the suite method of Testcase to run > tests in > >source order > ># > ># Only works if there is one class that runs tests > > > > > >require 'test/unit' > > > >module Test > > module Unit > > class TestCase > > def self.suite > > > > lines = IO.readlines(__FILE__) > > tests = lines.grep(/^ *(def test)/){ |line| > > line.strip.gsub('def ' , '') } > > > > suite = TestSuite.new(name) > > tests.each do |this_test| > > puts "Adding test " + this_test > > catch(:invalid_test) do > > suite << new(this_test) > > end > > end > > if (suite.empty?) > > catch(:invalid_test) do > > suite << new(:default_test) > > end > > end > > return suite > > end > > end > > end > >end > > > > > >class Tester > > > def test_020 > > puts "020" > > end > > > > def test_030 > > puts "030" > > end > > > > def test_100 > > puts "100" > > end > > > > def test_010 > > puts "010" > > end > > > >end > > > > > > > > > > > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From sirella.maesah at gmail.com Wed Aug 31 11:52:13 2005 From: sirella.maesah at gmail.com (Stephanie Mayfield) Date: Wed, 31 Aug 2005 12:52:13 -0300 Subject: [Wtr-general] Where is object_exist_check? Message-ID: <71ef6790050831085265b2ab35@mail.gmail.com> I have a very simple script that attempts to log into a website. I'm trying to use WET as well as I have windows popups to test later on. When attempting to press the login button I'm getting this error: 1) Error: test_remove_category_missing_name(TC_sample_tests): NameError: undefined local variable or method `object_exist_check' for # D:/ruby/lib/ruby/site_ruby/1.8/qantom/webobjects/WebObject.rb:37:in `click' D:/ruby/myRuby/AdminTest/WETCat.rb:22:in `setup' Here is the important part of the script: require 'WET' include WET $SERVER = "" class TC_sample_tests < Test::Unit::TestCase def setup test_site = 'http://'+$SERVER+'/imadmin/admin'; # open the browser $ie = Browser.new() $ie.goto(test_site) $ie.TextField("name:=username").set("") $ie.TextField("name:=password").set("") $ie.TextField("name:=userdomain").set("") $ie.Button("name:=login").click() # this is where the error is being generated ... end I can't find where "object_exist_check" mentioned in the WET WebObject module would be. Where is it supposed to be? I have watir installed via gem version 1.41 and WET version 0.5.1 for watir v1.4. Thanks in advance! -- Steph -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050831/4862b653/attachment.html From raghu at qantom.com Wed Aug 31 12:08:08 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Wed, 31 Aug 2005 21:38:08 +0530 Subject: [Wtr-general] Where is object_exist_check? In-Reply-To: <71ef6790050831085265b2ab35@mail.gmail.com> References: <71ef6790050831085265b2ab35@mail.gmail.com> Message-ID: <4315D5E8.4080703@qantom.com> Hi Stephanie, Ian Phillips found that there was a problem with the archive in the downloads. I have just fixed it and we are runinng some tests on it. If all goes well, I'll be putting it up there in around an hours time. I'll keep you posted. Thanks Raghu Stephanie Mayfield wrote: > I have a very simple script that attempts to log into a website. I'm > trying to use WET as well as I have windows popups to test later on. > > When attempting to press the login button I'm getting this error: > > 1) Error: > test_remove_category_missing_name(TC_sample_tests): > NameError: undefined local variable or method `object_exist_check' for > # > > D:/ruby/lib/ruby/site_ruby/1.8/qantom/webobjects/WebObject.rb:37:in > `click' > D:/ruby/myRuby/AdminTest/WETCat.rb:22:in `setup' > > > Here is the important part of the script: > require 'WET' > include WET > > $SERVER = "" > > class TC_sample_tests < Test::Unit::TestCase > def setup > test_site = 'http://'+$SERVER+'/imadmin/admin'; > > # open the browser > $ie = Browser.new() > $ie.goto(test_site) > $ie.TextField("name:=username").set("") > $ie.TextField("name:=password").set("") > $ie.TextField("name:=userdomain").set("") > $ie.Button("name:=login").click() # this is where the error is > being generated > ... > end > > I can't find where "object_exist_check" mentioned in the WET WebObject > module would be. Where is it supposed to be? > > I have watir installed via gem version 1.41 and WET version 0.5.1 for > watir v1.4. > > Thanks in advance! > -- > Steph > >------------------------------------------------------------------------ > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > -- Qantom Software http://www.qantom.com Ph : 26799269 Xtn. 125 sip : raghu at sip411.com -- From joe.yakich at eplanservices.com Wed Aug 31 13:08:18 2005 From: joe.yakich at eplanservices.com (Joe Yakich) Date: Wed, 31 Aug 2005 11:08:18 -0600 Subject: [Wtr-general] Re: Javascript dialogs - reading and closing Message-ID: <20050831170827.6533DE6DF0@mail2.firstlink.com> Dave, Thanks so much for posting this code, it looks like it will be exactly what we need to start handling our Javascript dialogs. I have a question (and it's probably an obvious one that I should know, so please excuse my ignorance). Does one actually modify Test::Unit::Assertions (Ruby\lib\ruby\1.8\test\unit\assertions.rb in my case) and add the assert_js_dialog method, or is there some preferred way to extend it? (Are there other setup/installation steps or gotchas that I should know about?) Thanks! Joe > Message: 2 > Date: Wed, 31 Aug 2005 18:07:26 +1000 > From: "Dave Burt" > Subject: [Wtr-general] Javascript dialogs - reading and closing > To: > Message-ID: <001101c5ae03$079c8400$6402a8c0 at telperion> > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi List, > > I've been using the following script to read and close javascript > alert() and confirm() dialogs in Watir. It could fairly easily be extended to deal with file choosers, as I saw someone asking for earlier. > > To be clear, it will wait a dialog to be shown and close it using the given button, and it can test for certain text in the dialog itself. It lets you do > this: > > require 'js_dialog' > > assert_js_dialog do > @ie.button(:value, "Alert test").click end > > assert_js_dialog /sample dialog text/, "Cancel" do > @ie.button(:value, "Confirm test").click end > > Code below. > > Cheers, > Dave > > ----- js_dialog.rb ----- > > require 'win32ole' > > # > # Use AutoIt to read and close Javascript dialog windows # module JavascriptDialog > > # > # Target javascript dialogs with this window title > # > WINDOW_TITLE = "Microsoft Internet Explorer" > > class << self > > # > # Return the text contained in a javascript dialog (e.g. an "alert()") > # if such a dialog is present or appears within +wait_seconds+. > # > def text(wait_seconds = 1) > # sleep 0.3 > autoit.WinWait(WINDOW_TITLE, nil, wait_seconds) if wait_seconds > s = autoit.WinGetText(WINDOW_TITLE) > s unless s == "1" > end > > # > # Close any active javascript dialog > # > def close > autoit.WinClose WINDOW_TITLE > end > > # > # Press the "OK" button on a javascript dialog > # > def ok > autoit.ControlClick(WINDOW_TITLE, "", "OK") > end > # > # Press the "Cancel" button on a javascript dialog > # > def cancel > autoit.ControlClick(WINDOW_TITLE, "", "Cancel") > end > # > # Press the "Yes" button on a javascript dialog > # > def yes > autoit.ControlClick(WINDOW_TITLE, "", "Yes") > end > # > # Press the "No" button on a javascript dialog > # > def no > autoit.ControlClick(WINDOW_TITLE, "", "No") > end > > private > > # > # Return an AutoIt COM object, creating it if it doesn't already > # exist > # > def autoit > unless defined? @@autoit > @@autoit = WIN32OLE.new("AutoItX3.Control") > end > @@autoit > end > end > end > > module Test::Unit::Assertions > # > # Passes if a Javascript dialog appears within +wait_seconds+ and its > # text matches the given (optional) pattern. > # > # Use like this: > # assert_js_dialog do > # watir_command_to_make_dialog_appear > # end > # Or like this: > # assert_js_dialog /Text to find in the dialog/, "Cancel" do > # watir_command_to_make_dialog_appear > # end > # > def assert_js_dialog(pattern = //, action = "close", message = nil) > _wrap_assertion do > begin > pipe = IO.popen("ruby js_dialog.rb #{action}") > yield > window_text = pipe.read rescue "" > pipe.close > unless window_text.empty? > assert_block(build_message(message, > " not found in JavaScript dialog.", pattern)) do > window_text.match(pattern) > end > else > raise Test::Unit::AssertionFailedError.new( > build_message(message, "No JavaScript window found.")) > end > ensure > pipe.close if pipe && !pipe.closed? > end > end > end > end > > # test - will close and print the text of an opened javascript dialog if # run as "ruby js_dialog.rb" > if $0 == __FILE__ > action = ARGV.shift || "close" > print JavascriptDialog.text || "" > JavascriptDialog.send action > end > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050831/ea858a5a/attachment.html From sirella.maesah at gmail.com Wed Aug 31 13:39:48 2005 From: sirella.maesah at gmail.com (Stephanie Mayfield) Date: Wed, 31 Aug 2005 14:39:48 -0300 Subject: [Wtr-general] Where is object_exist_check? In-Reply-To: <4315D5E8.4080703@qantom.com> References: <71ef6790050831085265b2ab35@mail.gmail.com> <4315D5E8.4080703@qantom.com> Message-ID: <71ef6790050831103960e990a3@mail.gmail.com> Oh good. Glad to see you are on top of the problem! Steph On 8/31/05, Raghu Venkataramana wrote: > > Hi Stephanie, > > Ian Phillips found that there was a problem with the archive in the > downloads. > I have just fixed it and we are runinng some tests on it. If all goes > well, I'll > be putting it up there in around an hours time. I'll keep you posted. > > Thanks > Raghu > > Stephanie Mayfield wrote: > > > I have a very simple script that attempts to log into a website. I'm > > trying to use WET as well as I have windows popups to test later on. > > > > When attempting to press the login button I'm getting this error: > > > > 1) Error: > > test_remove_category_missing_name(TC_sample_tests): > > NameError: undefined local variable or method `object_exist_check' for > > # > > > > D:/ruby/lib/ruby/site_ruby/1.8/qantom/webobjects/WebObject.rb:37:in > > `click' > > D:/ruby/myRuby/AdminTest/WETCat.rb:22:in `setup' > > > > > > Here is the important part of the script: > > require 'WET' > > include WET > > > > $SERVER = "" > > > > class TC_sample_tests < Test::Unit::TestCase > > def setup > > test_site = 'http://'+$SERVER+'/imadmin/admin'; > > > > # open the browser > > $ie = Browser.new() > > $ie.goto(test_site) > > $ie.TextField("name:=username").set("") > > $ie.TextField("name:=password").set("") > > $ie.TextField("name:=userdomain").set("") > > $ie.Button("name:=login").click() # this is where the error is > > being generated > > ... > > end > > > > I can't find where "object_exist_check" mentioned in the WET WebObject > > module would be. Where is it supposed to be? > > > > I have watir installed via gem version 1.41 and WET version 0.5.1 for > > watir v1.4. > > > > Thanks in advance! > > -- > > Steph > > > >------------------------------------------------------------------------ > > > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > -- > Qantom Software > > http://www.qantom.com > Ph : 26799269 Xtn. 125 > sip : raghu at sip411.com > -- > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- Steph Homepage: www.maesah.ca -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050831/ffeca1bb/attachment.html From christopher.mcmahon at gmail.com Wed Aug 31 13:51:13 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 31 Aug 2005 12:51:13 -0500 Subject: [Wtr-general] Rubyforge stats: Watir #1 Message-ID: <72799cd7050831105125ed1687@mail.gmail.com> Hey... I just noticed that Watir is the most active project on rubyforge right now. And it's creeping up the list of top project downloads, too. -Chris From raghu at qantom.com Wed Aug 31 14:02:27 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Wed, 31 Aug 2005 23:32:27 +0530 Subject: [Wtr-general] Re: [Wet-users] undefined local variable or method `object_exist_check' In-Reply-To: References: Message-ID: <4315F0B3.9050202@qantom.com> Hi Ian, Stephanie, I have fixed this problem and posted a new zip archive in the downloads area. If you navigate to the downloads page from wet.qantom.org, you can get the new version. Make sure that you are downloading 0.5.2. Thanks for reporting this. Raghu Ian Phillips wrote: > Hi. > > I am executing the following line and it produces the error below: > > Browser("title:=KPSA").Button("value:=LOGIN").click > > undefined local variable or method `object_exist_check' for > # bd62d0> > > Full error: > C:\wet0.5.1\qantom>WetRunner.rb C:\wet0.5.1\KOP_GUI_ADMIN_Sanity > DEBUG: init ie with FalseClass > DEBUG: init ie with TrueClass > DEBUG: init ie with TrueClass > DEBUG: init ie with TrueClass > DEBUG: init ie with TrueClass > undefined local variable or method `object_exist_check' for > # bd62d0> > C:\wet0.5.1/qantom/webobjects/WebObject.rb:37:in > `click'C:\wet0.5.1\KOP_GUI_ADMI > N_Sanity\scripts\GroupTest.qws:8C:/wet0.5.1/qantom/WetRunner.rb:48:in > `load'C:/w > et0.5.1/qantom/WetRunner.rb:48C:/wet0.5.1/qantom/WetRunner.rb:39:in > `each'C:/wet > 0.5.1/qantom/WetRunner.rb:39 > > C:\wet0.5.1\qantom> > > > Thanks > > Ian > From raghu at qantom.com Wed Aug 31 14:03:57 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Wed, 31 Aug 2005 23:33:57 +0530 Subject: [Wtr-general] Re: [Wet-users] undefined local variable or method `object_exist_check' In-Reply-To: References: Message-ID: <4315F10D.7040100@qantom.com> Hi Ian, Stephanie, We fixed this problem and posted a new zip archive in the downloads area. If you navigate to the downloads page from wet.qantom.org, you can get the new version. Make sure that you are downloading 0.5.2. Thanks for reporting this. Raghu Ian Phillips wrote: > Hi. > > I am executing the following line and it produces the error below: > > Browser("title:=KPSA").Button("value:=LOGIN").click > > undefined local variable or method `object_exist_check' for > # bd62d0> > > Full error: > C:\wet0.5.1\qantom>WetRunner.rb C:\wet0.5.1\KOP_GUI_ADMIN_Sanity > DEBUG: init ie with FalseClass > DEBUG: init ie with TrueClass > DEBUG: init ie with TrueClass > DEBUG: init ie with TrueClass > DEBUG: init ie with TrueClass > undefined local variable or method `object_exist_check' for > # bd62d0> > C:\wet0.5.1/qantom/webobjects/WebObject.rb:37:in > `click'C:\wet0.5.1\KOP_GUI_ADMI > N_Sanity\scripts\GroupTest.qws:8C:/wet0.5.1/qantom/WetRunner.rb:48:in > `load'C:/w > et0.5.1/qantom/WetRunner.rb:48C:/wet0.5.1/qantom/WetRunner.rb:39:in > `each'C:/wet > 0.5.1/qantom/WetRunner.rb:39 > > C:\wet0.5.1\qantom> > > > Thanks > > Ian > From bret at pettichord.com Wed Aug 31 13:57:10 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 31 Aug 2005 12:57:10 -0500 Subject: begin/assert/rescue harrmful? Re: [Wtr-general] assert PASSED and FAILED In-Reply-To: References: <72799cd705083108016d0d10ff@mail.gmail.com> <5.1.0.14.2.20050830114334.02e78628@127.0.0.1> <5.1.0.14.2.20050831080647.011bc3d0@127.0.0.1> <72799cd705083108016d0d10ff@mail.gmail.com> Message-ID: <5.1.0.14.2.20050831125056.02f96d28@127.0.0.1> >At 10:05 AM 8/31/2005, Ian Phillips wrote: >For one thing I cannot get it to work. Exactly. There is no reason to explain how to throw and catch exceptions in an introduction. Also, a common coding error (which also occurs several places in watir, sigh) is to catch more exceptions than you really need to do. The problem with this is that you may very well catch other kinds of exceptions than you expecting and so your code is broken, but you aren't getting any error messages because you trapped them. So you can't figure out what is going wrong. Fundamentally, rescue blocks hide errors. This is dangerous to do anywhere, much less in a test suite. It should only be done when there aren't other choices. In the case of begin/assert expression/rescue, you can always replace this code with if expression/then and what you get is easier to understand and has no chance of hiding errors. Bret >On 8/31/05, Chris McMahon ><christopher.mcmahon at gmail.com> wrote: >> > 3. "begin/assert/rescue" is really a bad idea and we will stop >> suggesting it. >> >>I *like* begin/assert/rescue. It's my friend. Why is it a bad idea? >> >>-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 _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Aug 31 14:01:12 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 31 Aug 2005 13:01:12 -0500 Subject: [Wtr-general] Cygwin Ruby and Watir In-Reply-To: <71D28C8451BFD5119B2B00508BE26E6409E11ABE@pasmail3.office.t mcs> Message-ID: <5.1.0.14.2.20050831130020.03108508@127.0.0.1> i think i've done this before. you'll have to manually install 'win32ole'. At 09:58 AM 8/31/2005, Sean Gallagher wrote: >Is anyone running Watir automation from Cygwin? If so, any advice, issues, >etc? > >Thanks. > >-sean >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Aug 31 14:05:07 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 31 Aug 2005 13:05:07 -0500 Subject: [Wtr-general] assert PASSED and FAILED In-Reply-To: <4315c55f.37605c1e.4287.26ed@mx.gmail.com> References: <5.1.0.14.2.20050831080647.011bc3d0@127.0.0.1> Message-ID: <5.1.0.14.2.20050831130155.031026e8@127.0.0.1> At 09:58 AM 8/31/2005, Zeljko Filipin wrote: >Will you describe installation of watir as gem in user guide? I think it is >the most simple way. Good suggestion. I think we need to consolidate the way's people get the Basic information about Watir. Currently we have: - users guide - main web site - readme -- which is the main page for the rdoc (which is all you get with a gem) I think what i want to do is have a short introduction which describes the basics of usage and put that in a README/RDOC and then have the users guide go into more detailed examples. Comments? Bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Aug 31 14:51:29 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 31 Aug 2005 13:51:29 -0500 Subject: [Wtr-general] Rubyforge stats: Watir #1 In-Reply-To: <72799cd7050831105125ed1687@mail.gmail.com> Message-ID: <5.1.0.14.2.20050831135046.030ee388@127.0.0.1> Look at our rate of activity growth: http://rubyforge.org/project/stats/?group_id=104 At 12:51 PM 8/31/2005, Chris McMahon wrote: >Hey... > I just noticed that Watir is the most active project on rubyforge >right now. And it's creeping up the list of top project downloads, >too. >-Chris > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From noreply at rubyforge.org Wed Aug 31 15:32:06 2005 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 31 Aug 2005 15:32:06 -0400 Subject: [Wtr-general] [ wtr-Bugs-2351 ] http://wtr.rubyforge.org/example_testcase.html errors Message-ID: <200508311932.j7VJW6hk020999@rubyforge.org> Bugs item #2351, was opened at 2005-08-31 15:32 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=487&aid=2351&group_id=104 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: http://wtr.rubyforge.org/example_testcase.html errors Initial Comment: two slight errors[typos] of the example test case page: Section 6: Evaluating the Results The Expected Result puts " - a Google page with results should be shown. "Programming Ruby" should be high on the list." the double quotes around Programming Ruby need to be escaped or replaced with single quotes Verify Results if ie.contains_test("Programming Ruby") should be if ie.contains_text("Programming Ruby") ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=487&aid=2351&group_id=104 From jhobbsjr at gmail.com Wed Aug 31 16:45:42 2005 From: jhobbsjr at gmail.com (John Hobbs) Date: Wed, 31 Aug 2005 16:45:42 -0400 Subject: [Wtr-general] Works in Watir but NOT in WET...any ideas? Message-ID: <30078ddb05083113455917b518@mail.gmail.com> WATIR Code: ie = IE.attach(:url , /MY.jsp/ ) f = ie.frame(:name, "MYFrame") puts f.html WET Code: b = Browser("url:=/MY.jsp/") f = b.Frame("name:=MYFrame") puts f.html In both cases, I have already logged in to the system and navigated to MY.jsp. When I run the Watir code, the html for "MYFrame" is displayed. When I run the WET code, I get the following error message: C:\WET/qantom/webobjects/WebFrame.rb:44:in `document': undefined method `document' for nil:NilClass (NoMethodError) from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1465:in `html' from C:/RubyCode/WetTest/FrameTest.rb:24 From bret at pettichord.com Wed Aug 31 17:47:13 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 31 Aug 2005 16:47:13 -0500 Subject: [Wtr-general] Unicode and Watir Message-ID: <5.1.0.14.2.20050831164547.03173900@127.0.0.1> I have a client who would like to use Watir to test a Unicode enabled application, supporting double-byte languages such as Chinese and Japanese. It looks to me like it doesn't work, but i haven't done Unicode with Ruby before and thought i would check to see if any one else had looked into this. Bret _____________________ Bret Pettichord www.pettichord.com From jeff.darklight at gmail.com Wed Aug 31 17:58:14 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 31 Aug 2005 14:58:14 -0700 Subject: [Wtr-general] Unicode and Watir In-Reply-To: <5.1.0.14.2.20050831164547.03173900@127.0.0.1> References: <5.1.0.14.2.20050831164547.03173900@127.0.0.1> Message-ID: I believe the normal method is to use iconv Which, was recently sent to the ruby-talk mailing list where a user had packaged them up nice and easy for windows users. Original Message was from Dave Burt dave at burt.id.au : I posted this while the gateway was down a couple of days ago: > Hi,>> I'd like to offer Windows One-Click Installer users two handy add-on > packages: Iconv and Curses.>> The packages include:> * all the required binaries> * the ruby extension (.so)> * the library proper (.dll)> * automatic installation script (setup.rb)> * information on installation (README)> * a list of where to get the binaries if you don't trust me (README)>> http://www.dave.burt.id.au/ruby/iconv.zip> http://www.dave.burt.id.au/ruby/curses.zip>> Cheers,> Dave Hope that helps. I haven't played with it yet, but I thought I'd pass the info along. j. On 8/31/05, Bret Pettichord wrote: > > I have a client who would like to use Watir to test a Unicode enabled > application, supporting double-byte languages such as Chinese and > Japanese. > It looks to me like it doesn't work, but i haven't done Unicode with Ruby > before and thought i would check to see if any one else had looked into > this. > > Bret > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "http://ruby-lang.org -- do you ruby?" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050831/d4a41a7f/attachment.html From christopher.mcmahon at gmail.com Wed Aug 31 18:05:11 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 31 Aug 2005 17:05:11 -0500 Subject: [Wtr-general] Unicode and Watir In-Reply-To: <5.1.0.14.2.20050831164547.03173900@127.0.0.1> References: <5.1.0.14.2.20050831164547.03173900@127.0.0.1> Message-ID: <72799cd7050831150540109dd3@mail.gmail.com> On 8/31/05, Bret Pettichord wrote: > I have a client who would like to use Watir to test a Unicode enabled > application, supporting double-byte languages such as Chinese and Japanese. > It looks to me like it doesn't work, but i haven't done Unicode with Ruby > before and thought i would check to see if any one else had looked into this. I ran across http://www.tbray.org/ongoing/When/200x/2005/08/27/Ruby as a link from whytheluckystiff's blog in which Tim Bray said of Ruby "The support for Unicode in regular expressions seems quite a bit behind what you have now in Perl and Java" C "hearsay" M From Peter.Ch at NETeller.com Wed Aug 31 18:27:11 2005 From: Peter.Ch at NETeller.com (Peter Chau) Date: Wed, 31 Aug 2005 16:27:11 -0600 Subject: [Wtr-general] Unicode and Watir Message-ID: I've had scripts running on a Shift-JIS website to read/write Japanese. I had more problems configuring Windows, DOS, and the text editor than I did with Ruby/Watir. >From what I remember, I had to install an East Asian Language Package in Control Panel, Regional and Language Options and then activate Japanese as a non-unicode program in the advance tab. To set up my text editor. I had to use a Japanese Font (Arial Unicode MS Japanese script). I haven't tried Regexp with Japanese characters. Peter From jim_che_tih at yahoo.com Wed Aug 31 22:10:30 2005 From: jim_che_tih at yahoo.com (jim che) Date: Wed, 31 Aug 2005 19:10:30 -0700 (PDT) Subject: [Wtr-general] How to connect the database using the ruby or how to run the java program during ruby code Message-ID: <20050901021030.24503.qmail@web33307.mail.mud.yahoo.com> hi everybody, I want to do some database operations during the execution of ruby code,but I don't know how to connect the database and how to operate the database by ruby language. I also wonder whether the java program can be called by ruby or not if can how should I do it. It is very nice if some example codes are showed. Thank you very much. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050831/0d495196/attachment.html From dave at burt.id.au Wed Aug 31 22:31:28 2005 From: dave at burt.id.au (Dave Burt) Date: Thu, 1 Sep 2005 12:31:28 +1000 Subject: [Wtr-general] Unicode and Watir References: <5.1.0.14.2.20050831164547.03173900@127.0.0.1> Message-ID: <006501c5ae9d$4560fdd0$6402a8c0@telperion> Jeff Wood suggested: >> http://www.dave.burt.id.au/ruby/iconv.zip > Hope that helps. I haven't played with it yet, but I thought I'd pass the info > along. It works for me. Documentation for iconv is available with the doco for the rest of the Ruby standard library, at http://www.ruby-doc.org/ In particular: http://www.ruby-doc.org/stdlib/libdoc/iconv/rdoc/index.html Cheers, Dave From dave at burt.id.au Wed Aug 31 22:38:47 2005 From: dave at burt.id.au (Dave Burt) Date: Thu, 1 Sep 2005 12:38:47 +1000 Subject: [Wtr-general] Re: Javascript dialogs - reading and closing References: <20050831170827.6533DE6DF0@mail2.firstlink.com> Message-ID: <007401c5ae9e$48935c90$6402a8c0@telperion> Joe Yakich wrote: > Thanks so much for posting this code, it looks like it will be exactly what we > need > to start handling our Javascript dialogs. You're welcome. I hope it works as well for you as it does for me. Did I mention it requires AutoIt? > I have a question (and it's probably an obvious one that I should know, so > please > excuse my ignorance). > > Does one actually modify Test::Unit::Assertions (Ruby\lib\ruby\1.8 > \test\unit\assertions.rb in my case) and add the assert_js_dialog method, or > is there > some preferred way to extend it? (Are there other setup/installation steps or > gotchas that I should know about?) If you follow my instructions blindly, and just put all my code in one file then require it, it will work. Ruby is an open language. That means js_dialog.rb is allowed to open up Test::Unit::Assertions and add a method to it, which will be included anywhere that module is included (e.g. in any Test::Unit::TestCase). This is the same way that you can add a method that is available everywhere. If you use "def" to write a method "at the top level" of a script, it's added to Object, and so you can use it anywhere. I'd recommend books, but I won't right now; I'll instead just plug learning Ruby itself. It's good. Cheers, Dave From bret at pettichord.com Wed Aug 31 23:37:50 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 31 Aug 2005 22:37:50 -0500 Subject: [Wtr-general] new installers Message-ID: <5.1.0.14.2.20050831222155.031d4110@127.0.0.1> Our new installers have been out for a bit. And we need to update our docs to reflect this. Should we tell people about the one-click installer, the gem or both? We have scattered reports of problems with the new one-click installer. We'd appreciate hearing more about it? Is it working for you. Do you like it? Is it better than the old one. I want to update our documentation on how to install Watir and would like some feedback first. I am also planning to convert the old installer to be a simply command line installer -- that way we have something very reliable for people who want more than a gem and are having problems with the one-clicker or want to install directly from HEAD. Bret _____________________ Bret Pettichord www.pettichord.com