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-gen