From bret at pettichord.com Sun Jul 2 03:36:04 2006 From: bret at pettichord.com (Bret Pettichord) Date: Sun, 2 Jul 2006 02:36:04 -0500 Subject: [Wtr-general] xpath error In-Reply-To: <882C8B6492C05E48AEA0C7B2D7D4254E03C14983@EMAIL.RALEYSNT.SECNET.RALEYS.COM> References: <882C8B6492C05E48AEA0C7B2D7D4254E03C14983@EMAIL.RALEYSNT.SECNET.RALEYS.COM> Message-ID: I've also run into some problems with rexml/xpath. Some one should track down what it is about your html page that is causing Rexml problems and then submit a bug report to the rexml project. When you get an Rexml bug number, it would hurt to include in a Jira/Watir bug report as well. My sense is that that using Rexml to parse tidied html is outlying use case for Rexml and that is why we are seeing these problems. I think the Rexml team will fix them, but they need to be isolated and reported. Bret On 6/30/06, NIcky Sandhu wrote: > > >> require 'rexml/rexml' > require 'rexml/rexml' > => true > >> print REXML::Version > print REXML::Version > 3.1.4=> nil > >> > > > *Warning: this e-mail may contain information proprietary to Raley's and > is intended only for the use of the intended recipients. If the reader of > this message is not an intended recipient, you are hereby notified that you > have received this message in error and that any review, dissemination, > distribution or copying of this message is strictly prohibited. If you have > received this message in error, please notify the sender immediately.* > > ------------------------------ > > > *From:* wtr-general-bounces at rubyforge.org [mailto: > wtr-general-bounces at rubyforge.org] *On Behalf Of *Angrez Singh > *Sent:* Thursday, June 29, 2006 8:08 PM > *To:* wtr-general at rubyforge.org > *Subject:* Re: [Wtr-general] xpath error > > Hi, > > Are you using latest version of REXML i.e. 3.1.4 ? If not install latest > version of REXML and try XPath again. > > Regards, > Angrez > > On 6/29/06, NIcky Sandhu wrote: > > > > I got an error using the xpath feature with watir 1.5.1.1045. > > >> ie.link(:xpath,'//a[contains(string(.),"Search Now")]').click > > > > I have attached the error document and the stack trace below. > > The document seems to be valid xml and other xpath tools work fine > > REXML::ParseException: # > error.xml >> > > .... > > > > > > _______________________________________________ > 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/20060702/97bad342/attachment.html From raghu at qantom.com Sun Jul 2 16:00:54 2006 From: raghu at qantom.com (Raghu Venkataramana) Date: Mon, 03 Jul 2006 01:30:54 +0530 Subject: [Wtr-general] A Proposal for WET UI Message-ID: <44A825F6.80705@qantom.com> All, I have created a draft proposal of a UI for WET. This is an attempt to make WET more user-friendly and to allow wet users to easily employ the most powerful features of WET like preconditions, teardowns, configuration and the XML Object repository. The WET Script assistant posted by Venugopal Shenoy, is another important move forward in our effort to make WET more usable. The proposal is at http://jira.openqa.org/secure/attachment/10620/UIProposal.pdf I would appreciate it if folks could go through this and provide your valuable comments. Dear Watir Users, My Sincere apologies for cross-posting. However since a few of you have already been thinking of similar utilities like recorders etc., I am sure that I can get some valuable feedback from the Watir community. Please send all of your comments, suggestions and feedback on this proposal to wet-users at lists.sourceforge.net or post your comments in the Jira issue that has been written to track the UI Issue - http://jira.openqa.org/browse/WET-23 -- Regards, Raghu Venkataramana /Director/ *Qantom Software Private Limited* 72/1B, 2nd Floor, K.H. Plaza, Kanakapura Road, Bangalore-78 Phone : 26655216-Xtn-125, Telefax : 26799269 The future of test tools is open source www.wet.qantom.org SQA partners for your products www.qantom.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060703/676b9b66/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: wet_email.jpg Type: image/jpeg Size: 1609 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20060703/676b9b66/attachment.jpg -------------- next part -------------- A non-text attachment was scrubbed... Name: banyan_email.jpg Type: image/jpeg Size: 3767 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20060703/676b9b66/attachment-0001.jpg From upgundecha at yahoo.com Mon Jul 3 04:12:11 2006 From: upgundecha at yahoo.com (Unmesh Gundecha) Date: Mon, 3 Jul 2006 01:12:11 -0700 (PDT) Subject: [Wtr-general] A Proposal for WET UI In-Reply-To: <44A825F6.80705@qantom.com> Message-ID: <20060703081211.94235.qmail@web53712.mail.yahoo.com> Dear Raghu, You are doing great work. Keep it up. However I would suggest not to resemble WET UI feature names with QTP. For example Object Repository etc. Regards, Unmesh Raghu Venkataramana wrote: All, I have created a draft proposal of a UI for WET. This is an attempt to make WET more user-friendly and to allow wet users to easily employ the most powerful features of WET like preconditions, teardowns, configuration and the XML Object repository. The WET Script assistant posted by Venugopal Shenoy, is another important move forward in our effort to make WET more usable. The proposal is at http://jira.openqa.org/secure/attachment/10620/UIProposal.pdf I would appreciate it if folks could go through this and provide your valuable comments. Dear Watir Users, My Sincere apologies for cross-posting. However since a few of you have already been thinking of similar utilities like recorders etc., I am sure that I can get some valuable feedback from the Watir community. Please send all of your comments, suggestions and feedback on this proposal to wet-users at lists.sourceforge.net or post your comments in the Jira issue that has been written to track the UI Issue - http://jira.openqa.org/browse/WET-23 -- Regards, Raghu Venkataramana /Director/ *Qantom Software Private Limited* 72/1B, 2nd Floor, K.H. Plaza, Kanakapura Road, Bangalore-78 Phone : 26655216-Xtn-125, Telefax : 26799269 The future of test tools is open source www.wet.qantom.org SQA partners for your products www.qantom.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general --------------------------------- Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2?/min or less. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060703/47ab7b6a/attachment.html From George.Flaherty at sas.com Mon Jul 3 11:08:24 2006 From: George.Flaherty at sas.com (George Flaherty) Date: Mon, 3 Jul 2006 11:08:24 -0400 Subject: [Wtr-general] UI Mapping Revisited. Message-ID: <416BE996E3CA9548819C278CE307B1D3897AFE@MERCMBX03.na.sas.com> Is there a preferred way to map out Watir UI components/features before test execution, then possibly "bind" them later? I know there have been some conversations regarding a Watir::Map class, but is there some other way until that feature is added? My main goal is to not duplicate UI features throughout various Test Suites. Thanks -george From bret at pettichord.com Mon Jul 3 12:42:05 2006 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 3 Jul 2006 11:42:05 -0500 Subject: [Wtr-general] UI Mapping Revisited. In-Reply-To: <416BE996E3CA9548819C278CE307B1D3897AFE@MERCMBX03.na.sas.com> References: <416BE996E3CA9548819C278CE307B1D3897AFE@MERCMBX03.na.sas.com> Message-ID: On 7/3/06, George Flaherty wrote: > > Is there a preferred way to map out Watir UI components/features before > test execution, then possibly "bind" them later? I know there have been some > conversations regarding a Watir::Map class, but is there some other way > until that feature is added? My main goal is to not duplicate UI features > throughout various Test Suites. > > Thanks > -george I know that i was talking about creating a Map class, but recently i've found that it was easier to just create small methods that returned various elements. Here's some of my code: class AddMatterDialogMap def initialize (modal) @browser = modal end def matter_name; @browser.text_field(:id, 'txtMatterName'); end def matter_no; @browser.text_field(:id, 'txtMatterNo'); end def work_group; @browser.select_list(:id, 'ddWorkGroup'); end def professional_in_charge; @browser.select_list(:id, 'ddPic'); end def city; @browser.text_field(:id, 'txtCity'); end def zip; @browser.text_field(:id, 'txtZip'); end def country; @browser.select_list(:id, 'ddlCountry'); end def open_date; @browser.text_field(:id, 'txtOpenDate'); end def matter_type; @browser.select_list(:id, 'ddMatterType'); end def close_date; @browser.text_field(:id, 'txtCloseDate'); end def litigation; @browser.select_list(:id, 'ddLitigation'); end def closed; @browser.checkbox(:id, 'chkClosed'); end def notes; @browser.text_field(:id, 'txtNotes'); end end So to use this ... map = AddMatterDialogMap.new ie map.open_date.set '1/1/06' Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060703/2bdc1614/attachment.html From George.Flaherty at sas.com Mon Jul 3 12:49:01 2006 From: George.Flaherty at sas.com (George Flaherty) Date: Mon, 3 Jul 2006 12:49:01 -0400 Subject: [Wtr-general] UI Mapping Revisited. Message-ID: <416BE996E3CA9548819C278CE307B1D3897B7B@MERCMBX03.na.sas.com> ahhh cool, I had "roughly" the same thing...but I figured I was doing it wrong :) I couldn't figure out the @browser = modal part... thanks Bret -george ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Monday, July 03, 2006 12:42 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] UI Mapping Revisited. On 7/3/06, George Flaherty wrote: Is there a preferred way to map out Watir UI components/features before test execution, then possibly "bind" them later? I know there have been some conversations regarding a Watir::Map class, but is there some other way until that feature is added? My main goal is to not duplicate UI features throughout various Test Suites. Thanks -george I know that i was talking about creating a Map class, but recently i've found that it was easier to just create small methods that returned various elements. Here's some of my code: class AddMatterDialogMap def initialize (modal) @browser = modal end def matter_name; @browser.text_field(:id, 'txtMatterName'); end def matter_no; @browser.text_field (:id, 'txtMatterNo'); end def work_group; @browser.select_list(:id, 'ddWorkGroup'); end def professional_in_charge; @browser.select_list(:id, 'ddPic'); end def city; @browser.text_field(:id, 'txtCity'); end def zip; @browser.text_field(:id, 'txtZip'); end def country; @browser.select_list(:id, 'ddlCountry'); end def open_date; @browser.text_field(:id, 'txtOpenDate'); end def matter_type; @browser.select_list (:id, 'ddMatterType'); end def close_date; @browser.text_field(:id, 'txtCloseDate'); end def litigation; @browser.select_list(:id, 'ddLitigation'); end def closed; @browser.checkbox(:id, 'chkClosed'); end def notes; @browser.text_field(:id, 'txtNotes'); end end So to use this ... map = AddMatterDialogMap.new ie map.open_date.set '1/1/06' Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060703/607c1fc0/attachment.html From Adrian.Rutter at tnt.com Tue Jul 4 11:09:18 2006 From: Adrian.Rutter at tnt.com (Adrian Rutter) Date: Tue, 4 Jul 2006 16:09:18 +0100 Subject: [Wtr-general] UI Mapping Revisited. Message-ID: Hi Bret, > class AddMatterDialogMap > def initialize (modal) > @browser = modal > end ...... > def open_date; @browser.text_field(:id, 'txtOpenDate'); end > def matter_type; @browser.select_list (:id, 'ddMatterType'); end ....... > end > So to use this ... > map = AddMatterDialogMap.new ie > map.open_date.set '1/1/06' This is a good solution. But how would you organise your navigaton and action methods? for example def goto_country_list .... end def enter_country(country) ... end Would you create new classes? At the moment I have a module for each window with methods contained that are relevant to that window. Aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- From dkurtz at olenick.com Wed Jul 5 12:09:41 2006 From: dkurtz at olenick.com (Daniel Kurtz) Date: Wed, 5 Jul 2006 11:09:41 -0500 Subject: [Wtr-general] Windows Sharepoint References: <82E50B4081E1354AAC1F917519B13F0DA23B77@OLENICK-01-EX.atlarge.net> Message-ID: <82E50B4081E1354AAC1F917519B13F0DA23BA4@OLENICK-01-EX.atlarge.net> Hi Bret; I did a Show_All_Objects on a Sharepoint page and couldn't make heads or tails out of the results. It might be that looking at the generated HTML might be more productive. Main problem seems to be however that WSS fires a popup for user authentication, with all the fun that THAT implies. But then, I tried a record and playback using Microsoft's own Visual Studio Team Test, and it couldn't deal with that authentication popup either . Daniel ________________________________ From: wtr-general-bounces at rubyforge.org on behalf of Bret Pettichord Sent: Wed 6/28/2006 3:11 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Windows Sharepoint On 6/26/06, Daniel Kurtz wrote: Has anyone ever tried to script a Windows Sharepoint site? We use sharepoint at my company and i just looked at the structure of the html of the site. It looks like it should be fairly scriptable with Watir. It's mostly organized as a bunch of nested tables. Many of the key elements are tagged with meaningful id's or classes. Some are tagged with long id's that appear to be GUID's. Bret -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 4885 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20060705/b926d35e/attachment.bin From ChintakrindiMeghana at managementdynamics.com Wed Jul 5 17:13:15 2006 From: ChintakrindiMeghana at managementdynamics.com (Chintakrindi Meghanath ) Date: Wed, 5 Jul 2006 17:13:15 -0400 Subject: [Wtr-general] Watir Framework Message-ID: <6CF3AA425295C7479483AC0018EDF98B01DAE11B@MI8NYCMAIL03.Mi8.com> Hi Right now we are using WinRunner for the testing of the application. And we implemeted WRSAFS (Open Source WinRunner Framework) which can be used on any type of application. Most of the scripts are covered in the framework and the user has to only enter the information in the text files. (Data Driven framework) So, the application is independent of the tool we used. Has anyone that type of watir framework, so that users not bother about the watir/ ruby etc.. Thanks Meghanath -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060705/fc29abcc/attachment.html From christopher.mcmahon at gmail.com Wed Jul 5 17:22:51 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 5 Jul 2006 14:22:51 -0700 Subject: [Wtr-general] Watir Framework In-Reply-To: <6CF3AA425295C7479483AC0018EDF98B01DAE11B@MI8NYCMAIL03.Mi8.com> References: <6CF3AA425295C7479483AC0018EDF98B01DAE11B@MI8NYCMAIL03.Mi8.com> Message-ID: <72799cd70607051422r6892748at60531475f26b3a0@mail.gmail.com> > Most of the scripts are covered in the framework and the user has to only > enter the information in the text files. (Data Driven framework) > So, the application is independent of the tool we used. > > Has anyone that type of watir framework, so that users not bother about the > watir/ ruby etc.. A number of people have built things like this, ranging widely in complexity. It's fairly easy to do, but it demands programming in the wider Ruby programming language. There is nothing like this "built-in" with Watir itself. Watir is one of many tools (DBI/ODBC; TMail; etc.) that such a data-driven system might call. -Chris From bret at pettichord.com Wed Jul 5 22:02:07 2006 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 5 Jul 2006 21:02:07 -0500 Subject: [Wtr-general] Watir Framework In-Reply-To: <6CF3AA425295C7479483AC0018EDF98B01DAE11B@MI8NYCMAIL03.Mi8.com> References: <6CF3AA425295C7479483AC0018EDF98B01DAE11B@MI8NYCMAIL03.Mi8.com> Message-ID: On 7/5/06, Chintakrindi Meghanath < ChintakrindiMeghana at managementdynamics.com> wrote: > > Right now we are using WinRunner for the testing of the application. > And we implemeted WRSAFS (Open Source WinRunner Framework) which can be > used on any type of application. > Most of the scripts are covered in the framework and the user has to only > enter the information in the text files. (Data Driven framework) > So, the application is independent of the tool we used. > > Has anyone that type of watir framework, so that users not bother about > the watir/ ruby etc.. > Frankly, i think you might find that it is easier to port SAFS to Watir/Ruby than any of the other tools it supports. Ruby is a great framework language and Watir was designed from the beginning to be easy to build with. I've known Carl Nagle (SAFS creator) for years and indeed his success with SAFS encouraged me to get more involved in Open Source. You may want to look at WET. It is another open-source framework that uses Watir. Although some people have built Watir-based frameworks that store tests in spreadsheets (like SAFS), i think you'll find that most people find that they can create a simple dialect in Ruby that allows them to make tests simple. This is an advantage that Ruby has over many other languages. I've been doing a lot of this kind of thing personally lately and need to write it up.... Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060705/e2a7fed5/attachment.html From bret at pettichord.com Wed Jul 5 22:08:21 2006 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 5 Jul 2006 21:08:21 -0500 Subject: [Wtr-general] Windows Sharepoint In-Reply-To: <82E50B4081E1354AAC1F917519B13F0DA23BA4@OLENICK-01-EX.atlarge.net> References: <82E50B4081E1354AAC1F917519B13F0DA23B77@OLENICK-01-EX.atlarge.net> <82E50B4081E1354AAC1F917519B13F0DA23BA4@OLENICK-01-EX.atlarge.net> Message-ID: Frankly, I never use show_all_objects. I used the IE Dev Toolbar to analyze the page. It is really the very best tool for this kind of thing. All Watir users should install it now! http://www.microsoft.com/downloads/details.aspx?FamilyID=e59c3964-672d-4511-bb3e-2d5e1db91038&displaylang=en Sorry about that authorization dialog.... Bret On 7/5/06, Daniel Kurtz wrote: > > Hi Bret; > > I did a Show_All_Objects on a Sharepoint page and couldn't make heads or > tails out of the results. It might be that looking at the generated HTML > might be more productive. Main problem seems to be however that WSS fires a > popup for user authentication, with all the fun that THAT implies. > > But then, I tried a record and playback using Microsoft's own Visual > Studio Team Test, and it couldn't deal with that authentication popup either > . > > Daniel > ________________________________ > > From: wtr-general-bounces at rubyforge.org on behalf of Bret Pettichord > Sent: Wed 6/28/2006 3:11 PM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] Windows Sharepoint > > > On 6/26/06, Daniel Kurtz wrote: > > Has anyone ever tried to script a Windows Sharepoint site? > > > We use sharepoint at my company and i just looked at the structure of the > html of the site. > > It looks like it should be fairly scriptable with Watir. It's mostly > organized as a bunch of nested tables. Many of the key elements are tagged > with meaningful id's or classes. Some are tagged with long id's that appear > to be GUID's. > > Bret > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060705/0cceab08/attachment.html From browne.daniel at gmail.com Thu Jul 6 04:11:34 2006 From: browne.daniel at gmail.com (Daniel Browne) Date: Thu, 6 Jul 2006 09:11:34 +0100 Subject: [Wtr-general] Need help populating a field array using variables In-Reply-To: <3111B45C4B9CE54C86294493C8C7E197041E4FD6@mailserver.nybot.com> References: <3111B45C4B9CE54C86294493C8C7E197041E4FD6@mailserver.nybot.com> Message-ID: <79518aef0607060111g816bae7j9e7e709241059ddf@mail.gmail.com> Frank, I was wondering if you could tell me exactly what the "#" operator does in this case? I have had a look at the ruby documentation but cannot find an explanation. Thanks. Cheers, Daniel. On 29/06/06, Legarreta, Frank wrote: > > > > > Thank you all so much! > > > > ie.text_field(:name,"grade_result_list[#{x}].beanCount").set("800") > > > > Worked like a charm. > > Regards, > > Frank > > "This e-mail and any attachments may contain confidential and privileged > information. Any dissemination or use of the information by a person other > than the intended recipient is unauthorized and may be illegal. If you are > not the intended recipient, please notify the sender immediately by return > e-mail, delete this e-mail and destroy any copies. Although this e-mail and > any attachments are believed to be free of any virus or other defect that > might affect any computer system into which it is received and opened, it is > the responsibility of the recipient to ensure that it is virus free and no > responsibility is accepted by the Board of Trade of the City of New York, > Inc. or the New York Clearing Corporation for any loss or damage arising in > any way from its use. Thank you." > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > From zeljko.filipin at gmail.com Thu Jul 6 05:13:46 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Thu, 6 Jul 2006 11:13:46 +0200 Subject: [Wtr-general] Need help populating a field array using variables In-Reply-To: <79518aef0607060111g816bae7j9e7e709241059ddf@mail.gmail.com> References: <3111B45C4B9CE54C86294493C8C7E197041E4FD6@mailserver.nybot.com> <79518aef0607060111g816bae7j9e7e709241059ddf@mail.gmail.com> Message-ID: #{} inside double quoted strings lets you include variables in strings. Like this: irb(main):001:0> a = 1 => 1 irb(main):004:0> "a = #{a}" => "a = 1" I just performed a google search for #{} and "#{}" (without quotes and with quotes) and got very interesting results. No match. I do not think I have ever seen it before. :) After a quick test, it looks to me that all queries including only punctuation result in no match. Interesting. From rodrigo.martin at enratio.com Thu Jul 6 10:38:03 2006 From: rodrigo.martin at enratio.com (Rodrigo Julian Martin) Date: Thu, 6 Jul 2006 11:38:03 -0300 Subject: [Wtr-general] [question] Finding a Link with 2 regular expressions? Message-ID: Hello Everybody! I'm trying to find a link with Watir by using 2 regular expressions.. is this posible? Let's suppose I'm trying to find a link with this url: http://server.com/jm/sell?act=form&subAct=modif&siteID=MLA&itemID=222459 75 And I've defined two RegExp: RegExp1 = "subAct=modif" RegExp2 = "22245975" I've tried something like.. If browser.link(:url, /#{regExp1}#{regExp2}/).exists? == true then [...] But this doesn't work.. I suppose I need something like / #{regExp1} | #{regExp2} / (but instead of doing an OR, something that works like an AND of regexps). Hope you understand my bad english Any help would be really appreciated Thanks in advance Rodrigo Julian Martin. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060706/f781a837/attachment.html From bret at pettichord.com Thu Jul 6 10:47:23 2006 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 6 Jul 2006 09:47:23 -0500 Subject: [Wtr-general] Need help populating a field array using variables In-Reply-To: <79518aef0607060111g816bae7j9e7e709241059ddf@mail.gmail.com> References: <3111B45C4B9CE54C86294493C8C7E197041E4FD6@mailserver.nybot.com> <79518aef0607060111g816bae7j9e7e709241059ddf@mail.gmail.com> Message-ID: On 7/6/06, Daniel Browne wrote: > > I was wondering if you could tell me exactly what the "#" operator > does in this case? I have had a look at the ruby documentation but > cannot find an explanation. Thanks. The name for this feature is "string interpolation". You might be able to find documentation if you search for that. Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060706/99b9b3b8/attachment.html From ravishan at BIWORLDWIDE.com Thu Jul 6 10:56:11 2006 From: ravishan at BIWORLDWIDE.com (Ravishankar, MG) Date: Thu, 6 Jul 2006 09:56:11 -0500 Subject: [Wtr-general] [question] Finding a Link with 2 regular expressions? Message-ID: <03CAD54D1DFAE5488B6C53178EF9EA3C07040F76@EXCHANGE1.biperf.com> If browser.link(:url, /#{regExp1}.*#{regExp2}/).exists? == true then [...] should work! -MG ________________________________ http://server.com/jm/sell?act=form&subAct=modif&siteID=MLA&itemID=222459 75 And I've defined two RegExp: RegExp1 = "subAct=modif" RegExp2 = "22245975" I've tried something like.. If browser.link(:url, /#{regExp1}#{regExp2}/).exists? == true then [...] But this doesn't work.. I suppose I need something like / #{regExp1} | #{regExp2} / (but instead of doing an OR, something that works like an AND of regexps). This e-mail message is being sent solely for use by the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by phone or reply by e-mail, delete the original message and destroy all copies. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060706/0daaf1bc/attachment.html From rodrigo.martin at enratio.com Thu Jul 6 11:08:32 2006 From: rodrigo.martin at enratio.com (Rodrigo Julian Martin) Date: Thu, 6 Jul 2006 12:08:32 -0300 Subject: [Wtr-general] [question] Finding a Link with 2 regularexpressions? Message-ID: Thanks Ravi, it worked! But I'm having another problem right now... the RegExp1 and RegExp2 could appear in any order in the links... I guess the sentence you sent me only works if regExp1 ocurrence is Before regExp2 right? ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Ravishankar, MG Sent: Jueves, 06 de Julio de 2006 11:56 a.m. To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] [question] Finding a Link with 2 regularexpressions? If browser.link(:url, /#{regExp1}.*#{regExp2}/).exists? == true then [...] should work! -MG ________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060706/85e6605f/attachment.html From browne.daniel at gmail.com Thu Jul 6 11:43:06 2006 From: browne.daniel at gmail.com (Daniel Browne) Date: Thu, 6 Jul 2006 16:43:06 +0100 Subject: [Wtr-general] Need help populating a field array using variables In-Reply-To: References: <3111B45C4B9CE54C86294493C8C7E197041E4FD6@mailserver.nybot.com> <79518aef0607060111g816bae7j9e7e709241059ddf@mail.gmail.com> Message-ID: <79518aef0607060843v4040a740m1f4bc16212b69928@mail.gmail.com> Zeljko and Bret, Thanks for that. As you found out, googling for an explanation wasn't easy. Searching for "string interpolation" gives me plenty of results. Mind you, the explanation you gave was enough anyway. Thanks. Cheers, Daniel. On 06/07/06, Bret Pettichord wrote: > On 7/6/06, Daniel Browne wrote: > > > I was wondering if you could tell me exactly what the "#" operator > > does in this case? I have had a look at the ruby documentation but > > cannot find an explanation. Thanks. > > > The name for this feature is "string interpolation". You might be able to > find documentation if you search for that. > > Bret > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > From browne.daniel at gmail.com Thu Jul 6 12:04:34 2006 From: browne.daniel at gmail.com (Daniel Browne) Date: Thu, 6 Jul 2006 17:04:34 +0100 Subject: [Wtr-general] [question] Finding a Link with 2 regularexpressions? In-Reply-To: References: Message-ID: <79518aef0607060904o5ceb9cf4qbe9a3840b43e5058@mail.gmail.com> What about somehting like: if (browser.link(:url, /#{regExp1}.*#{regExp2}/).exists? || browser.link(:url, /#{regExp2}.*#{regExp1}/).exists?) ... end Cheers, Daniel. On 06/07/06, Rodrigo Julian Martin wrote: > > > > > Thanks Ravi, it worked! But I'm having another problem right now? the > RegExp1 and RegExp2 could appear in any order in the links? I guess the > sentence you sent me only works if regExp1 ocurrence is Before regExp2 > right? > > > > ________________________________ > > > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of > Ravishankar, MG > Sent: Jueves, 06 de Julio de 2006 11:56 a.m. > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] [question] Finding a Link with 2 > regularexpressions? > > > > > > > If browser.link(:url, /#{regExp1}.*#{regExp2}/).exists? == > true then > > > [?] > > > > should work! > > > > -MG > > > ________________________________ > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > From rodrigo.martin at enratio.com Thu Jul 6 13:51:18 2006 From: rodrigo.martin at enratio.com (Rodrigo Julian Martin) Date: Thu, 6 Jul 2006 14:51:18 -0300 Subject: [Wtr-general] [question] Finding a Link with 2regularexpressions? Message-ID: Yeah daniel, that worked really well.. Then I realized I could use the OR .. O_O Cheers and thanks again -----Original Message----- What about somehting like: if (browser.link(:url, /#{regExp1}.*#{regExp2}/).exists? || browser.link(:url, /#{regExp2}.*#{regExp1}/).exists?) ... end Cheers, Daniel. From ChintakrindiMeghana at managementdynamics.com Thu Jul 6 16:45:11 2006 From: ChintakrindiMeghana at managementdynamics.com (Chintakrindi Meghanath ) Date: Thu, 6 Jul 2006 16:45:11 -0400 Subject: [Wtr-general] Watir Framework Message-ID: <6CF3AA425295C7479483AC0018EDF98B01DAE123@MI8NYCMAIL03.Mi8.com> Hi Bret I had asked Carl , whether we can use SAFS framework with the watir. The following is the reply from him. Carl -- We have not developed libraries for WATIR to interface with SAFS or STAF, but my bet is that it can be done. If WATIR can interface to C DLLS or VB DLLs or COM, then it should be able to connect with SAFS. Can we call these DLL's from the watir ? Thanks Meghanath -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060706/3f4fe38b/attachment.html From bret at pettichord.com Thu Jul 6 17:02:38 2006 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 6 Jul 2006 16:02:38 -0500 Subject: [Wtr-general] Watir Framework In-Reply-To: <6CF3AA425295C7479483AC0018EDF98B01DAE123@MI8NYCMAIL03.Mi8.com> References: <6CF3AA425295C7479483AC0018EDF98B01DAE123@MI8NYCMAIL03.Mi8.com> Message-ID: > > Carl -- We have not developed libraries for WATIR to interface with SAFS > or STAF, but my bet is > that it can be done. If WATIR can interface to C DLLS or VB > DLLs or COM, then it should be > able to connect with SAFS. > > Can we call these DLL's from the watir ? > Yes. Watir controls IE via its COM interface. In fact Watir actually extends Ruby's COM support (ie. WIN32OLE). Ruby can also directly call any DLL. Watir uses this ability for our limited support of Windows dialogs. In other words, Ruby can do all these things, and that is enough to make SAFS work with Watir. Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060706/0f06d2a8/attachment.html From Adrian.Rutter at tnt.com Fri Jul 7 05:52:08 2006 From: Adrian.Rutter at tnt.com (Adrian Rutter) Date: Fri, 7 Jul 2006 10:52:08 +0100 Subject: [Wtr-general] Watir Framework Message-ID: Bret wrote > i think you'll find that most people find that > they can create a simple dialect in Ruby that allows them to make tests > simple. This is an advantage that Ruby has over many other languages. I've > been doing a lot of this kind of thing personally lately and need to write > it up.... Could anyone elaborate on this, and maybe give some simple examples? Are you talking about creating a DSL? Aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- From zeljko.filipin at gmail.com Fri Jul 7 10:32:04 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 7 Jul 2006 16:32:04 +0200 Subject: [Wtr-general] Watir Users forum at forums.openqa.org In-Reply-To: References: Message-ID: Patrick asked what to do with Watir developers. Nobody said that it should not be removed, and I guess that Bret is answering most of the questions there (and he wrote that he would rather see it removed), so I guess it should be removed. Anybody thinks that it should mirror wtr-development at rubyforge.org? Bret, if nobody replies to this in a few days, should I tell Patrick to remove it? ?eljko On 6/27/06, Bret Pettichord wrote: > > I have two suggestions. > > 1. Remove it entirely; or > 2. Rename it to Watir Development and have it mirror > wtr-development at rubyforge.org. > > I am currently very behind on replying to emails on wtr-development (my > apologies) so i am somewhat reluctant to making it easier for people to post > questions there. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060707/158712d1/attachment.html From zeljko.filipin at gmail.com Fri Jul 7 10:54:45 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 7 Jul 2006 16:54:45 +0200 Subject: [Wtr-general] Watir Users forum at forums.openqa.org In-Reply-To: References: Message-ID: Patrick needs forum-watir-users at openqa.org (I guess we should change it to forum-watir-general at openqa.org) subscribed to wtr-general at rubyforge.org. I tried to subscribe it, but that e-mail should be verified, and Patrick said that it is not easy for him to do (but not impossible). He asked if we could somehow force that subscription without that e-mail verified. Can we ask rubyforge to force that subscription? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060707/39c4cc66/attachment.html From bret at pettichord.com Fri Jul 7 11:03:13 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 7 Jul 2006 10:03:13 -0500 Subject: [Wtr-general] Watir Framework In-Reply-To: References: Message-ID: On 7/7/06, Adrian Rutter wrote: > > Could anyone elaborate on this, and maybe give some simple examples? Are > you talking about creating a DSL? In a word, yes. Here is an example of a test. login goto AddMatterDialog do matter_no "123#{unique}" matter_name "My Matter#{unique}" open_date '1/1/2006' matter_type 'Bankruptcy' work_group 'Taggart Corporate Division' professional_in_charge 'Hernandez, Mark' end browser_title.should_equal 'View Matter' I got a lot of ideas from the Systir testing framework, although i ended up not actually using this library. I am also making heavy use of Rspec. Several articles on writing DSLs in Ruby were also helpful. Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060707/e760398b/attachment.html From christopher.mcmahon at gmail.com Fri Jul 7 11:09:42 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 7 Jul 2006 08:09:42 -0700 Subject: [Wtr-general] OT: Scripting Web Tests class at Agile2006 is *big* Message-ID: <72799cd70607070809l6f11fe0au209ac11bb0c10189@mail.gmail.com> 65 people (!) so far are registered for Scripting For Testers (with Watir) at the Agile2006 conference. There are still about 200 openings left for the conference itself. As you probably know, this is the class that Bret and Brian Marick initiated. Bret has kept the materials updated and open-source, so anyone is free to teach the class anywhere they want. This is probably the last time I'm teaching the course, so if anyone else is thinking about teaching it, drop me a line. -Chris From bret at pettichord.com Fri Jul 7 11:10:17 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 7 Jul 2006 10:10:17 -0500 Subject: [Wtr-general] Watir Users forum at forums.openqa.org In-Reply-To: References: Message-ID: Tom Copeland (tom at infoether.com) supports rubyforge. The group here should understand that this change will allow anyone with an OpenQA account to post to this list (via the forum). Bret On 7/7/06, Zeljko Filipin wrote: > > Patrick needs forum-watir-users at openqa.org (I guess we should change it > to forum-watir-general at openqa.org) subscribed to wtr-general at rubyforge.org. > I tried to subscribe it, but that e-mail should be verified, and Patrick > said that it is not easy for him to do (but not impossible). He asked if we > could somehow force that subscription without that e-mail verified. Can we > ask rubyforge to force that subscription? > > _______________________________________________ > 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/20060707/bdb610ee/attachment.html From bret at pettichord.com Fri Jul 7 11:11:18 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 7 Jul 2006 10:11:18 -0500 Subject: [Wtr-general] Watir Users forum at forums.openqa.org In-Reply-To: References: Message-ID: On 7/7/06, Zeljko Filipin wrote: > > Patrick asked what to do with Watir developers. Nobody said that it should > not be removed, and I guess that Bret is answering most of the questions > there (and he wrote that he would rather see it removed), so I guess it > should be removed. Anybody thinks that it should mirror > wtr-development at rubyforge.org? > > Bret, if nobody replies to this in a few days, should I tell Patrick to > remove it? > sure. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060707/b3df3d07/attachment.html From manishs at reconnex.net Fri Jul 7 12:07:58 2006 From: manishs at reconnex.net (Manish Sapariya) Date: Fri, 07 Jul 2006 21:37:58 +0530 Subject: [Wtr-general] why win32ole needed to be patched or modified Message-ID: <44AE86DE.1050209@reconnex.net> Hi, Bret mentioned in one of the posts that in order for watir to be working, win32ole ruby bindings needed to be patched. I was wondering for what kind of patch this was? If I want my own app to be driven using ole, what kind of patch I might require to add? I would appreciate pointers to the right forum if this is not the one. Thanks and Regards, Manish From manishs at reconnex.net Fri Jul 7 13:07:11 2006 From: manishs at reconnex.net (Manish Sapariya) Date: Fri, 07 Jul 2006 22:37:11 +0530 Subject: [Wtr-general] FireWatir on linux Message-ID: <44AE94BF.5070301@reconnex.net> Hi, Has anyone tried running firewatir on linux? I went through the code and looks like it wont run under linux because references to win32ole and autoit libraries. Is it expected run under linux by any chance? What will it take to make it run under linux? Thanks and Regards, Manish From christopher.mcmahon at gmail.com Fri Jul 7 13:13:03 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 7 Jul 2006 10:13:03 -0700 Subject: [Wtr-general] FireWatir on linux In-Reply-To: <44AE94BF.5070301@reconnex.net> References: <44AE94BF.5070301@reconnex.net> Message-ID: <72799cd70607071013s4809dc88i11da5e6a2a635ba3@mail.gmail.com> On 7/7/06, Manish Sapariya wrote: > Hi, > Has anyone tried running firewatir on linux? > I went through the code and looks like it wont > run under linux because references to win32ole > and autoit libraries. Dave Hoover got it running on a Mac. Search in the archives for "Firewatir on Intel Mac". -Chris From jfitisoff at yahoo.com Fri Jul 7 13:30:49 2006 From: jfitisoff at yahoo.com (John Fitisoff) Date: Fri, 7 Jul 2006 10:30:49 -0700 (PDT) Subject: [Wtr-general] FireWatir on linux In-Reply-To: <44AE94BF.5070301@reconnex.net> Message-ID: <20060707173049.59537.qmail@web54102.mail.yahoo.com> I've read accounts of folks using WATIR with Linux. You have to have the Windows API and IE installed to get it to work. I'm not sure what happens when FireWatir gets installed as it's using SSH, but seems like it might be possible. Try Googling WATIR and Linux... --- Manish Sapariya wrote: > Hi, > Has anyone tried running firewatir on linux? > I went through the code and looks like it wont > run under linux because references to win32ole > and autoit libraries. > > Is it expected run under linux by any chance? > What will it take to make it run under linux? > > Thanks and Regards, > Manish > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From manishs at reconnex.net Fri Jul 7 14:27:32 2006 From: manishs at reconnex.net (Manish Sapariya) Date: Fri, 07 Jul 2006 23:57:32 +0530 Subject: [Wtr-general] FireWatir on linux In-Reply-To: <72799cd70607071013s4809dc88i11da5e6a2a635ba3@mail.gmail.com> References: <44AE94BF.5070301@reconnex.net> <72799cd70607071013s4809dc88i11da5e6a2a635ba3@mail.gmail.com> Message-ID: <44AEA794.6070902@reconnex.net> Hi, I got it out of compilation error and I could run test.rb in mozilla_test (I had to comment java dialog box test, to get reed of other dependency errors.). However the test does not proceed ahead and gets in while loop saying... "TypeError: browser has no properties" Any ideas? Is this java script error? Could any one provide me any pointers to get going. Googling on this error message did not help. Thanks and Regards, Manish Chris McMahon wrote: > On 7/7/06, Manish Sapariya wrote: > >> Hi, >> Has anyone tried running firewatir on linux? >> I went through the code and looks like it wont >> run under linux because references to win32ole >> and autoit libraries. >> > > Dave Hoover got it running on a Mac. Search in the archives for > "Firewatir on Intel Mac". > -Chris > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From Adrian.Rutter at tnt.com Mon Jul 10 10:30:31 2006 From: Adrian.Rutter at tnt.com (Adrian Rutter) Date: Mon, 10 Jul 2006 15:30:31 +0100 Subject: [Wtr-general] Watir Framework Message-ID: Bret wrote > I got a lot of ideas from the Systir testing framework, although i > ended up not actually using this library. I am also making heavy use > of Rspec. Several articles on writing DSLs in Ruby were also helpful. Would there be any chance of publishing these ideas, for example on a blog or something? I myself had problems following Systir. Cheers Aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- From Mark_Cain at RL.gov Mon Jul 10 11:19:59 2006 From: Mark_Cain at RL.gov (Cain, Mark) Date: Mon, 10 Jul 2006 08:19:59 -0700 Subject: [Wtr-general] Error running 1.5.1.1053 Message-ID: After installing 1.5.1.1053 I get this error: C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1459: undefined method `exists' for class `Watir::IE' (NameError) from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require' from C:\watir_bonus\working\setup.rb:2 from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require' What am I doing wrong? ____________________ Mark L. Cain LMIT - E*STARS(r) ~ Lead Test Engineer 1981 Snyder, MSIN: G3-62, Richland, WA 99354 Mark_Cain at RL.gov 509.376.5458 "640 Kilobytes of computer memory ought to be enough for anybody." - Bill Gates, 1981 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060710/0002edc0/attachment.html From bret at pettichord.com Mon Jul 10 11:54:54 2006 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 10 Jul 2006 10:54:54 -0500 Subject: [Wtr-general] Watir Framework In-Reply-To: References: Message-ID: On 7/10/06, Adrian Rutter wrote: > > Bret wrote > > > I got a lot of ideas from the Systir testing framework, although i > > ended up not actually using this library. I am also making heavy use > > of Rspec. Several articles on writing DSLs in Ruby were also helpful. > > Would there be any chance of publishing these ideas, for example on a blog > or something? > I myself had problems following Systir. So did i. There were some examples in their docs that their framework didn't support. I had to ask the authors for details on how to make them work. I've been collecting notes for an article about the framework i'm building. I just haven't had the time yet. Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060710/9789c2df/attachment.html From Adrian.Rutter at tnt.com Mon Jul 10 13:20:52 2006 From: Adrian.Rutter at tnt.com (Adrian Rutter) Date: Mon, 10 Jul 2006 18:20:52 +0100 Subject: [Wtr-general] Watir Framework Message-ID: Brett wrote, > I've been collecting notes for an article about the framework I'm building. I just haven't had the time yet. Well keep up the excellent work. I was at an agile metrics design course in London on Thursday and a couple of heads of IT were very interested in Watir\Ruby. It is still quite surprising how much GUI browser testing is still manual. Aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- From manishs at reconnex.net Mon Jul 10 13:21:19 2006 From: manishs at reconnex.net (Manish Sapariya) Date: Mon, 10 Jul 2006 22:51:19 +0530 Subject: [Wtr-general] Watir ran on Linux Fedora Core 5 Message-ID: <44B28C8F.1090706@reconnex.net> Hi All, Dave provided me following xpi for jssh and FireWatir worked as expected on - Fedora Core - Firefox 1.5.0.1. http://people.mozilla.com/~davel/jssh/jssh-Linux-1.5.0.x.xpi Thanks to Dave for providing me the xpi. Currently I could only run links_xpath_test.rb. I haven't tried any other test though. Next step for me to get the javascript_test.rb working which involves clicking on the dialog boxes. Current solution I am planning to implement is to click on the dialog boxes using external process using dogtail testscripts, like watir 1.4. Dogtail is in python. I googled around to search for something ruby, but in vain. Any suggestion will be of great help. Thanks and Regards, Manish From bret at pettichord.com Mon Jul 10 14:09:53 2006 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 10 Jul 2006 13:09:53 -0500 Subject: [Wtr-general] Error running 1.5.1.1053 In-Reply-To: References: Message-ID: Sorry about that. I just committed a fix. See 1.5.1.1054. Bret On 7/10/06, Cain, Mark wrote: > > After installing 1.5.1.1053 I get this error: > > * > > C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1459 > *: undefined method `exists' for class `Watir::IE' (NameError) > > from > *C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21*:in > `require' > > from > *C:\watir_bonus\working\setup.rb:2* > > from > *C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21*:in > `require' > > What am I doing wrong? > > ____________________ > *Mark L. Cain* > *LMIT - **E*****STARS*(r)* **~ **Lead Test Engineer* > *1981 Snyder, MSIN: G3-62, Richland, WA 99354** > Mark_Cain at RL.gov > 509.376.5458* > *"640 Kilobytes of computer memory ought to be enough for anybody."** - > Bill Gates, 1981 *** > > * * > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060710/d0c382e1/attachment.html From ChintakrindiMeghana at managementdynamics.com Mon Jul 10 14:26:38 2006 From: ChintakrindiMeghana at managementdynamics.com (Chintakrindi Meghanath ) Date: Mon, 10 Jul 2006 14:26:38 -0400 Subject: [Wtr-general] Watir Framework Message-ID: <6CF3AA425295C7479483AC0018EDF98B01DAE138@MI8NYCMAIL03.Mi8.com> Hi Bret Is it very beneficial if we integrate watir with SAFS ? I have two concerns with SAFS. i) It seems to be slower (compared to watir) when executing the scripts. Suppose if we integrate, can we maintain the same speed of execution ? ii)The data files (input files) are the text files.Its tedious for user to enter the test files. If the input is from xls/csv its better. So, my question is cant, we develop that type of framework only with watir/ruby and not dependant on any other framework. Thanks Meghanath From FLegarreta at NYBOT.com Mon Jul 10 15:22:01 2006 From: FLegarreta at NYBOT.com (Legarreta, Frank) Date: Mon, 10 Jul 2006 15:22:01 -0400 Subject: [Wtr-general] Help! My database query works, my logic does not... Message-ID: <3111B45C4B9CE54C86294493C8C7E197041E4FF7@mailserver.nybot.com> Regardless of whether "testval" (in this case ASDF1234) is in the database, the conditional logic always returns true. The select statement is working, but I think the syntax of my if/else conditional logic is incorrect. ________________________________ require "dbi" $testval='ASDF1234' dbh = DBI.connect("dbi:ODBC:QAdatabase", "user", "password") $search = dbh.select_all("SELECT T_COLUMN FROM QA.TEMP_TABLE WHERE T_COLUMN = '#{$testval}' " ) if ( $testval = $search ) puts "test value in the database" else puts "test value is NOT in the database" end "This e-mail and any attachments may contain confidential and privileged information. Any dissemination or use of the information by a person other than the intended recipient is unauthorized and may be illegal. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this e-mail and destroy any copies. Although this e-mail and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by the Board of Trade of the City of New York, Inc. or the New York Clearing Corporation for any loss or damage arising in any way from its use. Thank you." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060710/8ca8a93c/attachment.html From bret at pettichord.com Mon Jul 10 15:25:13 2006 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 10 Jul 2006 14:25:13 -0500 Subject: [Wtr-general] Watir Framework In-Reply-To: <6CF3AA425295C7479483AC0018EDF98B01DAE138@MI8NYCMAIL03.Mi8.com> References: <6CF3AA425295C7479483AC0018EDF98B01DAE138@MI8NYCMAIL03.Mi8.com> Message-ID: On 7/10/06, Chintakrindi Meghanath < ChintakrindiMeghana at managementdynamics.com> wrote: > > Hi Bret > > Is it very beneficial if we integrate watir with SAFS ? > I have two concerns with SAFS. > > i) It seems to be slower (compared to watir) when executing the > scripts. > Suppose if we integrate, can we maintain the same speed of > execution ? > > ii)The data files (input files) are the text files.Its tedious for > user to enter the test files. > If the input is from xls/csv its better. > > So, my question is cant, we develop that type of framework only with > watir/ruby and not dependant on any other framework. > > Thanks > Meghanath It is fairly difficult to develop testing frameworks in the scripting languages used by many testing tools. This is one of the reasons why SAFS was developed. I believe it was developed in VB or C or C++ and then made available via DLL and COM API's. Ruby is a great language for developing frameworks. Arguably better than VB or C or C++. Many people have developed data-driven testing frameworks in Ruby for Watir. I can see two reasons for directly using SAFS with Watir. 1. You like the way SAFS is structured. 2. You already have a lot of tests already in SAFS, but want to now execute them with Watir. It doesn't sound like either of these is true for you. Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060710/98d540a7/attachment.html From paul.rogers at shaw.ca Mon Jul 10 15:32:03 2006 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 10 Jul 2006 13:32:03 -0600 Subject: [Wtr-general] Help! My database query works, my logic does not... In-Reply-To: <3111B45C4B9CE54C86294493C8C7E197041E4FF7@mailserver.nybot.com> References: <3111B45C4B9CE54C86294493C8C7E197041E4FF7@mailserver.nybot.com> Message-ID: if ( $testval = $search ) should be if ( $testval == $search ) there may be other problems too - do you need to specify which row column the value comes from? ( I cant remeber how this works off the top of my head) ie - perhaps it also needs to be, where [0][0] is the row and column number from the result set if ( $testval[0][0] == $search ) -------------- next part -------------- Regardless of whether "testval" (in this case ASDF1234) is in the database, the conditional logic always returns true. The select statement is working, but I think the syntax of my if/else conditional logic is incorrect. ________________________________ require "dbi" $testval='ASDF1234' dbh = DBI.connect("dbi:ODBC:QAdatabase", "user", "password") $search = dbh.select_all("SELECT T_COLUMN FROM QA.TEMP_TABLE WHERE T_COLUMN = '#{$testval}' " ) if ( $testval = $search ) puts "test value in the database" else puts "test value is NOT in the database" end "This e-mail and any attachments may contain confidential and privileged information. Any dissemination or use of the information by a person other than the intended recipient is unauthorized and may be illegal. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this e-mail and destroy any copies. Although this e-mail and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by the Board of Trade of the City of New York, Inc. or the New York Clearing Corporation for any loss or damage arising in any way from its use. Thank you." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060710/0ace7ac5/attachment.html -------------- next part -------------- _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From christopher.mcmahon at gmail.com Mon Jul 10 15:39:55 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 10 Jul 2006 12:39:55 -0700 Subject: [Wtr-general] Help! My database query works, my logic does not... In-Reply-To: <3111B45C4B9CE54C86294493C8C7E197041E4FF7@mailserver.nybot.com> References: <3111B45C4B9CE54C86294493C8C7E197041E4FF7@mailserver.nybot.com> Message-ID: <72799cd70607101239s66d7f8e6q5c8d49dfcf5176ff@mail.gmail.com> The most likely source of the problem is that you are assigning, not checking equality. You have if ( $testval = $search ) and you should have if $testval == $search BTW, do you really need those to be global variables? Or are you a Perl refugee? :) Also, make sure you know what DBI is returning. I use ODBC not DBI, but ODBC returns an Array of Arrays (AoA) where the first value in the array is the column *name* and the second value is the column *value*. So if I have a table tablex -------------------------- column1 column2 ------------ ------------ 123 abc 456 def and I do SELECT * FROM tablex WHERE column1 = '123' what comes back is [['column1','column2'],['123','abc']] I suggest you also do a 'puts $search' to see what's really coming back. -Chris On 7/10/06, Legarreta, Frank wrote: > > > > > Regardless of whether "testval" (in this case ASDF1234) is in the database, > the conditional logic always returns true. > > The select statement is working, but I think the syntax of my if/else > conditional logic is incorrect. > > > > > ________________________________ > > > require "dbi" > > $testval='ASDF1234' > > dbh = DBI.connect("dbi:ODBC:QAdatabase", "user", "password") > > $search = dbh.select_all("SELECT T_COLUMN FROM QA.TEMP_TABLE WHERE T_COLUMN > = '#{$testval}' " ) > > > > if ( $testval = $search ) > > puts "test value in the database" > > else > > puts "test value is NOT in the database" > > end > > > > > > > > > "This e-mail and any attachments may contain confidential and privileged > information. Any dissemination or use of the information by a person other > than the intended recipient is unauthorized and may be illegal. If you are > not the intended recipient, please notify the sender immediately by return > e-mail, delete this e-mail and destroy any copies. Although this e-mail and > any attachments are believed to be free of any virus or other defect that > might affect any computer system into which it is received and opened, it is > the responsibility of the recipient to ensure that it is virus free and no > responsibility is accepted by the Board of Trade of the City of New York, > Inc. or the New York Clearing Corporation for any loss or damage arising in > any way from its use. Thank you." > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > From ChintakrindiMeghana at managementdynamics.com Mon Jul 10 15:48:37 2006 From: ChintakrindiMeghana at managementdynamics.com (Chintakrindi Meghanath ) Date: Mon, 10 Jul 2006 15:48:37 -0400 Subject: [Wtr-general] Watir Framework Message-ID: <6CF3AA425295C7479483AC0018EDF98B01DAE13B@MI8NYCMAIL03.Mi8.com> Hi Bret You are absoulutely right. In fact I agree with both the points. It is well structured and also most of the scripts (text files) were generated. But as I mentioned my concerns are excecution speed (not as speed as watir) and input files (taking input from xls/csv instead of text fiels). Even I raised these questions in the SAFS discussion forum. And also , I think it has dependencies with other frameworks like STAF etc. Thanks Meghanath -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Bret Pettichord Sent: Monday, July 10, 2006 3:25 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Watir Framework On 7/10/06, Chintakrindi Meghanath < ChintakrindiMeghana at managementdynamics.com> wrote: Hi Bret Is it very beneficial if we integrate watir with SAFS ? I have two concerns with SAFS. i) It seems to be slower (compared to watir) when executing the scripts. Suppose if we integrate, can we maintain the same speed of execution ? ii)The data files (input files) are the text files.Its tedious for user to enter the test files. If the input is from xls/csv its better. So, my question is cant, we develop that type of framework only with watir/ruby and not dependant on any other framework. Thanks Meghanath It is fairly difficult to develop testing frameworks in the scripting languages used by many testing tools. This is one of the reasons why SAFS was developed. I believe it was developed in VB or C or C++ and then made available via DLL and COM API's. Ruby is a great language for developing frameworks. Arguably better than VB or C or C++. Many people have developed data-driven testing frameworks in Ruby for Watir. I can see two reasons for directly using SAFS with Watir. 1. You like the way SAFS is structured. 2. You already have a lot of tests already in SAFS, but want to now execute them with Watir. It doesn't sound like either of these is true for you. Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060710/e62e98b0/attachment.html From FLegarreta at NYBOT.com Mon Jul 10 15:56:19 2006 From: FLegarreta at NYBOT.com (Legarreta, Frank) Date: Mon, 10 Jul 2006 15:56:19 -0400 Subject: [Wtr-general] Help! My database query works, my logic does not... Message-ID: <3111B45C4B9CE54C86294493C8C7E197041E4FFB@mailserver.nybot.com> Paul, I tried both the "==" and [0][0] and now I get the opposite effect. The search now comes up false regardless of whether the testvalue exists in the database. Frank Re: [Wtr-general] Help! My database query works, my logic does not... Paul Rogers Mon, 10 Jul 2006 12:33:09 -0700 if ( $testval = $search ) should be if ( $testval == $search ) there may be other problems too - do you need to specify which row column the value comes from? ( I cant remeber how this works off the top of my head) ie - perhaps it also needs to be, where [0][0] is the row and column number from the result set if ( $testval[0][0] == $search ) Regardless of whether "testval" (in this case ASDF1234) is in the database, the conditional logic always returns true. The select statement is working, but I think the syntax of my if/else conditional logic is incorrect. ------------------------------------------------------------------------ -------- "This e-mail and any attachments may contain confidential and privileged information. Any dissemination or use of the information by a person other than the intended recipient is unauthorized and may be illegal. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this e-mail and destroy any copies. Although this e-mail and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by the Board of Trade of the City of New York, Inc. or the New York Clearing Corporation for any loss or damage arising in any way from its use. Thank you." From mtownley at firstlook.biz Mon Jul 10 16:15:00 2006 From: mtownley at firstlook.biz (Mike Townley) Date: Mon, 10 Jul 2006 15:15:00 -0500 Subject: [Wtr-general] Help! My database query works, my logic does not... Message-ID: <91E302EA72562F43AEDC06DD8FAE7D364C2743@ord1mail01.firstlook.biz> if ( $testval[0][0] == $search ) Should be: If ( $testval == $search[0][0]) Not the other way around. $search is your results set as per this line of code: $search = dbh.select_all("SELECT T_COLUMN FROM QA.TEMP_TABLE WHERE T_COLUMN = '#{$testval}' " ) here is a usefull little excerpt from http://www.kitebird.com/articles/rubydbi.html#TOC_10 [excerpt] row = dbh.select_one(statement) rows = dbh.select_all(statement) select_one executes a query and returns the first row as an array, or nil if the query returns no rows. select_all returns an array of DBI::Row objects. (You can access the contents of these objects as discussed earlier.) The array will be empty if the query returns no rows. [/excerpt] - Mike -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Legarreta, Frank Sent: Monday, July 10, 2006 2:56 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Help! My database query works, my logic does not... Paul, I tried both the "==" and [0][0] and now I get the opposite effect. The search now comes up false regardless of whether the testvalue exists in the database. Frank Re: [Wtr-general] Help! My database query works, my logic does not... Paul Rogers Mon, 10 Jul 2006 12:33:09 -0700 if ( $testval = $search ) should be if ( $testval == $search ) there may be other problems too - do you need to specify which row column the value comes from? ( I cant remeber how this works off the top of my head) ie - perhaps it also needs to be, where [0][0] is the row and column number from the result set if ( $testval[0][0] == $search ) Regardless of whether "testval" (in this case ASDF1234) is in the database, the conditional logic always returns true. The select statement is working, but I think the syntax of my if/else conditional logic is incorrect. ------------------------------------------------------------------------ -------- "This e-mail and any attachments may contain confidential and privileged information. Any dissemination or use of the information by a person other than the intended recipient is unauthorized and may be illegal. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this e-mail and destroy any copies. Although this e-mail and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by the Board of Trade of the City of New York, Inc. or the New York Clearing Corporation for any loss or damage arising in any way from its use. Thank you." _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From David.J.Solis at wellsfargo.com Mon Jul 10 17:03:04 2006 From: David.J.Solis at wellsfargo.com (David.J.Solis at wellsfargo.com) Date: Mon, 10 Jul 2006 16:03:04 -0500 Subject: [Wtr-general] Can I get rid of the Can I get rid of the "This page contains both secure and nonsecure items" warning? warning? Message-ID: <493148DCF171954FBBF8E8AAB261638C0575BC@msgswbmnmsp35.wellsfargo.com> Hello, I'm testing on a QA site that keeps giving me that annoying "This page contains both secure and nonsecure items" that keeps interfering with my scripts. Now I know because of the environment I'm working in I will be accessing secure and nonsecure sites causing this message to appear, so my solution is to dismiss the dialog box from within my scripts. So far I've tried all the tricks I've learned since I started using WATIR for handling popup messages, but I've had no success. Has anybody encountered this problem before? Has anybody successfully been able to dismiss this dialog box? Thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060710/b574abe8/attachment.html From FLegarreta at NYBOT.com Mon Jul 10 17:09:05 2006 From: FLegarreta at NYBOT.com (Legarreta, Frank) Date: Mon, 10 Jul 2006 17:09:05 -0400 Subject: [Wtr-general] wtr-general@rubyforge.org Message-ID: <3111B45C4B9CE54C86294493C8C7E197041E4FFC@mailserver.nybot.com> Mike Thank's for the info. OK. Now, if "$testval" is found, I get the expected result, however, if "$testval" is NOT found in the table I get the following error; >ruby DUPQ.rb DUPQ.rb:6: undefined method `[]' for nil:NilClass (NoMethodError) >Exit code: 1 "This e-mail and any attachments may contain confidential and privileged information. Any dissemination or use of the information by a person other than the intended recipient is unauthorized and may be illegal. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this e-mail and destroy any copies. Although this e-mail and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by the Board of Trade of the City of New York, Inc. or the New York Clearing Corporation for any loss or damage arising in any way from its use. Thank you." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060710/b0eecce7/attachment.html From christopher.mcmahon at gmail.com Mon Jul 10 17:16:40 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 10 Jul 2006 14:16:40 -0700 Subject: [Wtr-general] wtr-general@rubyforge.org In-Reply-To: <3111B45C4B9CE54C86294493C8C7E197041E4FFC@mailserver.nybot.com> References: <3111B45C4B9CE54C86294493C8C7E197041E4FFC@mailserver.nybot.com> Message-ID: <72799cd70607101416y428fdcb9sa7fbfa6d7f81fd2b@mail.gmail.com> Use a begin/rescue, or even better, and assert_equal() statement instead of the if() that you have. Ruby won't let you operate on an object that does not exist. -Chris On 7/10/06, Legarreta, Frank wrote: > > > > > Mike > > > > Thank's for the info. OK. Now, if "$testval" is found, I get the expected > result, however, if "$testval" is NOT found in the table I get the following > error; > > > > >ruby DUPQ.rb > > DUPQ.rb:6: undefined method `[]' for nil:NilClass (NoMethodError) > > >Exit code: 1 > > "This e-mail and any attachments may contain confidential and privileged > information. Any dissemination or use of the information by a person other > than the intended recipient is unauthorized and may be illegal. If you are > not the intended recipient, please notify the sender immediately by return > e-mail, delete this e-mail and destroy any copies. Although this e-mail and > any attachments are believed to be free of any virus or other defect that > might affect any computer system into which it is received and opened, it is > the responsibility of the recipient to ensure that it is virus free and no > responsibility is accepted by the Board of Trade of the City of New York, > Inc. or the New York Clearing Corporation for any loss or damage arising in > any way from its use. Thank you." > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > From FLegarreta at NYBOT.com Mon Jul 10 17:22:30 2006 From: FLegarreta at NYBOT.com (Legarreta, Frank) Date: Mon, 10 Jul 2006 17:22:30 -0400 Subject: [Wtr-general] Help! My database query works, my logic does not... Message-ID: <3111B45C4B9CE54C86294493C8C7E197041E4FFD@mailserver.nybot.com> Mike Thank's for the info. OK. Now, if "$testval" is found, I get the expected result, however, if "$testval" is NOT found in the table I get the following error; >ruby DUPQ.rb DUPQ.rb:6: undefined method `[]' for nil:NilClass (NoMethodError) >Exit code: 1 "This e-mail and any attachments may contain confidential and privileged information. Any dissemination or use of the information by a person other than the intended recipient is unauthorized and may be illegal. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this e-mail and destroy any copies. Although this e-mail and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by the Board of Trade of the City of New York, Inc. or the New York Clearing Corporation for any loss or damage arising in any way from its use. Thank you." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060710/53bafdc0/attachment.html From lonny at titanez.net Mon Jul 10 17:27:10 2006 From: lonny at titanez.net (Lonny Eachus) Date: Mon, 10 Jul 2006 14:27:10 -0700 Subject: [Wtr-general] Can I get rid of the "This page contains both secure and nonsecure items" In-Reply-To: References: Message-ID: <44B2C62E.8020506@titanez.net> An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060710/5ad5e7a1/attachment.html From charley.baker at gmail.com Mon Jul 10 17:31:30 2006 From: charley.baker at gmail.com (Charley Baker) Date: Mon, 10 Jul 2006 15:31:30 -0600 Subject: [Wtr-general] Can I get rid of the Can I get rid of the "This page contains both secure and nonsecure items" warning? warning? In-Reply-To: <493148DCF171954FBBF8E8AAB261638C0575BC@msgswbmnmsp35.wellsfargo.com> References: <493148DCF171954FBBF8E8AAB261638C0575BC@msgswbmnmsp35.wellsfargo.com> Message-ID: You might try reducing your security permissions in ie, modifying the security settings in the advanced tab or include the domains as trusted sites in IE's settings. I'd go backwards to forwards on my suggestions. -Charley On 7/10/06, David.J.Solis at wellsfargo.com wrote: > > Hello, > > I'm testing on a QA site that keeps giving me that annoying "This page > contains both secure and nonsecure items" that keeps interfering with my > scripts. Now I know because of the environment I'm working in I will be > accessing secure and nonsecure sites causing this message to appear, so my > solution is to dismiss the dialog box from within my scripts. So far I've > tried all the tricks I've learned since I started using WATIR for handling > popup messages, but I've had no success. > > Has anybody encountered this problem before? Has anybody successfully been > able to dismiss this dialog box? > > Thanks in advance. > > _______________________________________________ > 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/20060710/cd8b2b5f/attachment.html From davids at tower-mt.com Mon Jul 10 17:49:18 2006 From: davids at tower-mt.com (David Schmidt) Date: Mon, 10 Jul 2006 14:49:18 -0700 Subject: [Wtr-general] Running Watir under Wine/CrossOver Office? Message-ID: <44B2CB5E.8030301@tower-mt.com> I've seen comments here and there on the net about folks running Watir under Wine or CrossOver Office. I've been trying both and have been having some problems. I've installed the latest Ruby one-click-installer and added c:\ruby\bin to the Wine path, and confirmed that path: $ wine ruby -e "puts \"#{ENV[\'PATH\']}\"" C:\Windows;C:\Windows\System;C:\ruby\bin While Wine can find C:\ruby\bin\ruby.exe using that path, Ruby isn't able to locate commands using the same path, like IRB or GEM. I was able to get gem to work by using the full path to the gem command ("wine ruby 'C:\ruby\bin\gem' list")and was able to get into IRB using wcmd. Has anyone else been running Watir under Wine that could give me some pointers on how to get Ruby and Watir configured correctly to run under Wine or CrossOver Office? David From angrez at gmail.com Tue Jul 11 01:33:30 2006 From: angrez at gmail.com (Angrez Singh) Date: Tue, 11 Jul 2006 11:03:30 +0530 Subject: [Wtr-general] Watir ran on Linux Fedora Core 5 In-Reply-To: <44B28C8F.1090706@reconnex.net> References: <44B28C8F.1090706@reconnex.net> Message-ID: Hi Manish, Its a great news that you were able to run FireWatir on Linux. As far as I know you can run FireWatir on any platform by removing the code that access Win32 objects, or that uses Win32 API for clicking on the dialogs. I was able to run it on MAC here by including this code only when required i.e. I include the code only when a new instance of IE is created. So theoretically it is possible to run FireWatir on any platform. The only problem is what you are facing right now i.e. how to click the dialog boxes on that particular platform? Once we find solution to this, WATiR can be made a multi-platform testing tool. Regards, Angrez On 7/10/06, Manish Sapariya wrote: > > Hi All, > > Dave provided me following xpi for jssh and FireWatir worked as expected > on > - Fedora Core > - Firefox 1.5.0.1. > > http://people.mozilla.com/~davel/jssh/jssh-Linux-1.5.0.x.xpi > > Thanks to Dave for providing me the xpi. > Currently I could only run links_xpath_test.rb. > I haven't tried any other test though. > Next step for me to get the javascript_test.rb working which > involves clicking on the dialog boxes. > > Current solution I am planning to implement is to click on the > dialog boxes using external process using dogtail testscripts, > like watir 1.4. > > Dogtail is in python. I googled around to search for something > ruby, but in vain. > Any suggestion will be of great help. > Thanks and Regards, > Manish > > > _______________________________________________ > 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/20060711/45b3efff/attachment.html From rodrigo.martin at enratio.com Tue Jul 11 08:47:37 2006 From: rodrigo.martin at enratio.com (Rodrigo Julian Martin) Date: Tue, 11 Jul 2006 09:47:37 -0300 Subject: [Wtr-general] Can I get rid of the Can I get rid of the "This pagecontains both secure and nonsecure items" warning? warning? Message-ID: Hello David! I was facing the same problem in my tests, why don't you try installing WET? It has great support for handling modal popups like these... An example of code using WET: $browser_wet=Browser.new() $browser_wet.goto(url, OUTOFPROCESS) #If the popup appears at load time, use this.. $browser_wet.Dialog("title:=Security Alert").Button("index:=1").click If the popup appears after clicking a link, button or image, use sentences like this: browser_wet.Link("text:=Open Security Popup").click_without_blocking browser_wet.Dialog("title:=Security Alert").Button("index:=1").click Hope this help, try it out... I guess latest Watir have support for this kind of popup too, but I'm not sure because I couldn't upgrade to 1.5 yet. Cheers! Rodrigo Julian Martin ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of David.J.Solis at wellsfargo.com Sent: Lunes, 10 de Julio de 2006 06:03 p.m. To: wtr-general at rubyforge.org Subject: [Wtr-general] Can I get rid of the Can I get rid of the "This pagecontains both secure and nonsecure items" warning? warning? Hello, I'm testing on a QA site that keeps giving me that annoying "This page contains both secure and nonsecure items" that keeps interfering with my scripts. Now I know because of the environment I'm working in I will be accessing secure and nonsecure sites causing this message to appear, so my solution is to dismiss the dialog box from within my scripts. So far I've tried all the tricks I've learned since I started using WATIR for handling popup messages, but I've had no success. Has anybody encountered this problem before? Has anybody successfully been able to dismiss this dialog box? Thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060711/afbba583/attachment.html From dave.hoover at gmail.com Tue Jul 11 09:24:58 2006 From: dave.hoover at gmail.com (Dave Hoover) Date: Tue, 11 Jul 2006 08:24:58 -0500 Subject: [Wtr-general] Watir ran on Linux Fedora Core 5 Message-ID: <11c8704e0607110624p7f71ec44j203de676425ca464@mail.gmail.com> Angrez said: > So theoretically it is possible to run FireWatir on any platform. The only > problem is what you are facing right now i.e. how to click the dialog boxes > on that particular platform? Once we find solution to this, WATiR can be > made a multi-platform testing tool. Speaking of multi-platform, I've made some good progress on SafariWatir. Anyone interested in helping out with this? I'm using Applescript's "do JavaScript" method to make it work. --Dave From angrez at gmail.com Tue Jul 11 11:10:02 2006 From: angrez at gmail.com (Angrez Singh) Date: Tue, 11 Jul 2006 20:40:02 +0530 Subject: [Wtr-general] Watir ran on Linux Fedora Core 5 In-Reply-To: <11c8704e0607110624p7f71ec44j203de676425ca464@mail.gmail.com> References: <11c8704e0607110624p7f71ec44j203de676425ca464@mail.gmail.com> Message-ID: Hi Dave, Let me know what help you need. Regards, Angrez On 7/11/06, Dave Hoover wrote: > > Angrez said: > > So theoretically it is possible to run FireWatir on any platform. The > only > > problem is what you are facing right now i.e. how to click the dialog > boxes > > on that particular platform? Once we find solution to this, WATiR can be > > made a multi-platform testing tool. > > Speaking of multi-platform, I've made some good progress on > SafariWatir. Anyone interested in helping out with this? I'm using > Applescript's "do JavaScript" method to make it work. > > --Dave > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060711/9f4ec60e/attachment.html From bret at pettichord.com Tue Jul 11 12:18:05 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 11 Jul 2006 11:18:05 -0500 Subject: [Wtr-general] Can I get rid of the Can I get rid of the "This pagecontains both secure and nonsecure items" warning? warning? In-Reply-To: References: Message-ID: On 7/11/06, Rodrigo Julian Martin wrote: > > I guess latest Watir have support for this kind of popup too, but I'm not > sure because I couldn't upgrade to 1.5 yet. > Still on our to-do list. I mostly keep putting it off because i always find it easier to just avoid the popups in the first place. Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060711/51311542/attachment.html From mtownley at firstlook.biz Tue Jul 11 14:39:57 2006 From: mtownley at firstlook.biz (Mike Townley) Date: Tue, 11 Jul 2006 13:39:57 -0500 Subject: [Wtr-general] assert_arrayEquals Message-ID: <91E302EA72562F43AEDC06DD8FAE7D364C2748@ord1mail01.firstlook.biz> I have some test scripts that have been here before I started. After upgrading to 1.5 from 1.4 I get the following errors in my test scripts NoMethodError: undefined method `assert_arrayEquals' for # Is there a way to get that method back? Or can I replace it easily with another method? It is used in a whole bunch of places and I would love to be able to basically do a find and replace on it. Any help would be great. Thanks Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060711/699ab83d/attachment.html From christopher.mcmahon at gmail.com Tue Jul 11 15:14:15 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 11 Jul 2006 12:14:15 -0700 Subject: [Wtr-general] assert_arrayEquals In-Reply-To: <91E302EA72562F43AEDC06DD8FAE7D364C2748@ord1mail01.firstlook.biz> References: <91E302EA72562F43AEDC06DD8FAE7D364C2748@ord1mail01.firstlook.biz> Message-ID: <72799cd70607111214j59ac50f2jc0afbbe9a721be65@mail.gmail.com> You could write your own, but the coolest way I know to do this is like require 'test/unit' class Foo < Test::Unit::TestCase def test_foo array_1 = [1,2,3] array_2 = [1,2,3] assert_equal(array_1 - array_2 ,[]) end end On 7/11/06, Mike Townley wrote: > > > > > I have some test scripts that have been here before I started. After > upgrading to 1.5 from 1.4 I get the following errors in my test scripts > > NoMethodError: undefined method `assert_arrayEquals' for > # > > > > Is there a way to get that method back? Or can I replace it easily with > another method? It is used in a whole bunch of places and I would love to be > able to basically do a find and replace on it. > > > > Any help would be great. > > > > Thanks > > Mike > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > From dave.hoover at gmail.com Tue Jul 11 15:22:21 2006 From: dave.hoover at gmail.com (Dave Hoover) Date: Tue, 11 Jul 2006 14:22:21 -0500 Subject: [Wtr-general] assert_arrayEquals In-Reply-To: <72799cd70607111214j59ac50f2jc0afbbe9a721be65@mail.gmail.com> References: <91E302EA72562F43AEDC06DD8FAE7D364C2748@ord1mail01.firstlook.biz> <72799cd70607111214j59ac50f2jc0afbbe9a721be65@mail.gmail.com> Message-ID: <11c8704e0607111222v466004a0sc4b3895f3012af04@mail.gmail.com> On 7/11/06, Chris McMahon wrote: > You could write your own, but the coolest way I know to do this is like > > require 'test/unit' > > class Foo < Test::Unit::TestCase > def test_foo > array_1 = [1,2,3] > array_2 = [1,2,3] > > assert_equal(array_1 - array_2 ,[]) That doesn't quite cut it. Check this out... irb(main):001:0> a = [1, 2] => [1, 2] irb(main):002:0> b = [1, 2, 3] => [1, 2, 3] irb(main):003:0> a - b => [] From christopher.mcmahon at gmail.com Tue Jul 11 15:26:14 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 11 Jul 2006 12:26:14 -0700 Subject: [Wtr-general] assert_arrayEquals In-Reply-To: <11c8704e0607111222v466004a0sc4b3895f3012af04@mail.gmail.com> References: <91E302EA72562F43AEDC06DD8FAE7D364C2748@ord1mail01.firstlook.biz> <72799cd70607111214j59ac50f2jc0afbbe9a721be65@mail.gmail.com> <11c8704e0607111222v466004a0sc4b3895f3012af04@mail.gmail.com> Message-ID: <72799cd70607111226p85c9982nbc0f3213fa1b226b@mail.gmail.com> Dang. I didn't think of that. I've got some refactoring to do. :) This'd work though: require 'test/unit' class Foo < Test::Unit::TestCase def test_foo array_1 = [1,2,3] array_2 = [1,2,3] assert_equal(array_1 - array_2 ,[]) assert_equal(array_2 - array_1 ,[]) From mtownley at firstlook.biz Tue Jul 11 16:32:04 2006 From: mtownley at firstlook.biz (Mike Townley) Date: Tue, 11 Jul 2006 15:32:04 -0500 Subject: [Wtr-general] assert_arrayEquals Message-ID: <91E302EA72562F43AEDC06DD8FAE7D364C2749@ord1mail01.firstlook.biz> Thank you for the alternative methods. Can anyone shed some light on why it was removed in the first place? This really complicates things. I wasn't expecting all this rewriting after upgrading watir. Otherwise I would have stuck with 1.4 Mike -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: Tuesday, July 11, 2006 2:26 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] assert_arrayEquals Dang. I didn't think of that. I've got some refactoring to do. :) This'd work though: require 'test/unit' class Foo < Test::Unit::TestCase def test_foo array_1 = [1,2,3] array_2 = [1,2,3] assert_equal(array_1 - array_2 ,[]) assert_equal(array_2 - array_1 ,[]) _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From lonny at titanez.net Tue Jul 11 16:40:30 2006 From: lonny at titanez.net (Lonny Eachus) Date: Tue, 11 Jul 2006 13:40:30 -0700 Subject: [Wtr-general] Accessing Session Information In-Reply-To: References: Message-ID: <44B40CBE.1090807@titanez.net> We have been using multiple instances if IE so that we can run multiple instances of our programs simultaneously. There are various issues this raises, and until now we have been getting along with them, but now some are starting to get a bit sticky. I would like to know how to access any and all available session information that can be gleaned via Watir. I saw an old reference to "ie.ie.cookie", but this no longer works. I was able to get ie.document.cookie, but that does not look quite like what I expected. Any information on how to get as much session information as I can from Watir would be appreciated. Lonny Eachus ========== From christopher.mcmahon at gmail.com Tue Jul 11 16:53:28 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 11 Jul 2006 13:53:28 -0700 Subject: [Wtr-general] assert_arrayEquals In-Reply-To: <91E302EA72562F43AEDC06DD8FAE7D364C2749@ord1mail01.firstlook.biz> References: <91E302EA72562F43AEDC06DD8FAE7D364C2749@ord1mail01.firstlook.biz> Message-ID: <72799cd70607111353r737ceafdpa67fdbb8c4b8238c@mail.gmail.com> On 7/11/06, Mike Townley wrote: > Thank you for the alternative methods. Can anyone shed some light on why > it was removed in the first place? This really complicates things. I > wasn't expecting all this rewriting after upgrading watir. Otherwise I > would have stuck with 1.4 I think it wasn't implemented very well. It's not part of the regular 'test/unit' code. Somebody (Paul, I think) built it for convenience in testing Watir itself. It wasn't really intended to be a part of normal, regular test/unit type tests. I can't remember what the issue was, though. Seriously, though, you could absolutely write your own-- just add it to the 'test/unit.rb' code or add it somewhere in the Watir 'require', and you'll be ready to go. And, your very own assert_array_equals will behave exactly like you want it to, because you wrote it. From christopher.mcmahon at gmail.com Tue Jul 11 16:56:03 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 11 Jul 2006 13:56:03 -0700 Subject: [Wtr-general] assert_arrayEquals In-Reply-To: <72799cd70607111226p85c9982nbc0f3213fa1b226b@mail.gmail.com> References: <91E302EA72562F43AEDC06DD8FAE7D364C2748@ord1mail01.firstlook.biz> <72799cd70607111214j59ac50f2jc0afbbe9a721be65@mail.gmail.com> <11c8704e0607111222v466004a0sc4b3895f3012af04@mail.gmail.com> <72799cd70607111226p85c9982nbc0f3213fa1b226b@mail.gmail.com> Message-ID: <72799cd70607111356r11d9deb6u7e4d9422fe8d4762@mail.gmail.com> I took a look at some of my actual tests, and this handles the case where you want [1,2,3] and [3,2,1] to pass. Even better: require 'test/unit' class Foo < Test::Unit::TestCase def test_foo array_1 = [1,2,3] array_2 = [3,2,1] assert_equal(array_1.sort - array_2.sort ,[]) assert_equal(array_2.sort - array_1.sort ,[]) On 7/11/06, Chris McMahon wrote: > Dang. I didn't think of that. I've got some refactoring to do. :) > This'd work though: > > require 'test/unit' > > class Foo < Test::Unit::TestCase > def test_foo > array_1 = [1,2,3] > array_2 = [1,2,3] > > assert_equal(array_1 - array_2 ,[]) > assert_equal(array_2 - array_1 ,[]) > From Bill.Attebery at twtelecom.com Tue Jul 11 16:56:12 2006 From: Bill.Attebery at twtelecom.com (Attebery, Bill) Date: Tue, 11 Jul 2006 14:56:12 -0600 Subject: [Wtr-general] assert_arrayEquals In-Reply-To: <91E302EA72562F43AEDC06DD8FAE7D364C2749@ord1mail01.firstlook.biz> Message-ID: <485A27FF1E164B4FB51E2A066D5265A503EBEA@SRVMSXMB1.ad.twtelecom.com> Thank you for the alternative methods. Can anyone shed some light on why it was removed in the first place? This really complicates things. I wasn't expecting all this rewriting after upgrading watir. Otherwise I would have stuck with 1.4 Mike That method appears to be in the testUnitAddons.rb file in the watir directory in 1.4 -- can't you simply do one of the following: 1- copy the method and paste it into the 1.5 testUnitAddons.rb file (assuming it exists - I can't confirm as I haven't been able to install and use 1.5 successfully yet - problems with the attach method), 2- extend the Test::Unit::Assertions module in your test file 3- simply require testUnitAddons.rb in your test files? Below is the method from Test::Unit::Assertions in testUnitAddons.rb def assert_arrayEquals(expectArray, actualArray, message = nil ) _wrap_assertion do assert_block("assert should not be called with a block.") { !block_given? } assert_equal(expectArray.length, actualArray.length, "Lengths did not match") assert_block("contents are different." ){ compareArrays( expectArray, actualArray) } end #_wrap end #def The content contained in this electronic message is not intended to constitute formation of a contract binding TWTC. TWTC will be contractually bound only upon execution, by an authorized officer, of a contract including agreed terms and conditions or by express application of its tariffs. This message is intended only for the use of the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the sender of this E-Mail or by telephone. From mtownley at firstlook.biz Tue Jul 11 17:07:36 2006 From: mtownley at firstlook.biz (Mike Townley) Date: Tue, 11 Jul 2006 16:07:36 -0500 Subject: [Wtr-general] assert_arrayEquals Message-ID: <91E302EA72562F43AEDC06DD8FAE7D364C274A@ord1mail01.firstlook.biz> Thank you! This is really what I was looking for. Great. I don't have to rewrite too much now. I'll give this a shot and let you know if it doesn't work out. Previous tester probably shouldn't have used that method. He used it all over the place in the old scripts, I wont use it any new ones. Cheers! Mike -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Attebery, Bill Sent: Tuesday, July 11, 2006 3:56 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] assert_arrayEquals Thank you for the alternative methods. Can anyone shed some light on why it was removed in the first place? This really complicates things. I wasn't expecting all this rewriting after upgrading watir. Otherwise I would have stuck with 1.4 Mike That method appears to be in the testUnitAddons.rb file in the watir directory in 1.4 -- can't you simply do one of the following: 1- copy the method and paste it into the 1.5 testUnitAddons.rb file (assuming it exists - I can't confirm as I haven't been able to install and use 1.5 successfully yet - problems with the attach method), 2- extend the Test::Unit::Assertions module in your test file 3- simply require testUnitAddons.rb in your test files? Below is the method from Test::Unit::Assertions in testUnitAddons.rb def assert_arrayEquals(expectArray, actualArray, message = nil ) _wrap_assertion do assert_block("assert should not be called with a block.") { !block_given? } assert_equal(expectArray.length, actualArray.length, "Lengths did not match") assert_block("contents are different." ){ compareArrays( expectArray, actualArray) } end #_wrap end #def The content contained in this electronic message is not intended to constitute formation of a contract binding TWTC. TWTC will be contractually bound only upon execution, by an authorized officer, of a contract including agreed terms and conditions or by express application of its tariffs. This message is intended only for the use of the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the sender of this E-Mail or by telephone. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Bill.Attebery at twtelecom.com Tue Jul 11 17:12:32 2006 From: Bill.Attebery at twtelecom.com (Attebery, Bill) Date: Tue, 11 Jul 2006 15:12:32 -0600 Subject: [Wtr-general] Lists question Message-ID: <485A27FF1E164B4FB51E2A066D5265A503EBEB@SRVMSXMB1.ad.twtelecom.com> Has anyone written code to handle
    /
      and
    1. tags -- as a collection with iterators? I have the following HTML -- and I'd like to be able to handle the LIs as a collection and iterate through them (and access the link within) based on the text -- has anyone done this? If not I presume I'll have to extend watir and essentially clone the Spans, Divs or Ps classes and methods? Any suggestions? I'd like to do something link this: $ie.lis.each do |li| if li.text == /FOO/ puts 'FOO found' li.link(:index, 1).click else puts 'FOO not found' end end

      This document can not be saved until the following issues are resolved:

      • REVENUE CITY: Please fill in this required field. Go to the
field
      • LEGAL ENTITY: Please fill in this required field. Go to the
field
      The content contained in this electronic message is not intended to constitute formation of a contract binding TWTC. TWTC will be contractually bound only upon execution, by an authorized officer, of a contract including agreed terms and conditions or by express application of its tariffs. This message is intended only for the use of the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the sender of this E-Mail or by telephone. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060711/a760adcb/attachment.html From bret at pettichord.com Tue Jul 11 18:28:46 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 11 Jul 2006 17:28:46 -0500 Subject: [Wtr-general] assert_arrayEquals In-Reply-To: <91E302EA72562F43AEDC06DD8FAE7D364C274A@ord1mail01.firstlook.biz> References: <91E302EA72562F43AEDC06DD8FAE7D364C274A@ord1mail01.firstlook.biz> Message-ID: If anyone else runs into this problem you can simply do def assert_arrayEquals a1, a2 assert_equal a1, a2 end and now your tests will work. Bret On 7/11/06, Mike Townley wrote: > > Thank you! This is really what I was looking for. Great. I don't have to > rewrite too much now. I'll give this a shot and let you know if it > doesn't work out. > Previous tester probably shouldn't have used that method. He used it all > over the place in the old scripts, I wont use it any new ones. > > Cheers! > Mike > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Attebery, Bill > Sent: Tuesday, July 11, 2006 3:56 PM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] assert_arrayEquals > > > > Thank you for the alternative methods. Can anyone shed some light on why > it was removed in the first place? This really complicates things. I > wasn't expecting all this rewriting after upgrading watir. Otherwise I > would have stuck with 1.4 > > Mike > > > That method appears to be in the testUnitAddons.rb file in the watir > directory in 1.4 -- can't you simply do one of the following: > 1- copy the method and paste it into the 1.5 testUnitAddons.rb file > (assuming it exists - I can't confirm as I > haven't been able to install and use 1.5 successfully yet - > problems with the attach method), > 2- extend the Test::Unit::Assertions module in your test file > 3- simply require testUnitAddons.rb in your test files? > > Below is the method from Test::Unit::Assertions in testUnitAddons.rb > > def assert_arrayEquals(expectArray, actualArray, message = nil ) > _wrap_assertion do > assert_block("assert should not be called with a block.") { > !block_given? } > assert_equal(expectArray.length, actualArray.length, "Lengths > did not match") > > assert_block("contents are different." ){ compareArrays( > expectArray, actualArray) } > end #_wrap > end #def > > The content contained in this electronic message is not intended to > constitute formation of a contract binding TWTC. TWTC will be > contractually bound only upon execution, by an authorized officer, of > a contract including agreed terms and conditions or by express > application of its tariffs. > > This message is intended only for the use of the individual or entity > to which it is addressed. If the reader of this message is not the > intended recipient, or the employee or agent responsible for > delivering the message to the intended recipient, you are hereby > notified that any dissemination, distribution or copying of this > message is strictly prohibited. If you have received this > communication in error, please notify us immediately by replying to > the sender of this E-Mail or by telephone. > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.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/20060711/a3e6232d/attachment.html From christopher.mcmahon at gmail.com Tue Jul 11 18:34:39 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 11 Jul 2006 15:34:39 -0700 Subject: [Wtr-general] assert_arrayEquals In-Reply-To: References: <91E302EA72562F43AEDC06DD8FAE7D364C274A@ord1mail01.firstlook.biz> Message-ID: <72799cd70607111534i6bd35c7fl4bb32fad6d3c2d23@mail.gmail.com> On 7/11/06, Bret Pettichord wrote: > If anyone else runs into this problem you can simply do > > def assert_arrayEquals a1, a2 > assert_equal a1, a2 > end > > and now your tests will work. That's what Dave and I were kind of discussing. I think the original assert would pass if you compared [1,2,3] and [3,2,1], and would also give you an error msg. if the arrays had different number of elements. From mtownley at firstlook.biz Tue Jul 11 18:41:31 2006 From: mtownley at firstlook.biz (Mike Townley) Date: Tue, 11 Jul 2006 17:41:31 -0500 Subject: [Wtr-general] assert_arrayEquals Message-ID: <91E302EA72562F43AEDC06DD8FAE7D364C274B@ord1mail01.firstlook.biz> So should I use this instead of the original code for this method? -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: Tuesday, July 11, 2006 5:35 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] assert_arrayEquals On 7/11/06, Bret Pettichord wrote: > If anyone else runs into this problem you can simply do > > def assert_arrayEquals a1, a2 > assert_equal a1, a2 > end > > and now your tests will work. That's what Dave and I were kind of discussing. I think the original assert would pass if you compared [1,2,3] and [3,2,1], and would also give you an error msg. if the arrays had different number of elements. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Tue Jul 11 18:41:47 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 11 Jul 2006 17:41:47 -0500 Subject: [Wtr-general] Accessing Session Information In-Reply-To: <44B40CBE.1090807@titanez.net> References: <44B40CBE.1090807@titanez.net> Message-ID: On 7/11/06, Lonny Eachus wrote: > > Any information on how to get as much session information as I can from > Watir would be appreciated. Here is the raw data for what can be done with Watir. http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/prog_browser_node_entry.asp -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060711/c1666fb1/attachment.html From bret at pettichord.com Tue Jul 11 18:52:40 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 11 Jul 2006 17:52:40 -0500 Subject: [Wtr-general] assert_arrayEquals In-Reply-To: <72799cd70607111534i6bd35c7fl4bb32fad6d3c2d23@mail.gmail.com> References: <91E302EA72562F43AEDC06DD8FAE7D364C274A@ord1mail01.firstlook.biz> <72799cd70607111534i6bd35c7fl4bb32fad6d3c2d23@mail.gmail.com> Message-ID: On 7/11/06, Chris McMahon wrote: > > That's what Dave and I were kind of discussing. I think the original > assert would pass if you compared [1,2,3] and [3,2,1], and would also > give you an error msg. if the arrays had different number of elements. I actually don't think that was what the original code was trying to do. But since it was undocumented and had not unit tests, that makes it hard to figure out. That's kinda why i removed it. I do know that when i removed it, i simply replaced all calls to assert_arrayEqual with calls to assert_equal. And the tests still passed. Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060711/364ddd2f/attachment.html From bret at pettichord.com Tue Jul 11 18:54:29 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 11 Jul 2006 17:54:29 -0500 Subject: [Wtr-general] assert_arrayEquals In-Reply-To: <91E302EA72562F43AEDC06DD8FAE7D364C274B@ord1mail01.firstlook.biz> References: <91E302EA72562F43AEDC06DD8FAE7D364C274B@ord1mail01.firstlook.biz> Message-ID: My advice would be to replace all mentions of the method with calls to assert_equal. But some people who are conservative might prefer using the new method definition i provided below as it would require changing fewer files. Bret On 7/11/06, Mike Townley wrote: > > So should I use this instead of the original code for this method? > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon > Sent: Tuesday, July 11, 2006 5:35 PM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] assert_arrayEquals > > On 7/11/06, Bret Pettichord wrote: > > If anyone else runs into this problem you can simply do > > > > def assert_arrayEquals a1, a2 > > assert_equal a1, a2 > > end > > > > and now your tests will work. > > That's what Dave and I were kind of discussing. I think the original > assert would pass if you compared [1,2,3] and [3,2,1], and would also > give you an error msg. if the arrays had different number of elements. > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.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/20060711/22d599fb/attachment.html From bret at pettichord.com Tue Jul 11 19:02:55 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 11 Jul 2006 18:02:55 -0500 Subject: [Wtr-general] Lists question In-Reply-To: <485A27FF1E164B4FB51E2A066D5265A503EBEB@SRVMSXMB1.ad.twtelecom.com> References: <485A27FF1E164B4FB51E2A066D5265A503EBEB@SRVMSXMB1.ad.twtelecom.com> Message-ID: On 7/11/06, Attebery, Bill wrote: > > Has anyone written code to handle
        /
          and
        1. tags -- as a > collection with iterators? > I have the following HTML -- and I'd like to be able to handle the LIs as > a collection and iterate through them (and access the link within) based on > the text -- has anyone done this? If not I presume I'll have to extend > watir and essentially clone the Spans, Divs or Ps classes and methods? > > Any suggestions? > I recommend extending Watir. I've been steadily reducing the amount of code it takes to support a new tag in Watir. This shouldn't be very hard. It should take about 13 lines of code to add support for each each of these in 1.5 -- if you include "end" as a line of code. I've recently been reading up about meta programming and suspect that i could rework Watir so that adding support for tags like these would only take three or four lines of code. Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060711/55847e7b/attachment.html From Bill.Attebery at twtelecom.com Tue Jul 11 23:20:37 2006 From: Bill.Attebery at twtelecom.com (Attebery, Bill) Date: Tue, 11 Jul 2006 21:20:37 -0600 Subject: [Wtr-general] Lists question In-Reply-To: Message-ID: <485A27FF1E164B4FB51E2A066D5265A503EBEC@SRVMSXMB1.ad.twtelecom.com> Thanks Bret -- took a few more lines in 1.4.2 (as I mentioned earlier I haven't had success with 1.5 -- receive error on IE.attach) -- anyway here's the code if anyone wants it -- including a test and the html for the test file. Basically someone can see what methods/classes were required to add the element. I think that meta programming idea sounds really cool, and I'd think could allow for dynamic extension for new/different tags -- especially since this code is an exact dupe of div (and span and p and others I suspect) -- just replacing li for div (correct case of course). # feature tests for Li's # revision: $Revision: 1.17 $ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'setup' #EXTEND WATIR FOR LI TAGS -- cloned directly from corresponding DIV code module Watir module SupportsSubElements def li(how, what) return Li.new(self, how, what) end def lis return Lis.new(self) end end class IE def show_lis lis = document.getElementsByTagName("LI") puts "Found #{lis.length} li tags" index=1 lis.each do |d| puts "#{index} id=#{d.invoke('id')} class=#{d.invoke("className")}" index+=1 end end end class Li < SpanDivCommon TAG = 'LI' def tag; TAG; end def self.tag; TAG; end end class Lis < ElementCollections include CommonCollection def element_class; Li; end def set_show_items super @show_attributes.delete( "name") @show_attributes.add( "className" , 20) end end end #END EXTEND #TEST FOR LI EXTEND -- taken from P test cases class TC_Lis < Test::Unit::TestCase include Watir def setup() $ie.goto($htmlRoot + "li.html") end def test_li assert($ie.li(:id, 'number1').exists?) assert($ie.li(:index, 3).exists?) assert($ie.li(:title, 'test_3').exists?) assert_false($ie.li(:id, 'missing').exists?) assert_false($ie.li(:index, 8).exists?) assert_false($ie.li(:title, 'test_55').exists?) assert_raises( UnknownObjectException) {$ie.li(:id , 'missing').class_name } assert_raises( UnknownObjectException) {$ie.li(:id , 'missing').text } assert_raises( UnknownObjectException) {$ie.li(:id , 'missing').title } assert_raises( UnknownObjectException) {$ie.li(:id , 'missing').to_s } assert_raises( UnknownObjectException) {$ie.li(:id , 'missing').disabled } assert_equal( 'redText' , $ie.li(:index,1).class_name) assert_equal( 'LI_tag_1' , $ie.li(:index,1).title) assert_equal( 'This text is in a li with an id of number2' , $ie.li(:index,2).text) end def test_li_iterator assert_equal( 3, $ie.lis.length) assert_equal( 'italicText', $ie.lis[2].class_name) assert_equal( 'number3', $ie.lis[3].id) count=1 $ie.lis.each do |li| assert_equal('number'+count.to_s , li.id) count+=1 end assert_equal( count-1 , $ie.lis.length) end end #END TEST HTML for test file 'li.html' Test page for Div CVS Revision: "$Revision: 1.5 $"

          • This text is in a li with an id of number1 and title of LI_tag_1


          • This text is in a li with an id of number2


          • This text is in a li with an id of number3

          ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Tuesday, July 11, 2006 5:03 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Lists question On 7/11/06, Attebery, Bill wrote: Has anyone written code to handle
            /
              and
            1. tags -- as a collection with iterators? I have the following HTML -- and I'd like to be able to handle the LIs as a collection and iterate through them (and access the link within) based on the text -- has anyone done this? If not I presume I'll have to extend watir and essentially clone the Spans, Divs or Ps classes and methods? Any suggestions? I recommend extending Watir. I've been steadily reducing the amount of code it takes to support a new tag in Watir. This shouldn't be very hard. It should take about 13 lines of code to add support for each each of these in 1.5 -- if you include "end" as a line of code. I've recently been reading up about meta programming and suspect that i could rework Watir so that adding support for tags like these would only take three or four lines of code. Bret The content contained in this electronic message is not intended to constitute formation of a contract binding TWTC. TWTC will be contractually bound only upon execution, by an authorized officer, of a contract including agreed terms and conditions or by express application of its tariffs. This message is intended only for the use of the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the sender of this E-Mail or by telephone. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060711/72021d3f/attachment.html From bret at pettichord.com Wed Jul 12 02:27:50 2006 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 12 Jul 2006 01:27:50 -0500 Subject: [Wtr-general] FireWatir deserves its own project Message-ID: There have been several inquiries lately asking about FireWatir, getting it to run on Mac and Linux, and about our future plans to integrate with the main Watir code base. Most of the work (all?) on FireWatir has been done by Angrez Singh and his partner Abishek. Angrez has been busy lately and has not had the time to reply to all the requests and suggestions and patches. But he remains committed to FireWatir. Personally, i very much support the idea of getting Watir to work on Mac and Linux, but i will not be coordinating this effort. My current job has me solidly in the Windows world, and i've probably made less of use of Cygwin/Linux/Unix in the past six months that at any previous time in my career. (Some time ago i made a few changes to Watir to ensure that it could run in Cygwin, which was important to me at the time.) In any case, I've reviewed the FireWatir code and it is not clear to me that there is much overlap between the code needed to support FireFox and the code needed by Watir/IE. Therefore, i am suggesting that it be run as a separate project. The code base is currently hosted as a branch of the Watir code base, but i frankly don't see it being merged back in to trunk. I suggest that it be more formally moved into a separate repository: it could be a firewatir module in the existing Watir SVN repo at OpenQA. Or a separate project entirely on OpenQA or RubyForge. I'm happy to support it in any of these forms. The only real significant overlap that i see is with the Windows Dialog Box support, which is only useful for FireFox on Windows. It is also my view that this code in Watir is embarrassing unreliable and hard to use. I have some ideas on how to improve it, and have committed some partial improvements to it to SVN, but I haven't really been motivated to follow through on this. It bothers me that so many people struggle with winclicker and all, but personally, i find that i can usually just avoid the dialogs entirely. I realize that this isn't always possible -- but it hasn't been something that has gotten in my way. Not yet any how. The approach i've mainly been taking is "steal from WET". They've mostly figured out how to make this stuff work reliably. I think what i'd really like to see is someone take the WET dialog support that Raghu and Satya have developed and then package it as a separate gem that could be used by Watir and FireWatir/Windows and WET. I seem to recall Kingsley sending me a private note that he was working on this, but haven't seen much announced. Anyway, that is what i suggest. I also would like to mention some of Watir's history. Watir grew out of the Web Testing with Ruby project and was made of experiments with how to use Ruby for web testing. Chris Morris published the first IE/COM driver in Ruby. I started making modifications to this, Paul Rogers got ideas for making his own, and then Paul and I decided to work to gether to make a new one from scratch, based on TDD, so that it would have unit tests for all its features. That is what turned into Watir. Watir is becoming more mature, which makes its development more conservative. Many of the people who's suggestions and contributions have been rejected have come to understand what it means when we have a large established base of users who don't think kindly to API changes unless they are strictly necessary. Even pulling out something peripheral like assert_arrayEquals has caused some alarm. But what FireWatir needs is more experimentation, and that means that it needs to be developed according to different development rules from Watir. I am happy to consult, and to hear any ideas about how it might develop differently, but i think it is time for it to spread its wings, and am not so sure that it wouldn't even be best if there were a couple active versions of Ruby/FireFox drivers, free to share code and ideas between them, but with out too much worry about consistency and agreement. Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060712/6b1ef678/attachment.html From bret at pettichord.com Wed Jul 12 02:30:38 2006 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 12 Jul 2006 01:30:38 -0500 Subject: [Wtr-general] Lists question In-Reply-To: <485A27FF1E164B4FB51E2A066D5265A503EBEC@SRVMSXMB1.ad.twtelecom.com> References: <485A27FF1E164B4FB51E2A066D5265A503EBEC@SRVMSXMB1.ad.twtelecom.com> Message-ID: On 7/11/06, Attebery, Bill wrote: > > Thanks Bret -- took a few more lines in 1.4.2 (as I mentioned earlier I > haven't had success with 1.5 -- receive error on IE.attach) > This bothers me a lot. I need to add some diagnostics to IE.attach in 1.5trunk and then have you try it again and send the diagnostics report. Don't let me forget about this. Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060712/440b0507/attachment.html From Adrian.Rutter at tnt.com Wed Jul 12 05:51:16 2006 From: Adrian.Rutter at tnt.com (Adrian Rutter) Date: Wed, 12 Jul 2006 10:51:16 +0100 Subject: [Wtr-general] svn download Message-ID: from what I can gather the one click installer, installs by default the watir in 2 different places within the ruby path: 'C:\ruby\lib\ruby\site_ruby\1.8\watir' and within program files. I have downloaded the latest build. There is no installer in this. Should I just overwrite the new 'watir' folder with the old one in the ruby install folder? cheers aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- From Adrian.Rutter at tnt.com Wed Jul 12 06:20:44 2006 From: Adrian.Rutter at tnt.com (Adrian Rutter) Date: Wed, 12 Jul 2006 11:20:44 +0100 Subject: [Wtr-general] Watir Framework (SAFS) Message-ID: The benefits of SAFS are: 1) It is tool independent (with similar test tables you can use different tools [upto yet Winrunner, Robot Classic, RFT, some keywords for Abbot). 2) You don't need to know how to program to construct your own auto-tests 3) The test tables can bring different stakeholders together (i.e. BA's, test-designers, test-automators etc). Drawbacks. 1) Painfully slow in its implementation and execution. 2) Try version controlling a shed load of spreadsheets 3) The low-level sheets can get a little esoteric. Watir Benefits, 1) A scripting language like Ruby is fast and highly productive. Use scite and irb and your away. I am coming to the conclusion that you don't even need an ide. 2) The fundamentals of Ruby to learn are easier than BASIC. My team lead has no programming experience yet she can review my tests. 3) Got a full OO language; I have been utilising streams and threads. Try doing that in Robot Classic 4) The DSL stuff bret is working on I think will make it even easier for all project stakeholders to create tests. 5) Why use Excel? What's wrong with text files? Why not keep the test-data in a hash-map? Everything then is in one place. Drawbacks 1) I was struggling with how to structure and organise my tests. I have got something half decent, but still not entirely pleased with it. Something good needs to be collaboratively created. Nothing exists without a framework now, but I don't think the answer for Watir is SAFS. aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- From dave.hoover at gmail.com Wed Jul 12 07:20:27 2006 From: dave.hoover at gmail.com (Dave Hoover) Date: Wed, 12 Jul 2006 06:20:27 -0500 Subject: [Wtr-general] FireWatir deserves its own project In-Reply-To: References: Message-ID: <11c8704e0607120420m77ef53fbmfa83169c919640e7@mail.gmail.com> On 7/12/06, Bret Pettichord wrote: > But what FireWatir needs is more experimentation, and that means that it > needs to be developed according to different development rules from Watir. I > am happy to consult, and to hear any ideas about how it might develop > differently, but i think it is time for it to spread its wings, and am not > so sure that it wouldn't even be best if there were a couple active versions > of Ruby/FireFox drivers, free to share code and ideas between them, but with > out too much worry about consistency and agreement. It's probably too obvious to mention, but since I am the master of all things obvious, I will: let's make sure that every driver conforms to as much as the Watir API as is reasonable. Ultimately, if we can have more than one driver then we should be able to use the same Watir scripts regardless of which browser/OS we're on. BTW, I just started the SafariWatir project on RubyForge: http://rubyforge.org/projects/safariwatir/ From Adrian.Rutter at tnt.com Wed Jul 12 10:29:02 2006 From: Adrian.Rutter at tnt.com (Adrian Rutter) Date: Wed, 12 Jul 2006 15:29:02 +0100 Subject: [Wtr-general] Sending Tabs Message-ID: Hi, Is there a better way of sending tabs through Watir than using the windows scripting host? require 'win32ole' wsh = WIN32OLE.new("WScript.Shell") i=0 loop do wsh.SendKeys "{TAB}" i += 1 break unless i <=14 end cheers aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- From charley.baker at gmail.com Wed Jul 12 10:33:57 2006 From: charley.baker at gmail.com (Charley Baker) Date: Wed, 12 Jul 2006 08:33:57 -0600 Subject: [Wtr-general] svn download In-Reply-To: References: Message-ID: Hey Aidy, You can follow the instructions I put on the Watir FAQ wiki page: http://wiki.openqa.org/display/WTR/FAQ#FAQ-devgem Make sure to uninstall the one click installer before installing the gem. Let me know if you have any problems or questions. -Charley On 7/12/06, Adrian Rutter wrote: > > > from what I can gather the one click installer, installs by default the > watir in 2 different places > > within the ruby path: 'C:\ruby\lib\ruby\site_ruby\1.8\watir' > > and within program files. > > I have downloaded the latest build. There is no installer in this. Should > I > just overwrite the new 'watir' folder with the old one in the ruby install > folder? > > cheers > > aidy > > > > > --------------------------------------------------------------------------------------------------------------- > This message and any attachment are confidential and may be privileged or > otherwise protected from disclosure. > If you are not the intended recipient, please telephone or email the > sender and delete this message and any attachment from your system. > If you are not the intended recipient you must not copy this message or > attachment or disclose the contents to any other person. > > --------------------------------------------------------------------------------------------------------------- > _______________________________________________ > 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/20060712/fea0aeef/attachment.html From charley.baker at gmail.com Wed Jul 12 10:38:23 2006 From: charley.baker at gmail.com (Charley Baker) Date: Wed, 12 Jul 2006 08:38:23 -0600 Subject: [Wtr-general] Sending Tabs In-Reply-To: References: Message-ID: Hi Aidy, You can send tabs through AutoIt. Take a look at WindowHelper.rb. You can easily extend it with something like this: class WindowHelper def push_tab @autoit.WinWait "Your dialog title", "" @autoit.Send "{TAB}" end end -Charley On 7/12/06, Adrian Rutter wrote: > > > Hi, > > Is there a better way of sending tabs through Watir than using the windows > scripting host? > > require 'win32ole' > wsh = WIN32OLE.new("WScript.Shell") > i=0 > loop do > wsh.SendKeys "{TAB}" > i += 1 > break unless i <=14 > end > > cheers > > aidy > > > > > --------------------------------------------------------------------------------------------------------------- > This message and any attachment are confidential and may be privileged or > otherwise protected from disclosure. > If you are not the intended recipient, please telephone or email the > sender and delete this message and any attachment from your system. > If you are not the intended recipient you must not copy this message or > attachment or disclose the contents to any other person. > > --------------------------------------------------------------------------------------------------------------- > _______________________________________________ > 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/20060712/45a682e6/attachment.html From ChintakrindiMeghana at managementdynamics.com Wed Jul 12 10:49:00 2006 From: ChintakrindiMeghana at managementdynamics.com (Chintakrindi Meghanath ) Date: Wed, 12 Jul 2006 10:49:00 -0400 Subject: [Wtr-general] Watir Framework (SAFS) Message-ID: <6CF3AA425295C7479483AC0018EDF98B01DAE144@MI8NYCMAIL03.Mi8.com> Hi I completely agree with aidy. SAFS is slow in its exectuion , as I mentioned in my previous mail. I prefer xls/csv for the Datadriven because its very easy for the Data Entry. We faced so many issues/problems with the text files. There is no other technical reason, only for the comnfort of the data entry. Thanks Meghanath -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Adrian Rutter Sent: Wednesday, July 12, 2006 6:21 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Watir Framework (SAFS) The benefits of SAFS are: 1) It is tool independent (with similar test tables you can use different tools [upto yet Winrunner, Robot Classic, RFT, some keywords for Abbot). 2) You don't need to know how to program to construct your own auto-tests 3) The test tables can bring different stakeholders together (i.e. BA's, test-designers, test-automators etc). Drawbacks. 1) Painfully slow in its implementation and execution. 2) Try version controlling a shed load of spreadsheets 3) The low-level sheets can get a little esoteric. Watir Benefits, 1) A scripting language like Ruby is fast and highly productive. Use scite and irb and your away. I am coming to the conclusion that you don't even need an ide. 2) The fundamentals of Ruby to learn are easier than BASIC. My team lead has no programming experience yet she can review my tests. 3) Got a full OO language; I have been utilising streams and threads. Try doing that in Robot Classic 4) The DSL stuff bret is working on I think will make it even easier for all project stakeholders to create tests. 5) Why use Excel? What's wrong with text files? Why not keep the test-data in a hash-map? Everything then is in one place. Drawbacks 1) I was struggling with how to structure and organise my tests. I have got something half decent, but still not entirely pleased with it. Something good needs to be collaboratively created. Nothing exists without a framework now, but I don't think the answer for Watir is SAFS. aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From lonny at titanez.net Wed Jul 12 11:08:17 2006 From: lonny at titanez.net (Lonny Eachus) Date: Wed, 12 Jul 2006 08:08:17 -0700 Subject: [Wtr-general] Accessing Session Information In-Reply-To: References: Message-ID: <44B51061.5030401@titanez.net> An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060712/07b5635a/attachment.html From ChintakrindiMeghana at managementdynamics.com Wed Jul 12 11:11:51 2006 From: ChintakrindiMeghana at managementdynamics.com (Chintakrindi Meghanath ) Date: Wed, 12 Jul 2006 11:11:51 -0400 Subject: [Wtr-general] Watir Framework (SAFS) Message-ID: <6CF3AA425295C7479483AC0018EDF98B01DAE147@MI8NYCMAIL03.Mi8.com> Hi Aidy Are you in the process of developing any framework using the watir ? If yes, can you send some information about it ? Thanks Meghanath -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Chintakrindi Meghanath Sent: Wednesday, July 12, 2006 10:49 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Watir Framework (SAFS) Hi I completely agree with aidy. SAFS is slow in its exectuion , as I mentioned in my previous mail. I prefer xls/csv for the Datadriven because its very easy for the Data Entry. We faced so many issues/problems with the text files. There is no other technical reason, only for the comnfort of the data entry. Thanks Meghanath -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Adrian Rutter Sent: Wednesday, July 12, 2006 6:21 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Watir Framework (SAFS) The benefits of SAFS are: 1) It is tool independent (with similar test tables you can use different tools [upto yet Winrunner, Robot Classic, RFT, some keywords for Abbot). 2) You don't need to know how to program to construct your own auto-tests 3) The test tables can bring different stakeholders together (i.e. BA's, test-designers, test-automators etc). Drawbacks. 1) Painfully slow in its implementation and execution. 2) Try version controlling a shed load of spreadsheets 3) The low-level sheets can get a little esoteric. Watir Benefits, 1) A scripting language like Ruby is fast and highly productive. Use scite and irb and your away. I am coming to the conclusion that you don't even need an ide. 2) The fundamentals of Ruby to learn are easier than BASIC. My team lead has no programming experience yet she can review my tests. 3) Got a full OO language; I have been utilising streams and threads. Try doing that in Robot Classic 4) The DSL stuff bret is working on I think will make it even easier for all project stakeholders to create tests. 5) Why use Excel? What's wrong with text files? Why not keep the test-data in a hash-map? Everything then is in one place. Drawbacks 1) I was struggling with how to structure and organise my tests. I have got something half decent, but still not entirely pleased with it. Something good needs to be collaboratively created. Nothing exists without a framework now, but I don't think the answer for Watir is SAFS. aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.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 Jul 12 11:26:16 2006 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 12 Jul 2006 10:26:16 -0500 Subject: [Wtr-general] svn download In-Reply-To: References: Message-ID: On 7/12/06, Adrian Rutter wrote: > > > from what I can gather the one click installer, installs by default the > watir in 2 different places > > within the ruby path: 'C:\ruby\lib\ruby\site_ruby\1.8\watir' > > and within program files. To clarify: it installs the library in the first location and the bonus files in the second location. > I have downloaded the latest build. There is no installer in this. Should > I > just overwrite the new 'watir' folder with the old one in the ruby install > folder? No. Please see http://wiki.openqa.org/display/WTR/Development+Builds for the builds and instructions. Are the instructions here not clear? In short, do "gem install watir". Like Charley said, you should uninstall 1.4 first if it was installed with the one-click installer (not necessary for the 1.4 gem) Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060712/949b11d6/attachment.html From rand.thacker at gmail.com Wed Jul 12 12:51:50 2006 From: rand.thacker at gmail.com (Rand Thacker) Date: Wed, 12 Jul 2006 11:51:50 -0500 Subject: [Wtr-general] Accessing Session Information In-Reply-To: <44B51061.5030401@titanez.net> References: <44B51061.5030401@titanez.net> Message-ID: <33dc42ea0607120951q1d8fc3cfw9cc96d4d5c12edeb@mail.gmail.com> Lonny, for someone asking for help, you're going about it all wrong. Folks who answer questions on this list aren't doing it because it's their job or because they owe you. They are doing it out of the general desire to help the community. If you are rude to the people who are providing help, they will cease to answer your requests for help. Something like: "Bruce, I don't think the link you sent accessed the specific area of the tutorial that you were hoping for. Either that, or I'm just not sure what area would help me find answers to my questions regarding session information." Might get better results than outright sarcasm. On 7/12/06, Lonny Eachus wrote: > > > A link to information on Internet Explorer. My, how helpful! And RELEVANT > to my specific issue! > > I have to wonder why you did not also include a link to a book on Ruby, or > even an intro to MS Windows. > > Lonny Eachus > ========== > > Subject: > Re: [Wtr-general] Accessing Session Information From: > "Bret Pettichord" Date: > Tue, 11 Jul 2006 17:41:47 -0500 > > > On 7/11/06, Lonny Eachus wrote: > > > > Any information on how to get as much session information as I can from > > Watir would be appreciated. > > > Here is the raw data for what can be done with Watir. > > http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/prog_browser_node_entry.asp > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -- "I am the most humble person in the world!" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060712/a9cedc41/attachment.html From rand.thacker at gmail.com Wed Jul 12 12:55:34 2006 From: rand.thacker at gmail.com (Rand Thacker) Date: Wed, 12 Jul 2006 11:55:34 -0500 Subject: [Wtr-general] Accessing Session Information In-Reply-To: <33dc42ea0607120951q1d8fc3cfw9cc96d4d5c12edeb@mail.gmail.com> References: <44B51061.5030401@titanez.net> <33dc42ea0607120951q1d8fc3cfw9cc96d4d5c12edeb@mail.gmail.com> Message-ID: <33dc42ea0607120955h605aca6bp8c14c8c6f4fa0855@mail.gmail.com> And, as I stumble off of my soapbox, I realize that it would be even more polite to use the correct names: "Bret, I don't think the link you sent accessed the specific area of the tutorial that you were hoping for. Either that, or I'm just not sure what area would help me find answers to my questions regarding session information." On 7/12/06, Rand Thacker wrote: > > Lonny, for someone asking for help, you're going about it all wrong. > > Folks who answer questions on this list aren't doing it because it's their > job or because they owe you. They are doing it out of the general desire to > help the community. If you are rude to the people who are providing help, > they will cease to answer your requests for help. > > Something like: > "Bruce, I don't think the link you sent accessed the specific area of the > tutorial that you were hoping for. Either that, or I'm just not sure what > area would help me find answers to my questions regarding session > information." > Might get better results than outright sarcasm. > > > > On 7/12/06, Lonny Eachus wrote: > > > > > A link to information on Internet Explorer. My, how helpful! And > > RELEVANT to my specific issue! > > > > I have to wonder why you did not also include a link to a book on Ruby, > > or even an intro to MS Windows. > > > > Lonny Eachus > > ========== > > > > Subject: > > Re: [Wtr-general] Accessing Session Information From: > > "Bret Pettichord" Date: > > Tue, 11 Jul 2006 17:41:47 -0500 > > > > > > On 7/11/06, Lonny Eachus wrote: > > > > > > Any information on how to get as much session information as I can > > > from > > > Watir would be appreciated. > > > > > > Here is the raw data for what can be done with Watir. > > http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/prog_browser_node_entry.asp > > > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > -- > "I am the most humble person in the world!" > -- "I am the most humble person in the world!" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060712/a8c898b4/attachment.html From bret at pettichord.com Wed Jul 12 13:15:07 2006 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 12 Jul 2006 12:15:07 -0500 Subject: [Wtr-general] Sending Tabs In-Reply-To: References: Message-ID: On 7/12/06, Adrian Rutter wrote: > > Is there a better way of sending tabs through Watir than using the windows > scripting host? > > require 'win32ole' > wsh = WIN32OLE.new("WScript.Shell") > i=0 > loop do > wsh.SendKeys "{TAB}" > i += 1 > break unless i <=14 > end Not really. But there is a better way to do loops: 14.times { wsh.SendKeys "{TAB}" } Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060712/2543ebfc/attachment.html From lonny at titanez.net Wed Jul 12 13:58:57 2006 From: lonny at titanez.net (Lonny Eachus) Date: Wed, 12 Jul 2006 10:58:57 -0700 Subject: [Wtr-general] Accessing Session Information In-Reply-To: References: Message-ID: <44B53861.2050509@titanez.net> An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060712/b0dfad20/attachment.html From mtownley at firstlook.biz Wed Jul 12 14:23:47 2006 From: mtownley at firstlook.biz (Mike Townley) Date: Wed, 12 Jul 2006 13:23:47 -0500 Subject: [Wtr-general] Accessing Session Information Message-ID: <91E302EA72562F43AEDC06DD8FAE7D364C274E@ord1mail01.firstlook.biz> * Perhaps it was a mistake or misunderstanding, but it came across as a rather blatant insult I shouldn't have to really say this sort of thing, and I would prefer if things like this didn't need to be discussed on this list, but... If you admit there is possibility that you may have made a mistake in your interpretation of the Bret's action you cannot justify your response based on anything being 'blatent' as this would mean there was no room for interpretation. I am personally offended when people who take their free time (which is never really free) to help others are disrespected by being treated like they owe you something. The opensource community operates almost entirely on voluntary cooperation, collaboration, and participation. We all are here to give and receive the gifts of knowledge and information. Lonny, just because you have volunteered at times to help out and share does not entitle you to any assistance at all from anyone. If you found Bret's advice less than usefull, perhaps you should have politely asked for clarification. With people as busy as they are, we should strive to be more conscious and appreciative of when they take time to help us out with what are essentially our own problems to solve. Mike -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Lonny Eachus Sent: Wednesday, July 12, 2006 12:59 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Accessing Session Information With all due respect, Rand, I have been listening in on this forum for some time, and posting my own suggestions from time to time. My own advice might not always have been 100% spot-on, but at other times it definitely helped people here. Nor did I offer advice because I owed it to anybody. My desire was to help the community. Bret's link to a page on Internet Explorer was neither on-topic or useful. Perhaps it was a mistake or misunderstanding, but it came across as a rather blatant insult. I have no reason to apologize when a polite request on my part is met with such a rude response. Lonny Eachus ========== Subject: Re: [Wtr-general] Accessing Session Information From: "Rand Thacker" Date: Wed, 12 Jul 2006 11:51:50 -0500 Lonny, for someone asking for help, you're going about it all wrong. Folks who answer questions on this list aren't doing it because it's their job or because they owe you. They are doing it out of the general desire to help the community. If you are rude to the people who are providing help, they will cease to answer your requests for help. Something like: "Bruce, I don't think the link you sent accessed the specific area of the tutorial that you were hoping for. Either that, or I'm just not sure what area would help me find answers to my questions regarding session information." Might get better results than outright sarcasm. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060712/81693a47/attachment.html From bret at pettichord.com Wed Jul 12 14:32:18 2006 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 12 Jul 2006 13:32:18 -0500 Subject: [Wtr-general] why win32ole needed to be patched or modified In-Reply-To: <44AE86DE.1050209@reconnex.net> References: <44AE86DE.1050209@reconnex.net> Message-ID: On 7/7/06, Manish Sapariya wrote: > > Hi, > Bret mentioned in one of the posts that in order for watir to be working, > win32ole ruby bindings needed to be patched. > > I was wondering for what kind of patch this was? > If I want my own app to be driven using ole, what kind of patch I might > require to add? > > I would appreciate pointers to the right forum if this is not the one. > Thanks and Regards, > Manish I'm not quite sure what the basis for your question is. So i'll say some things and i hope you will find them useful. If not, please provide more details about what you are looking for. Please don't take this personally, but since it seems like this is not clear to everyone on the list, i feel like i need to say that you should not feel insulted by my response and if you do, it would be better to say so than respond rudely yourself. Now for your question. The WIN32OLE patch was needed for our support for modal dialogs -- which are an IE-only feature. Specifically, we wrote a DLL that returned a reference to the DOM in the modal dialog. We needed a way to "cast" this into a WIN32OLE object. We patched the WIN32OLE library to provide this "casting" ability. The WIN32OLE patch is included in the Watir source so you can look at it yourself, if that helps. Does this help? Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060712/4ad0b577/attachment.html From arkie at compli.com Wed Jul 12 15:10:27 2006 From: arkie at compli.com (Alan Ark) Date: Wed, 12 Jul 2006 14:10:27 -0500 Subject: [Wtr-general] WIN32OLERuntimeError redux - innertext Message-ID: <7F2DAB1053EC4D47B821DA0A7BA5E3EBC5F45A@mail-21ps.atlarge.net> Hello Listfolk. Searching the archives, I noticed that there were some threads about these WIN32OLERuntimeErrors. Here's another one to add to the pile. I will try rebooting my system to see if that resolves most of the issues, but I wanted to alert folks about this test case as well. Background Info ----------------------- I'm using the Watir 1.4.1 gem under Ruby 1.8 on a WinXp Pro box. I'm seeing the errors when I try to access a link. This happens some of the time, but not all of the time. Its typical for me, that when I get one of these errors, the same error will appear in other neighboring test cases as well. Then for some reason, the tests start to run fine again. I'm running my tests under the unit test framework. The tests usually run fine, but once in a while I'll get the WIN32OLERuntime error to appear to an unknown reason. My basic structure is the 1st test case will log the user into the system. The teardown script places the user at a known place in the system, and all the test cases will start from this known state. The Error Messages Seen -------------------------------------- test_030_AddAnotherGroup(RubyTester): WIN32OLERuntimeError: innerText OLE error code:0 in HRESULT error code:0x80070005 Access is denied. c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:924:in `method_missing' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:924:in `getLink' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:923:in `each' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:923:in `getLink' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:2840:in `initialize' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:570:in `new' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:570:in `link' Iteration1_DirectorWalk.rb:414:in `test_030_AddAnotherGroup' test_017_AddGroup(RubyTester): WIN32OLERuntimeError: click OLE error code:0 in HRESULT error code:0x80070005 Access is denied. c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:2013:in `method_missing' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:2013:in `click' Q:/Ruby/Projects/DirectorAT/Iteration1_DirectorWalk.rb:257:in `test_017_AddGroup' (code not included for test_017_AddGroup, but the error happens on a similar line as shown below) The test case being run ---------------------------------- def test_030_AddAnotherGroup # hits the following pages ## PAGE::settings/company ## PAGE::settings/newGroup ## PAGE::settings/userPickerNew # Make sure that we are at the inbox page. assert($ie.contains_text("Policies Requiring Signoff"),"Not at Inbox as expected at the start of the test case") # Get to the add groups page. Error --> $ie.link(:text,"Administration").click() <-- Error happens on this line @@sDate=verifySession(@@sDate,@@nExpire) assert($ie.image(:src,/admin-header.gif/).hasLoaded?,"Not on Admin page as expected") $ie.image(:id,/nav_groups/).click() @@sDate=verifySession(@@sDate,@@nExpire) assert($ie.contains_text("Groups Administration"),"Not on Groups section of Admin Page") $ie.link(:text,"Add New Group").click @@sDate=verifySession(@@sDate,@@nExpire) assert($ie.contains_text("Group Permissions"),"Not on Groups section of Admin Page") $ie.text_field(:name,"gname").set("To Be Deleted") $ie.checkbox(:name,"Perm7").set $ie.button(:id,"SubmitButton").click @@sDate=verifySession(@@sDate,@@nExpire) #Make sure that it got created correctly. assert($ie.contains_text("Group Created."),"Group not created properly") assert($ie.contains_text("To Be Deleted"),"Group To Be Deleted missing from the page") # State continuity - Make sure that we are at the inbox page. navigateToInbox($ie) @@sDate=verifySession(@@sDate,@@nExpire) end The teardown script ----------------------------- def teardown #close windows that might have caused problems. closePrintWindows # Make sure that we are at the Inbox $ie=IE.attach(:title,/^Compli:/) $ie.set_fast_speed() navigateToInbox($ie) end Method declaration for closePrintWindows ------------------------------------------------------------- def closePrintWindows # close all open ie windows all_closed = 'unknown' while (all_closed != 'yes') begin #use a regexp that will match any title so all ie windows are forced closed header = Regexp.new(/Compli: Print/) @ie = IE.attach(:title, header) @ie.close # catch the exception raised when there's now window to attach to. rescue NoMatchingWindowFoundException all_closed = 'yes' end end end Ideas, comments welcome. -Alan _____ Alan Ark | Lead QA Engineer | Compl? | HYPERLINK "mailto:arkie at compli.com"arkie at compli.com | office: 503.294.2020 | fax: 503.294.1200 | HYPERLINK "http://www.compli.com/"www.compli.com -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.9.10/385 - Release Date: 7/11/2006 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060712/49b32489/attachment.html From bret at pettichord.com Wed Jul 12 18:56:22 2006 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 12 Jul 2006 17:56:22 -0500 Subject: [Wtr-general] WIN32OLERuntimeError redux - innertext In-Reply-To: References: <7F2DAB1053EC4D47B821DA0A7BA5E3EBC5F45A@mail-21ps.atlarge.net> Message-ID: Sounds like a synchronization problem. There was a known synchronization problem with IE.attach in 1.4.1. That can be avoided if you call wait after attach. Thus: $ie=IE.attach(:title,/^Compli:/) $ie.wait # add this line $ie.set_fast_speed() navigateToInbox($ie) But depending on what is in navigateToInbox, i can't tell if that is the problem here. Can you show the code in navigateToInbox? And if this change fixes your problem, let us know. I'm wondering if we shouldn't release this fix as 1.4.2. Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060712/0f784615/attachment.html From rand.thacker at gmail.com Wed Jul 12 19:51:50 2006 From: rand.thacker at gmail.com (Rand Thacker) Date: Wed, 12 Jul 2006 18:51:50 -0500 Subject: [Wtr-general] WIN32OLERuntimeError redux - innertext In-Reply-To: References: <7F2DAB1053EC4D47B821DA0A7BA5E3EBC5F45A@mail-21ps.atlarge.net> Message-ID: <33dc42ea0607121651p7e39c66dt762711c1ec58f833@mail.gmail.com> I've even run into problems before where $ie.wait didn't seem to do the trick. Usually it was when the pages where doing a redirect or some other craziness that I hadn't planned on. My workaround was to go ahead and do the $ie.wait, then I threw in some thing like this: xUselessVariable = $ie.contains_text('it_would_never_contain_this_phrase') xUselessVariable = $ie.contains_text('it_would_never_contain_this_phrase_either') and just ignore the return values... and do your actions/assertions after this. I've did it twice because once helped, but didn't solve it everytime. I'm not running into those issues anymore. I know it's a hack, but it sure worked for me. Hope it helps someone else out there. On 7/12/06, Bret Pettichord wrote: > > > Sounds like a synchronization problem. There was a known synchronization > problem with IE.attach in 1.4.1. That can be avoided if you call wait > after attach. Thus: > > > $ie=IE.attach(:title,/^Compli:/) > > $ie.wait # add this line > > $ie.set_fast_speed() > > navigateToInbox($ie) > > > But depending on what is in navigateToInbox, i can't tell if that is the > problem here. Can you show the code in navigateToInbox? > > And if this change fixes your problem, let us know. I'm wondering if we > shouldn't release this fix as 1.4.2. > > Bret > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -- "I am the most humble person in the world!" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060712/8b1cc90d/attachment.html From bret at pettichord.com Wed Jul 12 20:20:29 2006 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 12 Jul 2006 19:20:29 -0500 Subject: [Wtr-general] WIN32OLERuntimeError redux - innertext In-Reply-To: <33dc42ea0607121651p7e39c66dt762711c1ec58f833@mail.gmail.com> References: <7F2DAB1053EC4D47B821DA0A7BA5E3EBC5F45A@mail-21ps.atlarge.net> <33dc42ea0607121651p7e39c66dt762711c1ec58f833@mail.gmail.com> Message-ID: That confirms that it is a synchronization problem. I think those useless calls are really the moral equivalent of sleep statements. Probably the cleanest and most reliable solution would be to use this after your call to IE.attach: require 'watir/waiter' WATIR::Waiter.wait_until { $ie.some_element_i_know_should_be_there.exists? } Although this library is packaged with Watir 1.5, it is a separate file (watir/waiter.rb) and can be used with 1.4 if you copy it over manually. Bret On 7/12/06, Rand Thacker wrote: > > I've even run into problems before where $ie.wait didn't seem to do the > trick. Usually it was when the pages where doing a redirect or some other > craziness that I hadn't planned on. > > My workaround was to go ahead and do the $ie.wait, then I threw in some > thing like this: > xUselessVariable = > $ie.contains_text('it_would_never_contain_this_phrase') > xUselessVariable = > $ie.contains_text('it_would_never_contain_this_phrase_either') > and just ignore the return values... and do your actions/assertions after > this. > I've did it twice because once helped, but didn't solve it everytime. > > I'm not running into those issues anymore. > > I know it's a hack, but it sure worked for me. Hope it helps someone else > out there. > > > On 7/12/06, Bret Pettichord wrote: > > > > Sounds like a synchronization problem. There was a known synchronization > problem with IE.attach in 1.4.1. That can be avoided if you call wait > after attach. Thus: > > > $ie=IE.attach(:title,/^Compli:/) > > $ie.wait # add this line > > $ie.set_fast_speed() > > navigateToInbox($ie) > > > But depending on what is in navigateToInbox, i can't tell if that is the > problem here. Can you show the code in navigateToInbox? > > And if this change fixes your problem, let us know. I'm wondering if we > shouldn't release this fix as 1.4.2. > > Bret > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > -- > "I am the most humble person in the world!" > > _______________________________________________ > 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/20060712/1cc9d1d4/attachment.html From Adrian.Rutter at tnt.com Thu Jul 13 04:53:37 2006 From: Adrian.Rutter at tnt.com (Adrian Rutter) Date: Thu, 13 Jul 2006 09:53:37 +0100 Subject: [Wtr-general] Watir Framework (SAFS) Message-ID: Carl Nagle wrote around 12 Jul 2006 on the RRAFS list You seem to be missing part of the appeal behind the purpose of SAFS and the original post concerning a WATIR engine. With a WATIR engine we could be testing our web content with WATIR as a SAFS engine. We could take a test that originally ran with SAFS for Rational Robot (RRAFS) and run it with SAFS for WATIR (WAFS?) instead, and vice-versa. We could also use both and not have to pick just one tool or the other. And when we have to run the same tests on Linux or Unix the tests could still be portable on whatever engine we choose to provide there (Selenium, LiveConnect, Common DOM, etc.). The idea is to provide test portability, tool-independence, and a common infrastructure for test development, reporting, and execution regardless of the tools that will be used. As a SAS example, we would still use the same test development tools (Excel or Test Composer) regardless of whether we were using SAFS for Rational Robot (slow) or SAFS for Watir (fast). The "test data" would be unified because both engines are SAFS engines, and the reporting would all stem from the same SAFS assets and services. Your ideas of what could\should be unified or shared is exactly what SAFS attempts to satisfy--a framework on which any and all of these things can be attached and shared. Most actually exist already in one form or another and the mechanisms to add others is present and documented. The issue, of course, is largely one of time and resources. You or anyone could help implement a Watir engine for SAFS. Then folks wouldn't have to choose between writing Watir tests in Ruby or writing portable tests in SAFS. In any event, thanks for sharing your ideas and furthering this discussion! --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- From Adrian.Rutter at tnt.com Thu Jul 13 06:16:03 2006 From: Adrian.Rutter at tnt.com (Adrian Rutter) Date: Thu, 13 Jul 2006 11:16:03 +0100 Subject: [Wtr-general] Watir Framework? Message-ID: > Are you in the process of developing any framework using the watir ? > If yes, can you send some information about it ? With every test case, I write a Test Class An example: class ST_LTD_3 def initialize $log.test_info(self.class, 'Select Depot which has territories and click search', 'All matching territories are displayed') string_to_search = ["DF1", "MA Portfolio"] start_browser login goto_territory_list search_territory("UNITED KINGDOM", "BRISTOL") click_search string_to_search.each {|x| $log.verify_html(x) } rescue => e p "test failed: #{e.message}" p e.backtrace ensure log_out close_window end end breakdown $log.test_info(self.class, 'Select Depot which has territories and click search', 'All matching territories are displayed') This logs the test name, a description of the test and the expected result to an xml file start_browser login each window or area of funtionality is in a module module Browser def start_browser(url='http://gbahevm06l24.gb.tntpost.com:9081/wps/portal') $ie = Watir::IE.new $ie.goto(url) $ie.maximize() end end module Login def login(username='g126ahe', password='g126ahe') $ie.link(:text, 'Log in').click $ie.text_field(:name, /userid/).set(username) $ie.text_field(:name, /password/).set(password) $ie.button(:value,'Log in').click end def log_out $ie.link(:text, 'Log out').click end end this logs a pass or fail to the xml log $log.verify_html(x) full xml log file class Logging def initialize @doc = Document.new xmldecl = XMLDecl.default @doc.add(xmldecl) @root = @doc.add_element 'testresults' end def verify_html(vp_text) #add optional params if $ie.contains_text(vp_text) self.test_results('pass') else self.test_results('fail', "#{vp_text} is NOT on the page") end #do a not here end def test_info(test_name, desc, exp) @test = @root.add_element 'test' @test.attributes["id"] = test_name des= @test.add_element 'description' des.text = desc res = @test.add_element 'expected' res.text = exp end def test_results(result, *msg) if result.upcase == 'PASS' then test_status= @test.add_element 'teststatus' test_status.text = 'PASS' elsif result.upcase == 'FAIL' then fail = @test.add_element 'teststatus' fail.text = 'FAIL!' fail_msg = @test.add_element 'failmessage' fail_msg.text = msg elsif result.upcase == 'SKIP' skip = @test.add_element 'teststatus' skip.text = 'SKIP' skip_msg = @test.add_element 'skipmessage' fail_msg.text = msg end end def write_xml_to_file @doc.write($stdout, 1) @doc.write(File.open("C:/test_results.xml","w")) end end the xml output is something like this - Check that window displayed is correct Correct image is displayed PASS - Select to Add an employee in a role Employee was assigned to territory successfully FAIL! security not implemented gonna fail to read in a csv do something like this def enter_territory require 'csv' reader = CSV.open('C:\test_data', 'r') header = reader.shift reader.each{|row| next unless row.any? p row } end the appmap bit, I am going to steal of Bret's suggestion in a previous post feedback or suggestions welcome aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- From sikander at marlabs.com Thu Jul 13 07:13:46 2006 From: sikander at marlabs.com (Sikander) Date: Thu, 13 Jul 2006 16:43:46 +0530 Subject: [Wtr-general] How to handle tab buttons Message-ID: <000f01c6a66d$6cd321e0$6520a8c0@caseshare.com> Hi! How to click for tab buttons. I have following code, Print Jobs Print jobs is my tab button. Thanks, Sikander -- Disclaimer: This e-mail, and any files transmitted with it are confidential to Marlabs Inc. and intended solely for the use of the individual or entity to whom it is addressed. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060713/a79132f1/attachment.html From christian.leskowsky at gmail.com Thu Jul 13 09:57:05 2006 From: christian.leskowsky at gmail.com (Christian Leskowsky) Date: Thu, 13 Jul 2006 09:57:05 -0400 Subject: [Wtr-general] `method_missing': document (WIN32OLERuntimeError) Message-ID: <58a2be440607130657u64a0a7fcg2e341d22948289a1@mail.gmail.com> Hi guys, I've found a problem similar to mine that was discussed on the list in May (I've borrowed the message header). Does anybody know what happened with it? I've hit it again in my testing. Let me explain what's happening... My environment: Windows XP SP2 ruby 1.8.4 (2005-12-24) [i386-mswin32] watir-1.5.1.1045 The error: OLE error code:80004005 in HRESULT error code:0x80020009 Exception occurred. from c:/ruby/lib/ruby/gems/1.8/gems/watir- 1.5.1.1045/./watir.rb:1640:in `wait' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1045/./watir.rb:2401:in `click' from b.rb:57 What's happening in the web application: 1/ A popup window with a form is created and attached to 2/ assorted text fields are filled in 3/ the form is submitted causing the popup window to close 4/ ruby exits with the exception thrown above Thanks for any help, -- - 'There was an owl lived in an oak. The more he heard, the less he spoke. The less he spoke, the more he heard.' Christian Leskowsky christian.leskowsky at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060713/aaa77419/attachment.html From arkie at compli.com Thu Jul 13 10:45:39 2006 From: arkie at compli.com (Alan Ark) Date: Thu, 13 Jul 2006 09:45:39 -0500 Subject: [Wtr-general] WIN32OLERuntimeError redux - innertext In-Reply-To: Message-ID: <7F2DAB1053EC4D47B821DA0A7BA5E3EBC5F582@mail-21ps.atlarge.net> Thanks for the leads folks. I?m busy with a new hire, but once I try these ideas, I will report back to the list. Much appreciated. -Alan _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Wednesday, July 12, 2006 5:20 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] WIN32OLERuntimeError redux - innertext That confirms that it is a synchronization problem. I think those useless calls are really the moral equivalent of sleep statements. Probably the cleanest and most reliable solution would be to use this after your call to IE.attach: require 'watir/waiter' WATIR::Waiter.wait_until { $ie.some_element_i_know_should_be_there.exists? } Although this library is packaged with Watir 1.5, it is a separate file (watir/waiter.rb) and can be used with 1.4 if you copy it over manually. Bret On 7/12/06, Rand Thacker wrote: I've even run into problems before where $ie.wait didn't seem to do the trick. Usually it was when the pages where doing a redirect or some other craziness that I hadn't planned on. My workaround was to go ahead and do the $ie.wait, then I threw in some thing like this: xUselessVariable = $ie.contains_text('it_would_never_contain_this_phrase') xUselessVariable = $ie.contains_text('it_would_never_contain_this_phrase_either') and just ignore the return values... and do your actions/assertions after this. I've did it twice because once helped, but didn't solve it everytime. I'm not running into those issues anymore. I know it's a hack, but it sure worked for me. Hope it helps someone else out there. On 7/12/06, Bret Pettichord wrote: Sounds like a synchronization problem. There was a known synchronization problem with IE.attach in 1.4.1. That can be avoided if you call wait after attach. Thus: $ie=IE.attach(:title,/^Compli:/) $ie.wait # add this line $ie.set_fast_speed() navigateToInbox($ie) But depending on what is in navigateToInbox, i can't tell if that is the problem here. Can you show the code in navigateToInbox? And if this change fixes your problem, let us know. I'm wondering if we shouldn't release this fix as 1.4.2. Bret _______________________________________________ Wtr-general mailing list HYPERLINK "mailto:Wtr-general at rubyforge.org" \nWtr-general at rubyforge.org HYPERLINK "http://rubyforge.org/mailman/listinfo/wtr-general" \nhttp://rubyforge.org/mailman/listinfo/wtr-general -- "I am the most humble person in the world!" _______________________________________________ Wtr-general mailing list HYPERLINK "mailto:Wtr-general at rubyforge.org"Wtr-general at rubyforge.org HYPERLINK "http://rubyforge.org/mailman/listinfo/wtr-general" \nhttp://rubyforge.org/mailman/listinfo/wtr-general -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.9.10/385 - Release Date: 7/11/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.9.10/387 - Release Date: 7/12/2006 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060713/a75a6dbd/attachment.html From ChintakrindiMeghana at managementdynamics.com Thu Jul 13 10:48:05 2006 From: ChintakrindiMeghana at managementdynamics.com (Chintakrindi Meghanath ) Date: Thu, 13 Jul 2006 10:48:05 -0400 Subject: [Wtr-general] Watir Framework? Message-ID: <6CF3AA425295C7479483AC0018EDF98B01DAE14E@MI8NYCMAIL03.Mi8.com> Hi Aidy Thanks for your information. Does the framework has the feature which I mentioned in my eariler email like the enduser need not to worry about the ruby/watir, he needs to modify only the data files or the user needs to modify the script ? Thanks Meghanath -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Adrian Rutter Sent: Thursday, July 13, 2006 6:16 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Watir Framework? > Are you in the process of developing any framework using the watir ? > If yes, can you send some information about it ? With every test case, I write a Test Class An example: class ST_LTD_3 def initialize $log.test_info(self.class, 'Select Depot which has territories and click search', 'All matching territories are displayed') string_to_search = ["DF1", "MA Portfolio"] start_browser login goto_territory_list search_territory("UNITED KINGDOM", "BRISTOL") click_search string_to_search.each {|x| $log.verify_html(x) } rescue => e p "test failed: #{e.message}" p e.backtrace ensure log_out close_window end end breakdown $log.test_info(self.class, 'Select Depot which has territories and click search', 'All matching territories are displayed') This logs the test name, a description of the test and the expected result to an xml file start_browser login each window or area of funtionality is in a module module Browser def start_browser(url='http://gbahevm06l24.gb.tntpost.com:9081/wps/portal') $ie = Watir::IE.new $ie.goto(url) $ie.maximize() end end module Login def login(username='g126ahe', password='g126ahe') $ie.link(:text, 'Log in').click $ie.text_field(:name, /userid/).set(username) $ie.text_field(:name, /password/).set(password) $ie.button(:value,'Log in').click end def log_out $ie.link(:text, 'Log out').click end end this logs a pass or fail to the xml log $log.verify_html(x) full xml log file class Logging def initialize @doc = Document.new xmldecl = XMLDecl.default @doc.add(xmldecl) @root = @doc.add_element 'testresults' end def verify_html(vp_text) #add optional params if $ie.contains_text(vp_text) self.test_results('pass') else self.test_results('fail', "#{vp_text} is NOT on the page") end #do a not here end def test_info(test_name, desc, exp) @test = @root.add_element 'test' @test.attributes["id"] = test_name des= @test.add_element 'description' des.text = desc res = @test.add_element 'expected' res.text = exp end def test_results(result, *msg) if result.upcase == 'PASS' then test_status= @test.add_element 'teststatus' test_status.text = 'PASS' elsif result.upcase == 'FAIL' then fail = @test.add_element 'teststatus' fail.text = 'FAIL!' fail_msg = @test.add_element 'failmessage' fail_msg.text = msg elsif result.upcase == 'SKIP' skip = @test.add_element 'teststatus' skip.text = 'SKIP' skip_msg = @test.add_element 'skipmessage' fail_msg.text = msg end end def write_xml_to_file @doc.write($stdout, 1) @doc.write(File.open("C:/test_results.xml","w")) end end the xml output is something like this - Check that window displayed is correct Correct image is displayed PASS - Select to Add an employee in a role Employee was assigned to territory successfully FAIL! security not implemented gonna fail to read in a csv do something like this def enter_territory require 'csv' reader = CSV.open('C:\test_data', 'r') header = reader.shift reader.each{|row| next unless row.any? p row } end the appmap bit, I am going to steal of Bret's suggestion in a previous post feedback or suggestions welcome aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Thu Jul 13 10:58:48 2006 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 13 Jul 2006 09:58:48 -0500 Subject: [Wtr-general] `method_missing': document (WIN32OLERuntimeError) In-Reply-To: <58a2be440607130657u64a0a7fcg2e341d22948289a1@mail.gmail.com> References: <58a2be440607130657u64a0a7fcg2e341d22948289a1@mail.gmail.com> Message-ID: Can you try using a "click_no_wait" instead of "click" to submit the form and close the popup window, and tell us whether the error stops happening? Bret On 7/13/06, Christian Leskowsky wrote: > > Hi guys, > > I've found a problem similar to mine that was discussed on the list in May > (I've borrowed the message header). Does anybody know what happened with it? > I've hit it again in my testing. Let me explain what's happening... > > My environment: > > Windows XP SP2 > ruby 1.8.4 (2005-12-24) [i386-mswin32] > watir-1.5.1.1045 > > The error: > > OLE error code:80004005 in > > HRESULT error code:0x80020009 > Exception occurred. from c:/ruby/lib/ruby/gems/1.8/gems/watir- > 1.5.1.1045/./watir.rb:1640:in `wait' > from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1045/./watir.rb:2401:in > `click' > from b.rb:57 > > What's happening in the web application: > > 1/ A popup window with a form is created and attached to > 2/ assorted text fields are filled in > 3/ the form is submitted causing the popup window to close > 4/ ruby exits with the exception thrown above > > Thanks for any help, > > -- > - > > 'There was an owl lived in an oak. > The more he heard, the less he spoke. > The less he spoke, the more he heard.' > > Christian Leskowsky > christian.leskowsky at gmail.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060713/7bcc635d/attachment.html From christian.leskowsky at gmail.com Thu Jul 13 11:14:25 2006 From: christian.leskowsky at gmail.com (Christian Leskowsky) Date: Thu, 13 Jul 2006 11:14:25 -0400 Subject: [Wtr-general] `method_missing': document (WIN32OLERuntimeError) In-Reply-To: References: <58a2be440607130657u64a0a7fcg2e341d22948289a1@mail.gmail.com> Message-ID: <58a2be440607130814x15ae9358h531e758af81d2d96@mail.gmail.com> Hey Bret, Thanks for your quick response! "click_no_wait" doesn't seem to work either. On 7/13/06, Bret Pettichord wrote: > > Can you try using a "click_no_wait" instead of "click" to submit the form > and close the popup window, and tell us whether the error stops happening? > > Bret > > On 7/13/06, Christian Leskowsky wrote: > Hi guys, > > I've found a problem similar to mine that was discussed on the list in May > (I've borrowed the message header). Does anybody know what happened with it? > I've hit it again in my testing. Let me explain what's happening... > > My environment: > > Windows XP SP2 > ruby 1.8.4 (2005-12-24) [i386-mswin32] > watir-1.5.1.1045 > > The error: > > OLE error code:80004005 in > > HRESULT error code:0x80020009 > Exception occurred. from c:/ruby/lib/ruby/gems/1.8/gems/watir- > 1.5.1.1045/./watir.rb:1640:in `wait' > from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1045/./watir.rb:2401:in > `click' > from b.rb:57 > > What's happening in the web application: > > 1/ A popup window with a form is created and attached to > 2/ assorted text fields are filled in > 3/ the form is submitted causing the popup window to close > 4/ ruby exits with the exception thrown above > > Thanks for any help, > > -- > - > > 'There was an owl lived in an oak. > The more he heard, the less he spoke. > The less he spoke, the more he heard.' > > Christian Leskowsky > christian.leskowsky at gmail.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 > > -- - 'There was an owl lived in an oak. The more he heard, the less he spoke. The less he spoke, the more he heard.' Christian Leskowsky christian.leskowsky at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060713/e06e3fdd/attachment.html From Adrian.Rutter at tnt.com Thu Jul 13 11:37:16 2006 From: Adrian.Rutter at tnt.com (Adrian Rutter) Date: Thu, 13 Jul 2006 16:37:16 +0100 Subject: [Wtr-general] Wtr-general Digest, Vol 32, Issue 18 In-Reply-To: Message-ID: > Hi Aidy > Thanks for your information. > Does the framework has the feature which I mentioned in my eariler email > like the enduser need not to worry about the ruby/watir, he needs to modify only the data files or > the user needs to modify the script ? > Thanks > Meghanath Not keyword driven if that is what you mean. But I don't know if I believe in that any more. Have a look at WET or converting the CSDDT. aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- From ChintakrindiMeghana at managementdynamics.com Thu Jul 13 11:59:49 2006 From: ChintakrindiMeghana at managementdynamics.com (Chintakrindi Meghanath ) Date: Thu, 13 Jul 2006 11:59:49 -0400 Subject: [Wtr-general] Wtr-general Digest, Vol 32, Issue 18 Message-ID: <6CF3AA425295C7479483AC0018EDF98B01DAE14F@MI8NYCMAIL03.Mi8.com> Hi Aidy Yes you are right. I am talking about the Keyword driven framework. So,your framework code needs to be modified /added whenever new functionality is incorporated in the AUT ? Thanks Meghanath -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Adrian Rutter Sent: Thursday, July 13, 2006 11:37 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Wtr-general Digest, Vol 32, Issue 18 > Hi Aidy > Thanks for your information. > Does the framework has the feature which I mentioned in my eariler email > like the enduser need not to worry about the ruby/watir, he needs to modify only the data files or > the user needs to modify the script ? > Thanks > Meghanath Not keyword driven if that is what you mean. But I don't know if I believe in that any more. Have a look at WET or converting the CSDDT. aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Thu Jul 13 12:27:21 2006 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 13 Jul 2006 11:27:21 -0500 Subject: [Wtr-general] `method_missing': document (WIN32OLERuntimeError) In-Reply-To: <58a2be440607130814x15ae9358h531e758af81d2d96@mail.gmail.com> References: <58a2be440607130657u64a0a7fcg2e341d22948289a1@mail.gmail.com> <58a2be440607130814x15ae9358h531e758af81d2d96@mail.gmail.com> Message-ID: What error message does it give when you use "click_no_wait" Bret On 7/13/06, Christian Leskowsky wrote: > > Hey Bret, > > Thanks for your quick response! > > "click_no_wait" doesn't seem to work either. > > > > On 7/13/06, Bret Pettichord < bret at pettichord.com> wrote: > > > > Can you try using a "click_no_wait" instead of "click" to submit the > > form and close the popup window, and tell us whether the error stops > > happening? > > > > Bret > > > > On 7/13/06, Christian Leskowsky < christian.leskowsky at gmail.com> wrote: > > Hi guys, > > > > I've found a problem similar to mine that was discussed on the list in > > May (I've borrowed the message header). Does anybody know what happened with > > it? I've hit it again in my testing. Let me explain what's happening... > > > > My environment: > > > > Windows XP SP2 > > ruby 1.8.4 (2005-12-24) [i386-mswin32] > > watir-1.5.1.1045 > > > > The error: > > > > OLE error code:80004005 in > > > > HRESULT error code:0x80020009 > > Exception occurred. from > > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1045/./watir.rb:1640:in > > `wait' > > from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1045/./watir.rb:2401:in > > `click' > > from b.rb:57 > > > > What's happening in the web application: > > > > 1/ A popup window with a form is created and attached to > > 2/ assorted text fields are filled in > > 3/ the form is submitted causing the popup window to close > > 4/ ruby exits with the exception thrown above > > > > Thanks for any help, > > > > -- > > - > > > > 'There was an owl lived in an oak. > > The more he heard, the less he spoke. > > The less he spoke, the more he heard.' > > > > Christian Leskowsky > > christian.leskowsky at gmail.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 > > > > > > > -- > - > > 'There was an owl lived in an oak. > The more he heard, the less he spoke. > The less he spoke, the more he heard.' > > Christian Leskowsky > christian.leskowsky at gmail.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060713/2d9e1c21/attachment.html From bret at pettichord.com Thu Jul 13 12:46:23 2006 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 13 Jul 2006 11:46:23 -0500 Subject: [Wtr-general] Watir Framework (SAFS) In-Reply-To: References: Message-ID: Aidy, Thanks for sharing Carl's thoughts with us. I should mention that i have a lot of respect for Carl and the SAFS team. I had detailed meetings with them to learn about open-source projects. It was only after that meeting that decide to commit to what eventually became Watir. Details from that meeting can be found here: http://www.pettichord.com/awta5.html Bret On 7/13/06, Adrian Rutter wrote: > > > > Carl Nagle wrote around 12 Jul 2006 on the RRAFS list > > You seem to be missing part of the appeal behind the purpose of SAFS and > the original post concerning a WATIR engine. With a WATIR engine we could > be testing our web content with WATIR as a SAFS engine. We could take a > test that originally ran with SAFS for Rational Robot (RRAFS) and run it > with SAFS for WATIR (WAFS?) instead, and vice-versa. We could also use > both and not have to pick just one tool or the other. And when we have to > run the same tests on Linux or Unix the tests could still be portable on > whatever engine we choose to provide there (Selenium, LiveConnect, Common > DOM, etc.). > > The idea is to provide test portability, tool-independence, and a common > infrastructure for test development, reporting, and execution regardless > of > the tools that will be used. As a SAS example, we would still use the > same > test development tools (Excel or Test Composer) regardless of whether we > were using SAFS for Rational Robot (slow) or SAFS for Watir (fast). The > "test data" would be unified because both engines are SAFS engines, and > the > reporting would all stem from the same SAFS assets and services. > > Your ideas of what could\should be unified or shared is exactly what SAFS > attempts to satisfy--a framework on which any and all of these things can > be attached and shared. Most actually exist already in one form or > another > and the mechanisms to add others is present and documented. The issue, of > course, is largely one of time and resources. You or anyone could help > implement a Watir engine for SAFS. Then folks wouldn't have to choose > between writing Watir tests in Ruby or writing portable tests in SAFS. > > In any event, thanks for sharing your ideas and furthering this > discussion! > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060713/9844a90d/attachment.html From bret at pettichord.com Thu Jul 13 13:08:30 2006 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 13 Jul 2006 12:08:30 -0500 Subject: [Wtr-general] FireWatir deserves its own project In-Reply-To: <11c8704e0607120420m77ef53fbmfa83169c919640e7@mail.gmail.com> References: <11c8704e0607120420m77ef53fbmfa83169c919640e7@mail.gmail.com> Message-ID: On 7/12/06, Dave Hoover wrote: > > It's probably too obvious to mention, but since I am the master of all > things obvious, I will: let's make sure that every driver conforms to > as much as the Watir API as is reasonable. Ultimately, if we can have > more than one driver then we should be able to use the same Watir > scripts regardless of which browser/OS we're on. It may be that the Watir tests should be packaged as a configurable set of tests that could be used with any of the Watir-Browser projects. Each test would be tagged to indicate which browser suites it is included in. This feature could even be used with Watir/IE -- in that we have some tests that will work with IE in background mode and others that require it be in the foreground. But the bigger issue of ensuring compatability between versions of Watir is tricky. For example, FireWatir doesn't support frames. Is this reasonable? Fit has something called FAT which are the tests that a Fit implementation is expected to meet. I think there may be a 1.0 and 1.1 version of these. We'd have to do something similar for MultiWatir. And even then, i suspect that each implementation would have some additional features that were not part of the standard API. For example, Watir gives direct access to the ole object, but any tests that make use of these won't be portable. This suggests that each implementation also should have a "strict" mode where it only allows execution against the core API or least creates warnings for all other uses. This way, users (or their managers) could make sure their tests were portable. Otherwise they wouldn't know until they tried. Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060713/2cc5a316/attachment.html From christian.leskowsky at gmail.com Thu Jul 13 14:09:57 2006 From: christian.leskowsky at gmail.com (Christian Leskowsky) Date: Thu, 13 Jul 2006 14:09:57 -0400 Subject: [Wtr-general] `method_missing': document (WIN32OLERuntimeError) In-Reply-To: References: <58a2be440607130657u64a0a7fcg2e341d22948289a1@mail.gmail.com> <58a2be440607130814x15ae9358h531e758af81d2d96@mail.gmail.com> Message-ID: <58a2be440607131109h14640f7emaa576220ff114c2d@mail.gmail.com> Hmm... well I feel a little silly. It did work. Changed the wrong click in my script. :-( Thanks for the help Bret. On 7/13/06, Bret Pettichord wrote: > > What error message does it give when you use "click_no_wait" > > > Bret > > On 7/13/06, Christian Leskowsky < christian.leskowsky at gmail.com> wrote: > > > > Hey Bret, > > > > Thanks for your quick response! > > > > "click_no_wait" doesn't seem to work either. > > > > > > > > On 7/13/06, Bret Pettichord < bret at pettichord.com> wrote: > > > > > > Can you try using a "click_no_wait" instead of "click" to submit the > > > form and close the popup window, and tell us whether the error stops > > > happening? > > > > > > Bret > > > > > > On 7/13/06, Christian Leskowsky < christian.leskowsky at gmail.com> > > > wrote: > > > Hi guys, > > > > > > I've found a problem similar to mine that was discussed on the list in > > > May (I've borrowed the message header). Does anybody know what happened with > > > it? I've hit it again in my testing. Let me explain what's happening... > > > > > > My environment: > > > > > > Windows XP SP2 > > > ruby 1.8.4 (2005-12-24) [i386-mswin32] > > > watir-1.5.1.1045 > > > > > > The error: > > > > > > OLE error code:80004005 in > > > > > > HRESULT error code:0x80020009 > > > Exception occurred. from > > > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1045/./watir.rb:1640:in > > > `wait' > > > from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1045/./watir.rb:2401:in > > > `click' > > > from b.rb:57 > > > > > > What's happening in the web application: > > > > > > 1/ A popup window with a form is created and attached to > > > 2/ assorted text fields are filled in > > > 3/ the form is submitted causing the popup window to close > > > 4/ ruby exits with the exception thrown above > > > > > > Thanks for any help, > > > > > > -- > > > - > > > > > > 'There was an owl lived in an oak. > > > The more he heard, the less he spoke. > > > The less he spoke, the more he heard.' > > > > > > Christian Leskowsky > > > christian.leskowsky at gmail.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 > > > > > > > > > > > > -- > > - > > > > 'There was an owl lived in an oak. > > The more he heard, the less he spoke. > > The less he spoke, the more he heard.' > > > > Christian Leskowsky > > christian.leskowsky at gmail.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 > > -- - 'There was an owl lived in an oak. The more he heard, the less he spoke. The less he spoke, the more he heard.' Christian Leskowsky christian.leskowsky at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060713/7ccf2f2b/attachment.html From dave.hoover at gmail.com Thu Jul 13 15:03:07 2006 From: dave.hoover at gmail.com (Dave Hoover) Date: Thu, 13 Jul 2006 14:03:07 -0500 Subject: [Wtr-general] FireWatir deserves its own project In-Reply-To: References: <11c8704e0607120420m77ef53fbmfa83169c919640e7@mail.gmail.com> Message-ID: <11c8704e0607131203k42f34f79r5124594f6871c16@mail.gmail.com> > But the bigger issue of ensuring compatability between versions of Watir is > tricky. For example, FireWatir doesn't support frames. Is this reasonable? I suppose that is up to whatever minimum standard is used to determine whether an API is sufficiently compatible or not. I like the idea of having a test suite that determines whether the API has met the standard ... and I suggest the suite be named Poseidon (god of wat[i]r). > And even then, i suspect that each implementation would have some additional > features that were not part of the standard API. No doubt. For example, SafariWatir has close and quit methods. One closes the window, while the other quits the application. Another example: SafariWatir has an alert method that returns an AlertWindow that has a click method. :-) > This suggests that each implementation also should have a > "strict" mode where it only allows execution against the core API or least > creates warnings for all other uses. This way, users (or their managers) > could make sure their tests were portable. Otherwise they wouldn't know > until they tried. Great idea. From bret at pettichord.com Thu Jul 13 16:16:13 2006 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 13 Jul 2006 15:16:13 -0500 Subject: [Wtr-general] FireWatir deserves its own project In-Reply-To: <11c8704e0607131203k42f34f79r5124594f6871c16@mail.gmail.com> References: <11c8704e0607120420m77ef53fbmfa83169c919640e7@mail.gmail.com> <11c8704e0607131203k42f34f79r5124594f6871c16@mail.gmail.com> Message-ID: On 7/13/06, Dave Hoover wrote: > > > And even then, i suspect that each implementation would have some > additional > > features that were not part of the standard API. > > No doubt. For example, SafariWatir has close and quit methods. One > closes the window, while the other quits the application. Another > example: SafariWatir has an alert method that returns an AlertWindow > that has a click method. :-) I put together a half-baked implementation of this in watir/ie in trunk (watir/dialog.rb, watir/unittests/dialog_test.rb). I called my method "dialog" instead of "alert". I guess this is a good question for the community -- what should this method be called? I don't think anyone is using this method and i have no emotional attachment. With mine this is how you click an alert button: ie.dialog.button("OK").click Comments? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060713/610a0301/attachment.html From dave.hoover at gmail.com Thu Jul 13 16:30:34 2006 From: dave.hoover at gmail.com (Dave Hoover) Date: Thu, 13 Jul 2006 15:30:34 -0500 Subject: [Wtr-general] FireWatir deserves its own project In-Reply-To: References: <11c8704e0607120420m77ef53fbmfa83169c919640e7@mail.gmail.com> <11c8704e0607131203k42f34f79r5124594f6871c16@mail.gmail.com> Message-ID: <11c8704e0607131330g1b378574t95665d6f38f9bf34@mail.gmail.com> On 7/13/06, Bret Pettichord wrote: > With mine this is how you click an alert button: > > ie.dialog.button("OK").click For clarification, this is how you click an alert button with SafariWatir: browser.alert.click It doesn't take a parameter since alert boxes only have one button. There would be a separate method for confirm boxes: browser.confirm("OK").click browser.confirm("Cancel").click Like Bret, I have no emotional attachment. Just looking to fit in with the rest of the API. From manishs at reconnex.net Fri Jul 14 03:31:26 2006 From: manishs at reconnex.net (Manish Sapariya) Date: Fri, 14 Jul 2006 13:01:26 +0530 Subject: [Wtr-general] why win32ole needed to be patched or modified In-Reply-To: References: <44AE86DE.1050209@reconnex.net> Message-ID: <44B7484E.6070307@reconnex.net> Hi Bret, I was trying to understand in general how Ruby provides access to win32ole library. If I want to drive my custom application, do I need to patch win32ole binding in such a way. I think I will have to do my homework better about ole and ruby ole binding. I didnt understand the need for patch quite exactly, but more understanding of ruby ole binding will make picture clear. Thanks anyways. Regards, Manish Bret Pettichord wrote: > On 7/7/06, *Manish Sapariya* > wrote: > > Hi, > Bret mentioned in one of the posts that in order for watir to be > working, > win32ole ruby bindings needed to be patched. > > I was wondering for what kind of patch this was? > If I want my own app to be driven using ole, what kind of patch I > might > require to add? > > I would appreciate pointers to the right forum if this is not the one. > Thanks and Regards, > Manish > > > I'm not quite sure what the basis for your question is. So i'll say > some things and i hope you will find them useful. If not, please > provide more details about what you are looking for. > > Please don't take this personally, but since it seems like this is not > clear to everyone on the list, i feel like i need to say that you > should not feel insulted by my response and if you do, it would be > better to say so than respond rudely yourself. > > Now for your question. > > The WIN32OLE patch was needed for our support for modal dialogs -- > which are an IE-only feature. Specifically, we wrote a DLL that > returned a reference to the DOM in the modal dialog. We needed a way > to "cast" this into a WIN32OLE object. We patched the WIN32OLE library > to provide this "casting" ability. The WIN32OLE patch is included in > the Watir source so you can look at it yourself, if that helps. > > Does this help? > > Bret > ------------------------------------------------------------------------ > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From Adrian.Rutter at tnt.com Fri Jul 14 10:34:30 2006 From: Adrian.Rutter at tnt.com (Adrian Rutter) Date: Fri, 14 Jul 2006 15:34:30 +0100 Subject: [Wtr-general] UI Mapping Revisited Message-ID: Instead of having a class map i.e. class ObjectMap def login_link;$ie.link(:text, 'Log in');end def logout_link;$ie.link(:text, 'Log out');end end Then map = ObjectMap.new map.login_link.click map.logout_link.click why not put the app map in a module so in the script we could just go login_link.click logout_link.click ? Cheers aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- From bret at pettichord.com Fri Jul 14 12:17:02 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 14 Jul 2006 11:17:02 -0500 Subject: [Wtr-general] UI Mapping Revisited In-Reply-To: References: Message-ID: The purpose of classes and objects (which are created from classes) is to encapsulate data. In your example, you are on encapsulating data, so you correct in saying that a module is as good as a class. This gives you the encapsulation: class ObjectMap def new ie; @ie = ie; end def login_link;$ie.link(:text, 'Log in');end def logout_link;$ie.link(:text, 'Log out');end end Then map = ObjectMap.new $ie map.login_link.click map.logout_link.click And if you want a cleaner syntax you can do... ObjectMap.new($ie).instance_eval do login_link.click logout_link.click end Bret On 7/14/06, Adrian Rutter wrote: > > > Instead of having a class map > > i.e. > > class ObjectMap > def login_link;$ie.link(:text, 'Log in');end > def logout_link;$ie.link(:text, 'Log out');end > end > > Then > > map = ObjectMap.new > map.login_link.click > map.logout_link.click > > why not put the app map in a module > > so in the script we could just go > > login_link.click > logout_link.click ? > > Cheers > > aidy > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060714/8c1e323f/attachment.html From bret at pettichord.com Fri Jul 14 13:05:28 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 14 Jul 2006 12:05:28 -0500 Subject: [Wtr-general] on vacation Message-ID: I will be on vacation and offline next week. The list mostly takes care of itself, but once or twice a week a post comes in that requires approval. the list automatically screens any post that is over 40 KB. These are either long threads, that haven't been cropped, or posts that include HTML attachments (normally a good thing). I almost always approve them, but like the fact that these require manual intervention, because it probably makes people think twice about long posts in the future. Would anyone be interested in helping to moderate the list? Paul Rogers is also set up as a moderator, but I know he sometimes has trouble directly accessing the list. Speak up today, before I'm gone. Contact me directly (not the list). Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060714/bf265dae/attachment.html From paul.rogers at shaw.ca Sun Jul 16 23:49:56 2006 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sun, 16 Jul 2006 21:49:56 -0600 Subject: [Wtr-general] on vacation References: Message-ID: <00ee01c6a954$11882580$6400a8c0@laptop> ok, I can watch out for any problems. Paul ----- Original Message ----- From: Bret Pettichord To: wtr-general at rubyforge.org Sent: Friday, July 14, 2006 11:05 AM Subject: [Wtr-general] on vacation I will be on vacation and offline next week. The list mostly takes care of itself, but once or twice a week a post comes in that requires approval. the list automatically screens any post that is over 40 KB. These are either long threads, that haven't been cropped, or posts that include HTML attachments (normally a good thing). I almost always approve them, but like the fact that these require manual intervention, because it probably makes people think twice about long posts in the future. Would anyone be interested in helping to moderate the list? Paul Rogers is also set up as a moderator, but I know he sometimes has trouble directly accessing the list. Speak up today, before I'm gone. Contact me directly (not the list). Bret ------------------------------------------------------------------------------ _______________________________________________ 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/20060716/6e8f3a4b/attachment.html From jatinder.saundh at gmail.com Mon Jul 17 09:34:03 2006 From: jatinder.saundh at gmail.com (Jatinder Singh) Date: Mon, 17 Jul 2006 19:04:03 +0530 Subject: [Wtr-general] Including Features of Universally used commercial test automation tools. Message-ID: <6368279b0607170634o341e4997tdf3c084d473f9f18@mail.gmail.com> Hi, I have spent around 2+ years working with Test Automation tools, specifically Rational Robot, Rational XDE Tester(now known as RFT). I was looking through the features of WATIR tool and found it lacking some good features of commercial tool(may be I overlooked them). May be I found following missing, 1. objects maps(so that there is centralized repositry of object definations) 2. Verification points. 3. Inbuilt Logging mechanisms.(this feature many projects ignore, but I believe this is the most important feature as logs are what finally to be seen) 4. Managing Tests. 5. Inbuilt keyword driven testing(a DSL to let test writers write tests without writing ruby code) 6. Recording tool. (I am not sure if it really does not exist in WATIR world) Apart from above there are some pain areas with various automation tools. such things should not be repeated in WATIR. >From my past expereince, I have few suggestions and I would be glad to share and contribute to WATIR project. Please let me know the process/procedure for contributing to WATIR project. Regards, Jatinder -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060717/ccdd5633/attachment.html From Adrian.Rutter at tnt.com Mon Jul 17 11:11:44 2006 From: Adrian.Rutter at tnt.com (Adrian Rutter) Date: Mon, 17 Jul 2006 16:11:44 +0100 Subject: [Wtr-general] svn download Message-ID: Hi Charly, I am working off ruby 184.17. I have un-installed the one-click installer and locally gem installed the new watir build to C:\Program Files\Watir. However the new build (or the way I am setting it up) freezes my i.e. Is everyone using ruby 182? Has anyone experienced this problem? The only thing I really need the latest watir build for is the multiple param object hook. aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- From charley.baker at gmail.com Mon Jul 17 11:22:30 2006 From: charley.baker at gmail.com (Charley Baker) Date: Mon, 17 Jul 2006 09:22:30 -0600 Subject: [Wtr-general] Including Features of Universally used commercial test automation tools. In-Reply-To: <6368279b0607170634o341e4997tdf3c084d473f9f18@mail.gmail.com> References: <6368279b0607170634o341e4997tdf3c084d473f9f18@mail.gmail.com> Message-ID: Hi Jatinder, One of the best ways to contribute is to follow the mailing list and post. I've answered some of your points below: On 7/17/06, Jatinder Singh wrote: > > Hi, > > I have spent around 2+ years working with Test Automation tools, > specifically Rational Robot, Rational XDE Tester(now known as RFT). > I was looking through the features of WATIR tool and found it lacking some > good features of commercial tool(may be I overlooked them). > May be I found following missing, > 1. objects maps(so that there is centralized repositry of object > definations) > Object maps are easy to create in Ruby, you might look at a previous thread in the last few days on UI Mapping: http://www.mail-archive.com/wtr-general%40rubyforge.org/msg04233.html 2. Verification points. > Take a look at the Watir user guide which lists one way of doing this through Test Unit Assertions: http://wtr.rubyforge.org/watir_user_guide.html 3. Inbuilt Logging mechanisms.(this feature many projects ignore, but I > believe this is the most important feature as logs are what finally to be > seen) > Watir has a logger built into it which has a default logger subclass that writes to STDERR. You can use ie.log(message) if you want to use the default logger, you can override with your own logger by using the ruby standard logging library: http://www.ruby-doc.org/stdlib/libdoc/logger/rdoc/index.html 4. Managing Tests. > There are several ways to do this, see below for a link to WET. 5. Inbuilt keyword driven testing(a DSL to let test writers write tests > without writing ruby code) > Several people have done this, again see below for a link to WET or take a look at Systir which is a basic framework to accomplish this. http://atomicobject.com/systir.page 6. Recording tool. (I am not sure if it really does not exist in WATIR > world) > Recording tools are of dubious use, you can search the mailing list for some discussion about automation recording tools. There are a couple of recording tools that were made for Watir, most of us find them to be unnecessary in general. Apart from above there are some pain areas with various automation tools. > such things should not be repeated in WATIR. > Watir is designed to be a base automation library able to be used by a framework. With Ruby as it's scripting language, it is designed to be as extensible as you'd like it to be. If you're looking for an example of an already built framework around Watir, you might want to take a look at WET which has many of the points you've listed above: http://www.openqa.org/wet/ Suggestions, questions and feedback are of course always welcome. I hope that helps. -Charley >From my past expereince, I have few suggestions and I would be glad to share > and contribute to WATIR project. > > Please let me know the process/procedure for contributing to WATIR > project. > > Regards, > Jatinder > > > > > _______________________________________________ > 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/20060717/655f245c/attachment.html From jatinder.saundh at gmail.com Mon Jul 17 11:29:08 2006 From: jatinder.saundh at gmail.com (Jatinder Singh) Date: Mon, 17 Jul 2006 20:59:08 +0530 Subject: [Wtr-general] Including Features of Universally used commercial test automation tools. In-Reply-To: References: <6368279b0607170634o341e4997tdf3c084d473f9f18@mail.gmail.com> Message-ID: <6368279b0607170829j796a9923sadfadb50aff7d1c6@mail.gmail.com> Charley, Thanks for the summary! I will go through the pointers you have given and reply back with suggestions if I have any. Regards, Jatinder On 7/17/06, Charley Baker wrote: > > Hi Jatinder, > > One of the best ways to contribute is to follow the mailing list and > post. I've answered some of your points below: > > On 7/17/06, Jatinder Singh wrote: > > > > Hi, > > > > I have spent around 2+ years working with Test Automation tools, > > specifically Rational Robot, Rational XDE Tester(now known as RFT). > > I was looking through the features of WATIR tool and found it lacking > > some good features of commercial tool(may be I overlooked them). > > May be I found following missing, > > 1. objects maps(so that there is centralized repositry of object > > definations) > > > > Object maps are easy to create in Ruby, you might look at a previous > thread in the last few days on UI Mapping: > http://www.mail-archive.com/wtr-general%40rubyforge.org/msg04233.html > > 2. Verification points. > > > > Take a look at the Watir user guide which lists one way of doing this > through Test Unit Assertions: http://wtr.rubyforge.org/watir_user_guide.html > > > 3. Inbuilt Logging mechanisms.(this feature many projects ignore, but I > > believe this is the most important feature as logs are what finally to be > > seen) > > > > Watir has a logger built into it which has a default logger subclass that > writes to STDERR. You can use ie.log(message) if you want to use the > default logger, you can override with your own logger by using the ruby > standard logging library: > http://www.ruby-doc.org/stdlib/libdoc/logger/rdoc/index.html > > 4. Managing Tests. > > > > There are several ways to do this, see below for a link to WET. > > 5. Inbuilt keyword driven testing(a DSL to let test writers write tests > > without writing ruby code) > > > > Several people have done this, again see below for a link to WET or take > a look at Systir which is a basic framework to accomplish this. > http://atomicobject.com/systir.page > > 6. Recording tool. (I am not sure if it really does not exist in WATIR > > world) > > > Recording tools are of dubious use, you can search the mailing list for > some discussion about automation recording tools. There are a couple of > recording tools that were made for Watir, most of us find them to be > unnecessary in general. > > > Apart from above there are some pain areas with various automation tools. > > such things should not be repeated in WATIR. > > > > > Watir is designed to be a base automation library able to be used by a > framework. With Ruby as it's scripting language, it is designed to be as > extensible as you'd like it to be. If you're looking for an example of an > already built framework around Watir, you might want to take a look at WET > which has many of the points you've listed above: > http://www.openqa.org/wet/ > > Suggestions, questions and feedback are of course always welcome. I hope > that helps. > > -Charley > > From my past expereince, I have few suggestions and I would be glad to > share and contribute to WATIR project. > > Please let me know the process/procedure for contributing to WATIR > project. > > Regards, > Jatinder > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.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/20060717/03ed2e48/attachment.html From ChintakrindiMeghana at managementdynamics.com Mon Jul 17 11:33:21 2006 From: ChintakrindiMeghana at managementdynamics.com (Chintakrindi Meghanath ) Date: Mon, 17 Jul 2006 11:33:21 -0400 Subject: [Wtr-general] Watir Framework Message-ID: <6CF3AA425295C7479483AC0018EDF98B01DAE159@MI8NYCMAIL03.Mi8.com> Hi Aidy Is your framework is available as open source or its only for the internal purpose ? Thanks Meghanath -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Adrian Rutter Sent: Thursday, July 13, 2006 6:16 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Watir Framework? > Are you in the process of developing any framework using the watir ? > If yes, can you send some information about it ? With every test case, I write a Test Class An example: class ST_LTD_3 def initialize $log.test_info(self.class, 'Select Depot which has territories and click search', 'All matching territories are displayed') string_to_search = ["DF1", "MA Portfolio"] start_browser login goto_territory_list search_territory("UNITED KINGDOM", "BRISTOL") click_search string_to_search.each {|x| $log.verify_html(x) } rescue => e p "test failed: #{e.message}" p e.backtrace ensure log_out close_window end end breakdown $log.test_info(self.class, 'Select Depot which has territories and click search', 'All matching territories are displayed') This logs the test name, a description of the test and the expected result to an xml file start_browser login each window or area of funtionality is in a module module Browser def start_browser(url='http://gbahevm06l24.gb.tntpost.com:9081/wps/portal') $ie = Watir::IE.new $ie.goto(url) $ie.maximize() end end module Login def login(username='g126ahe', password='g126ahe') $ie.link(:text, 'Log in').click $ie.text_field(:name, /userid/).set(username) $ie.text_field(:name, /password/).set(password) $ie.button(:value,'Log in').click end def log_out $ie.link(:text, 'Log out').click end end this logs a pass or fail to the xml log $log.verify_html(x) full xml log file class Logging def initialize @doc = Document.new xmldecl = XMLDecl.default @doc.add(xmldecl) @root = @doc.add_element 'testresults' end def verify_html(vp_text) #add optional params if $ie.contains_text(vp_text) self.test_results('pass') else self.test_results('fail', "#{vp_text} is NOT on the page") end #do a not here end def test_info(test_name, desc, exp) @test = @root.add_element 'test' @test.attributes["id"] = test_name des= @test.add_element 'description' des.text = desc res = @test.add_element 'expected' res.text = exp end def test_results(result, *msg) if result.upcase == 'PASS' then test_status= @test.add_element 'teststatus' test_status.text = 'PASS' elsif result.upcase == 'FAIL' then fail = @test.add_element 'teststatus' fail.text = 'FAIL!' fail_msg = @test.add_element 'failmessage' fail_msg.text = msg elsif result.upcase == 'SKIP' skip = @test.add_element 'teststatus' skip.text = 'SKIP' skip_msg = @test.add_element 'skipmessage' fail_msg.text = msg end end def write_xml_to_file @doc.write($stdout, 1) @doc.write(File.open("C:/test_results.xml","w")) end end the xml output is something like this - Check that window displayed is correct Correct image is displayed PASS - Select to Add an employee in a role Employee was assigned to territory successfully FAIL! security not implemented gonna fail to read in a csv do something like this def enter_territory require 'csv' reader = CSV.open('C:\test_data', 'r') header = reader.shift reader.each{|row| next unless row.any? p row } end the appmap bit, I am going to steal of Bret's suggestion in a previous post feedback or suggestions welcome aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From charley.baker at gmail.com Mon Jul 17 11:35:19 2006 From: charley.baker at gmail.com (Charley Baker) Date: Mon, 17 Jul 2006 09:35:19 -0600 Subject: [Wtr-general] svn download In-Reply-To: References: Message-ID: Hey Aidy, I've been working off of 182, but just moved to 184 last week and everything's working fine. The gem install should install it to your local ruby gems directory, I'm not sure what you mean when you say you installed it to c:\program files\watir, you shouldn't have anything there. You might want to double check the installed versions by running the Ruby and Watir version steps in the FAQ. Make sure any previous watir files are cleaned out from your ruby directory, site_install. Let me know what you find. -Charley On 7/17/06, Adrian Rutter wrote: > > > Hi Charly, > > I am working off ruby 184.17. I have un-installed the one-click installer > and locally gem installed the new watir build to C:\Program Files\Watir. > However the new build (or the way I am setting it up) freezes my i.e. Is > everyone using ruby 182? Has anyone experienced this problem? The only > thing I really need the latest watir build for is the multiple param > object > hook. > > aidy > > > > > --------------------------------------------------------------------------------------------------------------- > This message and any attachment are confidential and may be privileged or > otherwise protected from disclosure. > If you are not the intended recipient, please telephone or email the > sender and delete this message and any attachment from your system. > If you are not the intended recipient you must not copy this message or > attachment or disclose the contents to any other person. > > --------------------------------------------------------------------------------------------------------------- > _______________________________________________ > 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/20060717/b8d3a600/attachment.html From M.Muralidhar at ps.net Mon Jul 17 12:34:53 2006 From: M.Muralidhar at ps.net (Muralidhar, M) Date: Mon, 17 Jul 2006 22:04:53 +0530 Subject: [Wtr-general] Welcome to the "Wtr-general" mailing list (Digest mode) Message-ID: <2B2F52B02BA81643B599BB9E561407496D7CF0@pscbanpexch01.perotsystems.net> Hi, I want to know if WATIR can be integrated with a defect tracking and a requirement management tool? If so, please specify to which tools WATIR can be integrated to. Regards, Murali -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of wtr-general-request at rubyforge.org Sent: Monday, July 17, 2006 10:03 PM To: Muralidhar, M Subject: Welcome to the "Wtr-general" mailing list (Digest mode) Welcome to the Wtr-general at rubyforge.org mailing list! Howdy - welcome to the Web Testing with Ruby general mailing list. To post to this list, send your email to: wtr-general at rubyforge.org General information about the mailing list is at: http://rubyforge.org/mailman/listinfo/wtr-general If you ever want to unsubscribe or change your options (eg, switch to or from digest mode, change your password, etc.), visit your subscription page at: http://rubyforge.org/mailman/options/wtr-general/m.muralidhar%40ps.net You can also make such adjustments via email by sending a message to: Wtr-general-request at rubyforge.org with the word `help' in the subject or body (don't include the quotes), and you will get back a message with instructions. You must know your password to change your options (including changing the password, itself) or to unsubscribe. It is: $Murali99 Normally, Mailman will remind you of your rubyforge.org mailing list passwords once every month, although you can disable this if you prefer. This reminder will also include instructions on how to unsubscribe or change your account options. There is also a button on your options page that will email your current password to you. From arkie at compli.com Mon Jul 17 13:19:05 2006 From: arkie at compli.com (Alan Ark) Date: Mon, 17 Jul 2006 12:19:05 -0500 Subject: [Wtr-general] Welcome to the "Wtr-general" mailing list (Digestmode) In-Reply-To: <2B2F52B02BA81643B599BB9E561407496D7CF0@pscbanpexch01.perotsystems.net> Message-ID: <7F2DAB1053EC4D47B821DA0A7BA5E3EBC5F8A5@mail-21ps.atlarge.net> I am not aware of any out of the box integration with any defect tracking/ RM tools, but that is not to say that it can't be done. Since Watir is written in ruby, and you can pretty much do anything you want to in Ruby, it probably can be done. But it will probably require some investment on your part to make it work. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Muralidhar, M Sent: Monday, July 17, 2006 9:35 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Welcome to the "Wtr-general" mailing list (Digestmode) Hi, I want to know if WATIR can be integrated with a defect tracking and a requirement management tool? If so, please specify to which tools WATIR can be integrated to. Regards, Murali -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of wtr-general-request at rubyforge.org Sent: Monday, July 17, 2006 10:03 PM To: Muralidhar, M Subject: Welcome to the "Wtr-general" mailing list (Digest mode) Welcome to the Wtr-general at rubyforge.org mailing list! Howdy - welcome to the Web Testing with Ruby general mailing list. To post to this list, send your email to: wtr-general at rubyforge.org General information about the mailing list is at: http://rubyforge.org/mailman/listinfo/wtr-general If you ever want to unsubscribe or change your options (eg, switch to or from digest mode, change your password, etc.), visit your subscription page at: http://rubyforge.org/mailman/options/wtr-general/m.muralidhar%40ps.net You can also make such adjustments via email by sending a message to: Wtr-general-request at rubyforge.org with the word `help' in the subject or body (don't include the quotes), and you will get back a message with instructions. You must know your password to change your options (including changing the password, itself) or to unsubscribe. It is: $Murali99 Normally, Mailman will remind you of your rubyforge.org mailing list passwords once every month, although you can disable this if you prefer. This reminder will also include instructions on how to unsubscribe or change your account options. There is also a button on your options page that will email your current password to you. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.1/389 - Release Date: 7/14/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.1/389 - Release Date: 7/14/2006 From ben_simo at standardandpoors.com Mon Jul 17 18:44:37 2006 From: ben_simo at standardandpoors.com (Simo, Ben) Date: Mon, 17 Jul 2006 16:44:37 -0600 Subject: [Wtr-general] Install problem? Message-ID: Hello, I have just installed Ruby and WATIR on a Windows XP box. When I try to run the unit tests, I get an error stating that "gem_original_require" is missing. C:\watir\unittests>all_tests.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- watir (LoadError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from C:/watir/unittests/../unittests/setup.rb:4 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from C:/watir/unittests/all_tests.rb:4 I'm not sure if it matters: when I installed WATIR from the .exe package, I got errors about not being able to write to c:\watir until I manually created the directory. I manually created the c:\watir directory and then installed to it. Any ideas why I can't run the all_tests.rb script? Thank you, Ben Simo -------------------------------------------------------- The information contained in this message is intended only for the recipient, and may be a confidential attorney-client communication or may otherwise be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, please be aware that any dissemination or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the message and deleting it from your computer. -------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060717/6d692f78/attachment.html From kperez at cardinalsolutions.com Mon Jul 17 15:47:12 2006 From: kperez at cardinalsolutions.com (Ken Perez) Date: Mon, 17 Jul 2006 15:47:12 -0400 Subject: [Wtr-general] Attaching a Popup Message-ID: <67A1E8E424B41744A599459FE59EA4D40C5EC4@csgcinml01.cardinalsolutions.com> The app that I am working with has a lot of popups with important functionality on them. I have been unsuccessful in getting Watir to see these new windows, and I cant figure out why. The window Im looking at now appears after a button click: ie.button(:name, "addItem").click and Ive tried all these variations to get it to work: ie2 = Watir::IE.attach(:title, "Project - Administration -- Web Page Dialog") ie2 = Watir::IE.attach(:title, "Project - Administration") ie2 = Watir::IE.attach(:title, /Project/) ie2 = Watir::IE.attach(:title, /project/) ie2 = Watir::IE.attach(:url, "website list at the bottom of the new window") ie2 = Watir::IE.attach(:url, "website found in the properties of the button") ie2 = Watir::IE.attach(:url, /Project/) ie2 = Watir::IE.attach(:url, /project/) plus a few others, followed by ie2.button(:value, "Cancel").click to see if it worked. It either gives me 'Unable to locate a window with X' (#'s 5 & 6) or it does nothing (most of the rest of them). When it gets to the window, it just sits and waits, and when I click Cancel it stops the run, and exits with no errors. So its not finding the window, but not giving me any errors. I use Starclicker to deal with 'Are you sure Y/N' popups, but I have to actually edit things in these popups. Is there another way to attach a window, or use functionality on it? From vikashkumar051 at yahoo.co.in Tue Jul 18 07:05:31 2006 From: vikashkumar051 at yahoo.co.in (VIKASH KUMAR) Date: Tue, 18 Jul 2006 12:05:31 +0100 (BST) Subject: [Wtr-general] Getting problem in calling click event where various buttons have the same name Message-ID: <20060718110531.18277.qmail@web7813.mail.in.yahoo.com> Sir, In my web page there are lots of buttons having same name, they are called using _javascript. They are as follows: I am unable to call the click event using ie.button(:name,'delete').click as because all the buttons have same name. Please send me the solution for this. Thanks in Advance With Regards Vikash Kumar --------------------------------- Find out what India is talking about on Yahoo! Answers India. Send FREE SMS from New Yahoo! Messenger to Mobile: Download NOW! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060718/50faf289/attachment.html From Mark_Cain at RL.gov Tue Jul 18 10:08:47 2006 From: Mark_Cain at RL.gov (Cain, Mark) Date: Tue, 18 Jul 2006 07:08:47 -0700 Subject: [Wtr-general] Attaching a Popup In-Reply-To: <67A1E8E424B41744A599459FE59EA4D40C5EC4@csgcinml01.cardinalsolutions.com> Message-ID: What you are trying to do can't be done with the version of Watir.rb you are using because the page you are trying to attach to is a Modal window. Try this one at: https://svn.openqa.org/svn/watir/branches/modal_dialog/watir/ (you will also need the files from the Watir folder--the IEDialog and Win32ole forders.) Copy the Watir.rb file (and the watir directory mentioned above) into you ruby installation directory like: C:\ruby\lib\ruby\site_ruby\1.8 ie2 = $ie.attach_modal('Project - Administration') ie2.button(:value, "Cancel").click --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Ken Perez Sent: Monday, July 17, 2006 12:47 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Attaching a Popup The app that I am working with has a lot of popups with important functionality on them. I have been unsuccessful in getting Watir to see these new windows, and I cant figure out why. The window Im looking at now appears after a button click: ie.button(:name, "addItem").click and Ive tried all these variations to get it to work: ie2 = Watir::IE.attach(:title, "Project - Administration -- Web Page Dialog") ie2 = Watir::IE.attach(:title, "Project - Administration") ie2 = Watir::IE.attach(:title, /Project/) ie2 = Watir::IE.attach(:title, /project/) ie2 = Watir::IE.attach(:url, "website list at the bottom of the new window") ie2 = Watir::IE.attach(:url, "website found in the properties of the button") ie2 = Watir::IE.attach(:url, /Project/) ie2 = Watir::IE.attach(:url, /project/) plus a few others, followed by ie2.button(:value, "Cancel").click to see if it worked. It either gives me 'Unable to locate a window with X' (#'s 5 & 6) or it does nothing (most of the rest of them). When it gets to the window, it just sits and waits, and when I click Cancel it stops the run, and exits with no errors. So its not finding the window, but not giving me any errors. I use Starclicker to deal with 'Are you sure Y/N' popups, but I have to actually edit things in these popups. Is there another way to attach a window, or use functionality on it? _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Mark_Cain at RL.gov Tue Jul 18 10:13:12 2006 From: Mark_Cain at RL.gov (Cain, Mark) Date: Tue, 18 Jul 2006 07:13:12 -0700 Subject: [Wtr-general] Getting problem in calling click event where variousbuttons have the same name In-Reply-To: <20060718110531.18277.qmail@web7813.mail.in.yahoo.com> Message-ID: Starting at the topmost delete button, count them until you get to the desired button. $ie.button(:index,3).click -- would click the third from the top delete button on the page. --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of VIKASH KUMAR Sent: Tuesday, July 18, 2006 4:06 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Getting problem in calling click event where variousbuttons have the same name Sir, In my web page there are lots of buttons having same name, they are called using _javascript. They are as follows: I am unable to call the click event using ie.button(:name,'delete').click as because all the buttons have same name. Please send me the solution for this. Thanks in Advance With Regards Vikash Kumar ________________________________ Find out what India is talking about on Yahoo! Answers India. Send FREE SMS from New Yahoo! Messenger to Mobile: Download NOW! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060718/effbb77a/attachment.html From Mark_Cain at RL.gov Tue Jul 18 10:14:05 2006 From: Mark_Cain at RL.gov (Cain, Mark) Date: Tue, 18 Jul 2006 07:14:05 -0700 Subject: [Wtr-general] Install problem? In-Reply-To: Message-ID: I have always had to install rubygems for a new ruby install. Get the gem here: http://rubyforge.org/projects/rubygems/ Download it somewhere. Open a command prompt and navigate to where you downloaded it. Type gem install rubygems*.gem This fix the same problem for me on a new install. Hope this helps, --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Simo, Ben Sent: Monday, July 17, 2006 3:45 PM To: Wtr-general at rubyforge.org Subject: [Wtr-general] Install problem? Hello, I have just installed Ruby and WATIR on a Windows XP box. When I try to run the unit tests, I get an error stating that "gem_original_require" is missing. C:\watir\unittests>all_tests.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- watir (LoadError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from C:/watir/unittests/../unittests/setup.rb:4 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from C:/watir/unittests/all_tests.rb:4 I'm not sure if it matters: when I installed WATIR from the .exe package, I got errors about not being able to write to c:\watir until I manually created the directory. I manually created the c:\watir directory and then installed to it. Any ideas why I can't run the all_tests.rb script? Thank you, Ben Simo ________________________________ The information contained in this message is intended only for the recipient, and may be a confidential attorney-client communication or may otherwise be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, please be aware that any dissemination or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the message and deleting it from your computer. ________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060718/16063a1f/attachment.html From mb at michaelbolton.net Tue Jul 18 10:18:27 2006 From: mb at michaelbolton.net (Michael Bolton) Date: Tue, 18 Jul 2006 10:18:27 -0400 Subject: [Wtr-general] Attaching a Popup In-Reply-To: <67A1E8E424B41744A599459FE59EA4D40C5EC4@csgcinml01.cardinalsolutions.com> Message-ID: <01ee01c6aa75$09f95ab0$6501a8c0@Koko> >The app that I am working with has a lot of popups with important functionality on them. I have been unsuccessful in getting Watir to see these new windows, and I cant figure out why. The window Im looking at now appears after a button click: >ie.button(:name, "addItem").click >and Ive tried all these variations to get it to work: >ie2 = Watir::IE.attach(:title, "Project - Administration -- Web Page Dialog") >ie2 = Watir::IE.attach(:title, "Project - Administration") >ie2 = Watir::IE.attach(:title, /Project/) >ie2 = Watir::IE.attach(:title, /project/) >ie2 = Watir::IE.attach(:url, "website list at the bottom of the new window") >ie2 = Watir::IE.attach(:url, "website found in the properties of the button") >ie2 = Watir::IE.attach(:url, /Project/) >ie2 = Watir::IE.attach(:url, /project/) >plus a few others, followed by >ie2.button(:value, "Cancel").click >to see if it worked. >It either gives me 'Unable to locate a window with X' (#'s 5 & 6) or it does nothing (most of the rest of them). When it gets to the window, it just sits and waits, and when I click Cancel it stops the run, and exits with no errors. So its not finding the window, but not giving me any errors. None of your :urls look very much like URLS to me, and if the titles in your second window are also titles of your first window, you're not likely to have success. Try working with IRB, the interactive Ruby interpreter. After your first click, try attaching using various options (maybe try matching any pattern that isn't in your first IE object, using negation?) and then type ie2.html and see what you get. ---Michael B. From Adrian.Rutter at tnt.com Tue Jul 18 10:22:18 2006 From: Adrian.Rutter at tnt.com (Adrian Rutter) Date: Tue, 18 Jul 2006 15:22:18 +0100 Subject: [Wtr-general] UI Mapping Revisited Message-ID: bret wrote > ObjectMap.new($ie).instance_eval do > login_link.click > logout_link.click > end Nice method, from what I can gather #instance_eval is pre-fixing self on the custom methods. But why are you passing a global into the constructor? cheers aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- From rand.thacker at gmail.com Tue Jul 18 11:26:08 2006 From: rand.thacker at gmail.com (Rand Thacker) Date: Tue, 18 Jul 2006 10:26:08 -0500 Subject: [Wtr-general] UI Mapping Revisited In-Reply-To: References: Message-ID: <33dc42ea0607180826sb6a98f1x4f290f90b4b19c23@mail.gmail.com> If I remember correctly, this was part of a larger thread, and they were simply providing examples in the context of the code snippets provided. So, the $ie was simply part of that code, and Bret was just providing an answer that could work for non-globals, as well. On 7/18/06, Adrian Rutter wrote: > > > bret wrote > > > ObjectMap.new($ie).instance_eval do > > login_link.click > > logout_link.click > > end > > Nice method, from what I can gather #instance_eval is pre-fixing self on > the custom methods. But why are you passing a global into the constructor? > > cheers > > aidy > > > > > --------------------------------------------------------------------------------------------------------------- > This message and any attachment are confidential and may be privileged or > otherwise protected from disclosure. > If you are not the intended recipient, please telephone or email the > sender and delete this message and any attachment from your system. > If you are not the intended recipient you must not copy this message or > attachment or disclose the contents to any other person. > > --------------------------------------------------------------------------------------------------------------- > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "I am the most humble person in the world!" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060718/fbf4ab66/attachment.html From arkie at compli.com Tue Jul 18 12:52:58 2006 From: arkie at compli.com (Alan Ark) Date: Tue, 18 Jul 2006 11:52:58 -0500 Subject: [Wtr-general] WIN32OLERuntimeError redux - innertext In-Reply-To: <7F2DAB1053EC4D47B821DA0A7BA5E3EBC5F582@mail-21ps.atlarge.net> Message-ID: <7F2DAB1053EC4D47B821DA0A7BA5E3EBC5FA0B@mail-21ps.atlarge.net> Hi guys. Just wanted to report back to the list on this issue. What I had done: Put watir/waiter into my 1.4.1 version of watir. I also had to update watir/exceptions.rb as well. Initially I thought that was working, but after running more tests, the error still appears once in a while. The next suggestion was to upgrade my Watir version to 1.5. I?ll try this at a future time, but not at this moment. Thanks for the suggestions. -Alan _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Alan Ark Sent: Thursday, July 13, 2006 7:46 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] WIN32OLERuntimeError redux - innertext Thanks for the leads folks. I?m busy with a new hire, but once I try these ideas, I will report back to the list. Much appreciated. -Alan _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Wednesday, July 12, 2006 5:20 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] WIN32OLERuntimeError redux - innertext That confirms that it is a synchronization problem. I think those useless calls are really the moral equivalent of sleep statements. Probably the cleanest and most reliable solution would be to use this after your call to IE.attach: require 'watir/waiter' WATIR::Waiter.wait_until { $ie.some_element_i_know_should_be_there.exists? } Although this library is packaged with Watir 1.5, it is a separate file (watir/waiter.rb) and can be used with 1.4 if you copy it over manually. Bret On 7/12/06, Rand Thacker wrote: I've even run into problems before where $ie.wait didn't seem to do the trick. Usually it was when the pages where doing a redirect or some other craziness that I hadn't planned on. My workaround was to go ahead and do the $ie.wait, then I threw in some thing like this: xUselessVariable = $ie.contains_text('it_would_never_contain_this_phrase') xUselessVariable = $ie.contains_text('it_would_never_contain_this_phrase_either') and just ignore the return values... and do your actions/assertions after this. I've did it twice because once helped, but didn't solve it everytime. I'm not running into those issues anymore. I know it's a hack, but it sure worked for me. Hope it helps someone else out there. On 7/12/06, Bret Pettichord wrote: Sounds like a synchronization problem. There was a known synchronization problem with IE.attach in 1.4.1. That can be avoided if you call wait after attach. Thus: $ie=IE.attach(:title,/^Compli:/) $ie.wait # add this line $ie.set_fast_speed() navigateToInbox($ie) But depending on what is in navigateToInbox, i can't tell if that is the problem here. Can you show the code in navigateToInbox? And if this change fixes your problem, let us know. I'm wondering if we shouldn't release this fix as 1.4.2. Bret _______________________________________________ Wtr-general mailing list HYPERLINK "mailto:Wtr-general at rubyforge.org" \nWtr-general at rubyforge.org HYPERLINK "http://rubyforge.org/mailman/listinfo/wtr-general" \nhttp://rubyforge.org/mailman/listinfo/wtr-general -- "I am the most humble person in the world!" _______________________________________________ Wtr-general mailing list HYPERLINK "mailto:Wtr-general at rubyforge.org"Wtr-general at rubyforge.org HYPERLINK "http://rubyforge.org/mailman/listinfo/wtr-general" \nhttp://rubyforge.org/mailman/listinfo/wtr-general -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.9.10/385 - Release Date: 7/11/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.9.10/387 - Release Date: 7/12/2006 -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.9.10/387 - Release Date: 7/12/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.1/390 - Release Date: 7/17/2006 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060718/fcf2e372/attachment.html From ChintakrindiMeghana at managementdynamics.com Tue Jul 18 14:23:57 2006 From: ChintakrindiMeghana at managementdynamics.com (Chintakrindi Meghanath ) Date: Tue, 18 Jul 2006 14:23:57 -0400 Subject: [Wtr-general] Watir Framework Message-ID: <6CF3AA425295C7479483AC0018EDF98B01DAE161@MI8NYCMAIL03.Mi8.com> Hi Aidy We have written the following watir script for calling SAFS. require 'Watir' require 'Win32API' class STAF_Watir_Interface def processRequest(otrd) oresult = Win32API.new("DDVariableStore","STAFResult","","") ostaf = otrd.getSTAFHelper() status = ostaf.sendQueueMessage(debuglog, sinfo & "HookScript processing request...") otrd.setStatusCode(-1) otrd.setStatusInfo("") message = "I did good on line "& otrd.getLineNumber() details = "I deserve something special!" status = ostaf.logPassedMessage(otrd.getFac(), message, details, oresult) processRequest = otrd.getStatusCode() end engine = "SAFS/Watir" shutdown = "False" astaf = Win32API.new("DDVariableStore","STAFUtilities","","") otrd = Win32API.new("DDVariableStore","TestRecordData","","") oresult = Win32API.new("DDVariableStore","STAFResult","","") otrd.setSTAFHelper(ostaf) status = ostaf.registerNewProcess(engine) handleid = ostaf.getHandleID() status = ostaf.sendQueueMessage(debuglog, sinfo & "HookScript initializing...") status = ostaf.resetHookEvents(engine) status = ostaf.postEvent(engine & "Start") while (shutdown == False) do status = ostaf.sendQueueMessage(debuglog, sinfo & "HookScript Ready") status = ostaf.postEvent(engine & "Ready") status = ostaf.getNextHookTestEvent(engine) status = ostaf.sendQueueMessage(debuglog, sinfo & "HookScript Dispatched") otrd.reinitialize() status = ostaf.getTestRecordDataVariant(otrd) record = otrd.getInputRecord() if record == "SHUTDOWN_HOOK" then shutdown = "True" end if (shutdown == "False") then status = processRequest(otrd) status = ostaf.sendQueueMessage(debuglog, sinfo & "HookScript Results: "& status) status = ostaf.sendTestRecordResultsVariant (otrd) status = ostaf.setHookTestResultsEvents(engine, 2) status = ostaf.resetEvent(engine & "Running") else status = ostaf.sendQueueMessage(debuglog, sinfo & "HookScript Shutting Down") status = ostaf.postEvent(engine &"Results") end end status = ostaf.resetHookEvents(engine) status = ostaf.postEvent(engine &"Shutdown") status = ostaf.sendQueueMessage(debuglog, sinfo & "HookScript Shutdown") status = ostaf.unRegisterProcess () end But we are getting the following error. D:/Program Files/Watir/unittests/11.rb:35:1n 'initialize': GetProcAddress: STAFUtilities or STAFUtilitiesA from D:/Program Files/Watir/unittests/11.rb:35 Can you help us to solve the issue ? Thanks Meghanath From ben_simo at standardandpoors.com Tue Jul 18 15:21:01 2006 From: ben_simo at standardandpoors.com (Simo, Ben) Date: Tue, 18 Jul 2006 13:21:01 -0600 Subject: [Wtr-general] Install problem? Message-ID: Mark, Thanks, but that didn't seem to fix the problem. I am having the same problem on two different Windows XP PCs (one SP1, the other SP2). Ben -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Cain, Mark Sent: Tuesday, July 18, 2006 8:14 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Install problem? I have always had to install rubygems for a new ruby install. Get the gem here: http://rubyforge.org/projects/rubygems/ Download it somewhere. Open a command prompt and navigate to where you downloaded it. Type gem install rubygems*.gem This fix the same problem for me on a new install. Hope this helps, --Mark _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Simo, Ben Sent: Monday, July 17, 2006 3:45 PM To: Wtr-general at rubyforge.org Subject: [Wtr-general] Install problem? Hello, I have just installed Ruby and WATIR on a Windows XP box. When I try to run the unit tests, I get an error stating that "gem_original_require" is missing. C:\watir\unittests>all_tests.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- watir (LoadError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from C:/watir/unittests/../unittests/setup.rb:4 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from C:/watir/unittests/all_tests.rb:4 I'm not sure if it matters: when I installed WATIR from the .exe package, I got errors about not being able to write to c:\watir until I manually created the directory. I manually created the c:\watir directory and then installed to it. Any ideas why I can't run the all_tests.rb script? Thank you, Ben Simo _____ The information contained in this message is intended only for the recipient, and may be a confidential attorney-client communication or may otherwise be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, please be aware that any dissemination or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the message and deleting it from your computer. _____ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060718/b035bd65/attachment.html From Mark_Cain at RL.gov Tue Jul 18 15:29:39 2006 From: Mark_Cain at RL.gov (Cain, Mark) Date: Tue, 18 Jul 2006 12:29:39 -0700 Subject: [Wtr-general] Install problem? In-Reply-To: Message-ID: I just remembered, one of the last times I installed ruby (either rc 3 or final I can't remember which) blew away ALL of my path information. You might check to make sure ruby/bin and ruby/lib are in your path environment variable. --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Simo, Ben Sent: Tuesday, July 18, 2006 12:21 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Install problem? Mark, Thanks, but that didn't seem to fix the problem. I am having the same problem on two different Windows XP PCs (one SP1, the other SP2). Ben -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Cain, Mark Sent: Tuesday, July 18, 2006 8:14 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Install problem? I have always had to install rubygems for a new ruby install. Get the gem here: http://rubyforge.org/projects/rubygems/ Download it somewhere. Open a command prompt and navigate to where you downloaded it. Type gem install rubygems*.gem This fix the same problem for me on a new install. Hope this helps, --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Simo, Ben Sent: Monday, July 17, 2006 3:45 PM To: Wtr-general at rubyforge.org Subject: [Wtr-general] Install problem? Hello, I have just installed Ruby and WATIR on a Windows XP box. When I try to run the unit tests, I get an error stating that "gem_original_require" is missing. C:\watir\unittests>all_tests.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- watir (LoadError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from C:/watir/unittests/../unittests/setup.rb:4 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from C:/watir/unittests/all_tests.rb:4 I'm not sure if it matters: when I installed WATIR from the .exe package, I got errors about not being able to write to c:\watir until I manually created the directory. I manually created the c:\watir directory and then installed to it. Any ideas why I can't run the all_tests.rb script? Thank you, Ben Simo ________________________________ The information contained in this message is intended only for the recipient, and may be a confidential attorney-client communication or may otherwise be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, please be aware that any dissemination or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the message and deleting it from your computer. ________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060718/06813f1a/attachment.html From ben_simo at standardandpoors.com Tue Jul 18 15:34:18 2006 From: ben_simo at standardandpoors.com (Simo, Ben) Date: Tue, 18 Jul 2006 13:34:18 -0600 Subject: [Wtr-general] Install problem? Message-ID: I just reinstalled WATIR using the GEM file instead of the one-step install. Now it works. Thank you. Ben -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Cain, Mark Sent: Tuesday, July 18, 2006 1:30 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Install problem? I just remembered, one of the last times I installed ruby (either rc 3 or final I can't remember which) blew away ALL of my path information. You might check to make sure ruby/bin and ruby/lib are in your path environment variable. --Mark _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Simo, Ben Sent: Tuesday, July 18, 2006 12:21 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Install problem? Mark, Thanks, but that didn't seem to fix the problem. I am having the same problem on two different Windows XP PCs (one SP1, the other SP2). Ben -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Cain, Mark Sent: Tuesday, July 18, 2006 8:14 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Install problem? I have always had to install rubygems for a new ruby install. Get the gem here: http://rubyforge.org/projects/rubygems/ Download it somewhere. Open a command prompt and navigate to where you downloaded it. Type gem install rubygems*.gem This fix the same problem for me on a new install. Hope this helps, --Mark _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Simo, Ben Sent: Monday, July 17, 2006 3:45 PM To: Wtr-general at rubyforge.org Subject: [Wtr-general] Install problem? Hello, I have just installed Ruby and WATIR on a Windows XP box. When I try to run the unit tests, I get an error stating that "gem_original_require" is missing. C:\watir\unittests>all_tests.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- watir (LoadError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from C:/watir/unittests/../unittests/setup.rb:4 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from C:/watir/unittests/all_tests.rb:4 I'm not sure if it matters: when I installed WATIR from the .exe package, I got errors about not being able to write to c:\watir until I manually created the directory. I manually created the c:\watir directory and then installed to it. Any ideas why I can't run the all_tests.rb script? Thank you, Ben Simo _____ The information contained in this message is intended only for the recipient, and may be a confidential attorney-client communication or may otherwise be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, please be aware that any dissemination or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the message and deleting it from your computer. _____ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060718/5368a04f/attachment.html From fxn at hashref.com Tue Jul 18 17:20:38 2006 From: fxn at hashref.com (Xavier Noria) Date: Tue, 18 Jul 2006 23:20:38 +0200 Subject: [Wtr-general] problem with nested frames Message-ID: Just in case this rings some bell. I go to a page that has frames A and B. The latter in turn is a frameset with 4 frames, say B1, ..., B4. The main area of the page is B3 and I need to follow a link in B2 to change the main area. Problem is B3, accessed as ie.frame('B').frame('B3') has the same HTML before and after the link in B2 is clicked. This website is quite convoluted, but since Watir asks for frames to IE each time I invoke frame() I don't understand what may be happening. Any idea? -- fxn From mdove at pheedo.com Tue Jul 18 19:23:15 2006 From: mdove at pheedo.com (mi) Date: Tue, 18 Jul 2006 16:23:15 -0700 Subject: [Wtr-general] for loop syntax?? Message-ID: <44BD6D63.6040708@pheedo.com> Hi all, I'm using a for loop to access arrays to fill all the text fields in my forms. For some reason, i'm getting the following error at the end of the for loop execution??? c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in `assert_exists': Unable to locate object, using name and (Watir::Exception::UnknownObjectException) from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3382:in `set' from c:/ruby/lib/ruby/site_ruby/1.8/watir/watir_simple.rb:402:in `fill_text_field' from SmokeTest.rb:25 from SmokeTest.rb:24 Thanks in advance! <<<<> require 'watir' # the watir controller\ require 'watir/watir_simple' include Watir include Watir::Simple Simple1 = Simple test_site = 'http://dev01.pheedo.com' pubInfoTextFields = ['user', 'email', 'password', 'repass', 'url', 'ssn', 'payment_address', 'payment_city', 'payment_zip'] pubInfo = ['pubUserName', 'mdove at pheedo.com', '1', '1', 'http://www.test.com', '1234', '123 st', 'some city', '97035'] #[user name, emaildAdd, passwd1, passwd2, yourSite, TaxID, StreetAdd, CityName, State, ZipCode] Simple1.new_browser_at(test_site) Simple1.click_link_with_text("Sign up now") #same as Simple::click_link_with_text("Sign up now") #click on Publisher's sign up page Simple1.click_link_with_url(test_site+"/register.phdo?mode=publish") #Enter all the required fields x=0 for x in 0..9 do Simple1.fill_text_field(pubInfoTextFields[x], pubInfo[x]) puts "pubInfoTextFields = "+pubInfoTextFields[x]+" pubInfo = "+pubInfo[x] end From dsolis at yahoo.com Tue Jul 18 22:36:39 2006 From: dsolis at yahoo.com (David Solis) Date: Tue, 18 Jul 2006 19:36:39 -0700 (PDT) Subject: [Wtr-general] Page Loading Problem Message-ID: <20060719023639.92061.qmail@web82805.mail.mud.yahoo.com> I have a problem with a site taking too long to load. I'm hoping somebody can point in the right direction. The test environment in which my script runs takes a long time to load images. The following statement waits for the page to be loaded: $ie.text_field(:name, "username").set(casino_user) Is there a way that I can force this statement to start running without waiting for the page to completely load? class LoginCasino def initialize(casino_user, casino_password, casino_url, casino_submit_key, cgc_submit_key) $ie = Watir::IE.start(casino_url) if $ie.contains_text("Username:") $ie.goto($casino_url+"/security/logoff.do") end $ie.text_field(:name, "username").set(casino_user) $ie.text_field(:name, "password").set(casino_password) if (($casino_url=~/wpt/) || ($casino_url=~/msn/) || ($casino_url=~/vgfo/)) $ie.button(:value, casino_submit_key).click elsif (($casino_url=~/cqa/) || ($casino_url=~/cdev/)) $ie.button(:value, cgc_submit_key).click end #$ie.image(:src, submit_key).click() end def logout (casino_url) if (($casino_url=~/wpt/) || ($casino_url=~/msn/) || ($casino_url=~/vgfo/)) $ie.goto($casino_url+"/security/logoff.do") elsif (($casino_url=~/cqa/) || ($casino_url=~/cdev/)) $ie.link(:text, "Log Out").click end end def shutdown $ie.close sleep 1 end end -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060718/75ebd76e/attachment.html From vikashkumar051 at yahoo.co.in Wed Jul 19 01:04:27 2006 From: vikashkumar051 at yahoo.co.in (VIKASH KUMAR) Date: Wed, 19 Jul 2006 06:04:27 +0100 (BST) Subject: [Wtr-general] Just wanted to invoke click event where the button have parameters in it Message-ID: <20060719050427.44746.qmail@web7814.mail.in.yahoo.com> Sir, In my web page there are lots of buttons having same name, they are called using javascript. They are as follows: ie.button(:index,3).click , this works great if we know the index, but if someone just doesn't know the index, knows only the parameter which is ('delete', 'KH'), then what is the solution for it? Please send me the solution for this. Thanks in Advance With Regards Vikash Kumar --------------------------------- Find out what India is talking about on Yahoo! Answers India. Send FREE SMS from New Yahoo! Messenger to Mobile: Download NOW! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060719/90ac207c/attachment.html From vikashkumar051 at yahoo.co.in Wed Jul 19 01:52:20 2006 From: vikashkumar051 at yahoo.co.in (VIKASH KUMAR) Date: Wed, 19 Jul 2006 06:52:20 +0100 (BST) Subject: [Wtr-general] selecting multiple values from on list and passing it to other list Message-ID: <20060719055220.78195.qmail@web7809.mail.in.yahoo.com> Sir, I am facing a problem in selecting multiple values from a list and passing it over to another list box with any button click, it should do it automatically. for example the list is as given below: and the other list as : Please send me a solution for selecting multiple values from list "assigned" and passing it over to list "availableSystem", without any button click event. Thanks in advance. Vikash Kumar --------------------------------- Find out what India is talking about on Yahoo! Answers India. Send FREE SMS from New Yahoo! Messenger to Mobile: Download NOW! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060719/ec23e65d/attachment.html From areed at relocationcentral.com Wed Jul 19 09:51:13 2006 From: areed at relocationcentral.com (Adam Reed) Date: Wed, 19 Jul 2006 08:51:13 -0500 Subject: [Wtr-general] Best way to log Watir output? Message-ID: <2757CAE9849293409BFE6562B949516219A4A7@rccexh001.relocationcentral.com> What is the best way to create a log file, or otherwise manipulate Watir test output? I am looking a building a framework for testing, and it would be nice to output test results to a webpage, flat file, or even to a dashboard "results window". I would want to include variables used (eg, username/password for a login script, this seems straightforward), but most importantly assertion results, test date and time, etc. Thanks, Adam -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of wtr-general-request at rubyforge.org Sent: Tuesday, July 18, 2006 9:37 PM To: wtr-general at rubyforge.org Subject: Wtr-general Digest, Vol 32, Issue 26 Send Wtr-general mailing list submissions to wtr-general at rubyforge.org To subscribe or unsubscribe via the World Wide Web, visit http://rubyforge.org/mailman/listinfo/wtr-general or, via email, send a message with subject or body 'help' to wtr-general-request at rubyforge.org You can reach the person managing the list at wtr-general-owner at rubyforge.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Wtr-general digest..." Today's Topics: 1. Re: Install problem? (Simo, Ben) 2. problem with nested frames (Xavier Noria) 3. for loop syntax?? (mi) 4. Page Loading Problem (David Solis) ---------------------------------------------------------------------- Message: 1 Date: Tue, 18 Jul 2006 13:34:18 -0600 From: "Simo, Ben" Subject: Re: [Wtr-general] Install problem? To: Message-ID: Content-Type: text/plain; charset="iso-8859-1" I just reinstalled WATIR using the GEM file instead of the one-step install. Now it works. Thank you. Ben -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Cain, Mark Sent: Tuesday, July 18, 2006 1:30 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Install problem? I just remembered, one of the last times I installed ruby (either rc 3 or final I can't remember which) blew away ALL of my path information. You might check to make sure ruby/bin and ruby/lib are in your path environment variable. --Mark _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Simo, Ben Sent: Tuesday, July 18, 2006 12:21 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Install problem? Mark, Thanks, but that didn't seem to fix the problem. I am having the same problem on two different Windows XP PCs (one SP1, the other SP2). Ben -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Cain, Mark Sent: Tuesday, July 18, 2006 8:14 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Install problem? I have always had to install rubygems for a new ruby install. Get the gem here: http://rubyforge.org/projects/rubygems/ Download it somewhere. Open a command prompt and navigate to where you downloaded it. Type gem install rubygems*.gem This fix the same problem for me on a new install. Hope this helps, --Mark _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Simo, Ben Sent: Monday, July 17, 2006 3:45 PM To: Wtr-general at rubyforge.org Subject: [Wtr-general] Install problem? Hello, I have just installed Ruby and WATIR on a Windows XP box. When I try to run the unit tests, I get an error stating that "gem_original_require" is missing. C:\watir\unittests>all_tests.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- watir (LoadError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from C:/watir/unittests/../unittests/setup.rb:4 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from C:/watir/unittests/all_tests.rb:4 I'm not sure if it matters: when I installed WATIR from the .exe package, I got errors about not being able to write to c:\watir until I manually created the directory. I manually created the c:\watir directory and then installed to it. Any ideas why I can't run the all_tests.rb script? Thank you, Ben Simo _____ The information contained in this message is intended only for the recipient, and may be a confidential attorney-client communication or may otherwise be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, please be aware that any dissemination or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the message and deleting it from your computer. _____ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060718/5368a04f /attachment-0001.html ------------------------------ Message: 2 Date: Tue, 18 Jul 2006 23:20:38 +0200 From: Xavier Noria Subject: [Wtr-general] problem with nested frames To: Wtr-general at rubyforge.org Message-ID: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Just in case this rings some bell. I go to a page that has frames A and B. The latter in turn is a frameset with 4 frames, say B1, ..., B4. The main area of the page is B3 and I need to follow a link in B2 to change the main area. Problem is B3, accessed as ie.frame('B').frame('B3') has the same HTML before and after the link in B2 is clicked. This website is quite convoluted, but since Watir asks for frames to IE each time I invoke frame() I don't understand what may be happening. Any idea? -- fxn ------------------------------ Message: 3 Date: Tue, 18 Jul 2006 16:23:15 -0700 From: mi Subject: [Wtr-general] for loop syntax?? To: wtr-general at rubyforge.org Message-ID: <44BD6D63.6040708 at pheedo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Hi all, I'm using a for loop to access arrays to fill all the text fields in my forms. For some reason, i'm getting the following error at the end of the for loop execution??? c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in `assert_exists': Unable to locate object, using name and (Watir::Exception::UnknownObjectException) from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3382:in `set' from c:/ruby/lib/ruby/site_ruby/1.8/watir/watir_simple.rb:402:in `fill_text_field' from SmokeTest.rb:25 from SmokeTest.rb:24 Thanks in advance! <<<<> require 'watir' # the watir controller\ require 'watir/watir_simple' include Watir include Watir::Simple Simple1 = Simple test_site = 'http://dev01.pheedo.com' pubInfoTextFields = ['user', 'email', 'password', 'repass', 'url', 'ssn', 'payment_address', 'payment_city', 'payment_zip'] pubInfo = ['pubUserName', 'mdove at pheedo.com', '1', '1', 'http://www.test.com', '1234', '123 st', 'some city', '97035'] #[user name, emaildAdd, passwd1, passwd2, yourSite, TaxID, StreetAdd, CityName, State, ZipCode] Simple1.new_browser_at(test_site) Simple1.click_link_with_text("Sign up now") #same as Simple::click_link_with_text("Sign up now") #click on Publisher's sign up page Simple1.click_link_with_url(test_site+"/register.phdo?mode=publish") #Enter all the required fields x=0 for x in 0..9 do Simple1.fill_text_field(pubInfoTextFields[x], pubInfo[x]) puts "pubInfoTextFields = "+pubInfoTextFields[x]+" pubInfo = "+pubInfo[x] end ------------------------------ Message: 4 Date: Tue, 18 Jul 2006 19:36:39 -0700 (PDT) From: David Solis Subject: [Wtr-general] Page Loading Problem To: wtr-general at rubyforge.org Message-ID: <20060719023639.92061.qmail at web82805.mail.mud.yahoo.com> Content-Type: text/plain; charset="iso-8859-1" I have a problem with a site taking too long to load. I'm hoping somebody can point in the right direction. The test environment in which my script runs takes a long time to load images. The following statement waits for the page to be loaded: $ie.text_field(:name, "username").set(casino_user) Is there a way that I can force this statement to start running without waiting for the page to completely load? class LoginCasino def initialize(casino_user, casino_password, casino_url, casino_submit_key, cgc_submit_key) $ie = Watir::IE.start(casino_url) if $ie.contains_text("Username:") $ie.goto($casino_url+"/security/logoff.do") end $ie.text_field(:name, "username").set(casino_user) $ie.text_field(:name, "password").set(casino_password) if (($casino_url=~/wpt/) || ($casino_url=~/msn/) || ($casino_url=~/vgfo/)) $ie.button(:value, casino_submit_key).click elsif (($casino_url=~/cqa/) || ($casino_url=~/cdev/)) $ie.button(:value, cgc_submit_key).click end #$ie.image(:src, submit_key).click() end def logout (casino_url) if (($casino_url=~/wpt/) || ($casino_url=~/msn/) || ($casino_url=~/vgfo/)) $ie.goto($casino_url+"/security/logoff.do") elsif (($casino_url=~/cqa/) || ($casino_url=~/cdev/)) $ie.link(:text, "Log Out").click end end def shutdown $ie.close sleep 1 end end -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060718/75ebd76e /attachment.html ------------------------------ _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general End of Wtr-general Digest, Vol 32, Issue 26 ******************************************* From Mark_Cain at RL.gov Wed Jul 19 10:01:16 2006 From: Mark_Cain at RL.gov (Cain, Mark) Date: Wed, 19 Jul 2006 07:01:16 -0700 Subject: [Wtr-general] selecting multiple values from on list and passing itto other list In-Reply-To: <20060719055220.78195.qmail@web7809.mail.in.yahoo.com> Message-ID: You could do something like this: dbList = $ie.select_list( :name, 'assigned').getAllContents for dbl in dbList $ie.selectBox( :name, 'assigned').select("#{dbl}") end Hope this helps, --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of VIKASH KUMAR Sent: Tuesday, July 18, 2006 10:52 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] selecting multiple values from on list and passing itto other list Sir, I am facing a problem in selecting multiple values from a list and passing it over to another list box with any button click, it should do it automatically. for example the list is as given below: and the other list as : Please send me a solution for selecting multiple values from list "assigned" and passing it over to list "availableSystem", without any button click event. Thanks in advance. Vikash Kumar ________________________________ Find out what India is talking about on Yahoo! Answers India. Send FREE SMS from New Yahoo! Messenger to Mobile: Download NOW! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060719/312b410f/attachment.html From Mark_Cain at RL.gov Wed Jul 19 10:05:53 2006 From: Mark_Cain at RL.gov (Cain, Mark) Date: Wed, 19 Jul 2006 07:05:53 -0700 Subject: [Wtr-general] for loop syntax?? In-Reply-To: <44BD6D63.6040708@pheedo.com> Message-ID: You will need to these: require 'test/unit' require 'test/unit/ui/console/testrunner' require 'watir/testUnitAddons' require 'watir/testcase' I usually add the setup.rb from the unittest directory instead because these requires are already in it. --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of mi Sent: Tuesday, July 18, 2006 4:23 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] for loop syntax?? Hi all, I'm using a for loop to access arrays to fill all the text fields in my forms. For some reason, i'm getting the following error at the end of the for loop execution??? c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in `assert_exists': Unable to locate object, using name and (Watir::Exception::UnknownObjectException) from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3382:in `set' from c:/ruby/lib/ruby/site_ruby/1.8/watir/watir_simple.rb:402:in `fill_text_field' from SmokeTest.rb:25 from SmokeTest.rb:24 Thanks in advance! <<<<> require 'watir' # the watir controller\ require 'watir/watir_simple' include Watir include Watir::Simple Simple1 = Simple test_site = 'http://dev01.pheedo.com' pubInfoTextFields = ['user', 'email', 'password', 'repass', 'url', 'ssn', 'payment_address', 'payment_city', 'payment_zip'] pubInfo = ['pubUserName', 'mdove at pheedo.com', '1', '1', 'http://www.test.com', '1234', '123 st', 'some city', '97035'] #[user name, emaildAdd, passwd1, passwd2, yourSite, TaxID, StreetAdd, CityName, State, ZipCode] Simple1.new_browser_at(test_site) Simple1.click_link_with_text("Sign up now") #same as Simple::click_link_with_text("Sign up now") #click on Publisher's sign up page Simple1.click_link_with_url(test_site+"/register.phdo?mode=publish") #Enter all the required fields x=0 for x in 0..9 do Simple1.fill_text_field(pubInfoTextFields[x], pubInfo[x]) puts "pubInfoTextFields = "+pubInfoTextFields[x]+" pubInfo = "+pubInfo[x] end _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From charley.baker at gmail.com Wed Jul 19 10:43:20 2006 From: charley.baker at gmail.com (Charley Baker) Date: Wed, 19 Jul 2006 08:43:20 -0600 Subject: [Wtr-general] for loop syntax?? In-Reply-To: References: <44BD6D63.6040708@pheedo.com> Message-ID: Your loop is 0-9 which is 10, your arrays are only 9 items long. You've overshot it by one. for x in 0..8 do ....... -Charley On 7/19/06, Cain, Mark wrote: > > You will need to these: > > require 'test/unit' > require 'test/unit/ui/console/testrunner' > require 'watir/testUnitAddons' > require 'watir/testcase' > > I usually add the setup.rb from the unittest directory instead because > these requires are already in it. > > --Mark > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of mi > Sent: Tuesday, July 18, 2006 4:23 PM > To: wtr-general at rubyforge.org > Subject: [Wtr-general] for loop syntax?? > > Hi all, > > I'm using a for loop to access arrays to fill all the text fields in my > > forms. For some reason, i'm getting the following error at the end of > the for loop execution??? > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in `assert_exists': Unable > to locate object, using name and > (Watir::Exception::UnknownObjectException) > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3382:in `set' > from c:/ruby/lib/ruby/site_ruby/1.8/watir/watir_simple.rb:402:in > `fill_text_field' > from SmokeTest.rb:25 > from SmokeTest.rb:24 > > > Thanks in advance! > > <<<<> > > require 'watir' # the watir controller\ > require 'watir/watir_simple' > include Watir > include Watir::Simple > > Simple1 = Simple > > test_site = 'http://dev01.pheedo.com' > pubInfoTextFields = ['user', 'email', 'password', 'repass', 'url', > 'ssn', 'payment_address', 'payment_city', 'payment_zip'] > pubInfo = ['pubUserName', 'mdove at pheedo.com', '1', '1', > 'http://www.test.com', '1234', '123 st', 'some city', '97035'] > #[user name, emaildAdd, passwd1, passwd2, yourSite, TaxID, StreetAdd, > CityName, State, ZipCode] > > Simple1.new_browser_at(test_site) > Simple1.click_link_with_text("Sign up now") #same as > Simple::click_link_with_text("Sign up now") > > #click on Publisher's sign up page > Simple1.click_link_with_url(test_site+"/register.phdo?mode=publish") > > #Enter all the required fields > x=0 > for x in 0..9 do > Simple1.fill_text_field(pubInfoTextFields[x], pubInfo[x]) > puts "pubInfoTextFields = "+pubInfoTextFields[x]+" pubInfo = > "+pubInfo[x] > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060719/0a9c6244/attachment.html From charley.baker at gmail.com Wed Jul 19 10:58:34 2006 From: charley.baker at gmail.com (Charley Baker) Date: Wed, 19 Jul 2006 08:58:34 -0600 Subject: [Wtr-general] Page Loading Problem In-Reply-To: <20060719023639.92061.qmail@web82805.mail.mud.yahoo.com> References: <20060719023639.92061.qmail@web82805.mail.mud.yahoo.com> Message-ID: You can turn off image loading in the ie options dialog under advanced. I'm not aware of any other way to set Watir not to wait for ready state from the browser. -Charley On 7/18/06, David Solis wrote: > > I have a problem with a site taking too long to load. I'm hoping somebody > can point in the right direction. > The test environment in which my script runs takes a long time to load > images. The following statement waits for the page to be loaded: > > $ie.text_field(:name, "username").set(casino_user) > > Is there a way that I can force this statement to start running without > waiting for the page to completely load? > > class LoginCasino > def initialize(casino_user, casino_password, casino_url, > casino_submit_key, cgc_submit_key) > $ie = Watir::IE.start(casino_url) > if $ie.contains_text("Username:") > $ie.goto($casino_url+"/security/logoff.do") > end > $ie.text_field(:name, "username").set(casino_user) > $ie.text_field(:name, "password").set(casino_password) > if (($casino_url=~/wpt/) || ($casino_url=~/msn/) || > ($casino_url=~/vgfo/)) > $ie.button(:value, casino_submit_key).click > elsif (($casino_url=~/cqa/) || ($casino_url=~/cdev/)) > $ie.button(:value, cgc_submit_key).click > end > > #$ie.image(:src, submit_key).click() > end > def logout (casino_url) > if (($casino_url=~/wpt/) || ($casino_url=~/msn/) || > ($casino_url=~/vgfo/)) > $ie.goto($casino_url+"/security/logoff.do") > elsif (($casino_url=~/cqa/) || ($casino_url=~/cdev/)) > $ie.link(:text, "Log Out").click > end > end > > def shutdown > $ie.close > sleep 1 > end > end > > > _______________________________________________ > 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/20060719/431ca445/attachment.html From charley.baker at gmail.com Wed Jul 19 11:04:29 2006 From: charley.baker at gmail.com (Charley Baker) Date: Wed, 19 Jul 2006 09:04:29 -0600 Subject: [Wtr-general] Best way to log Watir output? In-Reply-To: <2757CAE9849293409BFE6562B949516219A4A7@rccexh001.relocationcentral.com> References: <2757CAE9849293409BFE6562B949516219A4A7@rccexh001.relocationcentral.com> Message-ID: Adam, If you want to create a log file look at logger which is a Ruby library, Watir makes use of it in WatirLogger. Otherwise if you're looking for a junit type of test run dashboard and you're using Test::Unit, take a look at Test Unit Reporter: http://rubyforge.org/frs/?group_id=319 It can dump out reports in either html or xml. -Charley On 7/19/06, Adam Reed wrote: > > What is the best way to create a log file, or otherwise manipulate Watir > test output? > > I am looking a building a framework for testing, and it would be nice to > output test results to a webpage, flat file, or even to a dashboard > "results window". I would want to include variables used (eg, > username/password for a login script, this seems straightforward), but > most importantly assertion results, test date and time, etc. > > Thanks, > Adam > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060719/3d37e621/attachment.html From mb at michaelbolton.net Wed Jul 19 11:20:53 2006 From: mb at michaelbolton.net (Michael Bolton) Date: Wed, 19 Jul 2006 11:20:53 -0400 Subject: [Wtr-general] Best way to log Watir output? In-Reply-To: <2757CAE9849293409BFE6562B949516219A4A7@rccexh001.relocationcentral.com> Message-ID: <011e01c6ab46$ed201140$6501a8c0@Koko> Ruby's Logger object? What do you mean by "best"? ---Michael B. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Adam Reed Sent: July 19, 2006 9:51 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Best way to log Watir output? What is the best way to create a log file, or otherwise manipulate Watir test output? I am looking a building a framework for testing, and it would be nice to output test results to a webpage, flat file, or even to a dashboard "results window". I would want to include variables used (eg, username/password for a login script, this seems straightforward), but most importantly assertion results, test date and time, etc. Thanks, Adam -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of wtr-general-request at rubyforge.org Sent: Tuesday, July 18, 2006 9:37 PM To: wtr-general at rubyforge.org Subject: Wtr-general Digest, Vol 32, Issue 26 Send Wtr-general mailing list submissions to wtr-general at rubyforge.org To subscribe or unsubscribe via the World Wide Web, visit http://rubyforge.org/mailman/listinfo/wtr-general or, via email, send a message with subject or body 'help' to wtr-general-request at rubyforge.org You can reach the person managing the list at wtr-general-owner at rubyforge.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Wtr-general digest..." Today's Topics: 1. Re: Install problem? (Simo, Ben) 2. problem with nested frames (Xavier Noria) 3. for loop syntax?? (mi) 4. Page Loading Problem (David Solis) ---------------------------------------------------------------------- Message: 1 Date: Tue, 18 Jul 2006 13:34:18 -0600 From: "Simo, Ben" Subject: Re: [Wtr-general] Install problem? To: Message-ID: Content-Type: text/plain; charset="iso-8859-1" I just reinstalled WATIR using the GEM file instead of the one-step install. Now it works. Thank you. Ben -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Cain, Mark Sent: Tuesday, July 18, 2006 1:30 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Install problem? I just remembered, one of the last times I installed ruby (either rc 3 or final I can't remember which) blew away ALL of my path information. You might check to make sure ruby/bin and ruby/lib are in your path environment variable. --Mark _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Simo, Ben Sent: Tuesday, July 18, 2006 12:21 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Install problem? Mark, Thanks, but that didn't seem to fix the problem. I am having the same problem on two different Windows XP PCs (one SP1, the other SP2). Ben -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Cain, Mark Sent: Tuesday, July 18, 2006 8:14 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Install problem? I have always had to install rubygems for a new ruby install. Get the gem here: http://rubyforge.org/projects/rubygems/ Download it somewhere. Open a command prompt and navigate to where you downloaded it. Type gem install rubygems*.gem This fix the same problem for me on a new install. Hope this helps, --Mark _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Simo, Ben Sent: Monday, July 17, 2006 3:45 PM To: Wtr-general at rubyforge.org Subject: [Wtr-general] Install problem? Hello, I have just installed Ruby and WATIR on a Windows XP box. When I try to run the unit tests, I get an error stating that "gem_original_require" is missing. C:\watir\unittests>all_tests.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- watir (LoadError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from C:/watir/unittests/../unittests/setup.rb:4 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from C:/watir/unittests/all_tests.rb:4 I'm not sure if it matters: when I installed WATIR from the .exe package, I got errors about not being able to write to c:\watir until I manually created the directory. I manually created the c:\watir directory and then installed to it. Any ideas why I can't run the all_tests.rb script? Thank you, Ben Simo _____ The information contained in this message is intended only for the recipient, and may be a confidential attorney-client communication or may otherwise be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, please be aware that any dissemination or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the message and deleting it from your computer. _____ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060718/5368a04f /attachment-0001.html ------------------------------ Message: 2 Date: Tue, 18 Jul 2006 23:20:38 +0200 From: Xavier Noria Subject: [Wtr-general] problem with nested frames To: Wtr-general at rubyforge.org Message-ID: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Just in case this rings some bell. I go to a page that has frames A and B. The latter in turn is a frameset with 4 frames, say B1, ..., B4. The main area of the page is B3 and I need to follow a link in B2 to change the main area. Problem is B3, accessed as ie.frame('B').frame('B3') has the same HTML before and after the link in B2 is clicked. This website is quite convoluted, but since Watir asks for frames to IE each time I invoke frame() I don't understand what may be happening. Any idea? -- fxn ------------------------------ Message: 3 Date: Tue, 18 Jul 2006 16:23:15 -0700 From: mi Subject: [Wtr-general] for loop syntax?? To: wtr-general at rubyforge.org Message-ID: <44BD6D63.6040708 at pheedo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Hi all, I'm using a for loop to access arrays to fill all the text fields in my forms. For some reason, i'm getting the following error at the end of the for loop execution??? c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in `assert_exists': Unable to locate object, using name and (Watir::Exception::UnknownObjectException) from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3382:in `set' from c:/ruby/lib/ruby/site_ruby/1.8/watir/watir_simple.rb:402:in `fill_text_field' from SmokeTest.rb:25 from SmokeTest.rb:24 Thanks in advance! <<<<> require 'watir' # the watir controller\ require 'watir/watir_simple' include Watir include Watir::Simple Simple1 = Simple test_site = 'http://dev01.pheedo.com' pubInfoTextFields = ['user', 'email', 'password', 'repass', 'url', 'ssn', 'payment_address', 'payment_city', 'payment_zip'] pubInfo = ['pubUserName', 'mdove at pheedo.com', '1', '1', 'http://www.test.com', '1234', '123 st', 'some city', '97035'] #[user name, emaildAdd, passwd1, passwd2, yourSite, TaxID, StreetAdd, CityName, State, ZipCode] Simple1.new_browser_at(test_site) Simple1.click_link_with_text("Sign up now") #same as Simple::click_link_with_text("Sign up now") #click on Publisher's sign up page Simple1.click_link_with_url(test_site+"/register.phdo?mode=publish") #Enter all the required fields x=0 for x in 0..9 do Simple1.fill_text_field(pubInfoTextFields[x], pubInfo[x]) puts "pubInfoTextFields = "+pubInfoTextFields[x]+" pubInfo = "+pubInfo[x] end ------------------------------ Message: 4 Date: Tue, 18 Jul 2006 19:36:39 -0700 (PDT) From: David Solis Subject: [Wtr-general] Page Loading Problem To: wtr-general at rubyforge.org Message-ID: <20060719023639.92061.qmail at web82805.mail.mud.yahoo.com> Content-Type: text/plain; charset="iso-8859-1" I have a problem with a site taking too long to load. I'm hoping somebody can point in the right direction. The test environment in which my script runs takes a long time to load images. The following statement waits for the page to be loaded: $ie.text_field(:name, "username").set(casino_user) Is there a way that I can force this statement to start running without waiting for the page to completely load? class LoginCasino def initialize(casino_user, casino_password, casino_url, casino_submit_key, cgc_submit_key) $ie = Watir::IE.start(casino_url) if $ie.contains_text("Username:") $ie.goto($casino_url+"/security/logoff.do") end $ie.text_field(:name, "username").set(casino_user) $ie.text_field(:name, "password").set(casino_password) if (($casino_url=~/wpt/) || ($casino_url=~/msn/) || ($casino_url=~/vgfo/)) $ie.button(:value, casino_submit_key).click elsif (($casino_url=~/cqa/) || ($casino_url=~/cdev/)) $ie.button(:value, cgc_submit_key).click end #$ie.image(:src, submit_key).click() end def logout (casino_url) if (($casino_url=~/wpt/) || ($casino_url=~/msn/) || ($casino_url=~/vgfo/)) $ie.goto($casino_url+"/security/logoff.do") elsif (($casino_url=~/cqa/) || ($casino_url=~/cdev/)) $ie.link(:text, "Log Out").click end end def shutdown $ie.close sleep 1 end end -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060718/75ebd76e /attachment.html ------------------------------ _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general End of Wtr-general Digest, Vol 32, Issue 26 ******************************************* _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From areed at relocationcentral.com Wed Jul 19 11:35:32 2006 From: areed at relocationcentral.com (Adam Reed) Date: Wed, 19 Jul 2006 10:35:32 -0500 Subject: [Wtr-general] Best way to log Watir output? Message-ID: <2757CAE9849293409BFE6562B9495162198BA6@rccexh001.relocationcentral.com> Michael, The only resource I was able to find online pointed me back to the test_logger.rb script in watir/examples/logging. This script manually logs each action by doing a result/escape on each assertion to output the result to a .txt file. While this works, it's tedious and inefficient for a large script. I thought there would have to be a better way, such as "grabbing" the SCIte output, since it contains exactly what I would want. Someone has now suggested that I take a look at WET to accompany Ruby. Is this, or another method, an accepted "best practice" as far as Watir scripting goes? Thanks again, Adam -------------------------------------------------- Ruby's Logger object? What do you mean by "best"? ---Michael B. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of wtr-general-request at rubyforge.org Sent: Wednesday, July 19, 2006 10:21 AM To: wtr-general at rubyforge.org Subject: Wtr-general Digest, Vol 32, Issue 28 Send Wtr-general mailing list submissions to wtr-general at rubyforge.org To subscribe or unsubscribe via the World Wide Web, visit http://rubyforge.org/mailman/listinfo/wtr-general or, via email, send a message with subject or body 'help' to wtr-general-request at rubyforge.org You can reach the person managing the list at wtr-general-owner at rubyforge.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Wtr-general digest..." Today's Topics: 1. Re: for loop syntax?? (Cain, Mark) 2. Re: for loop syntax?? (Charley Baker) 3. Re: Page Loading Problem (Charley Baker) 4. Re: Best way to log Watir output? (Charley Baker) 5. Re: Best way to log Watir output? (Michael Bolton) ---------------------------------------------------------------------- Message: 1 Date: Wed, 19 Jul 2006 07:05:53 -0700 From: "Cain, Mark" Subject: Re: [Wtr-general] for loop syntax?? To: Message-ID: Content-Type: text/plain; charset="US-ASCII" You will need to these: require 'test/unit' require 'test/unit/ui/console/testrunner' require 'watir/testUnitAddons' require 'watir/testcase' I usually add the setup.rb from the unittest directory instead because these requires are already in it. --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of mi Sent: Tuesday, July 18, 2006 4:23 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] for loop syntax?? Hi all, I'm using a for loop to access arrays to fill all the text fields in my forms. For some reason, i'm getting the following error at the end of the for loop execution??? c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in `assert_exists': Unable to locate object, using name and (Watir::Exception::UnknownObjectException) from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3382:in `set' from c:/ruby/lib/ruby/site_ruby/1.8/watir/watir_simple.rb:402:in `fill_text_field' from SmokeTest.rb:25 from SmokeTest.rb:24 Thanks in advance! <<<<> require 'watir' # the watir controller\ require 'watir/watir_simple' include Watir include Watir::Simple Simple1 = Simple test_site = 'http://dev01.pheedo.com' pubInfoTextFields = ['user', 'email', 'password', 'repass', 'url', 'ssn', 'payment_address', 'payment_city', 'payment_zip'] pubInfo = ['pubUserName', 'mdove at pheedo.com', '1', '1', 'http://www.test.com', '1234', '123 st', 'some city', '97035'] #[user name, emaildAdd, passwd1, passwd2, yourSite, TaxID, StreetAdd, CityName, State, ZipCode] Simple1.new_browser_at(test_site) Simple1.click_link_with_text("Sign up now") #same as Simple::click_link_with_text("Sign up now") #click on Publisher's sign up page Simple1.click_link_with_url(test_site+"/register.phdo?mode=publish") #Enter all the required fields x=0 for x in 0..9 do Simple1.fill_text_field(pubInfoTextFields[x], pubInfo[x]) puts "pubInfoTextFields = "+pubInfoTextFields[x]+" pubInfo = "+pubInfo[x] end _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ------------------------------ Message: 2 Date: Wed, 19 Jul 2006 08:43:20 -0600 From: "Charley Baker" Subject: Re: [Wtr-general] for loop syntax?? To: wtr-general at rubyforge.org Message-ID: Content-Type: text/plain; charset="iso-8859-1" Your loop is 0-9 which is 10, your arrays are only 9 items long. You've overshot it by one. for x in 0..8 do ....... -Charley On 7/19/06, Cain, Mark wrote: > > You will need to these: > > require 'test/unit' > require 'test/unit/ui/console/testrunner' > require 'watir/testUnitAddons' > require 'watir/testcase' > > I usually add the setup.rb from the unittest directory instead because > these requires are already in it. > > --Mark > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of mi > Sent: Tuesday, July 18, 2006 4:23 PM > To: wtr-general at rubyforge.org > Subject: [Wtr-general] for loop syntax?? > > Hi all, > > I'm using a for loop to access arrays to fill all the text fields in > my > > forms. For some reason, i'm getting the following error at the end of > the for loop execution??? > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in `assert_exists': > Unable to locate object, using name and > (Watir::Exception::UnknownObjectException) > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3382:in `set' > from c:/ruby/lib/ruby/site_ruby/1.8/watir/watir_simple.rb:402:in > `fill_text_field' > from SmokeTest.rb:25 > from SmokeTest.rb:24 > > > Thanks in advance! > > <<<<> > > require 'watir' # the watir controller\ > require 'watir/watir_simple' > include Watir > include Watir::Simple > > Simple1 = Simple > > test_site = 'http://dev01.pheedo.com' > pubInfoTextFields = ['user', 'email', 'password', 'repass', 'url', > 'ssn', 'payment_address', 'payment_city', 'payment_zip'] pubInfo = > ['pubUserName', 'mdove at pheedo.com', '1', '1', 'http://www.test.com', > '1234', '123 st', 'some city', '97035'] #[user name, emaildAdd, > passwd1, passwd2, yourSite, TaxID, StreetAdd, CityName, State, > ZipCode] > > Simple1.new_browser_at(test_site) > Simple1.click_link_with_text("Sign up now") #same as > Simple::click_link_with_text("Sign up now") > > #click on Publisher's sign up page > Simple1.click_link_with_url(test_site+"/register.phdo?mode=publish") > > #Enter all the required fields > x=0 > for x in 0..9 do > Simple1.fill_text_field(pubInfoTextFields[x], pubInfo[x]) > puts "pubInfoTextFields = "+pubInfoTextFields[x]+" pubInfo = > "+pubInfo[x] > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060719/0a9c6244 /attachment-0001.html ------------------------------ Message: 3 Date: Wed, 19 Jul 2006 08:58:34 -0600 From: "Charley Baker" Subject: Re: [Wtr-general] Page Loading Problem To: wtr-general at rubyforge.org Message-ID: Content-Type: text/plain; charset="iso-8859-1" You can turn off image loading in the ie options dialog under advanced. I'm not aware of any other way to set Watir not to wait for ready state from the browser. -Charley On 7/18/06, David Solis wrote: > > I have a problem with a site taking too long to load. I'm hoping > somebody can point in the right direction. > The test environment in which my script runs takes a long time to load > images. The following statement waits for the page to be loaded: > > $ie.text_field(:name, "username").set(casino_user) > > Is there a way that I can force this statement to start running > without waiting for the page to completely load? > > class LoginCasino > def initialize(casino_user, casino_password, casino_url, > casino_submit_key, cgc_submit_key) > $ie = Watir::IE.start(casino_url) > if $ie.contains_text("Username:") > $ie.goto($casino_url+"/security/logoff.do") > end > $ie.text_field(:name, "username").set(casino_user) > $ie.text_field(:name, "password").set(casino_password) > if (($casino_url=~/wpt/) || ($casino_url=~/msn/) || > ($casino_url=~/vgfo/)) > $ie.button(:value, casino_submit_key).click > elsif (($casino_url=~/cqa/) || ($casino_url=~/cdev/)) > $ie.button(:value, cgc_submit_key).click > end > > #$ie.image(:src, submit_key).click() > end > def logout (casino_url) > if (($casino_url=~/wpt/) || ($casino_url=~/msn/) || > ($casino_url=~/vgfo/)) > $ie.goto($casino_url+"/security/logoff.do") > elsif (($casino_url=~/cqa/) || ($casino_url=~/cdev/)) > $ie.link(:text, "Log Out").click > end > end > > def shutdown > $ie.close > sleep 1 > end > end > > > _______________________________________________ > 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/20060719/431ca445 /attachment-0001.html ------------------------------ Message: 4 Date: Wed, 19 Jul 2006 09:04:29 -0600 From: "Charley Baker" Subject: Re: [Wtr-general] Best way to log Watir output? To: wtr-general at rubyforge.org Message-ID: Content-Type: text/plain; charset="iso-8859-1" Adam, If you want to create a log file look at logger which is a Ruby library, Watir makes use of it in WatirLogger. Otherwise if you're looking for a junit type of test run dashboard and you're using Test::Unit, take a look at Test Unit Reporter: http://rubyforge.org/frs/?group_id=319 It can dump out reports in either html or xml. -Charley On 7/19/06, Adam Reed wrote: > > What is the best way to create a log file, or otherwise manipulate > Watir test output? > > I am looking a building a framework for testing, and it would be nice > to output test results to a webpage, flat file, or even to a dashboard > "results window". I would want to include variables used (eg, > username/password for a login script, this seems straightforward), but > most importantly assertion results, test date and time, etc. > > Thanks, > Adam > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060719/3d37e621 /attachment-0001.html ------------------------------ Message: 5 Date: Wed, 19 Jul 2006 11:20:53 -0400 From: "Michael Bolton" Subject: Re: [Wtr-general] Best way to log Watir output? To: Message-ID: <011e01c6ab46$ed201140$6501a8c0 at Koko> Content-Type: text/plain; charset="us-ascii" Ruby's Logger object? What do you mean by "best"? ---Michael B. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Adam Reed Sent: July 19, 2006 9:51 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Best way to log Watir output? What is the best way to create a log file, or otherwise manipulate Watir test output? I am looking a building a framework for testing, and it would be nice to output test results to a webpage, flat file, or even to a dashboard "results window". I would want to include variables used (eg, username/password for a login script, this seems straightforward), but most importantly assertion results, test date and time, etc. Thanks, Adam -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of wtr-general-request at rubyforge.org Sent: Tuesday, July 18, 2006 9:37 PM To: wtr-general at rubyforge.org Subject: Wtr-general Digest, Vol 32, Issue 26 Send Wtr-general mailing list submissions to wtr-general at rubyforge.org To subscribe or unsubscribe via the World Wide Web, visit http://rubyforge.org/mailman/listinfo/wtr-general or, via email, send a message with subject or body 'help' to wtr-general-request at rubyforge.org You can reach the person managing the list at wtr-general-owner at rubyforge.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Wtr-general digest..." Today's Topics: 1. Re: Install problem? (Simo, Ben) 2. problem with nested frames (Xavier Noria) 3. for loop syntax?? (mi) 4. Page Loading Problem (David Solis) ---------------------------------------------------------------------- Message: 1 Date: Tue, 18 Jul 2006 13:34:18 -0600 From: "Simo, Ben" Subject: Re: [Wtr-general] Install problem? To: Message-ID: Content-Type: text/plain; charset="iso-8859-1" I just reinstalled WATIR using the GEM file instead of the one-step install. Now it works. Thank you. Ben -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Cain, Mark Sent: Tuesday, July 18, 2006 1:30 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Install problem? I just remembered, one of the last times I installed ruby (either rc 3 or final I can't remember which) blew away ALL of my path information. You might check to make sure ruby/bin and ruby/lib are in your path environment variable. --Mark _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Simo, Ben Sent: Tuesday, July 18, 2006 12:21 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Install problem? Mark, Thanks, but that didn't seem to fix the problem. I am having the same problem on two different Windows XP PCs (one SP1, the other SP2). Ben -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Cain, Mark Sent: Tuesday, July 18, 2006 8:14 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Install problem? I have always had to install rubygems for a new ruby install. Get the gem here: http://rubyforge.org/projects/rubygems/ Download it somewhere. Open a command prompt and navigate to where you downloaded it. Type gem install rubygems*.gem This fix the same problem for me on a new install. Hope this helps, --Mark _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Simo, Ben Sent: Monday, July 17, 2006 3:45 PM To: Wtr-general at rubyforge.org Subject: [Wtr-general] Install problem? Hello, I have just installed Ruby and WATIR on a Windows XP box. When I try to run the unit tests, I get an error stating that "gem_original_require" is missing. C:\watir\unittests>all_tests.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- watir (LoadError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from C:/watir/unittests/../unittests/setup.rb:4 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from C:/watir/unittests/all_tests.rb:4 I'm not sure if it matters: when I installed WATIR from the .exe package, I got errors about not being able to write to c:\watir until I manually created the directory. I manually created the c:\watir directory and then installed to it. Any ideas why I can't run the all_tests.rb script? Thank you, Ben Simo _____ The information contained in this message is intended only for the recipient, and may be a confidential attorney-client communication or may otherwise be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, please be aware that any dissemination or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the message and deleting it from your computer. _____ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060718/5368a04f /attachment-0001.html ------------------------------ Message: 2 Date: Tue, 18 Jul 2006 23:20:38 +0200 From: Xavier Noria Subject: [Wtr-general] problem with nested frames To: Wtr-general at rubyforge.org Message-ID: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Just in case this rings some bell. I go to a page that has frames A and B. The latter in turn is a frameset with 4 frames, say B1, ..., B4. The main area of the page is B3 and I need to follow a link in B2 to change the main area. Problem is B3, accessed as ie.frame('B').frame('B3') has the same HTML before and after the link in B2 is clicked. This website is quite convoluted, but since Watir asks for frames to IE each time I invoke frame() I don't understand what may be happening. Any idea? -- fxn ------------------------------ Message: 3 Date: Tue, 18 Jul 2006 16:23:15 -0700 From: mi Subject: [Wtr-general] for loop syntax?? To: wtr-general at rubyforge.org Message-ID: <44BD6D63.6040708 at pheedo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Hi all, I'm using a for loop to access arrays to fill all the text fields in my forms. For some reason, i'm getting the following error at the end of the for loop execution??? c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in `assert_exists': Unable to locate object, using name and (Watir::Exception::UnknownObjectException) from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3382:in `set' from c:/ruby/lib/ruby/site_ruby/1.8/watir/watir_simple.rb:402:in `fill_text_field' from SmokeTest.rb:25 from SmokeTest.rb:24 Thanks in advance! <<<<> require 'watir' # the watir controller\ require 'watir/watir_simple' include Watir include Watir::Simple Simple1 = Simple test_site = 'http://dev01.pheedo.com' pubInfoTextFields = ['user', 'email', 'password', 'repass', 'url', 'ssn', 'payment_address', 'payment_city', 'payment_zip'] pubInfo = ['pubUserName', 'mdove at pheedo.com', '1', '1', 'http://www.test.com', '1234', '123 st', 'some city', '97035'] #[user name, emaildAdd, passwd1, passwd2, yourSite, TaxID, StreetAdd, CityName, State, ZipCode] Simple1.new_browser_at(test_site) Simple1.click_link_with_text("Sign up now") #same as Simple::click_link_with_text("Sign up now") #click on Publisher's sign up page Simple1.click_link_with_url(test_site+"/register.phdo?mode=publish") #Enter all the required fields x=0 for x in 0..9 do Simple1.fill_text_field(pubInfoTextFields[x], pubInfo[x]) puts "pubInfoTextFields = "+pubInfoTextFields[x]+" pubInfo = "+pubInfo[x] end ------------------------------ Message: 4 Date: Tue, 18 Jul 2006 19:36:39 -0700 (PDT) From: David Solis Subject: [Wtr-general] Page Loading Problem To: wtr-general at rubyforge.org Message-ID: <20060719023639.92061.qmail at web82805.mail.mud.yahoo.com> Content-Type: text/plain; charset="iso-8859-1" I have a problem with a site taking too long to load. I'm hoping somebody can point in the right direction. The test environment in which my script runs takes a long time to load images. The following statement waits for the page to be loaded: $ie.text_field(:name, "username").set(casino_user) Is there a way that I can force this statement to start running without waiting for the page to completely load? class LoginCasino def initialize(casino_user, casino_password, casino_url, casino_submit_key, cgc_submit_key) $ie = Watir::IE.start(casino_url) if $ie.contains_text("Username:") $ie.goto($casino_url+"/security/logoff.do") end $ie.text_field(:name, "username").set(casino_user) $ie.text_field(:name, "password").set(casino_password) if (($casino_url=~/wpt/) || ($casino_url=~/msn/) || ($casino_url=~/vgfo/)) $ie.button(:value, casino_submit_key).click elsif (($casino_url=~/cqa/) || ($casino_url=~/cdev/)) $ie.button(:value, cgc_submit_key).click end #$ie.image(:src, submit_key).click() end def logout (casino_url) if (($casino_url=~/wpt/) || ($casino_url=~/msn/) || ($casino_url=~/vgfo/)) $ie.goto($casino_url+"/security/logoff.do") elsif (($casino_url=~/cqa/) || ($casino_url=~/cdev/)) $ie.link(:text, "Log Out").click end end def shutdown $ie.close sleep 1 end end -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060718/75ebd76e /attachment.html ------------------------------ _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general End of Wtr-general Digest, Vol 32, Issue 26 ******************************************* _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ------------------------------ _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general End of Wtr-general Digest, Vol 32, Issue 28 ******************************************* From mdove at pheedo.com Wed Jul 19 11:53:17 2006 From: mdove at pheedo.com (mi) Date: Wed, 19 Jul 2006 08:53:17 -0700 Subject: [Wtr-general] for loop syntax?? In-Reply-To: References: <44BD6D63.6040708@pheedo.com> Message-ID: <44BE556D.5080909@pheedo.com> ahhhhhhhhhhh, That was it!!! I'm just NOT used to start an iteration form 0:-( THANKS a million!!!!!!!! Charley Baker wrote: > Your loop is 0-9 which is 10, your arrays are only 9 items long. > You've overshot it by one. > > for x in 0..8 do > ....... > > -Charley > > On 7/19/06, * Cain, Mark* > > wrote: > > You will need to these: > > require 'test/unit' > require 'test/unit/ui/console/testrunner' > require 'watir/testUnitAddons' > require 'watir/testcase' > > I usually add the setup.rb from the unittest directory instead because > these requires are already in it. > > --Mark > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org > ] On Behalf Of mi > Sent: Tuesday, July 18, 2006 4:23 PM > To: wtr-general at rubyforge.org > Subject: [Wtr-general] for loop syntax?? > > Hi all, > > I'm using a for loop to access arrays to fill all the text fields > in my > > forms. For some reason, i'm getting the following error at the end of > the for loop execution??? > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in `assert_exists': > Unable > to locate object, using name and > (Watir::Exception::UnknownObjectException) > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3382:in `set' > from c:/ruby/lib/ruby/site_ruby/1.8/watir/watir_simple.rb:402:in > `fill_text_field' > from SmokeTest.rb :25 > from SmokeTest.rb:24 > > > Thanks in advance! > > <<<<> > > require 'watir' # the watir controller\ > require 'watir/watir_simple' > include Watir > include Watir::Simple > > Simple1 = Simple > > test_site = 'http://dev01.pheedo.com' > pubInfoTextFields = ['user', 'email', 'password', 'repass', 'url', > 'ssn', 'payment_address', 'payment_city', 'payment_zip'] > pubInfo = ['pubUserName', 'mdove at pheedo.com > ', '1', '1', > 'http://www.test.com', '1234', '123 st', 'some city', '97035'] > #[user name, emaildAdd, passwd1, passwd2, yourSite, TaxID, StreetAdd, > CityName, State, ZipCode] > > Simple1.new_browser_at(test_site) > Simple1.click_link_with_text("Sign up now") #same as > Simple::click_link_with_text("Sign up now") > > #click on Publisher's sign up page > Simple1.click_link_with_url(test_site+"/register.phdo?mode=publish") > > #Enter all the required fields > x=0 > for x in 0..9 do > Simple1.fill_text_field(pubInfoTextFields[x], pubInfo[x]) > puts "pubInfoTextFields = "+pubInfoTextFields[x]+" pubInfo = > "+pubInfo[x] > 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 > > > ------------------------------------------------------------------------ > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From christopher.mcmahon at gmail.com Wed Jul 19 12:02:25 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 19 Jul 2006 09:02:25 -0700 Subject: [Wtr-general] for loop syntax?? In-Reply-To: <44BE556D.5080909@pheedo.com> References: <44BD6D63.6040708@pheedo.com> <44BE556D.5080909@pheedo.com> Message-ID: <72799cd70607190902u290903a3w31d35c9120ba4903@mail.gmail.com> On 7/19/06, mi wrote: > ahhhhhhhhhhh, That was it!!! I'm just NOT used to start an iteration > form 0:-( THANKS a million!!!!!!!! Ruby folks don't generally use for loops: 1.upto 9 do |x| puts x end ruby loop.rb 1 2 3 4 5 6 7 8 9 >Exit code: 0 From tester.paul at gmail.com Wed Jul 19 12:20:05 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Wed, 19 Jul 2006 12:20:05 -0400 Subject: [Wtr-general] for loop syntax?? In-Reply-To: <72799cd70607190902u290903a3w31d35c9120ba4903@mail.gmail.com> References: <44BD6D63.6040708@pheedo.com> <44BE556D.5080909@pheedo.com> <72799cd70607190902u290903a3w31d35c9120ba4903@mail.gmail.com> Message-ID: <37c405480607190920w126a23aax5c732828a22ed8b6@mail.gmail.com> Ruby rocks! My fav is: 9.times {|x| puts x} It doesn't get any clearer for me than just telling it how many times I want it to loop without worrying about extra syntax that I'm likely to get wrong.. ;) On 19/07/06, Chris McMahon wrote: > > On 7/19/06, mi wrote: > > ahhhhhhhhhhh, That was it!!! I'm just NOT used to start an iteration > > form 0:-( THANKS a million!!!!!!!! > > Ruby folks don't generally use for loops: > > > 1.upto 9 do |x| > puts x > end > > ruby loop.rb > 1 > 2 > 3 > 4 > 5 > 6 > 7 > 8 > 9 > >Exit code: 0 > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060719/31cef6d7/attachment.html From rand.thacker at gmail.com Wed Jul 19 12:43:04 2006 From: rand.thacker at gmail.com (Rand Thacker) Date: Wed, 19 Jul 2006 11:43:04 -0500 Subject: [Wtr-general] for loop syntax?? In-Reply-To: <37c405480607190920w126a23aax5c732828a22ed8b6@mail.gmail.com> References: <44BD6D63.6040708@pheedo.com> <44BE556D.5080909@pheedo.com> <72799cd70607190902u290903a3w31d35c9120ba4903@mail.gmail.com> <37c405480607190920w126a23aax5c732828a22ed8b6@mail.gmail.com> Message-ID: <33dc42ea0607190943t49bec021i5bc17e560c0b640@mail.gmail.com> Let's not forget the each_index method, then the size of the array no longer matters: pubInfoTextFields.each_index {|x| Simple1.fill_text_field(pubInfoTextFields[x], pubInfo[x]) puts "pubInfoTextFields = "+pubInfoTextFields[x]+" pubInfo = "+pubInfo[x] } On 7/19/06, Paul Carvalho wrote: > > Ruby rocks! My fav is: > > 9.times {|x| puts x} > > It doesn't get any clearer for me than just telling it how many times I > want it to loop without worrying about extra syntax that I'm likely to get > wrong.. ;) > > > > > On 19/07/06, Chris McMahon wrote: > > > > On 7/19/06, mi wrote: > > > ahhhhhhhhhhh, That was it!!! I'm just NOT used to start an iteration > > > form 0:-( THANKS a million!!!!!!!! > > > > Ruby folks don't generally use for loops: > > > > > > 1.upto 9 do |x| > > puts x > > end > > > > ruby loop.rb > > 1 > > 2 > > 3 > > 4 > > 5 > > 6 > > 7 > > 8 > > 9 > > >Exit code: 0 > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -- "I am the most humble person in the world!" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060719/e53a0166/attachment.html From mb at michaelbolton.net Wed Jul 19 13:20:30 2006 From: mb at michaelbolton.net (Michael Bolton) Date: Wed, 19 Jul 2006 13:20:30 -0400 Subject: [Wtr-general] Best way to log Watir output? In-Reply-To: <2757CAE9849293409BFE6562B9495162198BA6@rccexh001.relocationcentral.com> Message-ID: <017401c6ab57$a2bdf3e0$6501a8c0@Koko> >The only resource I was able to find online pointed me back to the test_logger.rb script in watir/examples/logging. This script manually logs each action by doing a result/escape on each assertion to output the result to a .txt file. While this works, it's tedious and inefficient for a large script. I thought there would have to be a better way, such as "grabbing" the SCIte output, since it contains exactly what I would want. If all you want to do it to grab the output, the simple thing to do is to pipe the output to a file: myscript.rb > outputfile.txt That's simplest; it may not be best. >Someone has now suggested that I take a look at WET to accompany Ruby. Is this, or another method, an accepted "best practice" as far as Watir scripting goes? There are no best practices. Who cares what other people claim is best? What works for /you/? ---Michael B. From zeljko.filipin at gmail.com Wed Jul 19 15:33:30 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 19 Jul 2006 21:33:30 +0200 Subject: [Wtr-general] How to handle tab buttons In-Reply-To: <000f01c6a66d$6cd321e0$6520a8c0@caseshare.com> References: <000f01c6a66d$6cd321e0$6520a8c0@caseshare.com> Message-ID: Your tab is just a cell in a table. ie.cell(:id, "tbJobstd0").click -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060719/c8fb8c3b/attachment.html From zeljko.filipin at gmail.com Wed Jul 19 16:09:57 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 19 Jul 2006 22:09:57 +0200 Subject: [Wtr-general] Just wanted to invoke click event where the button have parameters in it In-Reply-To: <20060719050427.44746.qmail@web7814.mail.in.yahoo.com> References: <20060719050427.44746.qmail@web7814.mail.in.yahoo.com> Message-ID: HTML that you provided is not valid. Three tags have the same id. Ids should be unique. Can you ask your developer to change to In short, change id="delete" to id="KH". Then you could access it like this ie.button(:id, "KH").click On 7/19/06, VIKASH KUMAR wrote: > > Sir, > In my web page there are lots of buttons having same name, they are called > using javascript. They are as follows: > > > > > > > > > *ie.button(:index,3).click* , this works great if we know the index, but *if > someone just doesn't know the index, knows only the parameter which is > ('delete', 'KH'), then what is the solution for it?* > > Please send me the solution for this. > Thanks in Advance > > With Regards > > Vikash Kumar > > ------------------------------ > Find out what India is talking about on Yahoo! Answers India. > Send FREE SMS from New Yahoo! Messenger to Mobile: Download NOW! > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060719/2583ab12/attachment.html From krystynak at gmail.com Wed Jul 19 20:06:13 2006 From: krystynak at gmail.com (John Krystynak) Date: Wed, 19 Jul 2006 17:06:13 -0700 Subject: [Wtr-general] File Download dialog never gets attached/found Message-ID: I want to get Watir to load a page, press a "download file" button and save the file. This first part works fine - and the "File Download" dialog comes up --------- PART 1 ---------------- require 'Watir' include Watir ie = IE.new ie.goto("http://example.com") ie.button(:value,"Login").click ie.link(:id, "csv_link").click ------------------------------------- If I run PART 1 from the command line, it never exits, it just keeps running while the File Download dialog is up. However, if I include the autoit code (below) in the same file, it never clicks the file dialog. If I kill it the running PART I script, and then run the following: % ruby autoitFS.rb myfile where the autoitFS.rb is code like this: ----- autoitFS.rb --------------------- require 'win32ole' autoit = WIN32OLE.new("AutoItX3.Control") file = ARGV[0] autoit.WinWait("File Download") autoit.ControlClick("File Download", "Would you like to open the file or save it to your computer?", "&Save") autoit.WinWait("Save As", "Save &in", 3) autoit.ControlSetText("Save As", "Save &in", "Edit1", "E\:\\Docs\\" + file + ".csv") autoit.ControlClick("Save As", "Save &in", "&Save") -------------------------- It works... To summarize: it works if I run the scripts separately - and I Ctrl-C the first script when the dialog comes up. It doesn't work if I combine the scripts into one ruby file. How can I get this to work from within one .rb file so I can loop over a bunch of URLs? Also, how can I get the first script to exit by itself? I tried doing this from at the bottom of PART 1 system( "ruby autoitFS.rb myfile" ) but nothing happenend. Thanks, johnk -- Compare New & Used Networking Equipment http://routercomp.com From manishs at reconnex.net Thu Jul 20 00:41:28 2006 From: manishs at reconnex.net (manishs at reconnex.net) Date: Thu, 20 Jul 2006 10:11:28 +0530 Subject: [Wtr-general] for loop syntax?? In-Reply-To: <37c405480607190920w126a23aax5c732828a22ed8b6@mail.gmail.com> References: <44BD6D63.6040708@pheedo.com> <72799cd70607190902u290903a3w31d35c9120ba4903@mail.gmail.com> <37c405480607190920w126a23aax5c732828a22ed8b6@mail.gmail.com> Message-ID: <200607201011.29378.manishs@reconnex.net> Does these constructs provide the current index value somehow? Regards, Manish On Wednesday 19 July 2006 21:50, Paul Carvalho wrote: > Ruby rocks! My fav is: > > 9.times {|x| puts x} > > It doesn't get any clearer for me than just telling it how many times I > want it to loop without worrying about extra syntax that I'm likely to get > wrong.. ;) > > On 19/07/06, Chris McMahon wrote: > > On 7/19/06, mi wrote: > > > ahhhhhhhhhhh, That was it!!! I'm just NOT used to start an iteration > > > form 0:-( THANKS a million!!!!!!!! > > > > Ruby folks don't generally use for loops: > > > > > > 1.upto 9 do |x| > > puts x > > end > > > > ruby loop.rb > > 1 > > 2 > > 3 > > 4 > > 5 > > 6 > > 7 > > 8 > > 9 > > > > >Exit code: 0 From sikander at marlabs.com Thu Jul 20 02:56:37 2006 From: sikander at marlabs.com (sikander) Date: Thu, 20 Jul 2006 12:26:37 +0530 Subject: [Wtr-general] Check Syntax in SciTE Version 1.67 Message-ID: <002201c6abc9$a8758c90$6520a8c0@caseshare.com> Hi!! There is no option called 'Check Syntax - Ctrl + 1' in SciTE Version 1.67 of Ruby, Please add it Regards, Sikander -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060720/192f5edc/attachment.html From zeljko.filipin at gmail.com Thu Jul 20 06:21:27 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Thu, 20 Jul 2006 12:21:27 +0200 Subject: [Wtr-general] Check Syntax in SciTE Version 1.67 In-Reply-To: <002201c6abc9$a8758c90$6520a8c0@caseshare.com> References: <002201c6abc9$a8758c90$6520a8c0@caseshare.com> Message-ID: You should probably post this to some scite mailing list ( http://www.scintilla.org/SciTE.html). -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060720/500b6d2d/attachment.html From polleu at xpiece.com Thu Jul 20 10:05:35 2006 From: polleu at xpiece.com (polleu at xpiece.com) Date: Thu, 20 Jul 2006 16:05:35 +0200 (CEST) Subject: [Wtr-general] Rounding values Message-ID: <20060720140535.3250C80DA5D@mail.tamergotchya.de> Hi all, I want to verify if the text is correctly displayed depending on different input scenarios. The web application however rounds values, e.g. if the calculated result is 170500 then displayed should be 180000. How can i do same in Ruby/Watir? Thanks, Ulrike From rand.thacker at gmail.com Thu Jul 20 10:46:10 2006 From: rand.thacker at gmail.com (Rand Thacker) Date: Thu, 20 Jul 2006 09:46:10 -0500 Subject: [Wtr-general] Rounding values In-Reply-To: <20060720140535.3250C80DA5D@mail.tamergotchya.de> References: <20060720140535.3250C80DA5D@mail.tamergotchya.de> Message-ID: <33dc42ea0607200746u236exd48deea5e769bcb5@mail.gmail.com> You could do something like this: x = (y/10000 + 1) * 10000 Of course, if the exponent of the numbers changes, you might want to define a function that can put more intelligence in there. On 7/20/06, polleu at xpiece.com wrote: > > Hi all, > > I want to verify if the text is correctly displayed depending on > different input scenarios. The web application however rounds values, > e.g. if the calculated result is 170500 then displayed should be > 180000. > > How can i do same in Ruby/Watir? > > Thanks, > Ulrike > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "I am the most humble person in the world!" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060720/ad253fec/attachment.html From christopher.mcmahon at gmail.com Thu Jul 20 11:11:41 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 20 Jul 2006 08:11:41 -0700 Subject: [Wtr-general] for loop syntax?? In-Reply-To: <200607201011.29378.manishs@reconnex.net> References: <44BD6D63.6040708@pheedo.com> <72799cd70607190902u290903a3w31d35c9120ba4903@mail.gmail.com> <37c405480607190920w126a23aax5c732828a22ed8b6@mail.gmail.com> <200607201011.29378.manishs@reconnex.net> Message-ID: <72799cd70607200811h56f30e36ga7e5f9a88b003848@mail.gmail.com> On 7/19/06, manishs at reconnex.net wrote: > Does these constructs provide the current index value somehow? > Regards, > Manish There are probably lots of ways to do that. Here's one, if I understand the question correctly: list = ["foo","bar","baz"] 0.upto 2 do |x| puts "index " + x.to_s + " : " + list[x] end >ruby bah.rb index 0 : foo index 1 : bar index 2 : baz >Exit code: 0 From mb at michaelbolton.net Thu Jul 20 11:18:54 2006 From: mb at michaelbolton.net (Michael Bolton) Date: Thu, 20 Jul 2006 11:18:54 -0400 Subject: [Wtr-general] Rounding values In-Reply-To: <20060720140535.3250C80DA5D@mail.tamergotchya.de> Message-ID: <002201c6ac0f$d0569560$6501a8c0@Koko> >I want to verify if the text is correctly displayed depending on different input scenarios. The web application however rounds values, e.g. if the calculated result is 170500 then displayed should be 180000. >How can i do same in Ruby/Watir? I'm not sure I understand the question and the context. Is there a decimal point involved? Are you trying to round up to some ceiling of thousands? Can you express your rounding rules in English or math? If so, we can probably help you to write some Ruby code to do it. Otherwise, there are lots of ways to interpret the single example you've given, and all but one of those interpretations will be wrong. Note that there are different kinds of rounding in different kinds of contexts. http://en.wikipedia.org/wiki/Rounding ---Michael B. From christopher.mcmahon at gmail.com Thu Jul 20 11:22:50 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 20 Jul 2006 08:22:50 -0700 Subject: [Wtr-general] Rounding values In-Reply-To: <20060720140535.3250C80DA5D@mail.tamergotchya.de> References: <20060720140535.3250C80DA5D@mail.tamergotchya.de> Message-ID: <72799cd70607200822u5dd30756w6a9d42ffd68498ba@mail.gmail.com> On 7/20/06, polleu at xpiece.com wrote: > Hi all, > > I want to verify if the text is correctly displayed depending on > different input scenarios. The web application however rounds values, > e.g. if the calculated result is 170500 then displayed should be > 180000. > > How can i do same in Ruby/Watir? Ruby test/unit has an assert method "assert_in_delta" that looks like it would do what you want. The code for it is in C:\ruby\lib\ruby\1.8\test\unit\assertions.rb and it's pretty easy to read if you want to see exactly how it works. Also, one of the coolest parts about Ruby is that much of Ruby is actually written in Ruby-- so if assert_in_delta doesn't do *exactly* what you want, it's pretty easy to write an assert_foo(() method that does do exactly what you want. From kperez at cardinalsolutions.com Thu Jul 20 13:54:23 2006 From: kperez at cardinalsolutions.com (Ken Perez) Date: Thu, 20 Jul 2006 13:54:23 -0400 Subject: [Wtr-general] Attaching a Popup Message-ID: <67A1E8E424B41744A599459FE59EA4D40C5EC6@csgcinml01.cardinalsolutions.com> I copied all the files I needed from here, but when I run that command I get: undefined method `attach_modal' for # (NoMethodError). Ive checked the files multiple times, and Im sure I got what you said to. Is there something else I need to do for this to work? >What you are trying to do can't be done with the version of Watir.rb you >are using because the page you are trying to attach to is a Modal >window. Try this one at: >https://svn.openqa.org/svn/watir/branches/modal_dialog/watir/ (you will >also need the files from the Watir folder--the IEDialog and Win32ole >forders.) > >Copy the Watir.rb file (and the watir directory mentioned above) into >you ruby installation directory like: >C:\ruby\lib\ruby\site_ruby\1.8 > >ie2 = $ie.attach_modal('Project - Administration') > >ie2.button(:value, "Cancel").click > >--Mark From charley.baker at gmail.com Thu Jul 20 14:17:37 2006 From: charley.baker at gmail.com (Charley Baker) Date: Thu, 20 Jul 2006 12:17:37 -0600 Subject: [Wtr-general] Attaching a Popup In-Reply-To: <67A1E8E424B41744A599459FE59EA4D40C5EC6@csgcinml01.cardinalsolutions.com> References: <67A1E8E424B41744A599459FE59EA4D40C5EC6@csgcinml01.cardinalsolutions.com> Message-ID: Ken, You might want to follow the instructions for getting the latest development gem installed: http://wiki.openqa.org/display/WTR/FAQ#FAQ-devgem And if you are working with an IE modal dialog, which you can verify from the html source, it should have a function showModalDialog() for the popup. Ugly stuff usually used only on internal apps, I've had to deal with a lot of them. If it is an ie modal dialog then you can use this to get to it: modal = ie.modal_dialog There are some examples in modal_dialog_test.rb in the unittests directory. The unittests really serve as great documentation for the project in general. cheers, Charley On 7/20/06, Ken Perez wrote: > > I copied all the files I needed from here, but when I run that command I > get: > undefined method `attach_modal' for # > (NoMethodError). > > Ive checked the files multiple times, and Im sure I got what you said > to. Is there something else I need to do for this to work? > > >What you are trying to do can't be done with the version of Watir.rb you > >are using because the page you are trying to attach to is a Modal > >window. Try this one at: > >https://svn.openqa.org/svn/watir/branches/modal_dialog/watir/ (you will > >also need the files from the Watir folder--the IEDialog and Win32ole > >forders.) > > > >Copy the Watir.rb file (and the watir directory mentioned above) into > >you ruby installation directory like: > >C:\ruby\lib\ruby\site_ruby\1.8 > > > >ie2 = $ie.attach_modal('Project - Administration') > > > >ie2.button(:value, "Cancel").click > > > >--Mark > > > _______________________________________________ > 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/20060720/cab098da/attachment.html From NSandhu at raleys.com Thu Jul 20 14:44:42 2006 From: NSandhu at raleys.com (NIcky Sandhu) Date: Thu, 20 Jul 2006 11:44:42 -0700 Subject: [Wtr-general] Popup menus Message-ID: <882C8B6492C05E48AEA0C7B2D7D4254E03D463BB@EMAIL.RALEYSNT.SECNET.RALEYS.COM> I have scanned the mailing list but found nothing for the popup menu as described in this microsoft document http://msdn.microsoft.com/workshop/author/om/popup_overview.asp#Navigati on_With_Popups Has anyone dealt with these kind of menus, typically implemented by a call to window.createPopup on the page. I have tried winclicker and autoit but I cannot get a handle to this window. Any suggestions? Warning: this e-mail may contain information proprietary to Raley's and is intended only for the use of the intended recipients. If the reader of this message is not an intended recipient, you are hereby notified that you have received this message in error and that any review, dissemination, distribution or copying of this message is strictly prohibited. If you have received this message in error, please notify the sender immediately. From acalvo at netactica.com Thu Jul 20 17:10:21 2006 From: acalvo at netactica.com (Aureliano Calvo) Date: Thu, 20 Jul 2006 19:10:21 -0200 Subject: [Wtr-general] Handle pop-ups and simple authentication Message-ID: <20060720210405.M2571@netactica.com> Hi! I'm looking in the Watir documentation, and googled for it, but I can't find a way to handle pop-ups generated with the javascript method "alert" and be able to login to a site secured with basic authentication. Wandering through the source code I've found the WinClicker class, but I don't understand how to use it. How can I click on the alerts and/or login to a basic authenticated site? Thanks in advance, Aureliano. From manishs at reconnex.net Fri Jul 21 00:18:57 2006 From: manishs at reconnex.net (Manish Sapariya) Date: Fri, 21 Jul 2006 09:48:57 +0530 Subject: [Wtr-general] for loop syntax?? In-Reply-To: <72799cd70607200811h56f30e36ga7e5f9a88b003848@mail.gmail.com> References: <44BD6D63.6040708@pheedo.com> <72799cd70607190902u290903a3w31d35c9120ba4903@mail.gmail.com> <37c405480607190920w126a23aax5c732828a22ed8b6@mail.gmail.com> <200607201011.29378.manishs@reconnex.net> <72799cd70607200811h56f30e36ga7e5f9a88b003848@mail.gmail.com> Message-ID: <44C055B1.5020003@reconnex.net> This is neat. I used for loops because i wanted to index array like you explained. Thanks, Manish On 07/20/2006 08:41 PM, Chris McMahon wrote: > On 7/19/06, manishs at reconnex.net wrote: > >> Does these constructs provide the current index value somehow? >> Regards, >> Manish >> > > There are probably lots of ways to do that. Here's one, if I > understand the question correctly: > > > list = ["foo","bar","baz"] > > 0.upto 2 do |x| > puts "index " + x.to_s + " : " + list[x] > end > > >> ruby bah.rb >> > index 0 : foo > index 1 : bar > index 2 : baz > >> Exit code: 0 >> > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From sikander at marlabs.com Fri Jul 21 03:22:25 2006 From: sikander at marlabs.com (sikander) Date: Fri, 21 Jul 2006 12:52:25 +0530 Subject: [Wtr-general] Getting WIN32OLERuntimeError: focus - Error Message-ID: <000301c6ac96$6afdaf00$6520a8c0@caseshare.com> Hi! I was using the following code to execute my scripts but uncounted WIN32OLERuntimeError: focus - Error Code: $ie.frame("Main").text_field(:id, "tbJobs__ctl0_txtTbPrnPageNumber").set("2") $ie.frame("Main").button(:id, "tbJobs__ctl0_btnTbPrnGo").click Error is: 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. c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3388:in `method_missing' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3388:in `set' Will you plz suggest me how to handle this. Thanks, SIkander -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060721/5aca4184/attachment.html From vikashkumar051 at yahoo.co.in Fri Jul 21 03:52:37 2006 From: vikashkumar051 at yahoo.co.in (VIKASH KUMAR) Date: Fri, 21 Jul 2006 08:52:37 +0100 (BST) Subject: [Wtr-general] problem in click event of "div" In-Reply-To: Message-ID: <20060721075237.44558.qmail@web7802.mail.in.yahoo.com> Sir, How to focus on "div" element & click on that element. I am using HTML having source:
              I wanted to click on div having id="tCt2", the below code is not working: id.div(:id,"tCt2").click Please send me a solution for this. Thanks in advance Vikash Kumar --------------------------------- Find out what India is talking about on Yahoo! Answers India. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060721/4cbdfe1f/attachment.html From zeljko.filipin at gmail.com Fri Jul 21 03:58:39 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 21 Jul 2006 09:58:39 +0200 Subject: [Wtr-general] problem in click event of "div" In-Reply-To: <20060721075237.44558.qmail@web7802.mail.in.yahoo.com> References: <20060721075237.44558.qmail@web7802.mail.in.yahoo.com> Message-ID: It seems like a spelling error to me, because this works for me (change first "id" to "ie"): ie.div(:id,"tCt2").click On 7/21/06, VIKASH KUMAR wrote: > > > I wanted to click on div having id="tCt2", the below code is not working: > *id.div(:id,"tCt2").click* > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060721/be557fcb/attachment.html From christian.leskowsky at gmail.com Fri Jul 21 08:11:05 2006 From: christian.leskowsky at gmail.com (Christian Leskowsky) Date: Fri, 21 Jul 2006 08:11:05 -0400 Subject: [Wtr-general] problem in click event of "div" In-Reply-To: References: <20060721075237.44558.qmail@web7802.mail.in.yahoo.com> Message-ID: <58a2be440607210511m727cb22ag8dcec091d3c43860@mail.gmail.com> Not sure what clicking on the div will do here. Does it translate into a click on the inner checkbox? On 7/21/06, Zeljko Filipin wrote: > > It seems like a spelling error to me, because this works for me (change > first "id" to "ie"): > > ie.div(:id,"tCt2").click > > > On 7/21/06, VIKASH KUMAR wrote: > > > > > > I wanted to click on div having id="tCt2", the below code is not > > working: > > *id.div(:id,"tCt2").click* > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -- - 'There was an owl lived in an oak. The more he heard, the less he spoke. The less he spoke, the more he heard.' Christian Leskowsky christian.leskowsky at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060721/c0504209/attachment.html From margrymouse-newsletters at yahoo.com Fri Jul 21 10:44:37 2006 From: margrymouse-newsletters at yahoo.com (Pauli's List Subscriptions) Date: Fri, 21 Jul 2006 07:44:37 -0700 (PDT) Subject: [Wtr-general] Newbie - please point me at an appropriate demo Message-ID: <20060721144437.5464.qmail@web31808.mail.mud.yahoo.com> Hello, I've just downloaded Ruby and Watir. I've looked at WET's webpage. I have a table of parameters, which I'd like to use sequentially as input to the same test, logging the results as testing proceeds. WET can support this requirement, on the input side, from spreadsheets with it's 'datatable' feature. But my parameters are in a MySql database table, and I'd like to update the results there. Since Ruby provides DBI access to databases, I figure I would be better served if I just coded it myself in Ruby. However, I'm new to Ruby. I've found Ruby, DBI and WATIR documentation. What I'd dearly like to see is some sample code that executes a query from a table, iterates the results, processing a WATIR test for each row, and logs the results at each test completion. Is there such a sample anyone can point me at? Or, barring that - any pointers on how best to approach this? In any case, once I get it working, I think it would be a good sample to add to the Wiki - I'll try and add it there - once I'm done. Much thanks! Pauli From jason_horn at insightbb.com Fri Jul 21 10:53:18 2006 From: jason_horn at insightbb.com (jason_horn at insightbb.com) Date: Fri, 21 Jul 2006 10:53:18 -0400 Subject: [Wtr-general] Getting WIN32OLERuntimeError: focus - Error In-Reply-To: <000301c6ac96$6afdaf00$6520a8c0@caseshare.com> References: <000301c6ac96$6afdaf00$6520a8c0@caseshare.com> Message-ID: Most likely happening from the text_field command... If the control is disabled, you will not be able to modify the value for it. This happens all the time in DHTML. Does that text box only become available if more than one page exists? Might want to look into that, maybe set up a condition block to test whether there are mutiple pages... Hope it helps! ----- Original Message ----- From: sikander Date: Friday, July 21, 2006 3:19 Subject: [Wtr-general] Getting WIN32OLERuntimeError: focus - Error To: wtr-general at rubyforge.org > Hi! > > > > I was using the following code to execute my scripts but uncounted > WIN32OLERuntimeError: focus - Error > > > > Code: > > $ie.frame("Main").text_field(:id, > "tbJobs__ctl0_txtTbPrnPageNumber").set("2") > > $ie.frame("Main").button(:id, "tbJobs__ctl0_btnTbPrnGo").click > > > > Error is: > > 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. > > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3388:in `method_missing' > > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3388:in `set' > > > > Will you plz suggest me how to handle this. > > > > Thanks, > > SIkander > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060721/b32b8b7a/attachment.html From jason_horn at insightbb.com Fri Jul 21 10:57:38 2006 From: jason_horn at insightbb.com (jason_horn at insightbb.com) Date: Fri, 21 Jul 2006 10:57:38 -0400 Subject: [Wtr-general] Newbie - please point me at an appropriate demo In-Reply-To: <20060721144437.5464.qmail@web31808.mail.mud.yahoo.com> References: <20060721144437.5464.qmail@web31808.mail.mud.yahoo.com> Message-ID: Just found this searching "ruby mysql" in Google... Looks like it is pretty easy to read... Good Luck! http://www.rubywizard.net/ruby-mysql.html ----- Original Message ----- From: Pauli's List Subscriptions Date: Friday, July 21, 2006 10:52 Subject: [Wtr-general] Newbie - please point me at an appropriate demo To: Wtr-general at rubyforge.org > Hello, > > I've just downloaded Ruby and Watir. I've looked at > WET's webpage. > > I have a table of parameters, which I'd like to use > sequentially as input to the same test, logging the > results as testing proceeds. WET can support this > requirement, on the input side, from spreadsheets with > it's 'datatable' feature. But my parameters are in a > MySql database table, and I'd like to update the > results there. Since Ruby provides DBI access to > databases, I figure I would be better served if I just > coded it myself in Ruby. > > However, I'm new to Ruby. I've found Ruby, DBI and > WATIR documentation. What I'd dearly like to see is > some sample code that executes a query from a table, > iterates the results, processing a WATIR test for each > row, and logs the results at each test completion. > > Is there such a sample anyone can point me at? Or, > barring that - any pointers on how best to approach > this? > > In any case, once I get it working, I think it would > be a good sample to add to the Wiki - I'll try and add > it there - once I'm done. > > Much thanks! > > Pauli > _______________________________________________ > 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/20060721/f8c7fa8c/attachment.html From margrymouse-newsletters at yahoo.com Fri Jul 21 11:07:18 2006 From: margrymouse-newsletters at yahoo.com (Pauli's List Subscriptions) Date: Fri, 21 Jul 2006 08:07:18 -0700 (PDT) Subject: [Wtr-general] Newbie - please point me at an appropriate demo In-Reply-To: Message-ID: <20060721150718.94115.qmail@web31809.mail.mud.yahoo.com> Jason, Thanks much - that looks to be helpful. I'm more interested in how to iterate the WATIR test though. So far I haven't seen how to - in language that come from my programming background, but may not be exactly Ruby/WATIR appropriate - wrap a test inside a function that I can call with parameters, that will return some results set. Once I have that, I can just plug it into the code from the page you linked for me, and I'm away! Pauli --- jason_horn at insightbb.com wrote: > Just found this searching "ruby mysql" in Google... > Looks like it is pretty easy to read... Good Luck! > > http://www.rubywizard.net/ruby-mysql.html > > ----- Original Message ----- > From: Pauli's List Subscriptions > > However, I'm new to Ruby. I've found Ruby, DBI > and > > WATIR documentation. What I'd dearly like to see > is > > some sample code that executes a query from a > table, > > iterates the results, processing a WATIR test for > each > > row, and logs the results at each test completion. > > From dave.hoover at gmail.com Fri Jul 21 11:37:32 2006 From: dave.hoover at gmail.com (Dave Hoover) Date: Fri, 21 Jul 2006 10:37:32 -0500 Subject: [Wtr-general] SafariWatir 0.1.0 Message-ID: <11c8704e0607210837s387ded1dsfaebedd797bbfe6f@mail.gmail.com> Announcment: http://redsquirrel.com/cgi-bin/dave/projects/watir/safari.watir.0.1.0.html Installation: gem install safariwatir Home Page: http://safariwatir.rubyforge.org/ Enjoy! --Dave From fxn at hashref.com Fri Jul 21 11:45:16 2006 From: fxn at hashref.com (Xavier Noria) Date: Fri, 21 Jul 2006 17:45:16 +0200 Subject: [Wtr-general] SafariWatir 0.1.0 In-Reply-To: <11c8704e0607210837s387ded1dsfaebedd797bbfe6f@mail.gmail.com> References: <11c8704e0607210837s387ded1dsfaebedd797bbfe6f@mail.gmail.com> Message-ID: <171ACE10-B845-474F-9DB3-494BDF9BF772@hashref.com> On Jul 21, 2006, at 17:37, Dave Hoover wrote: > Announcment: http://redsquirrel.com/cgi-bin/dave/projects/watir/ > safari.watir.0.1.0.html > > Installation: gem install safariwatir > > Home Page: http://safariwatir.rubyforge.org/ > > Enjoy! > --Dave Dude, that rocks! I am tired of Remote Desktop :-). From Bill.Attebery at twtelecom.com Fri Jul 21 13:58:32 2006 From: Bill.Attebery at twtelecom.com (Attebery, Bill) Date: Fri, 21 Jul 2006 11:58:32 -0600 Subject: [Wtr-general] Lists question Message-ID: <485A27FF1E164B4FB51E2A066D5265A503EC2D@SRVMSXMB1.ad.twtelecom.com> On 7/11/06, Bret Pettichord wrote: This bothers me a lot. I need to add some diagnostics to IE.attach in 1.5 trunk and then have you try it again and send the diagnostics report. Don't let me forget about this. Bret Bret I made some time to do some digging into the code (1.5.1.1054) and discovered this in the IE::_find method class IE ... def self._find(how, what) shell = WIN32OLE.new("Shell.Application") ieTemp = nil shell.Windows.each do |window| next unless (window.path =~ /Internet Explorer/ rescue false) Seems that in this context !~ would be desired in that last line, so I tried that in place of the =~ and it worked for me -- my attach code seems to work again. What do you think? The content contained in this electronic message is not intended to constitute formation of a contract binding TWTC. TWTC will be contractually bound only upon execution, by an authorized officer, of a contract including agreed terms and conditions or by express application of its tariffs. This message is intended only for the use of the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the sender of this E-Mail or by telephone. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060721/30217b83/attachment.html From ChintakrindiMeghana at managementdynamics.com Fri Jul 21 17:23:22 2006 From: ChintakrindiMeghana at managementdynamics.com (Chintakrindi Meghanath ) Date: Fri, 21 Jul 2006 17:23:22 -0400 Subject: [Wtr-general] Testing of the Java Client (which opens in browser) Application Message-ID: <6CF3AA425295C7479483AC0018EDF98B06EF46AF@MI8NYCMAIL03.Mi8.com> Hi We have an application , which opens a browser and then a java client. The application is in java client only.User has to navigate in the Java Client. If the usr closes the browser , then java client is also closed. Can we able to test this type of application using the watir ? Thanks Meghanath -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060721/ff89945a/attachment.html From sbtang1 at hotmail.com Fri Jul 21 17:41:39 2006 From: sbtang1 at hotmail.com (Steve Tangsombatvisit) Date: Fri, 21 Jul 2006 14:41:39 -0700 Subject: [Wtr-general] Setting a timeout on ie.goto()? Message-ID: Hi folks, Relatively new to using Ruby/Watir... I have a quick question about the ie.goto statement, is there a way to set a timeout for this call so that if the webpage does not complete loading with X amount of seconds the call terminates? The problem we're running into is that some of the pages we access occasionally NEVER finish loading. On the IE status bar (bottom left) we'll see a message that says "Opening Page XXXX" or " (1 Item Remaining) Opening Page XXXXX" and that message will persist forever (as far as we can tell)... So our scripts are hanging at the ie.goto call cause the page never loads completely. Any tips you guys can give me? Thanks, Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060721/18ea3928/attachment.html From charley.baker at gmail.com Fri Jul 21 17:43:46 2006 From: charley.baker at gmail.com (Charley Baker) Date: Fri, 21 Jul 2006 15:43:46 -0600 Subject: [Wtr-general] Testing of the Java Client (which opens in browser) Application In-Reply-To: <6CF3AA425295C7479483AC0018EDF98B06EF46AF@MI8NYCMAIL03.Mi8.com> References: <6CF3AA425295C7479483AC0018EDF98B06EF46AF@MI8NYCMAIL03.Mi8.com> Message-ID: I'm assuming you are talking about a java applet. Java applets, Flash controls and the like are not supported by the current version of Watir. Since Watir uses IE through com, embedded objects are visible but there's no interface into their internals. -Charley On 7/21/06, Chintakrindi Meghanath < ChintakrindiMeghana at managementdynamics.com> wrote: > > Hi > > We have an application , which opens a browser and then a java client. > The application is in java client only.User has to navigate in the Java > Client. > If the usr closes the browser , then java client is also closed. > Can we able to test this type of application using the watir ? > > Thanks > Meghanath > > > _______________________________________________ > 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/20060721/0b122e0d/attachment.html From fxn at hashref.com Fri Jul 21 17:47:29 2006 From: fxn at hashref.com (Xavier Noria) Date: Fri, 21 Jul 2006 23:47:29 +0200 Subject: [Wtr-general] how to disable image loading Message-ID: <73046FE1-DEF2-4256-A1B9-E54379B4EFA6@hashref.com> Is there a way to disable image loading programmatically? -- fxn From charley.baker at gmail.com Fri Jul 21 18:16:06 2006 From: charley.baker at gmail.com (Charley Baker) Date: Fri, 21 Jul 2006 16:16:06 -0600 Subject: [Wtr-general] how to disable image loading In-Reply-To: <73046FE1-DEF2-4256-A1B9-E54379B4EFA6@hashref.com> References: <73046FE1-DEF2-4256-A1B9-E54379B4EFA6@hashref.com> Message-ID: You could use AutoIt to disable image loading in ie. Take a look at WindowHelper.rb(part of the watir distribution and uses AutoIt) as well as the AutoIt site at: http://www.hiddensoft.com/AutoIt/ -Charley On 7/21/06, Xavier Noria wrote: > > Is there a way to disable image loading programmatically? > > -- fxn > > _______________________________________________ > 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/20060721/973a2481/attachment.html From charley.baker at gmail.com Fri Jul 21 18:18:07 2006 From: charley.baker at gmail.com (Charley Baker) Date: Fri, 21 Jul 2006 16:18:07 -0600 Subject: [Wtr-general] Setting a timeout on ie.goto()? In-Reply-To: References: Message-ID: Hey Steve, Honestly that sounds like a defect. That being said, there is no simple way that I currently know of to get around waiting for ie to return a ready state. -Charley On 7/21/06, Steve Tangsombatvisit wrote: > > Hi folks, > > Relatively new to using Ruby/Watir... I have a quick question about the > ie.goto statement, is there a way to set a timeout for this call so that > if the webpage does not complete loading with X amount of seconds the call > terminates? > > The problem we're running into is that some of the pages we access > occasionally NEVER finish loading. On the IE status bar (bottom left) we'll > see a message that says "Opening Page XXXX" or " (1 Item Remaining) Opening > Page XXXXX" and that message will persist forever (as far as we can tell)... > So our scripts are hanging at the ie.goto call cause the page never loads > completely. > > Any tips you guys can give me? > > Thanks, > Steve > > _______________________________________________ > 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/20060721/6f361740/attachment.html From jfitisoff at yahoo.com Fri Jul 21 18:25:55 2006 From: jfitisoff at yahoo.com (John Fitisoff) Date: Fri, 21 Jul 2006 15:25:55 -0700 (PDT) Subject: [Wtr-general] Setting a timeout on ie.goto()? In-Reply-To: Message-ID: <20060721222555.73391.qmail@web54106.mail.yahoo.com> <> Yup. I'm working on multithreaded tests and that seems to happen (not a lot, but then it doesn't have to happen a lot to mess things up). You can use Ruby's timeout library to set a timeout value for an action or series of actions and then rescue the timeout exception when it occurs. something like the example below should work. But someone else out there may have a simpler way of dealing with it. ---------------------------- require 'watir' require 'timeout' include Watir ie = IE.new def timeout begin timeout(120.0) do |timeout_length| ie.goto("www.yoursite.com") end rescue Timeout::Error => e puts e ie.close end end --- Steve Tangsombatvisit wrote: > Hi folks, > > Relatively new to using Ruby/Watir... I have a > quick question about the ie.goto statement, is there > a way to set a timeout for this call so that if the > webpage does not complete loading with X amount of > seconds the call terminates? > > The problem we're running into is that some of the > pages we access occasionally NEVER finish loading. > On the IE status bar (bottom left) we'll see a > message that says "Opening Page XXXX" or " (1 Item > Remaining) Opening Page XXXXX" and that message will > persist forever (as far as we can tell)... So our > scripts are hanging at the ie.goto call cause the > page never loads completely. > > Any tips you guys can give me? > > Thanks, > Steve> _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From krystynak at gmail.com Fri Jul 21 19:59:47 2006 From: krystynak at gmail.com (John Krystynak) Date: Fri, 21 Jul 2006 16:59:47 -0700 Subject: [Wtr-general] Setting a timeout on ie.goto()? In-Reply-To: <20060721222555.73391.qmail@web54106.mail.yahoo.com> References: <20060721222555.73391.qmail@web54106.mail.yahoo.com> Message-ID: I have a similar problem - that program that does a ie.link().click that brings up a File Save Dialog never resumes. I've tried threads, and system calls to run the Autoit stuff, but the only way I can automatically fill in the File Save Dialog is to run a separate autoit ruby program from the command line. Then after autoit fills in the dialog, and the file is saved, the original ruby program that got to that point is hung, still on the ie.link().click. It never resumes once the dialog is gone. It's really frustrating. johnk On 7/21/06, John Fitisoff wrote: > < pages we access occasionally NEVER finish loading.>> > > Yup. I'm working on multithreaded tests and that seems > to happen (not a lot, but then it doesn't have to > happen a lot to mess things up). You can use Ruby's > timeout library to set a timeout value for an action > or series of actions and then rescue the timeout > exception when it occurs. something like the example > below should work. But someone else out there may have > a simpler way of dealing with it. > ---------------------------- > > require 'watir' > require 'timeout' > include Watir > > ie = IE.new > > def timeout > begin > timeout(120.0) do |timeout_length| > ie.goto("www.yoursite.com") > end > rescue Timeout::Error => e > puts e > ie.close > end > end > > > > --- Steve Tangsombatvisit wrote: > > > Hi folks, > > > > Relatively new to using Ruby/Watir... I have a > > quick question about the ie.goto statement, is there > > a way to set a timeout for this call so that if the > > webpage does not complete loading with X amount of > > seconds the call terminates? > > > > The problem we're running into is that some of the > > pages we access occasionally NEVER finish loading. > > On the IE status bar (bottom left) we'll see a > > message that says "Opening Page XXXX" or " (1 Item > > Remaining) Opening Page XXXXX" and that message will > > persist forever (as far as we can tell)... So our > > scripts are hanging at the ie.goto call cause the > > page never loads completely. > > > > Any tips you guys can give me? > > > > Thanks, > > Steve> > _______________________________________________ > > 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 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- Compare New & Used Networking Equipment http://routercomp.com From ben_simo at standardandpoors.com Fri Jul 21 23:39:10 2006 From: ben_simo at standardandpoors.com (Simo, Ben) Date: Fri, 21 Jul 2006 21:39:10 -0600 Subject: [Wtr-general] Proxy server login Message-ID: I am trying to use WATIR through a proxy server. The browser is configured to automatically detect proxy settings and to use a configuration script. When manually browsing in IE, the browser displays a proxy login dialog when I attempt to access a site that is outside our network. This proxy login dialog may show up when the browser is opened, or it may show up later. When I start IE via WATIR, no proxy login dialog is displayed and IE displays the "Cannot find server" error page. How can I get WATIR to start IE so that it will detect the need to login to the proxy server, and how do I get it to log into the proxy server? Thank you, Ben J. Benjamin Simo Senior Quality Assurance Engineer Standard & Poor's The McGraw-Hill Companies 7400 S. Alton Ct. Centennial, CO 80112 ben_simo at standardandpoors.com (303) 721-4606 -------------------------------------------------------- The information contained in this message is intended only for the recipient, and may be a confidential attorney-client communication or may otherwise be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, please be aware that any dissemination or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the message and deleting it from your computer. -------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060721/71ff6251/attachment.html From vikashkumar051 at yahoo.co.in Sat Jul 22 00:34:46 2006 From: vikashkumar051 at yahoo.co.in (VIKASH KUMAR) Date: Sat, 22 Jul 2006 05:34:46 +0100 (BST) Subject: [Wtr-general] problem in click event of "div" In-Reply-To: Message-ID: <20060722043446.37721.qmail@web7803.mail.in.yahoo.com> Sir, How to focus on "div" element & click on that element. I am using HTML having source:
              I wanted to click on div having id="tCt2", the below code is not working: ie.div(:id,"tCt2").flash ie.div(:id,"tCt2").click Please send me a solution for this. Thanks in advance Vikash Kumar --------------------------------- Find out what India is talking about on Yahoo! Answers India. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060722/70c4583b/attachment.html From tester.paul at gmail.com Sat Jul 22 01:07:46 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Sat, 22 Jul 2006 01:07:46 -0400 Subject: [Wtr-general] problem in click event of "div" In-Reply-To: <20060722043446.37721.qmail@web7803.mail.in.yahoo.com> References: <20060722043446.37721.qmail@web7803.mail.in.yahoo.com> Message-ID: <37c405480607212207y282da5b6u8fc2b08996faa4fb@mail.gmail.com> Hi Vikash, Maybe your code is working. Maybe it just doesn't do what you think it should do. Are you trying to access the checkbox? If so, why not just try something more direct like: ie.checkbox(:id, /3_1/).flash ie.checkbox(:id, /3_1/).set On 22/07/06, VIKASH KUMAR wrote: > > >
              >
              > > >
              > > I wanted to click on div having id="tCt2", the below code is not > working: > * ie.div(:id,"tCt2").flash* > * ie.div(:id,"tCt2").click > * > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060722/b7c4ff20/attachment.html From fxn at hashref.com Sat Jul 22 05:29:01 2006 From: fxn at hashref.com (Xavier Noria) Date: Sat, 22 Jul 2006 11:29:01 +0200 Subject: [Wtr-general] Handle pop-ups and simple authentication In-Reply-To: <20060720210405.M2571@netactica.com> References: <20060720210405.M2571@netactica.com> Message-ID: <5D59017D-0C9C-41F5-BC77-E13CC50E039C@hashref.com> On Jul 20, 2006, at 23:10, Aureliano Calvo wrote: > Hi! > I'm looking in the Watir documentation, and googled for it, but I > can't find a > way to handle pop-ups generated with the javascript method "alert" > and be able > to login to a site secured with basic authentication. > > Wandering through the source code I've found the WinClicker class, > but I don't > understand how to use it. > > How can I click on the alerts and/or login to a basic authenticated > site? Take a look at watir/WindowHelper.rb, never used it but seems it does that. -- fxn From sikander at marlabs.com Mon Jul 24 00:11:14 2006 From: sikander at marlabs.com (sikander) Date: Mon, 24 Jul 2006 09:41:14 +0530 Subject: [Wtr-general] Getting WIN32OLERuntimeError: focus - Error In-Reply-To: Message-ID: <000001c6aed7$34f79400$6520a8c0@caseshare.com> Yes. The control (i.e., text field and button) will only enable when there are more than one pages. Regards, sikander Message: 6 Date: Fri, 21 Jul 2006 10:53:18 -0400 From: Subject: Re: [Wtr-general] Getting WIN32OLERuntimeError: focus - Error To: wtr-general at rubyforge.org Message-ID: Content-Type: text/plain; charset="us-ascii" Most likely happening from the text_field command... If the control is disabled, you will not be able to modify the value for it. This happens all the time in DHTML. Does that text box only become available if more than one page exists? Might want to look into that, maybe set up a condition block to test whether there are mutiple pages... Hope it helps! ----- Original Message ----- From: sikander Date: Friday, July 21, 2006 3:19 Subject: [Wtr-general] Getting WIN32OLERuntimeError: focus - Error To: wtr-general at rubyforge.org > Hi! > > > > I was using the following code to execute my scripts but uncounted > WIN32OLERuntimeError: focus - Error > > > > Code: > > $ie.frame("Main").text_field(:id, > "tbJobs__ctl0_txtTbPrnPageNumber").set("2") > > $ie.frame("Main").button(:id, "tbJobs__ctl0_btnTbPrnGo").click > > > > Error is: > > 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. > > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3388:in `method_missing' > > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3388:in `set' > > > > Will you plz suggest me how to handle this. > > > > Thanks, > > SIkander > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060721/b32b8b7a/att achment.html ------------------------------ _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general End of Wtr-general Digest, Vol 32, Issue 32 ******************************************* -- From areed at relocationcentral.com Mon Jul 24 17:49:54 2006 From: areed at relocationcentral.com (Adam Reed) Date: Mon, 24 Jul 2006 16:49:54 -0500 Subject: [Wtr-general] Using include for logging function Message-ID: <2757CAE9849293409BFE6562B949516219A4AF@rccexh001.relocationcentral.com> Howdy again. I have written a script that successfully logs different aspects of a very simple web test. I have it set up to create a log directory structure depending on the Project name, test being performed, and date (all variables). I would like to separate the general logging code so that I can use it in other tests. This is, however giving me some trouble. You can download the coded sample here: http://www.makeharmony.com/watir.html Essentially what I'd like to do is tear the Logger section out of that script and call it logger.rb, make the variables global with $, and placed require 'logger' in the test script. This, however, doesn't work so well. What do I need to do? Thanks, Adam PS - You'll notice some WET code in there as well -- I was never able to get Watir JS pop-up handling solved, so I tried out the WET code instead. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of wtr-general-request at rubyforge.org Sent: Friday, July 21, 2006 11:35 PM To: wtr-general at rubyforge.org Subject: Wtr-general Digest, Vol 32, Issue 34 Send Wtr-general mailing list submissions to wtr-general at rubyforge.org To subscribe or unsubscribe via the World Wide Web, visit http://rubyforge.org/mailman/listinfo/wtr-general or, via email, send a message with subject or body 'help' to wtr-general-request at rubyforge.org You can reach the person managing the list at wtr-general-owner at rubyforge.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Wtr-general digest..." Today's Topics: 1. how to disable image loading (Xavier Noria) 2. Re: how to disable image loading (Charley Baker) 3. Re: Setting a timeout on ie.goto()? (Charley Baker) 4. Re: Setting a timeout on ie.goto()? (John Fitisoff) 5. Re: Setting a timeout on ie.goto()? (John Krystynak) 6. Proxy server login (Simo, Ben) 7. problem in click event of "div" (VIKASH KUMAR) ---------------------------------------------------------------------- Message: 1 Date: Fri, 21 Jul 2006 23:47:29 +0200 From: Xavier Noria Subject: [Wtr-general] how to disable image loading To: Wtr-general at rubyforge.org Message-ID: <73046FE1-DEF2-4256-A1B9-E54379B4EFA6 at hashref.com> Content-Type: text/plain; charset=US-ASCII; format=flowed Is there a way to disable image loading programmatically? -- fxn ------------------------------ Message: 2 Date: Fri, 21 Jul 2006 16:16:06 -0600 From: "Charley Baker" Subject: Re: [Wtr-general] how to disable image loading To: wtr-general at rubyforge.org Message-ID: Content-Type: text/plain; charset="iso-8859-1" You could use AutoIt to disable image loading in ie. Take a look at WindowHelper.rb(part of the watir distribution and uses AutoIt) as well as the AutoIt site at: http://www.hiddensoft.com/AutoIt/ -Charley On 7/21/06, Xavier Noria wrote: > > Is there a way to disable image loading programmatically? > > -- fxn > > _______________________________________________ > 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/20060721/973a2481 /attachment-0001.html ------------------------------ Message: 3 Date: Fri, 21 Jul 2006 16:18:07 -0600 From: "Charley Baker" Subject: Re: [Wtr-general] Setting a timeout on ie.goto()? To: wtr-general at rubyforge.org Message-ID: Content-Type: text/plain; charset="iso-8859-1" Hey Steve, Honestly that sounds like a defect. That being said, there is no simple way that I currently know of to get around waiting for ie to return a ready state. -Charley On 7/21/06, Steve Tangsombatvisit wrote: > > Hi folks, > > Relatively new to using Ruby/Watir... I have a quick question about > the ie.goto statement, is there a way to set a timeout for this call > so that if the webpage does not complete loading with X amount of > seconds the call terminates? > > The problem we're running into is that some of the pages we access > occasionally NEVER finish loading. On the IE status bar (bottom left) > we'll see a message that says "Opening Page XXXX" or " (1 Item > Remaining) Opening Page XXXXX" and that message will persist forever (as far as we can tell)... > So our scripts are hanging at the ie.goto call cause the page never > loads completely. > > Any tips you guys can give me? > > Thanks, > Steve > > _______________________________________________ > 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/20060721/6f361740 /attachment-0001.html ------------------------------ Message: 4 Date: Fri, 21 Jul 2006 15:25:55 -0700 (PDT) From: John Fitisoff Subject: Re: [Wtr-general] Setting a timeout on ie.goto()? To: wtr-general at rubyforge.org Message-ID: <20060721222555.73391.qmail at web54106.mail.yahoo.com> Content-Type: text/plain; charset=iso-8859-1 <> Yup. I'm working on multithreaded tests and that seems to happen (not a lot, but then it doesn't have to happen a lot to mess things up). You can use Ruby's timeout library to set a timeout value for an action or series of actions and then rescue the timeout exception when it occurs. something like the example below should work. But someone else out there may have a simpler way of dealing with it. ---------------------------- require 'watir' require 'timeout' include Watir ie = IE.new def timeout begin timeout(120.0) do |timeout_length| ie.goto("www.yoursite.com") end rescue Timeout::Error => e puts e ie.close end end --- Steve Tangsombatvisit wrote: > Hi folks, > > Relatively new to using Ruby/Watir... I have a quick question about > the ie.goto statement, is there a way to set a timeout for this call > so that if the webpage does not complete loading with X amount of > seconds the call terminates? > > The problem we're running into is that some of the pages we access > occasionally NEVER finish loading. > On the IE status bar (bottom left) we'll see a message that says > "Opening Page XXXX" or " (1 Item > Remaining) Opening Page XXXXX" and that message will persist forever > (as far as we can tell)... So our scripts are hanging at the ie.goto > call cause the page never loads completely. > > Any tips you guys can give me? > > Thanks, > Steve> _______________________________________________ > 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 ------------------------------ Message: 5 Date: Fri, 21 Jul 2006 16:59:47 -0700 From: "John Krystynak" Subject: Re: [Wtr-general] Setting a timeout on ie.goto()? To: wtr-general at rubyforge.org Message-ID: Content-Type: text/plain; charset=ISO-8859-1; format=flowed I have a similar problem - that program that does a ie.link().click that brings up a File Save Dialog never resumes. I've tried threads, and system calls to run the Autoit stuff, but the only way I can automatically fill in the File Save Dialog is to run a separate autoit ruby program from the command line. Then after autoit fills in the dialog, and the file is saved, the original ruby program that got to that point is hung, still on the ie.link().click. It never resumes once the dialog is gone. It's really frustrating. johnk On 7/21/06, John Fitisoff wrote: > < pages we access occasionally NEVER finish loading.>> > > Yup. I'm working on multithreaded tests and that seems > to happen (not a lot, but then it doesn't have to > happen a lot to mess things up). You can use Ruby's > timeout library to set a timeout value for an action > or series of actions and then rescue the timeout > exception when it occurs. something like the example > below should work. But someone else out there may have > a simpler way of dealing with it. > ---------------------------- > > require 'watir' > require 'timeout' > include Watir > > ie = IE.new > > def timeout > begin > timeout(120.0) do |timeout_length| > ie.goto("www.yoursite.com") > end > rescue Timeout::Error => e > puts e > ie.close > end > end > > > > --- Steve Tangsombatvisit wrote: > > > Hi folks, > > > > Relatively new to using Ruby/Watir... I have a > > quick question about the ie.goto statement, is there > > a way to set a timeout for this call so that if the > > webpage does not complete loading with X amount of > > seconds the call terminates? > > > > The problem we're running into is that some of the > > pages we access occasionally NEVER finish loading. > > On the IE status bar (bottom left) we'll see a > > message that says "Opening Page XXXX" or " (1 Item > > Remaining) Opening Page XXXXX" and that message will > > persist forever (as far as we can tell)... So our > > scripts are hanging at the ie.goto call cause the > > page never loads completely. > > > > Any tips you guys can give me? > > > > Thanks, > > Steve> > _______________________________________________ > > 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 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- Compare New & Used Networking Equipment http://routercomp.com ------------------------------ Message: 6 Date: Fri, 21 Jul 2006 21:39:10 -0600 From: "Simo, Ben" Subject: [Wtr-general] Proxy server login To: Message-ID: Content-Type: text/plain; charset="iso-8859-1" I am trying to use WATIR through a proxy server. The browser is configured to automatically detect proxy settings and to use a configuration script. When manually browsing in IE, the browser displays a proxy login dialog when I attempt to access a site that is outside our network. This proxy login dialog may show up when the browser is opened, or it may show up later. When I start IE via WATIR, no proxy login dialog is displayed and IE displays the "Cannot find server" error page. How can I get WATIR to start IE so that it will detect the need to login to the proxy server, and how do I get it to log into the proxy server? Thank you, Ben J. Benjamin Simo Senior Quality Assurance Engineer Standard & Poor's The McGraw-Hill Companies 7400 S. Alton Ct. Centennial, CO 80112 ben_simo at standardandpoors.com (303) 721-4606 -------------------------------------------------------- The information contained in this message is intended only for the recipient, and may be a confidential attorney-client communication or may otherwise be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, please be aware that any dissemination or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the message and deleting it from your computer. -------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060721/71ff6251 /attachment-0001.html ------------------------------ Message: 7 Date: Sat, 22 Jul 2006 05:34:46 +0100 (BST) From: VIKASH KUMAR Subject: [Wtr-general] problem in click event of "div" To: wtr-general at rubyforge.org Message-ID: <20060722043446.37721.qmail at web7803.mail.in.yahoo.com> Content-Type: text/plain; charset="iso-8859-1" Sir, How to focus on "div" element & click on that element. I am using HTML having source:
              I wanted to click on div having id="tCt2", the below code is not working: ie.div(:id,"tCt2").flash ie.div(:id,"tCt2").click Please send me a solution for this. Thanks in advance Vikash Kumar --------------------------------- Find out what India is talking about on Yahoo! Answers India. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060722/70c4583b /attachment.html ------------------------------ _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general End of Wtr-general Digest, Vol 32, Issue 34 ******************************************* From christopher.mcmahon at gmail.com Mon Jul 24 17:57:53 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 24 Jul 2006 14:57:53 -0700 Subject: [Wtr-general] Using include for logging function In-Reply-To: <2757CAE9849293409BFE6562B949516219A4AF@rccexh001.relocationcentral.com> References: <2757CAE9849293409BFE6562B949516219A4AF@rccexh001.relocationcentral.com> Message-ID: <72799cd70607241457n4ed5c550i40c92a0f928f878b@mail.gmail.com> > Essentially what I'd like to do is tear the Logger section out of that > script and call it logger.rb, make the variables global with $, and > placed require 'logger' in the test script. This, however, doesn't work > so well. > > What do I need to do? No reason why what you propose shouldn't work. What errors are you getting? -Chris From bret at pettichord.com Mon Jul 24 18:55:40 2006 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 24 Jul 2006 17:55:40 -0500 Subject: [Wtr-general] Best way to log Watir output? In-Reply-To: <2757CAE9849293409BFE6562B949516219A4A7@rccexh001.relocationcentral.com> References: <2757CAE9849293409BFE6562B949516219A4A7@rccexh001.relocationcentral.com> Message-ID: Please don't include the text from an entire digest in your posts. It makes the thread very difficult to read. Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060724/804c4399/attachment.html From arkie at compli.com Mon Jul 24 19:38:24 2006 From: arkie at compli.com (Alan Ark) Date: Mon, 24 Jul 2006 18:38:24 -0500 Subject: [Wtr-general] FreeTextBox & Watir In-Reply-To: Message-ID: <7F2DAB1053EC4D47B821DA0A7BA5E3EBCCCFD5@mail-21ps.atlarge.net> Hi listfolks. Has anyone had to try to test a page that is using FreeTextBox? HYPERLINK "http://www.freetextbox.com/"www.freetextbox.com I?d like to chat with you if you have. Thanks -Alan -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.3/395 - Release Date: 7/21/2006 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060724/578ae1eb/attachment.html From paul.rogers at shaw.ca Mon Jul 24 23:33:47 2006 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 24 Jul 2006 23:33:47 -0400 Subject: [Wtr-general] FreeTextBox & Watir In-Reply-To: <7F2DAB1053EC4D47B821DA0A7BA5E3EBCCCFD5@mail-21ps.atlarge.net> References: <7F2DAB1053EC4D47B821DA0A7BA5E3EBCCCFD5@mail-21ps.atlarge.net> Message-ID: Ive never tried to test one, but Ive looked at similar things for inclusion in some projects Ive been working on. They are normally just a text area, so: ie.text_field(:index,1).set('Hello, world") should probably do it Paul -------------- next part -------------- Hi listfolks. Has anyone had to try to test a page that is using FreeTextBox? HYPERLINK "http://www.freetextbox.com/"www.freetextbox.com I?d like to chat with you if you have. Thanks -Alan -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.3/395 - Release Date: 7/21/2006 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060724/1300f620/attachment.html -------------- next part -------------- _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Tue Jul 25 01:52:24 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 25 Jul 2006 00:52:24 -0500 Subject: [Wtr-general] Lists question In-Reply-To: <485A27FF1E164B4FB51E2A066D5265A503EC2D@SRVMSXMB1.ad.twtelecom.com> References: <485A27FF1E164B4FB51E2A066D5265A503EC2D@SRVMSXMB1.ad.twtelecom.com> Message-ID: On 7/21/06, Attebery, Bill wrote: > > On 7/11/06, Bret Pettichord wrote: > > This bothers me a lot. I need to add some diagnostics to IE.attachin > 1.5 trunk and then have you try it again and send the diagnostics report. > Don't let me forget about this. > > Bret > > Bret > I made some time to do some digging into the code (1.5.1.1054) and > discovered this in the IE::_find method > class IE > ... > def self._find(how, what) > shell = WIN32OLE.new("Shell.Application") > ieTemp = nil > shell.Windows.each do |window| > next unless (window.path =~ /Internet Explorer/ rescue false) > > Seems that in this context !~ would be desired in that last line, so I > tried that in place of the =~ and it worked for me -- my attach code seems > to work again. > > What do you think? > Thanks for digging in to the code and sharing what you found. It's hard for me to understand where the logic error would be in this code, however. I accept that you changed it and it worked, but the =~ operator will return a number (= true) if there is a match, other wise nil (= false). Thus that line should skip ahead to the next window unless it is an Internet Explorer window. So it sounds right to me. I should note however, that this is something that i recently changed and something which i haven't figured out how to automate a unit test for yet. I did do a lot of manual testing.... So i could accept that there is an error in here pretty easily. I actually added this line because i was doing IE.attach(:title, //) and this was attaching to an outlook window, which cause me problems later on. This line screened that out (or maybe that case was what prompted the rescue false clause -- an idiom i've inveigled against before and yet one more reason why this code needs automated tests.) I'll have to make this code testable or at least put in some more diagnostics so we can get to the bottom of things. Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060725/97db1a99/attachment.html From mail at chriss-baumann.de Tue Jul 25 07:28:01 2006 From: mail at chriss-baumann.de (mail at chriss-baumann.de) Date: Tue, 25 Jul 2006 13:28:01 +0200 (CEST) Subject: [Wtr-general] File Download Message-ID: <20060725112803.898731FD0D@dd13630.kasserver.com> Hi all, i have a problem with downloading a file. How to handle the "File Save" - Popup? I have found this http://jira.openqa.org/browse/WTR-63 when searching the web, but it doesn?t work: Nothing happens, I don?t even get an error message. Thanks for advice, Chriss From areed at relocationcentral.com Tue Jul 25 09:31:13 2006 From: areed at relocationcentral.com (Adam Reed) Date: Tue, 25 Jul 2006 08:31:13 -0500 Subject: [Wtr-general] Making a function a separate file Message-ID: <2757CAE9849293409BFE6562B949516219A4B0@rccexh001.relocationcentral.com> Chris, The error I was getting was an uninitialized constant at the line where I call the function. The logger.rb file runs with no errors, and so does the test.rb prior to making include changes. SciTe doesn't get more specific than that unfortunately, so it's been hard to tell. I made sure that all variables used in both scripts are global. . . That's where I decided to e-mail. The main changes I make are to: remove the def logger section from the script and place it in a new file, add def Class Logger above the existing code. Put it in a new file called logger.rb in the same directory as the script. Add require 'logger' to the script header. Is any of that wrong? You can re-enact the process with the code I linked in the last e-mail. Thanks, Adam _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general End of Wtr-general Digest, Vol 32, Issue 32 ********** No reason why what you propose shouldn't work. What errors are you getting? -Chris From areed at relocationcentral.com Tue Jul 25 10:38:40 2006 From: areed at relocationcentral.com (Adam Reed) Date: Tue, 25 Jul 2006 09:38:40 -0500 Subject: [Wtr-general] FW: Making a function a separate file Message-ID: <2757CAE9849293409BFE6562B9495162198BB5@rccexh001.relocationcentral.com> Aha! I renamed the file and function to "rc_logger" instead of "logger", and it works just fine. Apparently logger is a reserved class? -----Original Message----- No reason why what you propose shouldn't work. What errors are you getting? -Chris From Bill.Attebery at twtelecom.com Tue Jul 25 11:00:22 2006 From: Bill.Attebery at twtelecom.com (Attebery, Bill) Date: Tue, 25 Jul 2006 09:00:22 -0600 Subject: [Wtr-general] Lists question In-Reply-To: Message-ID: <485A27FF1E164B4FB51E2A066D5265A503EC31@SRVMSXMB1.ad.twtelecom.com> I didn't fully understand the syntax -- but reading it closer I see what you mean now. I read it reversed -- do block unless window contains Internet Explorer (thus skipping all the IE windows) but it was really next (or skip) block unless window contains Internet Explorer (thus only acting on IE windows). I'm clueless as to why it worked when I flipped the logic (on non-modal IE windows at least, couldn't get modals to work) and doesn't work at all for me the other way!? I think I'll do some more digging. If you have some specific diagnostic code you'd like me to try, please forward. Thanks Bret I made some time to do some digging into the code (1.5.1.1054) and discovered this in the IE::_find method class IE ... def self._find(how, what) shell = WIN32OLE.new("Shell.Application") ieTemp = nil shell.Windows.each do |window| next unless (window.path =~ /Internet Explorer/ rescue false) Thanks for digging in to the code and sharing what you found. It's hard for me to understand where the logic error would be in this code, however. I accept that you changed it and it worked, but the =~ operator will return a number (= true) if there is a match, other wise nil (= false). Thus that line should skip ahead to the next window unless it is an Internet Explorer window. So it sounds right to me. Bret The content contained in this electronic message is not intended to constitute formation of a contract binding TWTC. TWTC will be contractually bound only upon execution, by an authorized officer, of a contract including agreed terms and conditions or by express application of its tariffs. This message is intended only for the use of the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the sender of this E-Mail or by telephone. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060725/d6b78ec6/attachment.html From arkie at compli.com Tue Jul 25 12:04:46 2006 From: arkie at compli.com (Alan Ark) Date: Tue, 25 Jul 2006 11:04:46 -0500 Subject: [Wtr-general] FreeTextBox & Watir In-Reply-To: Message-ID: <7F2DAB1053EC4D47B821DA0A7BA5E3EBCCD09F@mail-21ps.atlarge.net> Hi Paul, Thanks for the suggestion. We're using FreeTextBox in an Iframe, but when I try to access the field, I'm getting 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. I can read lots of attributes from the field (contents, name, id, etc), but it does not appear that I am able to *set* any value for it. So now I'm multitasking - tossing it to the list while I go searching the world for the answer. Wish me luck! -Alan -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Monday, July 24, 2006 8:34 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] FreeTextBox & Watir Ive never tried to test one, but Ive looked at similar things for inclusion in some projects Ive been working on. They are normally just a text area, so: ie.text_field(:index,1).set('Hello, world") should probably do it Paul -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.3/395 - Release Date: 7/21/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.4/396 - Release Date: 7/24/2006 From paul.rogers at shaw.ca Tue Jul 25 12:14:17 2006 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 25 Jul 2006 10:14:17 -0600 Subject: [Wtr-general] FreeTextBox & Watir In-Reply-To: <7F2DAB1053EC4D47B821DA0A7BA5E3EBCCD09F@mail-21ps.atlarge.net> References: <7F2DAB1053EC4D47B821DA0A7BA5E3EBCCD09F@mail-21ps.atlarge.net> Message-ID: these things tend to intercept all the keystrokes too, so perhaps its harder than I orignally thought If you click in it and then from irb do ie.show_active you should see some of the details about it. If I get some time later today, I'll give it a go Paul ----- Original Message ----- From: Alan Ark Date: Tuesday, July 25, 2006 10:04 am Subject: Re: [Wtr-general] FreeTextBox & Watir > Hi Paul, > > Thanks for the suggestion. > > We're using FreeTextBox in an Iframe, but when I try to access the > field, I'm getting > > 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. > > I can read lots of attributes from the field (contents, name, id, > etc), but it does not appear that I am able to *set* any value for it. > > So now I'm multitasking - tossing it to the list while I go > searching the world for the answer. Wish me luck! > > -Alan > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Monday, July 24, 2006 8:34 PM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] FreeTextBox & Watir > > Ive never tried to test one, but Ive looked at similar things for > inclusion in some projects Ive been working on. > > They are normally just a text area, so: > > ie.text_field(:index,1).set('Hello, world") > > should probably do it > > Paul > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.394 / Virus Database: 268.10.3/395 - Release Date: > 7/21/2006 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.394 / Virus Database: 268.10.4/396 - Release Date: > 7/24/2006 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From fxn at hashref.com Tue Jul 25 12:32:02 2006 From: fxn at hashref.com (Xavier Noria) Date: Tue, 25 Jul 2006 18:32:02 +0200 Subject: [Wtr-general] white screen of death Message-ID: I've been developing an application just fine, and in some machines in production after some successful runs ie.goto launches MSIE but nothing happens, there's just a blank page. Sometimes there is no trace, and sometimes we get something like c:/ruby/li b/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1122:in `method_missing': unknown pr operty or method: `visible' (WIN32OLERuntimeError) HRESULT error code:0x800706ba El servidor RPC no est? disponible. from c:/ruby/lib/ ruby/gems/1.8/g ems/watir-1.4.1/./watir.rb:1122:in `set_defaults' whish says that the RPC server is not available. RPC is listed as a running service however. Did anybody have this problem? It is a stopper for my current project which is about to be deployed to the client. -- fxn From Mark_Cain at RL.gov Tue Jul 25 12:45:23 2006 From: Mark_Cain at RL.gov (Cain, Mark) Date: Tue, 25 Jul 2006 09:45:23 -0700 Subject: [Wtr-general] IE7 and Popups Message-ID: I have recently started having to regression test all our web applications using IE7 beta3. Most everything seems to work except pop-ups (Confirms, Alerts, and Prompts). This part of my scripts has worked well using the latest IE6 version, but does not seem to work in IE7. Anyone else seeing this? Or things like this? Here is the method I am using: def startClicker( button , waitTime = 0.5) w = WinClicker.new longName = $ie.dir.gsub("/" , "\\" ) shortName = w.getShortFileName(longName) c = "start rubyw #{shortName }\\watir\\clickJSDialog.rb #{button } #{ waitTime} " puts "Starting #{c}" w.winsystem(c ) w=nil end Thanks, ____________________ Mark L. Cain LMIT - E*STARS(r) ~ Lead Test Engineer 1981 Snyder, MSIN: G3-62, Richland, WA 99354 Mark_Cain at RL.gov 509.376.5458 "640 Kilobytes of computer memory ought to be enough for anybody." - Bill Gates, 1981 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060725/154bee31/attachment.html From arkie at compli.com Tue Jul 25 12:56:47 2006 From: arkie at compli.com (Alan Ark) Date: Tue, 25 Jul 2006 11:56:47 -0500 Subject: [Wtr-general] FreeTextBox & Watir In-Reply-To: Message-ID: <7F2DAB1053EC4D47B821DA0A7BA5E3EBCCD0C0@mail-21ps.atlarge.net> Well using ie.show_active has given me very interesting results. What I had expected to be my text_field to be active was something totally different. => "HTML Document name= id=ctl0_MainBody_PolicyHtmlEditor_designEditor src=about:blank innerText= \n" irb(main):305:0> Clicking on the various dropdown that let me choose the attributes of the font displays what I expected - a series of select-one's Clicking on any of the font styling/formatting buttons (like Bold, Strikethru, centered, left-justified) also returns the HTML document type. I'm going to play around with this a little more. It is very interesting though. -Alan -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, July 25, 2006 9:14 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] FreeTextBox & Watir these things tend to intercept all the keystrokes too, so perhaps its harder than I orignally thought If you click in it and then from irb do ie.show_active you should see some of the details about it. If I get some time later today, I'll give it a go Paul ----- Original Message ----- From: Alan Ark Date: Tuesday, July 25, 2006 10:04 am Subject: Re: [Wtr-general] FreeTextBox & Watir > Hi Paul, > > Thanks for the suggestion. > > We're using FreeTextBox in an Iframe, but when I try to access the > field, I'm getting > > 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. > > I can read lots of attributes from the field (contents, name, id, > etc), but it does not appear that I am able to *set* any value for it. > > So now I'm multitasking - tossing it to the list while I go > searching the world for the answer. Wish me luck! > > -Alan > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Monday, July 24, 2006 8:34 PM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] FreeTextBox & Watir > > Ive never tried to test one, but Ive looked at similar things for > inclusion in some projects Ive been working on. > > They are normally just a text area, so: > > ie.text_field(:index,1).set('Hello, world") > > should probably do it > > Paul > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.394 / Virus Database: 268.10.3/395 - Release Date: > 7/21/2006 > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.394 / Virus Database: 268.10.4/396 - Release Date: > 7/24/2006 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.4/396 - Release Date: 7/24/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.4/396 - Release Date: 7/24/2006 From Mark_Cain at RL.gov Tue Jul 25 13:14:04 2006 From: Mark_Cain at RL.gov (Cain, Mark) Date: Tue, 25 Jul 2006 10:14:04 -0700 Subject: [Wtr-general] IE7 and Popups In-Reply-To: Message-ID: I got it! Microsoft changed the name of the pop-up title bar from 'Microsoft Internet Explorer' to 'Windows Internet Explorer'. This should be changed in winClicker.rb or at least put in the FAQ. --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: Tuesday, July 25, 2006 9:45 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] IE7 and Popups I have recently started having to regression test all our web applications using IE7 beta3. Most everything seems to work except pop-ups (Confirms, Alerts, and Prompts). This part of my scripts has worked well using the latest IE6 version, but does not seem to work in IE7. Anyone else seeing this? Or things like this? Here is the method I am using: def startClicker( button , waitTime = 0.5) w = WinClicker.new longName = $ie.dir.gsub("/" , "\\" ) shortName = w.getShortFileName(longName) c = "start rubyw #{shortName }\\watir\\clickJSDialog.rb #{button } #{ waitTime} " puts "Starting #{c}" w.winsystem(c ) w=nil end Thanks, ____________________ Mark L. Cain LMIT - E*STARS(r) ~ Lead Test Engineer 1981 Snyder, MSIN: G3-62, Richland, WA 99354 Mark_Cain at RL.gov 509.376.5458 "640 Kilobytes of computer memory ought to be enough for anybody." - Bill Gates, 1981 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060725/d24df1e8/attachment.html From soccerkey23 at hotmail.com Tue Jul 25 14:32:05 2006 From: soccerkey23 at hotmail.com (Tess :)) Date: Tue, 25 Jul 2006 12:32:05 -0600 Subject: [Wtr-general] Cancel Subscription Message-ID: I do not wish to recieve emails from this network anymore. Please take me off the list or tell me what I can do. Thanks! Tessa soccerkey23 at hotmail.com From richard.conroy at gmail.com Tue Jul 25 15:05:06 2006 From: richard.conroy at gmail.com (Richard Conroy) Date: Tue, 25 Jul 2006 20:05:06 +0100 Subject: [Wtr-general] white screen of death In-Reply-To: References: Message-ID: <511fa3a20607251205h59eba054mce2c17f16a550866@mail.gmail.com> MSIE does not close down instantaneously. Don't immediately try to relaunch it. I solved this with our scripts by introducing a 3 second delay between closing MSIE and reopening it. Another solution is to never close, or keep an IE window open somewhere (so that browser closes aren't actually closing down MSIE). We needed to flush login sessions properly with a non-deal app, so we just delayed. On 7/25/06, Xavier Noria wrote: > I've been developing an application just fine, and in some machines > in production after some successful runs ie.goto launches MSIE but > nothing happens, there's just a blank page. Sometimes there is no > trace, and sometimes we get something like > > c:/ruby/li > b/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1122:in `method_missing': > unknown pr > operty or method: `visible' (WIN32OLERuntimeError) > HRESULT error code:0x800706ba > El servidor RPC no est? disponible. from c:/ruby/lib/ > ruby/gems/1.8/g > ems/watir-1.4.1/./watir.rb:1122:in `set_defaults' > > whish says that the RPC server is not available. RPC is listed as a > running service however. > > Did anybody have this problem? It is a stopper for my current project > which is about to be deployed to the client. > > -- fxn > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From fxn at hashref.com Tue Jul 25 17:38:47 2006 From: fxn at hashref.com (Xavier Noria) Date: Tue, 25 Jul 2006 23:38:47 +0200 Subject: [Wtr-general] white screen of death In-Reply-To: <511fa3a20607251205h59eba054mce2c17f16a550866@mail.gmail.com> References: <511fa3a20607251205h59eba054mce2c17f16a550866@mail.gmail.com> Message-ID: On Jul 25, 2006, at 21:05, Richard Conroy wrote: > MSIE does not close down instantaneously. Don't immediately > try to relaunch it. Great, that's some light :-). I need to understand well what that means. Which is the relationship between closing ie (either via the close method or by hand closing a window) and launching another crawling? By now, in development, we just launch one or two (but pointing to different sites anyway), observe what it does, and close windows by hand or leave them there after done. We are not paying attention to the way we close windows, what should we be careful with? Now that we are on it, if there are several crawlers scrapping different sites, do they use the same object or each window represents a separate object? I am starting the crawling with ie.goto and works fine in the machine I develop, should I use ie.start for the starting URL instead? If so, could that be causing what we are seeing? > Another solution is to never close, or keep an IE window open > somewhere (so that browser closes aren't actually closing down > MSIE). Yeah, I guess with the previous questions I'll understand better the implications of closing ie. > We needed to flush login sessions properly with a non-deal > app, so we just delayed. I don't understand this, you mean you programmed logouts? -- fxn From mail at chriss-baumann.de Wed Jul 26 02:15:24 2006 From: mail at chriss-baumann.de (mail at chriss-baumann.de) Date: Wed, 26 Jul 2006 08:15:24 +0200 (CEST) Subject: [Wtr-general] How to open new IE-window minimized? Message-ID: <20060726061524.8C3D45E3B9@dd13630.kasserver.com> Hello! I?m using something like ie.link(:url, "bla").click and a new broswer window opens where I attach to do something. Works fine, but I want the new browser window to be started minimized (or invisible). Any suggestions? Thanks, Christian From nivetha at thoughtworks.com Wed Jul 26 02:29:31 2006 From: nivetha at thoughtworks.com (Nivetha Padmanaban) Date: Wed, 26 Jul 2006 11:59:31 +0530 Subject: [Wtr-general] How to open new IE-window minimized? In-Reply-To: <20060726061524.8C3D45E3B9@dd13630.kasserver.com> Message-ID: Use "minimize" to minimize the IE window. Regards, Nivetha. Email - nivetha at thoughtworks.com mail at chriss-baumann.de Sent by: wtr-general-bounces at rubyforge.org 07/26/2006 11:45 AM Please respond to wtr-general at rubyforge.org To wtr-general at rubyforge.org cc Subject [Wtr-general] How to open new IE-window minimized? Hello! I?m using something like ie.link(:url, "bla").click and a new broswer window opens where I attach to do something. Works fine, but I want the new browser window to be started minimized (or invisible). Any suggestions? Thanks, Christian _______________________________________________ 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/20060726/5d347acb/attachment.html From mail at chriss-baumann.de Wed Jul 26 02:44:55 2006 From: mail at chriss-baumann.de (mail at chriss-baumann.de) Date: Wed, 26 Jul 2006 08:44:55 +0200 (CEST) Subject: [Wtr-general] How to open new IE-window minimized? Message-ID: <20060726064455.57AC35E3C7@dd13630.kasserver.com> But then still the new window appears. I want the same behaviour as if a watir-script is started with "-b". Regards, Christian ----- Original Message ----- From: nivetha at thoughtworks.com To: wtr-general at rubyforge.org Date: 26.07.2006 08:29:31 Subject: Re: [Wtr-general] How to open new IE-window minimized? > > Use "minimize" to minimize > the IE window. > > Regards, > Nivetha. > Email - nivetha at thoughtworks.com > > > > > > > mail at chriss-baumann.de > > Sent by: wtr-general-bounces at rubyforge.org > 07/26/2006 11:45 AM > > > > Please respond to > wtr-general at rubyforge.org > > > > > > To > wtr-general at rubyforge.org > > > cc > > > > Subject > [Wtr-general] How to open new IE-window > minimized? > > > > > > > > > Hello! > > IŽm using something like ie.link(:url, "bla").click and a new > broswer window opens where I attach to do something. > Works fine, but I want the new browser window to be started minimized (or > invisible). Any suggestions? > > Thanks, > Christian > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > From zeljko.filipin at gmail.com Wed Jul 26 03:24:34 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 26 Jul 2006 09:24:34 +0200 Subject: [Wtr-general] Cancel Subscription In-Reply-To: References: Message-ID: Go to http://rubyforge.org/mailman/listinfo/wtr-general and unsubscribe. ?eljko On 7/25/06, Tess :) wrote: > > I do not wish to recieve emails from this network anymore. Please take me > off the list or tell me what I can do. Thanks! > > Tessa > > soccerkey23 at hotmail.com > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060726/43743e3e/attachment.html From zeljko.filipin at gmail.com Wed Jul 26 03:44:23 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 26 Jul 2006 09:44:23 +0200 Subject: [Wtr-general] How to open new IE-window minimized? In-Reply-To: <20060726064455.57AC35E3C7@dd13630.kasserver.com> References: <20060726064455.57AC35E3C7@dd13630.kasserver.com> Message-ID: It looks like a feature request to me. http://jira.openqa.org/browse/WTR On 7/26/06, mail at chriss-baumann.de wrote: > > But then still the new window appears. > I want the same behaviour as if a watir-script is started with "-b". -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060726/d770da65/attachment.html From mrussell at inpses.co.uk Wed Jul 26 04:15:31 2006 From: mrussell at inpses.co.uk (Max Russell) Date: Wed, 26 Jul 2006 09:15:31 +0100 Subject: [Wtr-general] Verifying instance of text in second browser? Message-ID: Hello I'm wishing to check that when an application is launched more than once in a browser, only the first browser instance can login and the second is returned a suitable error page. So far I've added this code to a module, to deal with this: def otherinstance(testname, testpass, testldap) threads = [] 2.times do threads << Thread.new {login(testname, testpass, testldap)} begin assert(ie.frame("main").contains_text("app_name") ) logger.log("Passed. Found test string 'app_name' ") logger.log_results("otherinstance", "app_name", "app_name", "TEST PASSED.") rescue => e logger.log("*FAILED*." + e.message + "\n" + e.backtrace.join("\n")) logger.log_results("otherinstance", "app_name", "app_name", "TEST FAILED.") end currently, I'm just trying this out, so the code is very similar to the Watir examples. My question is how I identify the browser instance? Do I iinitialise an empty count in the otherinstance method and then increment if for each instance created in the block. (Incidentally - the number 2 is not fixed; once I've got this code up and running it will be good for x instances of the browser. Thanks Max Max Russell test Analyst. InPS Tel: 01382 223900 Fax: 01382 204488 Visit our Web site at www.inps.co.uk The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of In Practice Systems Limited or any of its affiliates. If you are not the intended recipient please contact is.helpdesk at inps.co.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060726/7414409d/attachment.html From nivetha at thoughtworks.com Wed Jul 26 07:34:33 2006 From: nivetha at thoughtworks.com (Nivetha Padmanaban) Date: Wed, 26 Jul 2006 17:04:33 +0530 Subject: [Wtr-general] Keyword Framework & UI Message-ID: Has anybody written keyword framework for WATIR tool?? Has anybody written any UI using TCL/TK?? Regards, Nivetha. Email - nivetha at thoughtworks.com Mobile - (0) 98807 17518 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060726/81b7ab8b/attachment.html From Adrian.Lewis at tnt.com Wed Jul 26 07:58:58 2006 From: Adrian.Lewis at tnt.com (Adrian Lewis) Date: Wed, 26 Jul 2006 12:58:58 +0100 Subject: [Wtr-general] Keyword Framework & UI In-Reply-To: Message-ID: I can write a version of the CSDDT for Watir http://tinyurl.com/z6zjo But I want at least 3 people asking for this and the first iteration will be out in around 2 weeks. aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- From nivetha at thoughtworks.com Wed Jul 26 08:27:05 2006 From: nivetha at thoughtworks.com (Nivetha Padmanaban) Date: Wed, 26 Jul 2006 17:57:05 +0530 Subject: [Wtr-general] Keyword Framework & UI In-Reply-To: Message-ID: What do u mean by CSDDT? Regards, Nivetha. Email - nivetha at thoughtworks.com Adrian Lewis Sent by: wtr-general-bounces at rubyforge.org 07/26/2006 05:28 PM Please respond to wtr-general at rubyforge.org To wtr-general at rubyforge.org cc Subject Re: [Wtr-general] Keyword Framework & UI I can write a version of the CSDDT for Watir http://tinyurl.com/z6zjo But I want at least 3 people asking for this and the first iteration will be out in around 2 weeks. aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- _______________________________________________ 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/20060726/edeaffb4/attachment.html From areed at relocationcentral.com Wed Jul 26 09:14:32 2006 From: areed at relocationcentral.com (Adam Reed) Date: Wed, 26 Jul 2006 08:14:32 -0500 Subject: [Wtr-general] Keyword Framework & UI Message-ID: <2757CAE9849293409BFE6562B9495162198BCC@rccexh001.relocationcentral.com> I had the same question. Control Synchronized Data Driven Testing (CSDDT) framework by Adrian Rutter Chapter 8 in the book that Adrian linked is summarized on www.stickyminds.com as: ". . .the authors explain how to implement a project within the CSDDT framework. The chapter includes a troubleshooting section, which details common problems encountered with this approach, and the solutions. This chapter includes a great deal of specific Rational Robot SQABasic code examples, including an entire example CSDDT framework." _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Nivetha Padmanaban Sent: Wednesday, July 26, 2006 7:27 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Keyword Framework & UI What do u mean by CSDDT? Regards, Nivetha. Email - nivetha at thoughtworks.com Adrian Lewis Sent by: wtr-general-bounces at rubyforge.org 07/26/2006 05:28 PM Please respond to wtr-general at rubyforge.org To wtr-general at rubyforge.org cc Subject Re: [Wtr-general] Keyword Framework & UI I can write a version of the CSDDT for Watir http://tinyurl.com/z6zjo But I want at least 3 people asking for this and the first iteration will be out in around 2 weeks. aidy ------------------------------------------------------------------------ --------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. ------------------------------------------------------------------------ --------------------------------------- _______________________________________________ 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/20060726/341b5140/attachment.html From Adrian.Lewis at tnt.com Wed Jul 26 09:21:30 2006 From: Adrian.Lewis at tnt.com (Adrian Lewis) Date: Wed, 26 Jul 2006 14:21:30 +0100 Subject: [Wtr-general] Keyword Framework & UI In-Reply-To: Message-ID: > What do u mean by CSDDT? Control Synchronized Data-Driven Testing written by Bruce Posey and outlined in the book 'Just Enough Software Test Automation' I amended it to make it more at the atomic level. Have a look at the link I sent you. aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- From Adrian.Lewis at tnt.com Wed Jul 26 09:34:13 2006 From: Adrian.Lewis at tnt.com (Adrian Lewis) Date: Wed, 26 Jul 2006 14:34:13 +0100 Subject: [Wtr-general] Keyword Framework & UI In-Reply-To: <2757CAE9849293409BFE6562B9495162198BCC@rccexh001.relocationcentral.com> Message-ID: > Control Synchronized Data Driven Testing (CSDDT) ........ Bruce wrote it, I amended it. The document I wrote on it is here http://www.scionlabs.com/using_rational_robot.zip The framework is simple and portable (agile? I think). Spoke to Bruce and he is very interested in Watir. I am CC'ing him on this e-mail. aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- From bret at pettichord.com Wed Jul 26 10:16:21 2006 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 26 Jul 2006 09:16:21 -0500 Subject: [Wtr-general] Just wanted to invoke click event where the button have parameters in it In-Reply-To: References: <20060719050427.44746.qmail@web7814.mail.in.yahoo.com> Message-ID: On 7/19/06, Zeljko Filipin wrote: > > HTML that you provided is not valid. Three tags have the same id. Ids > should be unique. > This is true. However, i think there is a workaround for this. Using 1.5. ie.button(:html, /'delete', 'KH')/).click Bret On 7/19/06, VIKASH KUMAR wrote: > > > Sir, > In my web page there are lots of buttons having same name, they are called > using javascript. They are as follows: > > > > > > > > > *ie.button(:index,3).click* , this works great if we know the index, but *if > someone just doesn't know the index, knows only the parameter which is > ('delete', 'KH'), then what is the solution for it?* > > Please send me the solution for this. > Thanks in Advance > > With Regards > > Vikash Kumar > > ------------------------------ > Find out what India is talking about on Yahoo! Answers India. > Send FREE SMS from New Yahoo! Messenger to Mobile: Download NOW! > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.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/20060726/d6c499cc/attachment.html From zeljko.filipin at gmail.com Wed Jul 26 10:30:50 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 26 Jul 2006 16:30:50 +0200 Subject: [Wtr-general] Just wanted to invoke click event where the button have parameters in it In-Reply-To: References: <20060719050427.44746.qmail@web7814.mail.in.yahoo.com> Message-ID: I knew there must be a way to click that button, I just did not know how. Watir is getting better and better. :) You made a typo, it should be ie.button(:html, /'delete', 'KH'/).click ?eljko On 7/26/06, Bret Pettichord wrote: > > > ie.button(:html, / 'delete', 'KH')/).click > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060726/224ae386/attachment.html From Adrian.Lewis at tnt.com Wed Jul 26 11:07:18 2006 From: Adrian.Lewis at tnt.com (Adrian Lewis) Date: Wed, 26 Jul 2006 16:07:18 +0100 Subject: [Wtr-general] Fw: was (thanks for the help) now SYSTIR Message-ID: Michael Bolton wrote aidy >> If there was a way to use Ruby to test Java and old win32 .... mb > Check out SYSTIR. mb > http://atomicobject.com/systir.page I cannot see for the life of me how SYSTIR could help to test legacy win32. The only thing I could think of is embed C in Ruby, to integrate with an application's process. With Java we could use JRuby to utilise the Robot class aidy ps have you seen the film 'Office Space'? --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- From lonny at titanez.net Wed Jul 26 11:16:51 2006 From: lonny at titanez.net (Lonny Eachus) Date: Wed, 26 Jul 2006 08:16:51 -0700 Subject: [Wtr-general] How to open new IE-window minimized? In-Reply-To: References: Message-ID: <44C78763.1030402@titanez.net> An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060726/d146c3e0/attachment.html From mb at michaelbolton.net Wed Jul 26 16:00:31 2006 From: mb at michaelbolton.net (Michael Bolton) Date: Wed, 26 Jul 2006 16:00:31 -0400 Subject: [Wtr-general] AWESOME Ruby Hacks Message-ID: <000101c6b0ee$29dc3440$4dccb60a@Koko> Hi, folks... In Chris McMahon's presentation at Agile 2006 today, we found this site: http://blog.nicksieger.com/articles/2006/04/23/tweaking-irb This outlines some wonderful things about how to hack your IRB configuration file to do some totally awesome things, including - IRB command-line completion - IRB command-line recall - logging the commands that you've issued in an IRB session - recalling (via up-arrow) the commands that you've issued in previous IRB sessions (what was I doing yesterday? {up}{up}{up}{up}{up} -- oh, right that was it.) Hope this helps. Ruby rules! ---Michael B. DevelopSense: Software Testing in Plain English Web Site: http://www.developsense.com Newsletter: addme at developsense.com Blog: http://www.developsense.com/blog.html From jesperrr at gmail.com Wed Jul 26 16:40:19 2006 From: jesperrr at gmail.com (=?UTF-8?Q?Jesper_R=C3=B8nn-Jensen?=) Date: Wed, 26 Jul 2006 22:40:19 +0200 Subject: [Wtr-general] AWESOME Ruby Hacks In-Reply-To: <000101c6b0ee$29dc3440$4dccb60a@Koko> References: <000101c6b0ee$29dc3440$4dccb60a@Koko> Message-ID: On 7/26/06, Michael Bolton wrote: > > http://blog.nicksieger.com/articles/2006/04/23/tweaking-irb > This outlines some wonderful things about how to hack your IRB > configuration > file to do some totally awesome things, including > What a great trick. Thanks a lot for sharing. I had to make a small adjustment though. On my system (win xp), I had to set a system variable "HOME" and point it to a dir where I put the .irbrc file. Read more about that here: "irb completion under windows" (ruby-talk) Unfortunately, Nicks blog post was not open for comments (or something else went wrong so I couldn't comment). /Jesper -- -- Jesper R?nn-Jensen LinkedIn: http://linkedin.com/in/jesper http://justaddwater.dk/ (weblog) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060726/e0f307d8/attachment.html From nicksieger at gmail.com Wed Jul 26 17:04:27 2006 From: nicksieger at gmail.com (Nick Sieger) Date: Wed, 26 Jul 2006 16:04:27 -0500 Subject: [Wtr-general] AWESOME Ruby Hacks In-Reply-To: References: <000101c6b0ee$29dc3440$4dccb60a@Koko> Message-ID: On 7/26/06, Jesper R?nn-Jensen wrote: > > On 7/26/06, Michael Bolton wrote: > > > > http://blog.nicksieger.com/articles/2006/04/23/tweaking-irb > > This outlines some wonderful things about how to hack your IRB > > configuration > > file to do some totally awesome things, including > > > > What a great trick. Thanks a lot for sharing. > Glad that you guys are finding it useful! Unfortunately, Nicks blog post was not open for comments (or something else > went wrong so I couldn't comment). > Sorry about that, I had comments closing after 10 days -- see no real reason to do that. Would you mind trying again? Cheers, /Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060726/9e9e1715/attachment.html From rand.thacker at gmail.com Wed Jul 26 17:24:03 2006 From: rand.thacker at gmail.com (Rand Thacker) Date: Wed, 26 Jul 2006 16:24:03 -0500 Subject: [Wtr-general] AWESOME Ruby Hacks In-Reply-To: References: <000101c6b0ee$29dc3440$4dccb60a@Koko> Message-ID: <33dc42ea0607261424s4cdbbff2l71a79672954cee31@mail.gmail.com> Hey, and as an aside, XP pro systems have ENV['HOMEPATH'], so you'd change LOG = "#{ENV['HOME']}/.irb-history" to LOG = "#{ENV['HOMEPATH']}\\.irb-history" Worked like a charm for me. And, thanks to all for these great pointers. Very helpful. On 7/26/06, Nick Sieger wrote: > > On 7/26/06, Jesper R?nn-Jensen wrote: > > > On 7/26/06, Michael Bolton < mb at michaelbolton.net> wrote: > > > > > > http://blog.nicksieger.com/articles/2006/04/23/tweaking-irb > > > This outlines some wonderful things about how to hack your IRB > > > configuration > > > file to do some totally awesome things, including > > > > > > > What a great trick. Thanks a lot for sharing. > > > > Glad that you guys are finding it useful! > > Unfortunately, Nicks blog post was not open for comments (or something > > else went wrong so I couldn't comment). > > > > Sorry about that, I had comments closing after 10 days -- see no real > reason to do that. Would you mind trying again? > > Cheers, > /Nick > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -- "I am the most humble person in the world!" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060726/3b4931b5/attachment.html From mdove at pheedo.com Wed Jul 26 21:36:17 2006 From: mdove at pheedo.com (mi) Date: Wed, 26 Jul 2006 18:36:17 -0700 Subject: [Wtr-general] Very basic Watir/Ruby question? Message-ID: <44C81891.7060905@pheedo.com> Hi all, I'm very new to Watir/Ruby stuff:-( I'm using Simple module to open up a browser and load a url using new_browser_at(url) and am also using fill_text_field() and click_button_with_value() to fill all the text fields and button click on the page. Now there is a checkbox on the page that i need to click also and i don't see any functions that will do under Simple module?? How would I go by to click on the checkbox???? Thanks in advance!! From jordan at digitalignition.com Wed Jul 26 21:57:07 2006 From: jordan at digitalignition.com (Jordan Glasner) Date: Wed, 26 Jul 2006 21:57:07 -0400 Subject: [Wtr-general] Very basic Watir/Ruby question? In-Reply-To: <44C81891.7060905@pheedo.com> References: <44C81891.7060905@pheedo.com> Message-ID: <31FE5866-EAC6-4BB0-B5F8-A6A6D2BD63DE@digitalignition.com> On Jul 26, 2006, at 9:36 PM, mi wrote: > How would I > go by to click on the checkbox???? ie.checkbox(:id,'your_id').set http://wtr.rubyforge.org/rdoc/classes/Watir/CheckBox.html From bret at pettichord.com Wed Jul 26 23:47:47 2006 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 26 Jul 2006 22:47:47 -0500 Subject: [Wtr-general] Watir, file_field, dojo and VMware In-Reply-To: <024801c69939$5e73c9b0$c802a8c0@lewis> References: <024801c69939$5e73c9b0$c802a8c0@lewis> Message-ID: What is a "ruby attach dialog"? I'd be surprised if vmWare itself is the source of your problem. I'm pretty sure we have people here who have used it with Watir successfully. True? Bret On 6/26/06, John Castellucci wrote: > > Howdy all ? I have some Watir tests that invoke the file_field field > object, and I've noticed some slightly odd behavior when running on native > WinXP vs. virtual WinXP through VMware. > > > > If a regular page has a file_field control, everything works peachy. > > > > But, the application also has pages where you can click a button and it > opens a dojo (a JavaScript toolkit) modal faux popup with the file_field > (the underlying page is disabled), and this is where I see the weird > behavior. > > > > When invoking field_field.set(), only the ruby attach dialog opens ? the > standard IE File Upload dialog **does not** open. It's not until the > attach dialog closes that the IE File Upload finally appears, and at this > point, the Watir script "hangs." (I suspect because there was no File dialog > for ruby to attach to). > > > > If I were to take a stab in the dark, I would say it might have something > to do with how VMware manages threads ? dojo, ruby and IE are all fighting > over processes, and IE is the loser? > > > > Anyone ever run into behavior like this before? > > > > _______________________________________________ > 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/20060726/cd9176f3/attachment.html From carl.l.shaulis at convergys.com Wed Jul 26 22:07:37 2006 From: carl.l.shaulis at convergys.com (carl.l.shaulis at convergys.com) Date: Wed, 26 Jul 2006 21:07:37 -0500 Subject: [Wtr-general] Very basic Watir/Ruby question? In-Reply-To: <44C81891.7060905@pheedo.com> Message-ID: Howdy, I am not sure this addresses your question but we deal with check boxes in two ways. We use cells and indices when the checkbox is in a table cell. @ie.cell(:id, 'something').checkbox(:index,1).set @ie.checkBox(:id, "something").click Good luck, Carl Carl L. Shaulis Convergys - Senior Analyst 512-634-0607 mi To Sent by: wtr-general at rubyforge.org wtr-general-bounc cc es at rubyforge.org Subject [Wtr-general] Very basic Watir/Ruby 07/26/2006 08:36 question? PM Please respond to wtr-general at rubyf orge.org Hi all, I'm very new to Watir/Ruby stuff:-( I'm using Simple module to open up a browser and load a url using new_browser_at(url) and am also using fill_text_field() and click_button_with_value() to fill all the text fields and button click on the page. Now there is a checkbox on the page that i need to click also and i don't see any functions that will do under Simple module?? How would I go by to click on the checkbox???? Thanks in advance!! _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From zeljko.filipin at gmail.com Thu Jul 27 03:40:06 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Thu, 27 Jul 2006 09:40:06 +0200 Subject: [Wtr-general] Very basic Watir/Ruby question? In-Reply-To: <44C81891.7060905@pheedo.com> References: <44C81891.7060905@pheedo.com> Message-ID: This is what watir simple can do: http://wtr.rubyforge.org/rdoc/classes/Watir/Simple.html I did not find anything about checkboxes. I guess it is time for you to start using the real watir. You will see it is not that difficult. Just follow user guide: http://www.openqa.org/watir/watir_user_guide.html -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060727/5a425b76/attachment.html From tester.paul at gmail.com Thu Jul 27 10:42:13 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Thu, 27 Jul 2006 10:42:13 -0400 Subject: [Wtr-general] Watir, file_field, dojo and VMware In-Reply-To: References: <024801c69939$5e73c9b0$c802a8c0@lewis> Message-ID: <37c405480607270742q43931b24j694a5cf98929cb1c@mail.gmail.com> I have used VMware with Watir successfully. I've got a WinXP Pro SP2 VMware session that has IE7 Beta 2. On it, I have Ruby 1.8.4 and Watir 1.4.1. I just ran the UnitTest "filefield_test.rb" and it executed without error. I can't say I really understand what the problem described below is, so I can't offer any suggestions right now. Paul. On 26/07/06, Bret Pettichord wrote: > > What is a "ruby attach dialog"? > > I'd be surprised if vmWare itself is the source of your problem. I'm > pretty sure we have people here who have used it with Watir successfully. > True? > > Bret > > On 6/26/06, John Castellucci wrote: > > > > Howdy all ? I have some Watir tests that invoke the file_field field > > object, and I've noticed some slightly odd behavior when running on native > > WinXP vs. virtual WinXP through VMware. > > > > If a regular page has a file_field control, everything works peachy. > > > > But, the application also has pages where you can click a button and it > > opens a dojo (a JavaScript toolkit) modal faux popup with the file_field > > (the underlying page is disabled), and this is where I see the weird > > behavior. > > > > When invoking field_field.set(), only the ruby attach dialog opens ? the > > standard IE File Upload dialog **does not** open. It's not until the > > attach dialog closes that the IE File Upload finally appears, and at this > > point, the Watir script "hangs." (I suspect because there was no File dialog > > for ruby to attach to). > > > > If I were to take a stab in the dark, I would say it might have > > something to do with how VMware manages threads ? dojo, ruby and IE are > > all fighting over processes, and IE is the loser? > > > > Anyone ever run into behavior like this before? > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060727/c303de0c/attachment.html From aidy.rutter at gmail.com Thu Jul 27 12:27:13 2006 From: aidy.rutter at gmail.com (aidy rutter) Date: Thu, 27 Jul 2006 17:27:13 +0100 Subject: [Wtr-general] app map and switch statement Message-ID: <859d18f20607270927i64f760b1ja00aaeb0e77aa0d3@mail.gmail.com> Hi, I am using Bret's AppMap concept def goto_territory_list ObjectMap.new.instance_eval do sales_admin_link.click territories_link.click end end but I am having a hell of a trouble trying to fit it into the below switch statement. Could anyone help? def enter_employees() File.open('C:\auto_tests\test_data\employee_data.csv','r') {|f| #use block so file is automatically closed f.each_line { |line| next if /^;/ =~ line #check for ';' at start of line i = 0 line.chomp.split(',').each{|x| i += 1 next if x.nil? or x == "null" #skip nil or "null" values case i when 1 #country employee_country_id.select(x) when 2 #depot employee_depot_id.select(x) when 3 #first_name employee_first_name.set(x) end puts "#{x} has been input" } click_submit click_new_employee_link } } end end cheers aidy -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060727/dda29123/attachment.html From mdove at pheedo.com Thu Jul 27 13:21:49 2006 From: mdove at pheedo.com (mi) Date: Thu, 27 Jul 2006 10:21:49 -0700 Subject: [Wtr-general] clicking on a link using sub-text of the link text? Message-ID: <44C8F62D.4060502@pheedo.com> Hi all, I'm not sure whether it's even possible to do that BUT let me try asking.... here is a one of the link in my web page that i need to click.. /......click below: {blank line} http://{static-text}/test.php?activate=blah, blah, blah..../ I tried ie.link{:url, /static-text/).click also tried ie.link(:aftertext, 'below:').click BUT i'm not a having a luck??? Thanks in advance!!! From ravishan at BIWORLDWIDE.com Thu Jul 27 14:48:32 2006 From: ravishan at BIWORLDWIDE.com (Ravishankar, MG) Date: Thu, 27 Jul 2006 13:48:32 -0500 Subject: [Wtr-general] clicking on a link using sub-text of the link text? Message-ID: <03CAD54D1DFAE5488B6C53178EF9EA3C07040FDD@EXCHANGE1.biperf.com> Try changing '{' to '(' ie.link(:url,/static-text/).click -Ravi -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of mi Sent: Thursday, July 27, 2006 12:22 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] clicking on a link using sub-text of the link text? Hi all, I'm not sure whether it's even possible to do that BUT let me try asking.... here is a one of the link in my web page that i need to click.. /......click below: {blank line} http://{static-text}/test.php?activate=blah, blah, blah..../ I tried ie.link{:url, /static-text/).click also tried ie.link(:aftertext, 'below:').click BUT i'm not a having a luck??? Thanks in advance!!! _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general This e-mail message is being sent solely for use by the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by phone or reply by e-mail, delete the original message and destroy all copies. Thank you. From johnc at testdev.net Thu Jul 27 15:23:06 2006 From: johnc at testdev.net (John Castellucci) Date: Thu, 27 Jul 2006 12:23:06 -0700 Subject: [Wtr-general] Watir, file_field, dojo and VMware In-Reply-To: Message-ID: <0c3601c6b1b2$165c2370$0c02a8c0@lewis> Bret asks: >What is a "ruby attach dialog"? I was referring to the DOS/ruby.exe window that opens and scrolls through all the window captions until it finds the File Open dialog. >I'd be surprised if vmWare itself is the source of your problem. I'm pretty >sure we have people here who have used it with Watir successfully. True? I had my sysadmin upgrade the VMWare server to the latest version, and updated my client as well, and this solved the problem. VMWare looks to be a useful tool where I work for allowing the developers to run acceptance tests without spending the time to configure their dev systems and keep the tests up-to-date locally. Original message: >>If a regular page has a file_field control, everything works peachy. >>? >>But, the application also has pages where you can click a button and it >>opens a dojo (a JavaScript toolkit) modal faux popup with the file_field >>(the underlying page is disabled), and this is where I see the weird >>behavior. >>? >>When invoking field_field.set(), only the ruby attach dialog opens ? the >>standard IE File Upload dialog *does not* open. ?It's not until the attach >>dialog closes that the IE File Upload finally appears, and at this point, >>the Watir script "hangs." (I suspect because there was no File dialog for >>ruby to attach to) From mdove at pheedo.com Thu Jul 27 15:32:15 2006 From: mdove at pheedo.com (mi) Date: Thu, 27 Jul 2006 12:32:15 -0700 Subject: [Wtr-general] clicking on a link using sub-text of the link text? In-Reply-To: <03CAD54D1DFAE5488B6C53178EF9EA3C07040FDD@EXCHANGE1.biperf.com> References: <03CAD54D1DFAE5488B6C53178EF9EA3C07040FDD@EXCHANGE1.biperf.com> Message-ID: <44C914BF.3000302@pheedo.com> Yes, i did typed correctly in the code:-) thanks though! Ravishankar, MG wrote: > > Try changing '{' to '(' > ie.link(:url,/static-text/).click > -Ravi > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of mi > Sent: Thursday, July 27, 2006 12:22 PM > To: wtr-general at rubyforge.org > Subject: [Wtr-general] clicking on a link using sub-text of the link > text? > > Hi all, > > I'm not sure whether it's even possible to do that BUT let me try > asking.... > > here is a one of the link in my web page that i need to click.. > > /......click below: > {blank line} > http://{static-text}/test.php?activate=blah, blah, blah..../ > > I tried ie.link{:url, /static-text/).click also tried > ie.link(:aftertext, 'below:').click BUT i'm not a having a luck??? > > Thanks in advance!!! > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > This e-mail message is being sent solely for use by the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by phone or reply by e-mail, delete the original message and destroy all copies. Thank you. > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > From christopher.mcmahon at gmail.com Thu Jul 27 16:37:46 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 27 Jul 2006 13:37:46 -0700 Subject: [Wtr-general] FreeTextBox & Watir In-Reply-To: <7F2DAB1053EC4D47B821DA0A7BA5E3EBCCD0C0@mail-21ps.atlarge.net> References: <7F2DAB1053EC4D47B821DA0A7BA5E3EBCCD0C0@mail-21ps.atlarge.net> Message-ID: <72799cd70607271337s1a224977o958ba86ecd7edc75@mail.gmail.com> On 7/25/06, Alan Ark wrote: > Well using ie.show_active has given me very interesting results. > > What I had expected to be my text_field to be active was something totally different. > > => "HTML Document name= id=ctl0_MainBody_PolicyHtmlEditor_designEditor > src=about:blank innerText= \n" > irb(main):305:0> > > > Clicking on the various dropdown that let me choose the attributes of the font displays what I expected - a series of select-one's > Clicking on any of the font styling/formatting buttons (like Bold, Strikethru, centered, left-justified) also returns the HTML document type. > > I'm going to play around with this a little more. It is very interesting though. So it is. You realize you have a frame or iframe there, right? That's the "HTML Document" bit. From christopher.mcmahon at gmail.com Thu Jul 27 16:53:51 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 27 Jul 2006 13:53:51 -0700 Subject: [Wtr-general] Keyword Framework & UI In-Reply-To: References: Message-ID: <72799cd70607271353t1c5a945mec5fbfcb4a577168@mail.gmail.com> On 7/26/06, Adrian Lewis wrote: > I can write a version of the CSDDT for Watir > > http://tinyurl.com/z6zjo > > But I want at least 3 people asking for this and the first iteration will > be out in around 2 weeks. There was great interest in Watir automation frameworks among the attendees at the Scripting Web Tests (with Watir and Ruby) class at Agile2006. There is I think no good example of a data-driven test framework to point people to, so this would be in general a fine idea. I would like to suggest a) make it open-source. Otherwise it's too hard to answer questions about it. b) write in in Ruby, because that's what the people using the framework will be using. c) please make an effort to answer ongoing questions about your work, either on this list or on a list devoted to the framework itself. Thanks. From fxn at hashref.com Thu Jul 27 20:06:11 2006 From: fxn at hashref.com (Xavier Noria) Date: Fri, 28 Jul 2006 02:06:11 +0200 Subject: [Wtr-general] clicking on a link using sub-text of the link text? In-Reply-To: <44C8F62D.4060502@pheedo.com> References: <44C8F62D.4060502@pheedo.com> Message-ID: <84AD2119-F3A0-4040-ADCE-45EC48BF5E3F@hashref.com> On Jul 27, 2006, at 7:21 PM, mi wrote: > here is a one of the link in my web page that i need to click.. > > /......click below: > {blank line} > http://{static-text}/test.php?activate=blah, blah, blah..../ > > I tried ie.link{:url, /static-text/).click also tried > ie.link(:aftertext, 'below:').click BUT i'm not a having a luck??? At least the first one should work (with the typo corrected, that is). Does ie.show_links output that one? -- fxn From mdove at pheedo.com Fri Jul 28 01:53:17 2006 From: mdove at pheedo.com (mi) Date: Thu, 27 Jul 2006 22:53:17 -0700 Subject: [Wtr-general] clicking on a link using sub-text of the link text? In-Reply-To: <84AD2119-F3A0-4040-ADCE-45EC48BF5E3F@hashref.com> References: <44C8F62D.4060502@pheedo.com> <84AD2119-F3A0-4040-ADCE-45EC48BF5E3F@hashref.com> Message-ID: <44C9A64D.3050409@pheedo.com> Yes, i do see the link when i do a ie.show_links() but i'm afraid that why it might not work... show_links shows the link as similar to the below... */http://{static-text}/blah...blah....http://{static-text}/blah..blah.../* So the same text is showing twice in the show_links printout, that might be why it's not working???? Xavier Noria wrote: > On Jul 27, 2006, at 7:21 PM, mi wrote: > > >> here is a one of the link in my web page that i need to click.. >> >> /......click below: >> {blank line} >> http://{static-text}/test.php?activate=blah, blah, blah..../ >> >> I tried ie.link{:url, /static-text/).click also tried >> ie.link(:aftertext, 'below:').click BUT i'm not a having a luck??? >> > > At least the first one should work (with the typo corrected, that > is). Does ie.show_links output that one? > > -- fxn > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > From zeljko.filipin at gmail.com Fri Jul 28 03:55:11 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 28 Jul 2006 09:55:11 +0200 Subject: [Wtr-general] clicking on a link using sub-text of the link text? In-Reply-To: <44C9A64D.3050409@pheedo.com> References: <44C8F62D.4060502@pheedo.com> <84AD2119-F3A0-4040-ADCE-45EC48BF5E3F@hashref.com> <44C9A64D.3050409@pheedo.com> Message-ID: It would be easier if you posted your html so we could try to click that link at our machine instead of guessing. ?eljko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060728/2886b722/attachment.html From Adrian.Lewis at tnt.com Fri Jul 28 05:14:56 2006 From: Adrian.Lewis at tnt.com (Adrian Lewis) Date: Fri, 28 Jul 2006 10:14:56 +0100 Subject: [Wtr-general] Keyword Framework & UI In-Reply-To: <72799cd70607271353t1c5a945mec5fbfcb4a577168@mail.gmail.com> Message-ID: Chris Wrote: > a) make it open-source. Otherwise it's too hard to answer questions about it. The CSDDT is open source, simple, agile and easy to use. > b) write in Ruby, because that's what the people using the >framework will be using. Will all be in Ruby; the good thing about Ruby (unlike Java) is that it can directly interface to COM and manipulate the Excel API (i.e. export spreadsheets to txt files) > c) please make an effort to answer ongoing questions about your work,either on this list or on a list devoted to the framework > itself. Not a problem. I'll use this list. And it will be iterative development: I would imagine the software will change dramatically with collaborative input. Will start next week. aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- From nivetha at thoughtworks.com Fri Jul 28 05:21:18 2006 From: nivetha at thoughtworks.com (Nivetha Padmanaban) Date: Fri, 28 Jul 2006 14:51:18 +0530 Subject: [Wtr-general] Keyword Framework & UI In-Reply-To: Message-ID: Is it already available to use? It sounds like it is already available to use. This sounds like you are going to start working on CSDDT or did i mis-understood somewhere!!! Regards, Nivetha. Email - nivetha at thoughtworks.com Mobile - (0) 98807 17518 Adrian Lewis Sent by: wtr-general-bounces at rubyforge.org 07/28/2006 02:44 PM Please respond to wtr-general at rubyforge.org To wtr-general at rubyforge.org cc Subject Re: [Wtr-general] Keyword Framework & UI Chris Wrote: > a) make it open-source. Otherwise it's too hard to answer questions about it. The CSDDT is open source, simple, agile and easy to use. > b) write in Ruby, because that's what the people using the >framework will be using. Will all be in Ruby; the good thing about Ruby (unlike Java) is that it can directly interface to COM and manipulate the Excel API (i.e. export spreadsheets to txt files) > c) please make an effort to answer ongoing questions about your work,either on this list or on a list devoted to the framework > itself. Not a problem. I'll use this list. And it will be iterative development: I would imagine the software will change dramatically with collaborative input. Will start next week. aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- _______________________________________________ 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/20060728/242b486a/attachment.html From Adrian.Lewis at tnt.com Fri Jul 28 06:45:26 2006 From: Adrian.Lewis at tnt.com (Adrian Lewis) Date: Fri, 28 Jul 2006 11:45:26 +0100 Subject: [Wtr-general] Keyword Framework & UI In-Reply-To: Message-ID: >> The CSDDT is open source, simple, agile and easy to use. > Is it already available to use? It sounds like it is already available to use. The CSDDT is open-source, I made amendmentts to it under the name of Adrian Rutter. It is writen in BASIC. I am going to convert that code to Ruby. http://www.scionlabs.com/using_rational_robot.zip Aidy ps. can someone give me a job at ThoughtWorks? --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- From mrussell at inpses.co.uk Fri Jul 28 07:01:49 2006 From: mrussell at inpses.co.uk (Max Russell) Date: Fri, 28 Jul 2006 12:01:49 +0100 Subject: [Wtr-general] No tests specified Message-ID: Hi- I've checked through the Rubyforge mail history but haven't found a solution so far. I'm trying to mimic the scripting101 labs examples, testing against a web app- I have 2 files: harness.rb # Simple test harness require 'watir' require 'test/unit' $LOAD_PATH << '.' class TestSuite < Test::Unit::TestCase def centralvision load 'centralvision.rb' end def teardown ie = Watir::IE.attach(:title, /Central Vision/) ie.close end end and the test I'm calling: # Simple script tests the fields of the Central Vision login page. require 'watir' require 'test/unit/assertions' include Test::Unit::Assertions # launch ie = Watir::IE.start('http://everestcf/CV_Tay_Test/home/Index.cfm') # verify the username text entry field #exists assert( ie.frame("main").text_field.exists?(:name, "username" )) #is blank assert( ie.frame("main").text_field. == "" )) # verify the password text entry field #exists assert( ie.frame("main").text_field.exists?(:name, "password" )) #is blank assert( ie.frame("main").text_field. == "" )) # verify the ldap drop down chooser field #exists assert( ie.frame("main").select_list.exists?(:name, "ldapDir")) I modified the $LOAD_PATH variable to say this directory only (although I don't know if that was necessary.) Basically every time I run the harness I get the following: >ruby harness.rb Loaded suite harness Started FE Finished in 0.063 seconds. 1) Failure: default_test(TestSuite) [harness.rb:12]: No tests were specified. 2) Error: default_test(TestSuite): Watir::Exception::NoMatchingWindowFoundException: Unable to locate a window with title of (?-mix:Central Vision) c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1208:in `attach_browser_window' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1111:in `attach_init' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1104:in `attach' harness.rb:13:in `teardown' 1 tests, 1 assertions, 1 failures, 1 errors I'm really getting confused with this now, I've tried to keep my code as simple as possible, but can't see where I'm going wrong? Any help is much appreciated. thanks Max Russell test Analyst. InPS Tel: 01382 223900 Fax: 01382 204488 Visit our Web site at www.inps.co.uk The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of In Practice Systems Limited or any of its affiliates. If you are not the intended recipient please contact is.helpdesk at inps.co.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060728/7cb98440/attachment.html From zeljko.filipin at gmail.com Fri Jul 28 07:09:43 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 28 Jul 2006 13:09:43 +0200 Subject: [Wtr-general] No tests specified In-Reply-To: References: Message-ID: Test::Unit::TestCase must have at least one method which name starts with "test_". Change def centralvision load 'centralvision.rb' end to def test_centralvision load 'centralvision.rb' end and you should be fine. ?eljko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060728/1bb2a6a0/attachment.html From christopher.mcmahon at gmail.com Fri Jul 28 11:15:23 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 28 Jul 2006 08:15:23 -0700 Subject: [Wtr-general] a new recorder for Watir Message-ID: <72799cd70607280815w26b8b989t61a4e51632934f02@mail.gmail.com> I just ran across this: http://qainsight.net/2006/07/27/WatirMaker+Is+Now+WatirRecorder+And+Is+Going+Open+Source.aspx From bret at pettichord.com Fri Jul 28 11:19:30 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 28 Jul 2006 10:19:30 -0500 Subject: [Wtr-general] Verifying instance of text in second browser? In-Reply-To: References: Message-ID: You don't actually need to use multiple threads for your scenario. But you do need manage separate Watir::IE objects, which means you need to modify your login method. If you show it, we can show you how to modify it make it work for this scenario. Bret On 7/26/06, Max Russell wrote: > > Hello > > > > I'm wishing to check that when an application is launched more than once > in a browser, only the first browser instance can login and the second is > returned a suitable error page. > > > > So far I've added this code to a module, to deal with this: > > > > def otherinstance(testname, testpass, testldap) > > threads = [] > > 2.times do threads << Thread.new {login(testname, > testpass, testldap)} > > begin > > assert(ie.frame("main").contains_text("app_name") > ) > > logger.log("Passed. Found test string > 'app_name' ") > > logger.log_results("otherinstance", > "app_name", "app_name", "TEST PASSED.") > > rescue => e > > logger.log("*FAILED*." + e.message + > "\n" + e.backtrace.join("\n")) > > logger.log_results("otherinstance", > "app_name", "app_name", "TEST FAILED.") > > end > > > > currently, I'm just trying this out, so the code is very similar to the > Watir examples. > > > > My question is how I identify the browser instance? Do I iinitialise an > empty count in the otherinstance method and then increment if for each > instance created in the block. > > > > (Incidentally - the number 2 is not fixed; once I've got this code up and > running it will be good for x instances of the browser. > > > > Thanks > > Max > > > > > > *Max Russell* > > *test Analyst.* > > *InPS* > > * * > > *Tel: 01382 223900* > > *Fax: 01382 204488* > > * * > > *Visit our Web site at www.inps.co.uk* > > * * > > *The information in this internet email is confidential and is intended > solely for the addressee. Access, copying or re-use of information in it by > anyone else is not authorised. Any views or opinions presented are solely > those of the author and do not necessarily represent those of In Practice > Systems Limited or any of its affiliates. If you are not the intended > recipient please contact is.helpdesk at inps.co.uk* > > > > _______________________________________________ > 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/20060728/ff6255c3/attachment.html From bret at pettichord.com Fri Jul 28 11:32:28 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 28 Jul 2006 10:32:28 -0500 Subject: [Wtr-general] Watir, file_field, dojo and VMware In-Reply-To: <0c3601c6b1b2$165c2370$0c02a8c0@lewis> References: <0c3601c6b1b2$165c2370$0c02a8c0@lewis> Message-ID: John, Thanks for the update. I agree that vmware (and virtual server, which is what my company now uses) are great tools for testing. Bret On 7/27/06, John Castellucci wrote: > > Bret asks: > >What is a "ruby attach dialog"? > > I was referring to the DOS/ruby.exe window that opens and scrolls through > all the window captions until it finds the File Open dialog. > > >I'd be surprised if vmWare itself is the source of your problem. I'm > pretty > >sure we have people here who have used it with Watir successfully. True? > > I had my sysadmin upgrade the VMWare server to the latest version, and > updated my client as well, and this solved the problem. > > VMWare looks to be a useful tool where I work for allowing the developers > to > run acceptance tests without spending the time to configure their dev > systems and keep the tests up-to-date locally. > > Original message: > >>If a regular page has a file_field control, everything works peachy. > >> > >>But, the application also has pages where you can click a button and it > >>opens a dojo (a JavaScript toolkit) modal faux popup with the file_field > >>(the underlying page is disabled), and this is where I see the weird > >>behavior. > >> > >>When invoking field_field.set(), only the ruby attach dialog opens ? the > >>standard IE File Upload dialog *does not* open. It's not until the > attach > >>dialog closes that the IE File Upload finally appears, and at this > point, > >>the Watir script "hangs." (I suspect because there was no File dialog > for > >>ruby to attach to) > > _______________________________________________ > 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/20060728/c4222894/attachment.html From arkie at compli.com Fri Jul 28 11:35:09 2006 From: arkie at compli.com (Alan Ark) Date: Fri, 28 Jul 2006 10:35:09 -0500 Subject: [Wtr-general] FreeTextBox & Watir In-Reply-To: <72799cd70607271337s1a224977o958ba86ecd7edc75@mail.gmail.com> Message-ID: <7F2DAB1053EC4D47B821DA0A7BA5E3EBCCD4DF@mail-21ps.atlarge.net> I've got a line open with the author of FTB to see why this is. When you include the free version of FTB, all you get is a DLL to link into your project. I'm hoping that the author will be able to give me a little more insight into the pieces that are being displayed. I do know about the frame (there are actually two of them), but I'm unsure on why they are there, or how/if I should be able to actually set text on the fields. For now I have a clumsy workaround - sleep for 15 seconds while I paste the text into the field. Its frustrating that I could not do ie.text_area(:id,"ctl0_MainBody_PolicyHtmlEditor").set("hi") on the object. Grrr. Sometimes you win, sometimes you have to find the way around. LOL. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: Thursday, July 27, 2006 1:38 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] FreeTextBox & Watir On 7/25/06, Alan Ark wrote: > Well using ie.show_active has given me very interesting results. > > What I had expected to be my text_field to be active was something totally different. > > => "HTML Document name= id=ctl0_MainBody_PolicyHtmlEditor_designEditor > src=about:blank innerText= \n" > irb(main):305:0> > > > Clicking on the various dropdown that let me choose the attributes of the font displays what I expected - a series of select-one's > Clicking on any of the font styling/formatting buttons (like Bold, Strikethru, centered, left-justified) also returns the HTML document type. > > I'm going to play around with this a little more. It is very interesting though. So it is. You realize you have a frame or iframe there, right? That's the "HTML Document" bit. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.4/401 - Release Date: 7/26/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.4/402 - Release Date: 7/27/2006 From bret at pettichord.com Fri Jul 28 12:39:47 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 28 Jul 2006 11:39:47 -0500 Subject: [Wtr-general] Keyword Framework & UI In-Reply-To: References: Message-ID: On 7/28/06, Adrian Lewis wrote: > > The CSDDT is open-source, I made amendmentts to it under the name of > Adrian > Rutter. It is writen in BASIC. I am going to convert that code to Ruby. Thanks for the heads up that you are using two different names on this list. I thought you were two different people. People interested in CSDDT may want to take a look at Just Enough Software Test Automation, which contains a 50-page chapter on the framework. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060728/85b7cb4c/attachment.html From fxn at hashref.com Fri Jul 28 13:04:10 2006 From: fxn at hashref.com (Xavier Noria) Date: Fri, 28 Jul 2006 19:04:10 +0200 Subject: [Wtr-general] need a frame-recursive wait Message-ID: A crawler that always works flawlessly in development regularly raises UnknownObjectException other computers. The same navigation done by hand via irb on those machines works. The website we are crawling has some frames, and the main frame contains yet another frameset so we have two levels. While reading watir.rb I noticed Watir::IE#wait does consider frames, but just one level of them. So my working assumption is that some inner frame is not completely loaded when the bot tries to access some element there. The PCs where it runs OK are slower than the PCs where it crashes. I don't know how that fits in the explanation (if it does), but it is a pattern. I'm gonna patch the method tomorrow to write some stack-based recursion. But before I do that I'd like to ask whether someone else already fixed this, or else if there is any technical reason that prevents that method from being recursive-like. -- fxn From Adrian.Lewis at tnt.com Fri Jul 28 13:20:12 2006 From: Adrian.Lewis at tnt.com (Adrian Lewis) Date: Fri, 28 Jul 2006 18:20:12 +0100 Subject: [Wtr-general] Keyword Framework & UI - OT In-Reply-To: Message-ID: Bret wrote > Thanks for the heads up that you are using two different names on this list. I thought you were two different people. I changed my surname recently because of family problems. Aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- From christopher.mcmahon at gmail.com Fri Jul 28 13:29:42 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 28 Jul 2006 10:29:42 -0700 Subject: [Wtr-general] need a frame-recursive wait In-Reply-To: References: Message-ID: <72799cd70607281029s18301a23x4a7af4cefac03504@mail.gmail.com> > I'm gonna patch the method tomorrow to write some stack-based > recursion. But before I do that I'd like to ask whether someone else > already fixed this, or else if there is any technical reason that > prevents that method from being recursive-like. > > -- fxn I have a kind of similar problem. Here's what I'm doing. The "i_really_mean_it" method clicks the "OK" button on a new screen. def send_the_dang_mail begin @ie.frame("viewtable").link(:text,"Send").click i_really_mean_it rescue sleep 1 send_the_dang_mail #puts "looking for viewtable" end Of course, the moment that the UI in the app changes, this becomes an endless loop,so it's on the fragile side. -Chris From bret at pettichord.com Fri Jul 28 13:30:05 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 28 Jul 2006 12:30:05 -0500 Subject: [Wtr-general] need a frame-recursive wait In-Reply-To: References: Message-ID: On 7/28/06, Xavier Noria wrote: > > I'm gonna patch the method tomorrow to write some stack-based > recursion. But before I do that I'd like to ask whether someone else > already fixed this, or else if there is any technical reason that > prevents that method from being recursive-like. Your solution sounds reasonable. Please submit a patch when you have it. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060728/bc832b40/attachment.html From Adrian.Lewis at tnt.com Fri Jul 28 13:33:21 2006 From: Adrian.Lewis at tnt.com (Adrian Lewis) Date: Fri, 28 Jul 2006 18:33:21 +0100 Subject: [Wtr-general] Keyword Framework & UI In-Reply-To: Message-ID: Bret wrote > People interested in CSDDT may want to take a look at Just Enough Software Test Automation, which contains a 50-page chapter on the framework The original CSDDT and code and my changes with a full explanatory word-document should be on the Rational Users site. http://groups.yahoo.com/group/RationalUsers/ I spoke to Bruce Posey about a week ago, and he was happy with me converting it to Ruby. However, I think I have much better ideas to improve the CSDDT. The CSDDT was half-there. Bruce would probably agree. Aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- From bret at pettichord.com Fri Jul 28 13:45:04 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 28 Jul 2006 12:45:04 -0500 Subject: [Wtr-general] Keyword Framework & UI In-Reply-To: References: Message-ID: On 7/28/06, Adrian Lewis wrote: > > I spoke to Bruce Posey about a week ago, and he was happy with me > converting it to Ruby. However, I think I have much better ideas to > improve > the CSDDT. The CSDDT was half-there. Bruce would probably agree. Have you compared the Posey data driven framework with the Nagle data driven framework? (http://safsdev.sourceforge.net) Has anyone? I would like to know how they compare. Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060728/d669881c/attachment.html From margrymouse-newsletters at yahoo.com Fri Jul 28 13:55:10 2006 From: margrymouse-newsletters at yahoo.com (Pauli's List Subscriptions) Date: Fri, 28 Jul 2006 10:55:10 -0700 (PDT) Subject: [Wtr-general] Newbie - Ruby dev IDE question In-Reply-To: <72799cd70607280815w26b8b989t61a4e51632934f02@mail.gmail.com> Message-ID: <20060728175510.12593.qmail@web31809.mail.mud.yahoo.com> Another newbie question - if you were developing a webapp on Windows XP, for eventual production installation on Linux hosting, and wanted a Ruby / Rails / Watir development IDE, would you go with Komodo, RadRails or another product. Why? Thanks a bunch for your helpful responses. Pauli From Adrian.Lewis at tnt.com Fri Jul 28 14:14:14 2006 From: Adrian.Lewis at tnt.com (Adrian Lewis) Date: Fri, 28 Jul 2006 19:14:14 +0100 Subject: [Wtr-general] Keyword Framework & UI In-Reply-To: Message-ID: Bret wrote, > Have you compared the Posey data driven framework with the Nagle data driven framework? (http://safsdev.sourceforge.net) > Has anyone? I would like to know how they compare. [this has gotta be quick cos gotta go] The CSDDT is tied to the test-tool, it is simple and fast; but you need to write your own functions. Excel sheets get exported to txt files and read by the tool. You make up your own keywords. SAFS is tool and 'application' independent,though certainly with for example Robot it can be too slow because of lengthy switch statements. With minor changes you could use the same sheets for Winrunner, RFT, Robot, Abbot etc. Carl has two sheets one for the business analysts\test designers (high level), and low level sheets for test automators. You can use SAFS out of the box - the keywords are there (http://safsdev.sourceforge.net/sqabasic2000/RRAFSReference.htm). I have taught a graduate in a morning how to construct automated tests without knowledge of the tool or programming. But it must be a collaborative effort to really work. Carl mentioned last week that the TID driver with RFT was much faster than using the Robot driver. SAFS uses an IBM STAF service that can alllow data exchange between processes, so you can use more than one tool at the same time. The situation however is that test-tools will soon be open-source, so we will not be at the mercy of vendors as the SAFS team have been for over a decade. aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- From bret at pettichord.com Fri Jul 28 14:17:27 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 28 Jul 2006 13:17:27 -0500 Subject: [Wtr-general] app map and switch statement In-Reply-To: <859d18f20607270927i64f760b1ja00aaeb0e77aa0d3@mail.gmail.com> References: <859d18f20607270927i64f760b1ja00aaeb0e77aa0d3@mail.gmail.com> Message-ID: What errors are you getting? I don't think this is your problem, but you might want to use this to simplify your code: line.chomp.split(',').each_with_index{|x,i| Bret On 7/27/06, aidy rutter wrote: > > Hi, > > I am using Bret's AppMap concept > > def goto_territory_list > ObjectMap.new.instance_eval do > sales_admin_link.click > territories_link.click > end > end > > but I am having a hell of a trouble trying to fit it into the below switch > statement. Could anyone help? > > def enter_employees() > File.open('C:\auto_tests\test_data\employee_data.csv','r') {|f| #use > block so file is automatically closed > > f.each_line { |line| > next if /^;/ =~ line #check for ';' at start of line > i = 0 > line.chomp.split(',').each{|x| > i += 1 > next if x.nil? or x == "null" #skip nil or "null" values > case i > when 1 #country > employee_country_id.select(x) > when 2 #depot > employee_depot_id.select(x) > when 3 #first_name > employee_first_name.set(x) > end > puts "#{x} has been input" > } > click_submit > click_new_employee_link > } > } > end > end > > cheers > > aidy > > > > _______________________________________________ > 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/20060728/636f2d12/attachment.html From bret at pettichord.com Fri Jul 28 15:15:13 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 28 Jul 2006 14:15:13 -0500 Subject: [Wtr-general] Project Map Message-ID: I just posted this to my blog. I'd been getting several emails from people who were wondering whether the project had been abandoned. http://www.io.com/~wazmo/blog/archives/2006_07.html#000240 Watir 1.5 is Under Active Development Many observers have wondered whether Watir is still being developed. If you look at our Rubyforge site, you'll see that our "last release":http://rubyforge.org/frs/?group_id=104&release_id=2725 was August 2005 and our "last code changes":http://wtr.rubyforge.org/statcvs/commit_log.htm) were made in February of this year. But actually, Watir is under active development. We've moved our source repository and many of the other project resources over to our "new home at OpenQA.org":http://openqa.org/watir/. Things are spread out right now, and it's somewhat confusing. Here is a map for where to find the most current information about our project. *Home Pages.* Our "home page at Rubyforge":http://wtr.rubyforge.org is still the best place for new users to start. It describes the latest fully supported, fully documented version of Watir (namely 1.4.1). Our "home page at OpenQA":http://www.openqa.org/watir links to the project resources at our new home. And our "wiki home page": http://wiki.openqa.org/projects/wtr is the best place to find the most recent information about the project. *Releases.* We are providing regular "development releases":http://wiki.openqa.org/display/WTR/Development+Builds (Ruby gems) of the work in progress for Watir 1.5 at OpenQA. When 1.5 becomes ready for official release, it will be released at our "existing Rubyforge location":http://rubyforge.org/projects/wtr/, and therefore available automatically when you "gem install watir". *Mailing List & Support.* We continue to use the "wtr-general":http://rubyforge.org/mailman/listinfo/wtr-general mailing list at Rubyforge as our primary discussion list. This is the best place to ask your questions about Watir. You'll have to subscribe before you can post. The "archives":http://rubyforge.org/mailman/listinfo/wtr-general contain answers to many common questions. OpenQA provides a "web-based forum":http://forums.openqa.org/forum.jspa?forumID=5&start=15, but this isn't monitored by as many people. *Wiki & FAQ.* We have moved our "wiki":http://wiki.openqa.org/display/WTR/Project+Home over to OpenQA. This includes our "FAQ":http://wiki.openqa.org/display/WTR/FAQ, which is frequently updated. *Buglist.* We are now using "Jira":http://jira.openqa.org/browse/WTR to track bugs and features at OpenQA. The "old trackers": http://rubyforge.org/tracker/?group_id=104 at Rubyforge will be closed down soon. *Source Repository.* We now use the "Subversion repository at OpenQA":http://openqa.org/watir/cvs.action. The "CVS repository at Rubyforge":http://rubyforge.org/scm/?group_id=104 is no longer being used. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060728/d4b7c8d4/attachment.html From bret at pettichord.com Fri Jul 28 15:42:32 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 28 Jul 2006 14:42:32 -0500 Subject: [Wtr-general] UI Mapping Revisited. In-Reply-To: References: Message-ID: On 7/4/06, Adrian Rutter wrote: > > But how would you organise your navigaton and > action methods? > > for example > > > def goto_country_list .... end > def enter_country(country) ... end > > Would you create new classes? At the moment I have a module for each > window > with methods contained that are relevant to that window. That sounds reasonable. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060728/e7ed9a83/attachment.html From bret at pettichord.com Fri Jul 28 16:53:16 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 28 Jul 2006 15:53:16 -0500 Subject: [Wtr-general] Popup menus In-Reply-To: <882C8B6492C05E48AEA0C7B2D7D4254E03D463BB@EMAIL.RALEYSNT.SECNET.RALEYS.COM> References: <882C8B6492C05E48AEA0C7B2D7D4254E03D463BB@EMAIL.RALEYSNT.SECNET.RALEYS.COM> Message-ID: You don't need winclicker or autoit. Just use plain watir. ie = Watir::IE.start(' http://msdn.microsoft.com/workshop/samples/author/dhtml/popup/showme4.html') ie.document.body.fireevent('oncontextmenu') ie.span(:text, 'MSDN Web Workshop').click It's all a matter of knowing the events and html to reference. I used Spy Smith (and reading source) to figure this out. Note that the second command really doesn't use Watir, but instead codes directly to the DOM. This is because we need to send the event to the body object, which Watir normally allows you to ignore. Bret On 7/20/06, NIcky Sandhu wrote: > > I have scanned the mailing list but found nothing for the popup menu as > described in this microsoft document > http://msdn.microsoft.com/workshop/author/om/popup_overview.asp#Navigati > on_With_Popups > > Has anyone dealt with these kind of menus, typically implemented by a > call to window.createPopup on the page. I have tried winclicker and > autoit but I cannot get a handle to this window. Any suggestions? > > Warning: this e-mail may contain information proprietary to Raley's and is > intended only for the use of the intended recipients. If the reader of this > message is not an intended recipient, you are hereby notified that you have > received this message in error and that any review, dissemination, > distribution or copying of this message is strictly prohibited. If you have > received this message in error, please notify the sender immediately. > _______________________________________________ > 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/20060728/5fa2c48d/attachment.html From arkie at compli.com Fri Jul 28 17:07:23 2006 From: arkie at compli.com (Alan Ark) Date: Fri, 28 Jul 2006 16:07:23 -0500 Subject: [Wtr-general] Project Map In-Reply-To: Message-ID: <7F2DAB1053EC4D47B821DA0A7BA5E3EBCCD579@mail-21ps.atlarge.net> Hey Bret. Thanks for this information. I know that as a recent addition to the mailing list, I had some of my questions answered by this email. Have a great weekend and thanks for all the hard work! -Alan _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Friday, July 28, 2006 12:15 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Project Map I just posted this to my blog. I'd been getting several emails from people who were wondering whether the project had been abandoned. HYPERLINK "http://www.io.com/~wazmo/blog/archives/2006_07.html#000240"http://www.io.com/~wazmo/blog/archives/2006_07.html#000240 Watir 1.5 is Under Active Development Many observers have wondered whether Watir is still being developed. If you look at our Rubyforge site, you'll see that our "last release":HYPERLINK "http://rubyforge.org/frs/?group_id=104&release_id=2725" http://rubyforge.org/frs/?group_id=104&release_id=2725 was August 2005 and our "last code changes":HYPERLINK "http://wtr.rubyforge.org/statcvs/commit_log.htm"http://wtr.rubyforge.org/statcvs/commit_log.htm ) were made in February of this year. But actually, Watir is under active development. We've moved our source repository and many of the other project resources over to our "new home at OpenQA.org": HYPERLINK "http://openqa.org/watir/"http://openqa.org/watir/. Things are spread out right now, and it's somewhat confusing. Here is a map for where to find the most current information about our project. *Home Pages.* Our "home page at Rubyforge": HYPERLINK "http://wtr.rubyforge.org"http://wtr.rubyforge.org is still the best place for new users to start. It describes the latest fully supported, fully documented version of Watir (namely 1.4.1). Our "home page at OpenQA":HYPERLINK "http://www.openqa.org/watir"http://www.openqa.org/watir links to the project resources at our new home. And our "wiki home page":HYPERLINK "http://wiki.openqa.org/projects/wtr"http://wiki.openqa.org/projects/wtr is the best place to find the most recent information about the project. *Releases.* We are providing regular "development releases":HYPERLINK "http://wiki.openqa.org/display/WTR/Development+Builds" http://wiki.openqa.org/display/WTR/Development+Builds (Ruby gems) of the work in progress for Watir 1.5 at OpenQA. When 1.5 becomes ready for official release, it will be released at our "existing Rubyforge location": HYPERLINK "http://rubyforge.org/projects/wtr/"http://rubyforge.org/projects/wtr/, and therefore available automatically when you "gem install watir". *Mailing List & Support.* We continue to use the "wtr-general":HYPERLINK "http://rubyforge.org/mailman/listinfo/wtr-general"http://rubyforge.org/mailman/listinfo/wtr-general mailing list at Rubyforge as our primary discussion list. This is the best place to ask your questions about Watir. You'll have to subscribe before you can post. The "archives":HYPERLINK "http://rubyforge.org/mailman/listinfo/wtr-general"http://rubyforge.org/mailman/listinfo/wtr-general contain answers to many common questions. OpenQA provides a "web-based forum":HYPERLINK "http://forums.openqa.org/forum.jspa?forumID=5&start=15"http://forums.openqa.org/forum.jspa?forumID=5&start=15, but this isn't monitored by as many people. *Wiki & FAQ.* We have moved our "wiki":HYPERLINK "http://wiki.openqa.org/display/WTR/Project+Home"http://wiki.openqa.org/display/WTR/Project+Home over to OpenQA. This includes our "FAQ":HYPERLINK "http://wiki.openqa.org/display/WTR/FAQ" http://wiki.openqa.org/display/WTR/FAQ, which is frequently updated. *Buglist.* We are now using "Jira":HYPERLINK "http://jira.openqa.org/browse/WTR"http://jira.openqa.org/browse/WTR to track bugs and features at OpenQA. The "old trackers": HYPERLINK "http://rubyforge.org/tracker/?group_id=104"http://rubyforge.org/tracker/?group_id=104 at Rubyforge will be closed down soon. *Source Repository.* We now use the "Subversion repository at OpenQA": HYPERLINK "http://openqa.org/watir/cvs.action"http://openqa.org/watir/cvs.action. The "CVS repository at Rubyforge":HYPERLINK "http://rubyforge.org/scm/?group_id=104"http://rubyforge.org/scm/?group_id=104 is no longer being used. -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.4/402 - Release Date: 7/27/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.4/402 - Release Date: 7/27/2006 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060728/1bc628ea/attachment.html From mdove at pheedo.com Fri Jul 28 17:18:27 2006 From: mdove at pheedo.com (mi) Date: Fri, 28 Jul 2006 14:18:27 -0700 Subject: [Wtr-general] clicking on a link using sub-text of the link text? In-Reply-To: References: <44C8F62D.4060502@pheedo.com> <84AD2119-F3A0-4040-ADCE-45EC48BF5E3F@hashref.com> <44C9A64D.3050409@pheedo.com> Message-ID: <44CA7F23.409@pheedo.com> I tried sending my html but it was bigger then 40K so here is the link i get when i do a ie.show_links.... /http://test.server.com/junk.php?test=junk12345http://test.server.com/junk.php?test=junk12345/ So basically, the link url is repeated???? Zeljko Filipin wrote: > It would be easier if you posted your html so we could try to click > that link at our machine instead of guessing. > > ?eljko > ------------------------------------------------------------------------ > > _______________________________________________ > 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/20060728/f5aadfd0/attachment.html From faught at tejasconsulting.com Fri Jul 28 17:34:24 2006 From: faught at tejasconsulting.com (Danny R. Faught) Date: Fri, 28 Jul 2006 21:34:24 +0000 Subject: [Wtr-general] simple solution for basic authentication Message-ID: Howdy folks. I find myself on a project where I want to use a browser-based test tool to record client-side performance metrics. After playing with several such tools again, Watir again emerged as the tool that I was first able to get a working script with. But along the way, I noticed with some amazement that Perl's Win32::IE::Mechanize module was able to handle the basic HTTP authentication that gives so many people headaches with other tools. It doesn't do it by automating the dialog asking for the login information, but rather it prevents the dialog from appearing by submitting the credentials right from the beginning. That means it makes one fewer transaction with the web server (avoiding the first request that gets a 401 response), but perhaps I can live with that. Has anyone else tried to implement this with Watir? If not I may try it myself. Here's the core of it in IE::Mechanize where it formulates the Authorization header, really simple stuff: sub __authorization_basic { my( $user, $pass ) = @_; defined $user && defined $pass or return; require MIME::Base64; return "Authorization: Basic " . MIME::Base64::encode_base64( "$user:$pass" ) . "\015\012"; } From Bill.Attebery at twtelecom.com Fri Jul 28 17:59:55 2006 From: Bill.Attebery at twtelecom.com (Attebery, Bill) Date: Fri, 28 Jul 2006 15:59:55 -0600 Subject: [Wtr-general] simple solution for basic authentication In-Reply-To: Message-ID: <485A27FF1E164B4FB51E2A066D5265A503EC6D@SRVMSXMB1.ad.twtelecom.com> I think I saw some chatter on this a couple months back -- check the archives in early May or do a search for Authentication. http://www.mail-archive.com/wtr-general%40rubyforge.org/ > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Danny > R. Faught > Sent: Friday, July 28, 2006 3:34 PM > To: wtr-general at rubyforge.org > Subject: [Wtr-general] simple solution for basic authentication > > Howdy folks. I find myself on a project where I want to use > a browser-based test tool to record client-side performance metrics. > After playing with several such tools again, Watir again > emerged as the tool that I was first able to get a working > script with. > > But along the way, I noticed with some amazement that Perl's > Win32::IE::Mechanize module was able to handle the basic HTTP > authentication that gives so many people headaches with other > tools. It doesn't do it by automating the dialog asking for > the login information, but rather it prevents the dialog from > appearing by submitting the credentials right from the > beginning. That means it makes one fewer transaction with > the web server (avoiding the first request that gets a 401 > response), but perhaps I can live with that. > > Has anyone else tried to implement this with Watir? If not I > may try it myself. Here's the core of it in IE::Mechanize > where it formulates the Authorization header, really simple stuff: > > sub __authorization_basic { > my( $user, $pass ) = @_; > defined $user && defined $pass or return; > > require MIME::Base64; > return "Authorization: Basic " . > MIME::Base64::encode_base64( "$user:$pass" ) . > "\015\012"; > } > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > The content contained in this electronic message is not intended to constitute formation of a contract binding TWTC. TWTC will be contractually bound only upon execution, by an authorized officer, of a contract including agreed terms and conditions or by express application of its tariffs. This message is intended only for the use of the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the sender of this E-Mail or by telephone. From christopher.mcmahon at gmail.com Fri Jul 28 18:21:50 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 28 Jul 2006 15:21:50 -0700 Subject: [Wtr-general] simple solution for basic authentication In-Reply-To: References: Message-ID: <72799cd70607281521q79a2739ap18f81bdd76775c3c@mail.gmail.com> > Has anyone else tried to implement this with Watir? If not I may try it > myself. Here's the core of it in IE::Mechanize where it formulates the > Authorization header, really simple stuff: > > sub __authorization_basic { > my( $user, $pass ) = @_; > defined $user && defined $pass or return; > > require MIME::Base64; > return "Authorization: Basic " . > MIME::Base64::encode_base64( "$user:$pass" ) . > "\015\012"; > } I tried and failed, but I thought my problem was in the way IE handled the data. I'd love to be proven wrong: http://chrismcmahonsblog.blogspot.com/2006/05/internet-explorer-basic-authorization.html From bret at pettichord.com Sat Jul 29 02:38:57 2006 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 29 Jul 2006 01:38:57 -0500 Subject: [Wtr-general] 40 K limit to attachments Message-ID: On 7/28/06, mi wrote:> I tried sending my html but it was bigger then 40K so here is the link i get when i do a ie.show_links.... I suggest either 1. We push up the limit on attachment sizes (100K? Larger?); or 2. Encourage people to put large attachments on a wiki page (to be designated) and then include a link in their mail. Please vote on these suggestions or make your own. We really need to see people's HTML if we are going to help them. ie.show_links and friends were not really designed to replacements. (In fact, between the IE Dev Tool bar and SpySmith, i never use any of the show_methods any more anyhow.) Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060729/f6b21be1/attachment.html From fxn at hashref.com Sat Jul 29 17:58:02 2006 From: fxn at hashref.com (Xavier Noria) Date: Sat, 29 Jul 2006 23:58:02 +0200 Subject: [Wtr-general] need a frame-recursive wait In-Reply-To: References: Message-ID: On Jul 28, 2006, at 7:30 PM, Bret Pettichord wrote: > On 7/28/06, Xavier Noria wrote: > I'm gonna patch the method tomorrow to write some stack-based > recursion. But before I do that I'd like to ask whether someone else > already fixed this, or else if there is any technical reason that > prevents that method from being recursive-like. > > Your solution sounds reasonable. Please submit a patch when you > have it. Great, here it is. I factored wait() out into wait_for_ie() and wait_for_document(). The patch is against 1.4.1, which is the one we are using. In addition to the stack-based recursion through frames I planned to add, I removed an unusued @pageHasReloaded flag, and added a do/while loop in wait_for_ie() because another reason why the program was crashing was that after the usual while busy + until readyState == complete the @ie object was again in a busy state! Argh! I have seen the do/while in wait_for_ie() sometimes executes more than once in that website with frames, for sure. That do/while loop is not a correct solution to the re-busy state. In principle it could happen that whatever puts @ie back in busy state may need a bit more to be triggered than those 0.02 seconds of sleep. But at least my program runs like a charm in my trials, and approach that problem properly I'd need to know more about those IE states than what I've found in the docs. In particular it's relationship with frames, DOM scripting, Ajax calls... Smells like an asynchronous thing to hook into if there's API for that. I am sure there's room for improvement there. -- fxn -------------- next part -------------- A non-text attachment was scrubbed... Name: adds_robustness_to_watir.patch Type: application/octet-stream Size: 5091 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20060729/7c2f8efd/attachment.obj -------------- next part -------------- From aidy.rutter at gmail.com Sun Jul 30 07:53:40 2006 From: aidy.rutter at gmail.com (aidy rutter) Date: Sun, 30 Jul 2006 12:53:40 +0100 Subject: [Wtr-general] Newbie - Ruby dev IDE question In-Reply-To: <20060728175510.12593.qmail@web31809.mail.mud.yahoo.com> References: <72799cd70607280815w26b8b989t61a4e51632934f02@mail.gmail.com> <20060728175510.12593.qmail@web31809.mail.mud.yahoo.com> Message-ID: <859d18f20607300453v69d0ebach4e9499867f92e8fa@mail.gmail.com> > Ruby /Rails / Watir development IDE Komodo is far too slow and I wouldn't touch it with a bargepole. There is a Elcipse Ruby plug-in, but only supports upto Ruby 1.8.2. for de-bugging. I just use Scite (bundled txt editor) which integrates well with the interpreter, and irb. They *may* be a project explorer somewhere that you could add to Scite No nothing about Rails, but I am on the London RailsConf in September Aidy On 7/28/06, Pauli's List Subscriptions wrote: > > Another newbie question - if you were developing a > webapp on Windows XP, for eventual production > installation on Linux hosting, and wanted a Ruby / > Rails / Watir development IDE, would you go with > Komodo, RadRails or another product. Why? > > Thanks a bunch for your helpful responses. > > Pauli > _______________________________________________ > 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/20060730/2b45a0ed/attachment.html From fxn at hashref.com Sun Jul 30 09:56:19 2006 From: fxn at hashref.com (Xavier Noria) Date: Sun, 30 Jul 2006 15:56:19 +0200 Subject: [Wtr-general] need a frame-recursive wait In-Reply-To: References: Message-ID: <61E4499C-D372-41D4-873A-3A10BCCCAD49@hashref.com> On Jul 29, 2006, at 11:58 PM, Xavier Noria wrote: > On Jul 28, 2006, at 7:30 PM, Bret Pettichord wrote: > >> On 7/28/06, Xavier Noria wrote: >> I'm gonna patch the method tomorrow to write some stack-based >> recursion. But before I do that I'd like to ask whether someone else >> already fixed this, or else if there is any technical reason that >> prevents that method from being recursive-like. >> >> Your solution sounds reasonable. Please submit a patch when you >> have it. > > Great, here it is. I think it is fair to say this contribution was paid by ASPgems, we have a few projects based on Watir and are very grateful to you guys for maintaining it. -- fxn From zeljko.filipin at gmail.com Mon Jul 31 03:57:03 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Mon, 31 Jul 2006 09:57:03 +0200 Subject: [Wtr-general] Project Map In-Reply-To: References: Message-ID: Patrick from Openqa is trying to merge Watir General forum and this list. There are some problems, but I hope he will resolve them in near future. ?eljko On 7/28/06, Bret Pettichord wrote: > > OpenQA provides a "web-based > forum":http://forums.openqa.org/forum.jspa?forumID=5&start=15, but > this isn't monitored by as many people. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060731/a3034252/attachment.html From zeljko.filipin at gmail.com Mon Jul 31 04:28:40 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Mon, 31 Jul 2006 10:28:40 +0200 Subject: [Wtr-general] Newbie - Ruby dev IDE question In-Reply-To: <20060728175510.12593.qmail@web31809.mail.mud.yahoo.com> References: <72799cd70607280815w26b8b989t61a4e51632934f02@mail.gmail.com> <20060728175510.12593.qmail@web31809.mail.mud.yahoo.com> Message-ID: I use Arachno Ruby (http://ruby-ide.com/ruby/ruby_ide_and_ruby_editor.php). Take a look. ?eljko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060731/21e1d030/attachment.html From zeljko.filipin at gmail.com Mon Jul 31 05:07:43 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Mon, 31 Jul 2006 11:07:43 +0200 Subject: [Wtr-general] clicking on a link using sub-text of the link text? In-Reply-To: <44CA7F23.409@pheedo.com> References: <44C8F62D.4060502@pheedo.com> <84AD2119-F3A0-4040-ADCE-45EC48BF5E3F@hashref.com> <44C9A64D.3050409@pheedo.com> <44CA7F23.409@pheedo.com> Message-ID: What I meant by "send us you html" is not to send the whole page, but only a html snippet that is relevant to the problem. Something like this: link -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060731/05551733/attachment.html From zeljko.filipin at gmail.com Mon Jul 31 05:09:25 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Mon, 31 Jul 2006 11:09:25 +0200 Subject: [Wtr-general] 40 K limit to attachments In-Reply-To: References: Message-ID: I would not even look at 40K+ html. All I really need to provide some help is a little snippet of relevant html. ?eljko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060731/4568e154/attachment.html From Adrian.Lewis at tnt.com Mon Jul 31 05:23:23 2006 From: Adrian.Lewis at tnt.com (Adrian Lewis) Date: Mon, 31 Jul 2006 10:23:23 +0100 Subject: [Wtr-general] Newbie - Ruby dev IDE question In-Reply-To: Message-ID: > I use Arachno Ruby (http://ruby-ide.com/ruby/ruby_ide_and_ruby_editor.php ). Take a look. supports only 1.8.2. and the beta for 1.8.4 ([for me] kept crashing). Would like peoples experience on Rad Rails though. aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- From zeljko.filipin at gmail.com Mon Jul 31 05:29:23 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Mon, 31 Jul 2006 11:29:23 +0200 Subject: [Wtr-general] Newbie - Ruby dev IDE question In-Reply-To: References: Message-ID: Did you sent crash reports? Every time I send one, Lothar (developer) quickly fixes it. On 7/31/06, Adrian Lewis wrote: > > > I use Arachno Ruby ( > http://ruby-ide.com/ruby/ruby_ide_and_ruby_editor.php > ). Take a look. > > supports only 1.8.2. and the beta for 1.8.4 ([for me] kept crashing). -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060731/0e854c86/attachment.html From Adrian.Lewis at tnt.com Mon Jul 31 05:41:45 2006 From: Adrian.Lewis at tnt.com (Adrian Lewis) Date: Mon, 31 Jul 2006 10:41:45 +0100 Subject: [Wtr-general] Newbie - Ruby dev IDE question In-Reply-To: Message-ID: Zeljko Could you give me a link to the Ruby 184 supported version. aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- From zeljko.filipin at gmail.com Mon Jul 31 05:53:00 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Mon, 31 Jul 2006 11:53:00 +0200 Subject: [Wtr-general] Newbie - Ruby dev IDE question In-Reply-To: References: Message-ID: I have ruby 1.8.4 and official version of Arachno works at my windows machine (http://ruby-ide.com/ruby/ruby_ide_and_ruby_editor.php). There is even a Linux version (beta) http://ruby-ide.com/forum/showthread.php?t=589. ?eljko On 7/31/06, Adrian Lewis wrote: > > Zeljko > > Could you give me a link to the Ruby 184 supported version. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060731/ba2b64d5/attachment.html From Adrian.Lewis at tnt.com Mon Jul 31 05:59:36 2006 From: Adrian.Lewis at tnt.com (Adrian Lewis) Date: Mon, 31 Jul 2006 10:59:36 +0100 Subject: [Wtr-general] Newbie - Ruby dev IDE question In-Reply-To: Message-ID: > I have ruby 1.8.4 and official version of Arachno works at my windows machine But there is no de-bugging with this version and 1.8.4. Am I correct in saying that? aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- From zeljko.filipin at gmail.com Mon Jul 31 06:15:35 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Mon, 31 Jul 2006 12:15:35 +0200 Subject: [Wtr-general] Newbie - Ruby dev IDE question In-Reply-To: References: Message-ID: I do not use debugger a lot, but I just tried it and it works. If you have any problems, contact Lothar or post a question at Arachno forum. What happens when you start debugger? Nothing? ?eljko On 7/31/06, Adrian Lewis wrote: > > But there is no de-bugging with this version and 1.8.4. Am I correct in > saying that? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060731/52a54c2e/attachment.html From Adrian.Lewis at tnt.com Mon Jul 31 06:21:27 2006 From: Adrian.Lewis at tnt.com (Adrian Lewis) Date: Mon, 31 Jul 2006 11:21:27 +0100 Subject: [Wtr-general] Newbie - Ruby dev IDE question In-Reply-To: Message-ID: > What happens when you start debugger? Nothing? Crashes. But the last time I used it was over a month ago. Aidy --------------------------------------------------------------------------------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --------------------------------------------------------------------------------------------------------------- From zeljko.filipin at gmail.com Mon Jul 31 06:53:59 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Mon, 31 Jul 2006 12:53:59 +0200 Subject: [Wtr-general] Newbie - Ruby dev IDE question In-Reply-To: References: Message-ID: Try "new and improved" Arachno, it will work. And, if it does not, just submit crash report and it will be fixed soon. ?eljko On 7/31/06, Adrian Lewis wrote: > > > What happens when you start debugger? Nothing? > > Crashes. But the last time I used it was over a month ago. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060731/b77d1169/attachment.html From lonny at titanez.net Mon Jul 31 11:24:36 2006 From: lonny at titanez.net (Lonny Eachus) Date: Mon, 31 Jul 2006 08:24:36 -0700 Subject: [Wtr-general] Newbie - Ruby dev IDE question Message-ID: <44CE20B4.7090308@titanez.net> We have been using RadRails almost since it has been available. It is based on the time-tested Eclipse IDE from IBM. (Get it? This was started when Java became big. Eclipse as opposed to "Sun"). So RadRails has a solid foundation, but it is still dependent on its developers to make sure it works properly for Ruby / Rails. The first release or two of RadRails were missing so much in functionality that they were pretty much unusable. But it has come so far since then that I have to wonder why anyone would use anything else, unless it were for performance reasons (Eclipse can be something of a hog). It supports just about all functions of SVN, allowing you to track your source visibly and seamlessly. (It must be noted, however, that the release we are currently using, 0.6.4, has a bug in its SVN support: it does not create tags properly. But you can still do that manually, so no big deal.) Despite a couple of very minor bugs, RadRails is by far the most fully-functional IDE for Ruby / Rails that I have seen. Eclipse has so many features that it would be pointless to even try to list them here, and most if not all of those features carry over to RadRails. Lonny Eachus ============ > From: Adrian Lewis > To: wtr-general at rubyforge.org > Date: Mon, 31 Jul 2006 10:23:23 +0100 > Subject: Re: [Wtr-general] Newbie - Ruby dev IDE question > > I use Arachno Ruby (http://ruby-ide.com/ruby/ruby_ide_and_ruby_editor.php). > Take a look. > > supports only 1.8.2. and the beta for 1.8.4 ([for me] kept crashing). > Would like peoples experience on Rad Rails though. > > aidy From ChintakrindiMeghana at managementdynamics.com Mon Jul 31 12:10:13 2006 From: ChintakrindiMeghana at managementdynamics.com (Chintakrindi Meghanath ) Date: Mon, 31 Jul 2006 12:10:13 -0400 Subject: [Wtr-general] Watir - 1.5 Message-ID: <6CF3AA425295C7479483AC0018EDF98B06EF46D0@MI8NYCMAIL03.Mi8.com> Hi All Where can download the watir 1.5 In the download section , I can see till 1.4.1 Thanks Meghanath -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060731/768ca31e/attachment.html From charley.baker at gmail.com Mon Jul 31 12:36:53 2006 From: charley.baker at gmail.com (Charley Baker) Date: Mon, 31 Jul 2006 10:36:53 -0600 Subject: [Wtr-general] Watir - 1.5 In-Reply-To: <6CF3AA425295C7479483AC0018EDF98B06EF46D0@MI8NYCMAIL03.Mi8.com> References: <6CF3AA425295C7479483AC0018EDF98B06EF46D0@MI8NYCMAIL03.Mi8.com> Message-ID: Hey Chintakrinidi, 1.5.1 is currently a development version, you can download a gem from http://wiki.openqa.org/display/WTR/Development+Builds or follow the link on that page to the FAQ to build your own from the latest in source control: http://wiki.openqa.org/display/WTR/FAQ#FAQ-devgem -Charley On 7/31/06, Chintakrindi Meghanath < ChintakrindiMeghana at managementdynamics.com> wrote: > > Hi All > > Where can download the watir 1.5 > In the download section , I can see till 1.4.1 > > > Thanks > > Meghanath > > _______________________________________________ > 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/20060731/02c9ee4f/attachment.html From mrussell at inpses.co.uk Mon Jul 31 12:39:21 2006 From: mrussell at inpses.co.uk (Max Russell) Date: Mon, 31 Jul 2006 17:39:21 +0100 Subject: [Wtr-general] No tests specified Message-ID: Hi- I tried changing the code as suggested: Test::Unit::TestCase must have at least one method which name starts with "test_". Change def centralvision load 'centralvision.rb' end to def test_centralvision load 'centralvision.rb' end and you should be fine. However, I now get this output- >ruby harness.rb Loaded suite TestSuite Started ./test_centralvision.rb:17: warning: parenthesize argument(s) for future version EE Finished in 0.078 seconds. 1) Error: test_centralvision(TestSuite): SyntaxError: ./test_centralvision.rb:17: syntax error harness.rb:10:in `load' harness.rb:10:in `test_centralvision' 2) Error: test_centralvision(TestSuite): Watir::Exception::NoMatchingWindowFoundException: Unable to locate a window with title of Central Vision c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1208:in `attach_browser_window' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1111:in `attach_init' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1104:in `attach' harness.rb:14:in `teardown' 1 tests, 0 assertions, 0 failures, 2 errors I really don't see why it should be getting a Syntax Error? I still have the same simple test loading up but have changed the def as suggested. thanks Max Russell test Analyst. InPS Tel: 01382 223900 Fax: 01382 204488 Visit our Web site at www.inps.co.uk The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of In Practice Systems Limited or any of its affiliates. If you are not the intended recipient please contact is.helpdesk at inps.co.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060731/2c06c8ad/attachment.html From ChintakrindiMeghana at managementdynamics.com Mon Jul 31 12:55:21 2006 From: ChintakrindiMeghana at managementdynamics.com (Chintakrindi Meghanath ) Date: Mon, 31 Jul 2006 12:55:21 -0400 Subject: [Wtr-general] Watir 1.5 Message-ID: <6CF3AA425295C7479483AC0018EDF98B06EF46D1@MI8NYCMAIL03.Mi8.com> Hi Thanks, I downloaded and installed using the gem. (gem install watir) How do I know where it got installed ? Also currently I am running watir 1.4.x, shall I need to remove it ? Thanks Meghanath -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060731/77b7091a/attachment.html From bmle at webmetrics.com Mon Jul 31 13:12:30 2006 From: bmle at webmetrics.com (Bach Le) Date: Mon, 31 Jul 2006 10:12:30 -0700 Subject: [Wtr-general] Firing Onclick Event Message-ID: <44CE39FE.6010407@webmetrics.com> I'm writing some tests for our website and our website has javascript menus. I can find the proper element in the DOM just fine and when I go to fire the onclick event, it looks like it is clicking the right object but nothing happens. Here's a snippet of code of the div I'm trying to click Here's the javascript for the "onMenuItemAction" function of the onclick event. function onMenuItemAction(e, l) { l = window.ActiveMenuItem; if (!l) return; hideActiveMenus(); if (l.mmaction) eval("" + l.mmaction); window.ActiveMenuItem = 0; } In this example, I want to click on the div with menuItem1 which has an onclick event which I can fire by calling ie.div(:id, 'menuItem1').fire_event('onclick') When i do this in irb or in a watir script, it shows the clicking of the item on the page but nothing happens and I assume this is because the onclick event calls a javascript function "onMenuItemAction" which evaluates the value of the property "mmaction". Does anyone know why this is the case and does anyone know of a solution? Thanks In Advance. P.S. The code is ugly but I can't do anything to change it. From charley.baker at gmail.com Mon Jul 31 13:35:32 2006 From: charley.baker at gmail.com (Charley Baker) Date: Mon, 31 Jul 2006 11:35:32 -0600 Subject: [Wtr-general] Watir 1.5 In-Reply-To: <6CF3AA425295C7479483AC0018EDF98B06EF46D1@MI8NYCMAIL03.Mi8.com> References: <6CF3AA425295C7479483AC0018EDF98B06EF46D1@MI8NYCMAIL03.Mi8.com> Message-ID: I'd recommend you uninstall your previous version if you've used the one click installer for Watir 1.4.1. Gems get installed into your ruby gems directory - ruby_install_directory\lib\ruby\gems\1.8\gems. Read through the FAQ, should help explain some basics. -Charley On 7/31/06, Chintakrindi Meghanath < ChintakrindiMeghana at managementdynamics.com> wrote: > > Hi > > Thanks, I downloaded and installed using the gem. (gem install watir) > How do I know where it got installed ? > Also currently I am running watir 1.4.x, shall I need to remove it ? > > > > Thanks > > Meghanath > > _______________________________________________ > 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/20060731/8cb2a7c8/attachment.html From ChintakrindiMeghana at managementdynamics.com Mon Jul 31 14:07:05 2006 From: ChintakrindiMeghana at managementdynamics.com (Chintakrindi Meghanath ) Date: Mon, 31 Jul 2006 14:07:05 -0400 Subject: [Wtr-general] Click on the Tab Message-ID: <6CF3AA425295C7479483AC0018EDF98B06EF46D3@MI8NYCMAIL03.Mi8.com> Hi I am trying to click a "Tab" in my application . I tried with various combinations, but couldnt succeed. Here is the source code can anyone help me ? I have to click on the "Parties" tab.