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 - 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.
- LEGAL ENTITY: Please fill in this required 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 - 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 - 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. Ev