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. Even pulling out something peripheral like
assert_arrayEquals has caused some alarm.
But what FireWatir needs is more experimentation, and that means that it
needs to be developed according to different development rules from Watir. I
am happy to consult, and to hear any ideas about how it might develop
differently, but i think it is time for it to spread its wings, and am not
so sure that it wouldn't even be best if there were a couple active versions
of Ruby/FireFox drivers, free to share code and ideas between them, but with
out too much worry about consistency and agreement.
Bret
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060712/6b1ef678/attachment.html
From bret at pettichord.com Wed Jul 12 02:30:38 2006
From: bret at pettichord.com (Bret Pettichord)
Date: Wed, 12 Jul 2006 01:30:38 -0500
Subject: [Wtr-general] Lists question
In-Reply-To: <485A27FF1E164B4FB51E2A066D5265A503EBEC@SRVMSXMB1.ad.twtelecom.com>
References:
<485A27FF1E164B4FB51E2A066D5265A503EBEC@SRVMSXMB1.ad.twtelecom.com>
Message-ID:
On 7/11/06, Attebery, Bill wrote:
>
> Thanks Bret -- took a few more lines in 1.4.2 (as I mentioned earlier I
> haven't had success with 1.5 -- receive error on IE.attach)
>
This bothers me a lot. I need to add some diagnostics to IE.attach in
1.5trunk and then have you try it again and send the diagnostics
report. Don't
let me forget about this.
Bret
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060712/440b0507/attachment.html
From Adrian.Rutter at tnt.com Wed Jul 12 05:51:16 2006
From: Adrian.Rutter at tnt.com (Adrian Rutter)
Date: Wed, 12 Jul 2006 10:51:16 +0100
Subject: [Wtr-general] svn download
Message-ID:
from what I can gather the one click installer, installs by default the
watir in 2 different places
within the ruby path: 'C:\ruby\lib\ruby\site_ruby\1.8\watir'
and within program files.
I have downloaded the latest build. There is no installer in this. Should I
just overwrite the new 'watir' folder with the old one in the ruby install
folder?
cheers
aidy
---------------------------------------------------------------------------------------------------------------
This message and any attachment are confidential and may be privileged or otherwise protected from disclosure.
If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system.
If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person.
---------------------------------------------------------------------------------------------------------------
From Adrian.Rutter at tnt.com Wed Jul 12 06:20:44 2006
From: Adrian.Rutter at tnt.com (Adrian Rutter)
Date: Wed, 12 Jul 2006 11:20:44 +0100
Subject: [Wtr-general] Watir Framework (SAFS)
Message-ID:
The benefits of SAFS are:
1) It is tool independent (with similar test tables you can use different
tools [upto yet Winrunner, Robot Classic, RFT, some keywords for Abbot).
2) You don't need to know how to program to construct your own auto-tests
3) The test tables can bring different stakeholders together (i.e. BA's,
test-designers, test-automators etc).
Drawbacks.
1) Painfully slow in its implementation and execution.
2) Try version controlling a shed load of spreadsheets
3) The low-level sheets can get a little esoteric.
Watir
Benefits,
1) A scripting language like Ruby is fast and highly productive. Use scite
and irb and your away. I am coming to the conclusion that you don't even
need an ide.
2) The fundamentals of Ruby to learn are easier than BASIC. My team lead
has no programming experience yet she can review my tests.
3) Got a full OO language; I have been utilising streams and threads. Try
doing that in Robot Classic
4) The DSL stuff bret is working on I think will make it even easier for
all project stakeholders to create tests.
5) Why use Excel? What's wrong with text files? Why not keep the test-data
in a hash-map? Everything then is in one place.
Drawbacks
1) I was struggling with how to structure and organise my tests. I have got
something half decent, but still not entirely pleased with it. Something
good needs to be collaboratively created. Nothing exists without a
framework now, but I don't think the answer for Watir is SAFS.
aidy
---------------------------------------------------------------------------------------------------------------
This message and any attachment are confidential and may be privileged or otherwise protected from disclosure.
If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system.
If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person.
---------------------------------------------------------------------------------------------------------------
From dave.hoover at gmail.com Wed Jul 12 07:20:27 2006
From: dave.hoover at gmail.com (Dave Hoover)
Date: Wed, 12 Jul 2006 06:20:27 -0500
Subject: [Wtr-general] FireWatir deserves its own project
In-Reply-To:
References:
Message-ID: <11c8704e0607120420m77ef53fbmfa83169c919640e7@mail.gmail.com>
On 7/12/06, Bret Pettichord wrote:
> But what FireWatir needs is more experimentation, and that means that it
> needs to be developed according to different development rules from Watir. I
> am happy to consult, and to hear any ideas about how it might develop
> differently, but i think it is time for it to spread its wings, and am not
> so sure that it wouldn't even be best if there were a couple active versions
> of Ruby/FireFox drivers, free to share code and ideas between them, but with
> out too much worry about consistency and agreement.
It's probably too obvious to mention, but since I am the master of all
things obvious, I will: let's make sure that every driver conforms to
as much as the Watir API as is reasonable. Ultimately, if we can have
more than one driver then we should be able to use the same Watir
scripts regardless of which browser/OS we're on.
BTW, I just started the SafariWatir project on RubyForge:
http://rubyforge.org/projects/safariwatir/
From Adrian.Rutter at tnt.com Wed Jul 12 10:29:02 2006
From: Adrian.Rutter at tnt.com (Adrian Rutter)
Date: Wed, 12 Jul 2006 15:29:02 +0100
Subject: [Wtr-general] Sending Tabs
Message-ID:
Hi,
Is there a better way of sending tabs through Watir than using the windows
scripting host?
require 'win32ole'
wsh = WIN32OLE.new("WScript.Shell")
i=0
loop do
wsh.SendKeys "{TAB}"
i += 1
break unless i <=14
end
cheers
aidy
---------------------------------------------------------------------------------------------------------------
This message and any attachment are confidential and may be privileged or otherwise protected from disclosure.
If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system.
If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person.
---------------------------------------------------------------------------------------------------------------
From charley.baker at gmail.com Wed Jul 12 10:33:57 2006
From: charley.baker at gmail.com (Charley Baker)
Date: Wed, 12 Jul 2006 08:33:57 -0600
Subject: [Wtr-general] svn download
In-Reply-To:
References:
Message-ID:
Hey Aidy,
You can follow the instructions I put on the Watir FAQ wiki page:
http://wiki.openqa.org/display/WTR/FAQ#FAQ-devgem
Make sure to uninstall the one click installer before installing the gem.
Let me know if you have any problems or questions.
-Charley
On 7/12/06, Adrian Rutter wrote:
>
>
> from what I can gather the one click installer, installs by default the
> watir in 2 different places
>
> within the ruby path: 'C:\ruby\lib\ruby\site_ruby\1.8\watir'
>
> and within program files.
>
> I have downloaded the latest build. There is no installer in this. Should
> I
> just overwrite the new 'watir' folder with the old one in the ruby install
> folder?
>
> cheers
>
> aidy
>
>
>
>
> ---------------------------------------------------------------------------------------------------------------
> This message and any attachment are confidential and may be privileged or
> otherwise protected from disclosure.
> If you are not the intended recipient, please telephone or email the
> sender and delete this message and any attachment from your system.
> If you are not the intended recipient you must not copy this message or
> attachment or disclose the contents to any other person.
>
> ---------------------------------------------------------------------------------------------------------------
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060712/fea0aeef/attachment.html
From charley.baker at gmail.com Wed Jul 12 10:38:23 2006
From: charley.baker at gmail.com (Charley Baker)
Date: Wed, 12 Jul 2006 08:38:23 -0600
Subject: [Wtr-general] Sending Tabs
In-Reply-To:
References:
Message-ID:
Hi Aidy,
You can send tabs through AutoIt. Take a look at WindowHelper.rb. You can
easily extend it with something like this:
class WindowHelper
def push_tab
@autoit.WinWait "Your dialog title", ""
@autoit.Send "{TAB}"
end
end
-Charley
On 7/12/06, Adrian Rutter wrote:
>
>
> Hi,
>
> Is there a better way of sending tabs through Watir than using the windows
> scripting host?
>
> require 'win32ole'
> wsh = WIN32OLE.new("WScript.Shell")
> i=0
> loop do
> wsh.SendKeys "{TAB}"
> i += 1
> break unless i <=14
> end
>
> cheers
>
> aidy
>
>
>
>
> ---------------------------------------------------------------------------------------------------------------
> This message and any attachment are confidential and may be privileged or
> otherwise protected from disclosure.
> If you are not the intended recipient, please telephone or email the
> sender and delete this message and any attachment from your system.
> If you are not the intended recipient you must not copy this message or
> attachment or disclose the contents to any other person.
>
> ---------------------------------------------------------------------------------------------------------------
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060712/45a682e6/attachment.html
From ChintakrindiMeghana at managementdynamics.com Wed Jul 12 10:49:00 2006
From: ChintakrindiMeghana at managementdynamics.com (Chintakrindi Meghanath )
Date: Wed, 12 Jul 2006 10:49:00 -0400
Subject: [Wtr-general] Watir Framework (SAFS)
Message-ID: <6CF3AA425295C7479483AC0018EDF98B01DAE144@MI8NYCMAIL03.Mi8.com>
Hi
I completely agree with aidy.
SAFS is slow in its exectuion , as I mentioned in my previous mail.
I prefer xls/csv for the Datadriven because its very easy for the Data Entry.
We faced so many issues/problems with the text files.
There is no other technical reason, only for the comnfort of the data entry.
Thanks
Meghanath
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Adrian Rutter
Sent: Wednesday, July 12, 2006 6:21 AM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] Watir Framework (SAFS)
The benefits of SAFS are:
1) It is tool independent (with similar test tables you can use different
tools [upto yet Winrunner, Robot Classic, RFT, some keywords for Abbot).
2) You don't need to know how to program to construct your own auto-tests
3) The test tables can bring different stakeholders together (i.e. BA's,
test-designers, test-automators etc).
Drawbacks.
1) Painfully slow in its implementation and execution.
2) Try version controlling a shed load of spreadsheets
3) The low-level sheets can get a little esoteric.
Watir
Benefits,
1) A scripting language like Ruby is fast and highly productive. Use scite
and irb and your away. I am coming to the conclusion that you don't even
need an ide.
2) The fundamentals of Ruby to learn are easier than BASIC. My team lead
has no programming experience yet she can review my tests.
3) Got a full OO language; I have been utilising streams and threads. Try
doing that in Robot Classic
4) The DSL stuff bret is working on I think will make it even easier for
all project stakeholders to create tests.
5) Why use Excel? What's wrong with text files? Why not keep the test-data
in a hash-map? Everything then is in one place.
Drawbacks
1) I was struggling with how to structure and organise my tests. I have got
something half decent, but still not entirely pleased with it. Something
good needs to be collaboratively created. Nothing exists without a
framework now, but I don't think the answer for Watir is SAFS.
aidy
---------------------------------------------------------------------------------------------------------------
This message and any attachment are confidential and may be privileged or otherwise protected from disclosure.
If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system.
If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person.
---------------------------------------------------------------------------------------------------------------
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
From lonny at titanez.net Wed Jul 12 11:08:17 2006
From: lonny at titanez.net (Lonny Eachus)
Date: Wed, 12 Jul 2006 08:08:17 -0700
Subject: [Wtr-general] Accessing Session Information
In-Reply-To:
References:
Message-ID: <44B51061.5030401@titanez.net>
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060712/07b5635a/attachment.html
From ChintakrindiMeghana at managementdynamics.com Wed Jul 12 11:11:51 2006
From: ChintakrindiMeghana at managementdynamics.com (Chintakrindi Meghanath )
Date: Wed, 12 Jul 2006 11:11:51 -0400
Subject: [Wtr-general] Watir Framework (SAFS)
Message-ID: <6CF3AA425295C7479483AC0018EDF98B01DAE147@MI8NYCMAIL03.Mi8.com>
Hi Aidy
Are you in the process of developing any framework using
the watir ?
If yes, can you send some information about it ?
Thanks
Meghanath
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Chintakrindi
Meghanath
Sent: Wednesday, July 12, 2006 10:49 AM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] Watir Framework (SAFS)
Hi
I completely agree with aidy.
SAFS is slow in its exectuion , as I mentioned in my previous mail.
I prefer xls/csv for the Datadriven because its very easy for the Data Entry.
We faced so many issues/problems with the text files.
There is no other technical reason, only for the comnfort of the data entry.
Thanks
Meghanath
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Adrian Rutter
Sent: Wednesday, July 12, 2006 6:21 AM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] Watir Framework (SAFS)
The benefits of SAFS are:
1) It is tool independent (with similar test tables you can use different
tools [upto yet Winrunner, Robot Classic, RFT, some keywords for Abbot).
2) You don't need to know how to program to construct your own auto-tests
3) The test tables can bring different stakeholders together (i.e. BA's,
test-designers, test-automators etc).
Drawbacks.
1) Painfully slow in its implementation and execution.
2) Try version controlling a shed load of spreadsheets
3) The low-level sheets can get a little esoteric.
Watir
Benefits,
1) A scripting language like Ruby is fast and highly productive. Use scite
and irb and your away. I am coming to the conclusion that you don't even
need an ide.
2) The fundamentals of Ruby to learn are easier than BASIC. My team lead
has no programming experience yet she can review my tests.
3) Got a full OO language; I have been utilising streams and threads. Try
doing that in Robot Classic
4) The DSL stuff bret is working on I think will make it even easier for
all project stakeholders to create tests.
5) Why use Excel? What's wrong with text files? Why not keep the test-data
in a hash-map? Everything then is in one place.
Drawbacks
1) I was struggling with how to structure and organise my tests. I have got
something half decent, but still not entirely pleased with it. Something
good needs to be collaboratively created. Nothing exists without a
framework now, but I don't think the answer for Watir is SAFS.
aidy
---------------------------------------------------------------------------------------------------------------
This message and any attachment are confidential and may be privileged or otherwise protected from disclosure.
If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system.
If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person.
---------------------------------------------------------------------------------------------------------------
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
From bret at pettichord.com Wed Jul 12 11:26:16 2006
From: bret at pettichord.com (Bret Pettichord)
Date: Wed, 12 Jul 2006 10:26:16 -0500
Subject: [Wtr-general] svn download
In-Reply-To:
References:
Message-ID:
On 7/12/06, Adrian Rutter wrote:
>
>
> from what I can gather the one click installer, installs by default the
> watir in 2 different places
>
> within the ruby path: 'C:\ruby\lib\ruby\site_ruby\1.8\watir'
>
> and within program files.
To clarify: it installs the library in the first location and the bonus
files in the second location.
> I have downloaded the latest build. There is no installer in this. Should
> I
> just overwrite the new 'watir' folder with the old one in the ruby install
> folder?
No. Please see
http://wiki.openqa.org/display/WTR/Development+Builds
for the builds and instructions. Are the instructions here not clear? In
short, do "gem install watir".
Like Charley said, you should uninstall 1.4 first if it was installed with
the one-click installer (not necessary for the 1.4 gem)
Bret
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060712/949b11d6/attachment.html
From rand.thacker at gmail.com Wed Jul 12 12:51:50 2006
From: rand.thacker at gmail.com (Rand Thacker)
Date: Wed, 12 Jul 2006 11:51:50 -0500
Subject: [Wtr-general] Accessing Session Information
In-Reply-To: <44B51061.5030401@titanez.net>
References:
<44B51061.5030401@titanez.net>
Message-ID: <33dc42ea0607120951q1d8fc3cfw9cc96d4d5c12edeb@mail.gmail.com>
Lonny, for someone asking for help, you're going about it all wrong.
Folks who answer questions on this list aren't doing it because it's their
job or because they owe you. They are doing it out of the general desire to
help the community. If you are rude to the people who are providing help,
they will cease to answer your requests for help.
Something like:
"Bruce, I don't think the link you sent accessed the specific area of the
tutorial that you were hoping for. Either that, or I'm just not sure what
area would help me find answers to my questions regarding session
information."
Might get better results than outright sarcasm.
On 7/12/06, Lonny Eachus wrote:
>
>
> A link to information on Internet Explorer. My, how helpful! And RELEVANT
> to my specific issue!
>
> I have to wonder why you did not also include a link to a book on Ruby, or
> even an intro to MS Windows.
>
> Lonny Eachus
> ==========
>
> Subject:
> Re: [Wtr-general] Accessing Session Information From:
> "Bret Pettichord" Date:
> Tue, 11 Jul 2006 17:41:47 -0500
>
>
> On 7/11/06, Lonny Eachus wrote:
> >
> > Any information on how to get as much session information as I can from
> > Watir would be appreciated.
>
>
> Here is the raw data for what can be done with Watir.
>
> http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/prog_browser_node_entry.asp
>
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
--
"I am the most humble person in the world!"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060712/a9cedc41/attachment.html
From rand.thacker at gmail.com Wed Jul 12 12:55:34 2006
From: rand.thacker at gmail.com (Rand Thacker)
Date: Wed, 12 Jul 2006 11:55:34 -0500
Subject: [Wtr-general] Accessing Session Information
In-Reply-To: <33dc42ea0607120951q1d8fc3cfw9cc96d4d5c12edeb@mail.gmail.com>
References:
<44B51061.5030401@titanez.net>
<33dc42ea0607120951q1d8fc3cfw9cc96d4d5c12edeb@mail.gmail.com>
Message-ID: <33dc42ea0607120955h605aca6bp8c14c8c6f4fa0855@mail.gmail.com>
And, as I stumble off of my soapbox, I realize that it would be even more
polite to use the correct names:
"Bret, I don't think the link you sent accessed the specific area of the
tutorial that you were hoping for. Either that, or I'm just not sure what
area would help me find answers to my questions regarding session
information."
On 7/12/06, Rand Thacker wrote:
>
> Lonny, for someone asking for help, you're going about it all wrong.
>
> Folks who answer questions on this list aren't doing it because it's their
> job or because they owe you. They are doing it out of the general desire to
> help the community. If you are rude to the people who are providing help,
> they will cease to answer your requests for help.
>
> Something like:
> "Bruce, I don't think the link you sent accessed the specific area of the
> tutorial that you were hoping for. Either that, or I'm just not sure what
> area would help me find answers to my questions regarding session
> information."
> Might get better results than outright sarcasm.
>
>
>
> On 7/12/06, Lonny Eachus wrote:
>
> >
> > A link to information on Internet Explorer. My, how helpful! And
> > RELEVANT to my specific issue!
> >
> > I have to wonder why you did not also include a link to a book on Ruby,
> > or even an intro to MS Windows.
> >
> > Lonny Eachus
> > ==========
> >
> > Subject:
> > Re: [Wtr-general] Accessing Session Information From:
> > "Bret Pettichord" Date:
> > Tue, 11 Jul 2006 17:41:47 -0500
> >
> >
> > On 7/11/06, Lonny Eachus wrote:
> > >
> > > Any information on how to get as much session information as I can
> > > from
> > > Watir would be appreciated.
> >
> >
> > Here is the raw data for what can be done with Watir.
> > http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/prog_browser_node_entry.asp
> >
> >
> >
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
>
>
> --
> "I am the most humble person in the world!"
>
--
"I am the most humble person in the world!"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060712/a8c898b4/attachment.html
From bret at pettichord.com Wed Jul 12 13:15:07 2006
From: bret at pettichord.com (Bret Pettichord)
Date: Wed, 12 Jul 2006 12:15:07 -0500
Subject: [Wtr-general] Sending Tabs
In-Reply-To:
References:
Message-ID:
On 7/12/06, Adrian Rutter wrote:
>
> Is there a better way of sending tabs through Watir than using the windows
> scripting host?
>
> require 'win32ole'
> wsh = WIN32OLE.new("WScript.Shell")
> i=0
> loop do
> wsh.SendKeys "{TAB}"
> i += 1
> break unless i <=14
> end
Not really. But there is a better way to do loops:
14.times { wsh.SendKeys "{TAB}" }
Bret
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060712/2543ebfc/attachment.html
From lonny at titanez.net Wed Jul 12 13:58:57 2006
From: lonny at titanez.net (Lonny Eachus)
Date: Wed, 12 Jul 2006 10:58:57 -0700
Subject: [Wtr-general] Accessing Session Information
In-Reply-To:
References:
Message-ID: <44B53861.2050509@titanez.net>
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060712/b0dfad20/attachment.html
From mtownley at firstlook.biz Wed Jul 12 14:23:47 2006
From: mtownley at firstlook.biz (Mike Townley)
Date: Wed, 12 Jul 2006 13:23:47 -0500
Subject: [Wtr-general] Accessing Session Information
Message-ID: <91E302EA72562F43AEDC06DD8FAE7D364C274E@ord1mail01.firstlook.biz>
* Perhaps it was a mistake or misunderstanding, but it came across
as a rather blatant insult
I shouldn't have to really say this sort of thing, and I would prefer if
things like this didn't need to be discussed on this list, but...
If you admit there is possibility that you may have made a mistake in
your interpretation of the Bret's action you cannot justify your
response based on anything being 'blatent' as this would mean there was
no room for interpretation.
I am personally offended when people who take their free time (which is
never really free) to help others are disrespected by being treated like
they owe you something.
The opensource community operates almost entirely on voluntary
cooperation, collaboration, and participation. We all are here to give
and receive the gifts of knowledge and information. Lonny, just because
you have volunteered at times to help out and share does not entitle you
to any assistance at all from anyone. If you found Bret's advice less
than usefull, perhaps you should have politely asked for clarification.
With people as busy as they are, we should strive to be more conscious
and appreciative of when they take time to help us out with what are
essentially our own problems to solve.
Mike
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Lonny Eachus
Sent: Wednesday, July 12, 2006 12:59 PM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] Accessing Session Information
With all due respect, Rand, I have been listening in on this forum for
some time, and posting my own suggestions from time to time. My own
advice might not always have been 100% spot-on, but at other times it
definitely helped people here. Nor did I offer advice because I owed it
to anybody. My desire was to help the community.
Bret's link to a page on Internet Explorer was neither on-topic or
useful. Perhaps it was a mistake or misunderstanding, but it came across
as a rather blatant insult. I have no reason to apologize when a polite
request on my part is met with such a rude response.
Lonny Eachus
==========
Subject:
Re: [Wtr-general] Accessing Session Information
From:
"Rand Thacker"
Date:
Wed, 12 Jul 2006 11:51:50 -0500
Lonny, for someone asking for help, you're going about it all wrong.
Folks who answer questions on this list aren't doing it because it's
their job or because they owe you. They are doing it out of the general
desire to help the community. If you are rude to the people who are
providing help, they will cease to answer your requests for help.
Something like:
"Bruce, I don't think the link you sent accessed the specific area of
the tutorial that you were hoping for. Either that, or I'm just not
sure what area would help me find answers to my questions regarding
session information."
Might get better results than outright sarcasm.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060712/81693a47/attachment.html
From bret at pettichord.com Wed Jul 12 14:32:18 2006
From: bret at pettichord.com (Bret Pettichord)
Date: Wed, 12 Jul 2006 13:32:18 -0500
Subject: [Wtr-general] why win32ole needed to be patched or modified
In-Reply-To: <44AE86DE.1050209@reconnex.net>
References: <44AE86DE.1050209@reconnex.net>
Message-ID:
On 7/7/06, Manish Sapariya wrote:
>
> Hi,
> Bret mentioned in one of the posts that in order for watir to be working,
> win32ole ruby bindings needed to be patched.
>
> I was wondering for what kind of patch this was?
> If I want my own app to be driven using ole, what kind of patch I might
> require to add?
>
> I would appreciate pointers to the right forum if this is not the one.
> Thanks and Regards,
> Manish
I'm not quite sure what the basis for your question is. So i'll say some
things and i hope you will find them useful. If not, please provide more
details about what you are looking for.
Please don't take this personally, but since it seems like this is not clear
to everyone on the list, i feel like i need to say that you should not feel
insulted by my response and if you do, it would be better to say so than
respond rudely yourself.
Now for your question.
The WIN32OLE patch was needed for our support for modal dialogs -- which are
an IE-only feature. Specifically, we wrote a DLL that returned a reference
to the DOM in the modal dialog. We needed a way to "cast" this into a
WIN32OLE object. We patched the WIN32OLE library to provide this "casting"
ability. The WIN32OLE patch is included in the Watir source so you can look
at it yourself, if that helps.
Does this help?
Bret
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060712/4ad0b577/attachment.html
From arkie at compli.com Wed Jul 12 15:10:27 2006
From: arkie at compli.com (Alan Ark)
Date: Wed, 12 Jul 2006 14:10:27 -0500
Subject: [Wtr-general] WIN32OLERuntimeError redux - innertext
Message-ID: <7F2DAB1053EC4D47B821DA0A7BA5E3EBC5F45A@mail-21ps.atlarge.net>
Hello Listfolk.
Searching the archives, I noticed that there were some threads about these WIN32OLERuntimeErrors.
Here's another one to add to the pile.
I will try rebooting my system to see if that resolves most of the issues, but I wanted to alert folks about this test case as well.
Background Info
-----------------------
I'm using the Watir 1.4.1 gem under Ruby 1.8 on a WinXp Pro box.
I'm seeing the errors when I try to access a link. This happens some of the time, but not all of the time.
Its typical for me, that when I get one of these errors, the same error will appear in other neighboring test cases as well. Then for some reason, the tests start to run fine again.
I'm running my tests under the unit test framework. The tests usually run fine, but once in a while I'll get the WIN32OLERuntime error to appear to an unknown reason. My basic structure is the 1st test case will log the user into the system. The teardown script places the user at a known place in the system, and all the test cases will start from this known state.
The Error Messages Seen
--------------------------------------
test_030_AddAnotherGroup(RubyTester):
WIN32OLERuntimeError: innerText
OLE error code:0 in
HRESULT error code:0x80070005
Access is denied.
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:924:in `method_missing'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:924:in `getLink'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:923:in `each'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:923:in `getLink'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:2840:in `initialize'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:570:in `new'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:570:in `link'
Iteration1_DirectorWalk.rb:414:in `test_030_AddAnotherGroup'
test_017_AddGroup(RubyTester):
WIN32OLERuntimeError: click
OLE error code:0 in
HRESULT error code:0x80070005
Access is denied.
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:2013:in `method_missing'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:2013:in `click'
Q:/Ruby/Projects/DirectorAT/Iteration1_DirectorWalk.rb:257:in `test_017_AddGroup'
(code not included for test_017_AddGroup, but the error happens on a similar line as shown below)
The test case being run
----------------------------------
def test_030_AddAnotherGroup
# hits the following pages
## PAGE::settings/company
## PAGE::settings/newGroup
## PAGE::settings/userPickerNew
# Make sure that we are at the inbox page.
assert($ie.contains_text("Policies Requiring Signoff"),"Not at Inbox as expected at the start of the test case")
# Get to the add groups page.
Error --> $ie.link(:text,"Administration").click() <-- Error happens on this line
@@sDate=verifySession(@@sDate,@@nExpire)
assert($ie.image(:src,/admin-header.gif/).hasLoaded?,"Not on Admin page as expected")
$ie.image(:id,/nav_groups/).click()
@@sDate=verifySession(@@sDate,@@nExpire)
assert($ie.contains_text("Groups Administration"),"Not on Groups section of Admin Page")
$ie.link(:text,"Add New Group").click
@@sDate=verifySession(@@sDate,@@nExpire)
assert($ie.contains_text("Group Permissions"),"Not on Groups section of Admin Page")
$ie.text_field(:name,"gname").set("To Be Deleted")
$ie.checkbox(:name,"Perm7").set
$ie.button(:id,"SubmitButton").click
@@sDate=verifySession(@@sDate,@@nExpire)
#Make sure that it got created correctly.
assert($ie.contains_text("Group Created."),"Group not created properly")
assert($ie.contains_text("To Be Deleted"),"Group To Be Deleted missing from the page")
# State continuity - Make sure that we are at the inbox page.
navigateToInbox($ie)
@@sDate=verifySession(@@sDate,@@nExpire)
end
The teardown script
-----------------------------
def teardown
#close windows that might have caused problems.
closePrintWindows
# Make sure that we are at the Inbox
$ie=IE.attach(:title,/^Compli:/)
$ie.set_fast_speed()
navigateToInbox($ie)
end
Method declaration for closePrintWindows
-------------------------------------------------------------
def closePrintWindows
# close all open ie windows
all_closed = 'unknown'
while (all_closed != 'yes')
begin
#use a regexp that will match any title so all ie windows are forced closed
header = Regexp.new(/Compli: Print/)
@ie = IE.attach(:title, header)
@ie.close
# catch the exception raised when there's now window to attach to.
rescue NoMatchingWindowFoundException
all_closed = 'yes'
end
end
end
Ideas, comments welcome.
-Alan
_____
Alan Ark | Lead QA Engineer | Compl? | HYPERLINK "mailto:arkie at compli.com"arkie at compli.com | office: 503.294.2020 | fax: 503.294.1200 | HYPERLINK "http://www.compli.com/"www.compli.com
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/385 - Release Date: 7/11/2006
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060712/49b32489/attachment.html
From bret at pettichord.com Wed Jul 12 18:56:22 2006
From: bret at pettichord.com (Bret Pettichord)
Date: Wed, 12 Jul 2006 17:56:22 -0500
Subject: [Wtr-general] WIN32OLERuntimeError redux - innertext
In-Reply-To:
References: <7F2DAB1053EC4D47B821DA0A7BA5E3EBC5F45A@mail-21ps.atlarge.net>
Message-ID:
Sounds like a synchronization problem. There was a known synchronization
problem with IE.attach in 1.4.1. That can be avoided if you call wait after
attach. Thus:
$ie=IE.attach(:title,/^Compli:/)
$ie.wait # add this line
$ie.set_fast_speed()
navigateToInbox($ie)
But depending on what is in navigateToInbox, i can't tell if that is the
problem here. Can you show the code in navigateToInbox?
And if this change fixes your problem, let us know. I'm wondering if we
shouldn't release this fix as 1.4.2.
Bret
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060712/0f784615/attachment.html
From rand.thacker at gmail.com Wed Jul 12 19:51:50 2006
From: rand.thacker at gmail.com (Rand Thacker)
Date: Wed, 12 Jul 2006 18:51:50 -0500
Subject: [Wtr-general] WIN32OLERuntimeError redux - innertext
In-Reply-To:
References: <7F2DAB1053EC4D47B821DA0A7BA5E3EBC5F45A@mail-21ps.atlarge.net>
Message-ID: <33dc42ea0607121651p7e39c66dt762711c1ec58f833@mail.gmail.com>
I've even run into problems before where $ie.wait didn't seem to do the
trick. Usually it was when the pages where doing a redirect or some other
craziness that I hadn't planned on.
My workaround was to go ahead and do the $ie.wait, then I threw in some
thing like this:
xUselessVariable = $ie.contains_text('it_would_never_contain_this_phrase')
xUselessVariable =
$ie.contains_text('it_would_never_contain_this_phrase_either')
and just ignore the return values... and do your actions/assertions after
this.
I've did it twice because once helped, but didn't solve it everytime.
I'm not running into those issues anymore.
I know it's a hack, but it sure worked for me. Hope it helps someone else
out there.
On 7/12/06, Bret Pettichord wrote:
>
>
> Sounds like a synchronization problem. There was a known synchronization
> problem with IE.attach in 1.4.1. That can be avoided if you call wait
> after attach. Thus:
>
>
> $ie=IE.attach(:title,/^Compli:/)
>
> $ie.wait # add this line
>
> $ie.set_fast_speed()
>
> navigateToInbox($ie)
>
>
> But depending on what is in navigateToInbox, i can't tell if that is the
> problem here. Can you show the code in navigateToInbox?
>
> And if this change fixes your problem, let us know. I'm wondering if we
> shouldn't release this fix as 1.4.2.
>
> Bret
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
--
"I am the most humble person in the world!"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060712/8b1cc90d/attachment.html
From bret at pettichord.com Wed Jul 12 20:20:29 2006
From: bret at pettichord.com (Bret Pettichord)
Date: Wed, 12 Jul 2006 19:20:29 -0500
Subject: [Wtr-general] WIN32OLERuntimeError redux - innertext
In-Reply-To: <33dc42ea0607121651p7e39c66dt762711c1ec58f833@mail.gmail.com>
References: <7F2DAB1053EC4D47B821DA0A7BA5E3EBC5F45A@mail-21ps.atlarge.net>
<33dc42ea0607121651p7e39c66dt762711c1ec58f833@mail.gmail.com>
Message-ID:
That confirms that it is a synchronization problem. I think those useless
calls are really the moral equivalent of sleep statements.
Probably the cleanest and most reliable solution would be to use this after
your call to IE.attach:
require 'watir/waiter'
WATIR::Waiter.wait_until { $ie.some_element_i_know_should_be_there.exists?
}
Although this library is packaged with Watir 1.5, it is a separate file
(watir/waiter.rb) and can be used with 1.4 if you copy it over manually.
Bret
On 7/12/06, Rand Thacker wrote:
>
> I've even run into problems before where $ie.wait didn't seem to do the
> trick. Usually it was when the pages where doing a redirect or some other
> craziness that I hadn't planned on.
>
> My workaround was to go ahead and do the $ie.wait, then I threw in some
> thing like this:
> xUselessVariable =
> $ie.contains_text('it_would_never_contain_this_phrase')
> xUselessVariable =
> $ie.contains_text('it_would_never_contain_this_phrase_either')
> and just ignore the return values... and do your actions/assertions after
> this.
> I've did it twice because once helped, but didn't solve it everytime.
>
> I'm not running into those issues anymore.
>
> I know it's a hack, but it sure worked for me. Hope it helps someone else
> out there.
>
>
> On 7/12/06, Bret Pettichord wrote:
>
> >
> Sounds like a synchronization problem. There was a known synchronization
> problem with IE.attach in 1.4.1. That can be avoided if you call wait
> after attach. Thus:
>
>
> $ie=IE.attach(:title,/^Compli:/)
>
> $ie.wait # add this line
>
> $ie.set_fast_speed()
>
> navigateToInbox($ie)
>
>
> But depending on what is in navigateToInbox, i can't tell if that is the
> problem here. Can you show the code in navigateToInbox?
>
> And if this change fixes your problem, let us know. I'm wondering if we
> shouldn't release this fix as 1.4.2.
>
> Bret
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
>
>
> --
> "I am the most humble person in the world!"
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060712/1cc9d1d4/attachment.html
From Adrian.Rutter at tnt.com Thu Jul 13 04:53:37 2006
From: Adrian.Rutter at tnt.com (Adrian Rutter)
Date: Thu, 13 Jul 2006 09:53:37 +0100
Subject: [Wtr-general] Watir Framework (SAFS)
Message-ID:
Carl Nagle wrote around 12 Jul 2006 on the RRAFS list
You seem to be missing part of the appeal behind the purpose of SAFS and
the original post concerning a WATIR engine. With a WATIR engine we could
be testing our web content with WATIR as a SAFS engine. We could take a
test that originally ran with SAFS for Rational Robot (RRAFS) and run it
with SAFS for WATIR (WAFS?) instead, and vice-versa. We could also use
both and not have to pick just one tool or the other. And when we have to
run the same tests on Linux or Unix the tests could still be portable on
whatever engine we choose to provide there (Selenium, LiveConnect, Common
DOM, etc.).
The idea is to provide test portability, tool-independence, and a common
infrastructure for test development, reporting, and execution regardless of
the tools that will be used. As a SAS example, we would still use the same
test development tools (Excel or Test Composer) regardless of whether we
were using SAFS for Rational Robot (slow) or SAFS for Watir (fast). The
"test data" would be unified because both engines are SAFS engines, and the
reporting would all stem from the same SAFS assets and services.
Your ideas of what could\should be unified or shared is exactly what SAFS
attempts to satisfy--a framework on which any and all of these things can
be attached and shared. Most actually exist already in one form or another
and the mechanisms to add others is present and documented. The issue, of
course, is largely one of time and resources. You or anyone could help
implement a Watir engine for SAFS. Then folks wouldn't have to choose
between writing Watir tests in Ruby or writing portable tests in SAFS.
In any event, thanks for sharing your ideas and furthering this discussion!
---------------------------------------------------------------------------------------------------------------
This message and any attachment are confidential and may be privileged or otherwise protected from disclosure.
If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system.
If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person.
---------------------------------------------------------------------------------------------------------------
From Adrian.Rutter at tnt.com Thu Jul 13 06:16:03 2006
From: Adrian.Rutter at tnt.com (Adrian Rutter)
Date: Thu, 13 Jul 2006 11:16:03 +0100
Subject: [Wtr-general] Watir Framework?
Message-ID:
> Are you in the process of developing any framework using the watir ?
> If yes, can you send some information about it ?
With every test case, I write a Test Class
An example:
class ST_LTD_3
def initialize
$log.test_info(self.class, 'Select Depot which has territories and
click search',
'All matching territories are
displayed')
string_to_search = ["DF1", "MA Portfolio"]
start_browser
login
goto_territory_list
search_territory("UNITED KINGDOM", "BRISTOL")
click_search
string_to_search.each {|x|
$log.verify_html(x)
}
rescue => e
p "test failed: #{e.message}"
p e.backtrace
ensure
log_out
close_window
end
end
breakdown
$log.test_info(self.class, 'Select Depot which has territories and click
search',
'All matching territories are
displayed')
This logs the test name, a description of the test and the expected result
to an xml file
start_browser
login
each window or area of funtionality is in a module
module Browser
def
start_browser(url='http://gbahevm06l24.gb.tntpost.com:9081/wps/portal')
$ie = Watir::IE.new
$ie.goto(url)
$ie.maximize()
end
end
module Login
def login(username='g126ahe', password='g126ahe')
$ie.link(:text, 'Log in').click
$ie.text_field(:name, /userid/).set(username)
$ie.text_field(:name, /password/).set(password)
$ie.button(:value,'Log in').click
end
def log_out
$ie.link(:text, 'Log out').click
end
end
this logs a pass or fail to the xml log
$log.verify_html(x)
full xml log file
class Logging
def initialize
@doc = Document.new
xmldecl = XMLDecl.default
@doc.add(xmldecl)
@root = @doc.add_element 'testresults'
end
def verify_html(vp_text) #add optional params
if $ie.contains_text(vp_text)
self.test_results('pass')
else
self.test_results('fail', "#{vp_text} is NOT on the page")
end
#do a not here
end
def test_info(test_name, desc, exp)
@test = @root.add_element 'test'
@test.attributes["id"] = test_name
des= @test.add_element 'description'
des.text = desc
res = @test.add_element 'expected'
res.text = exp
end
def test_results(result, *msg)
if result.upcase == 'PASS' then
test_status= @test.add_element 'teststatus'
test_status.text = 'PASS'
elsif result.upcase == 'FAIL' then
fail = @test.add_element 'teststatus'
fail.text = 'FAIL!'
fail_msg = @test.add_element 'failmessage'
fail_msg.text = msg
elsif result.upcase == 'SKIP'
skip = @test.add_element 'teststatus'
skip.text = 'SKIP'
skip_msg = @test.add_element 'skipmessage'
fail_msg.text = msg
end
end
def write_xml_to_file
@doc.write($stdout, 1)
@doc.write(File.open("C:/test_results.xml","w"))
end
end
the xml output is something like this
- Check that window displayed is correctCorrect image is displayedPASS
- Select to Add an employee in a roleEmployee was assigned to territory successfullyFAIL!security not implemented gonna fail
to read in a csv do something like this
def enter_territory
require 'csv'
reader = CSV.open('C:\test_data', 'r')
header = reader.shift
reader.each{|row| next unless row.any?
p row
}
end
the appmap bit, I am going to steal of Bret's suggestion in a previous post
feedback or suggestions welcome
aidy
---------------------------------------------------------------------------------------------------------------
This message and any attachment are confidential and may be privileged or otherwise protected from disclosure.
If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system.
If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person.
---------------------------------------------------------------------------------------------------------------
From sikander at marlabs.com Thu Jul 13 07:13:46 2006
From: sikander at marlabs.com (Sikander)
Date: Thu, 13 Jul 2006 16:43:46 +0530
Subject: [Wtr-general] How to handle tab buttons
Message-ID: <000f01c6a66d$6cd321e0$6520a8c0@caseshare.com>
Hi!
How to click for tab buttons. I have following code,
Print Jobs
Print jobs is my tab button.
Thanks,
Sikander
--
Disclaimer:
This e-mail, and any files transmitted with it are confidential to Marlabs Inc. and intended solely for the use of the individual or entity to whom it is addressed. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060713/a79132f1/attachment.html
From christian.leskowsky at gmail.com Thu Jul 13 09:57:05 2006
From: christian.leskowsky at gmail.com (Christian Leskowsky)
Date: Thu, 13 Jul 2006 09:57:05 -0400
Subject: [Wtr-general] `method_missing': document (WIN32OLERuntimeError)
Message-ID: <58a2be440607130657u64a0a7fcg2e341d22948289a1@mail.gmail.com>
Hi guys,
I've found a problem similar to mine that was discussed on the list in May
(I've borrowed the message header). Does anybody know what happened with it?
I've hit it again in my testing. Let me explain what's happening...
My environment:
Windows XP SP2
ruby 1.8.4 (2005-12-24) [i386-mswin32]
watir-1.5.1.1045
The error:
OLE error code:80004005 in
HRESULT error code:0x80020009
Exception occurred. from c:/ruby/lib/ruby/gems/1.8/gems/watir-
1.5.1.1045/./watir.rb:1640:in `wait'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1045/./watir.rb:2401:in
`click'
from b.rb:57
What's happening in the web application:
1/ A popup window with a form is created and attached to
2/ assorted text fields are filled in
3/ the form is submitted causing the popup window to close
4/ ruby exits with the exception thrown above
Thanks for any help,
--
-
'There was an owl lived in an oak.
The more he heard, the less he spoke.
The less he spoke, the more he heard.'
Christian Leskowsky
christian.leskowsky at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060713/aaa77419/attachment.html
From arkie at compli.com Thu Jul 13 10:45:39 2006
From: arkie at compli.com (Alan Ark)
Date: Thu, 13 Jul 2006 09:45:39 -0500
Subject: [Wtr-general] WIN32OLERuntimeError redux - innertext
In-Reply-To:
Message-ID: <7F2DAB1053EC4D47B821DA0A7BA5E3EBC5F582@mail-21ps.atlarge.net>
Thanks for the leads folks.
I?m busy with a new hire, but once I try these ideas, I will report back to the list.
Much appreciated.
-Alan
_____
From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord
Sent: Wednesday, July 12, 2006 5:20 PM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] WIN32OLERuntimeError redux - innertext
That confirms that it is a synchronization problem. I think those useless calls are really the moral equivalent of sleep statements.
Probably the cleanest and most reliable solution would be to use this after your call to IE.attach:
require 'watir/waiter'
WATIR::Waiter.wait_until { $ie.some_element_i_know_should_be_there.exists? }
Although this library is packaged with Watir 1.5, it is a separate file (watir/waiter.rb) and can be used with 1.4 if you copy it over manually.
Bret
On 7/12/06, Rand Thacker wrote:
I've even run into problems before where $ie.wait didn't seem to do the trick. Usually it was when the pages where doing a redirect or some other craziness that I hadn't planned on.
My workaround was to go ahead and do the $ie.wait, then I threw in some thing like this:
xUselessVariable = $ie.contains_text('it_would_never_contain_this_phrase')
xUselessVariable = $ie.contains_text('it_would_never_contain_this_phrase_either')
and just ignore the return values... and do your actions/assertions after this.
I've did it twice because once helped, but didn't solve it everytime.
I'm not running into those issues anymore.
I know it's a hack, but it sure worked for me. Hope it helps someone else out there.
On 7/12/06, Bret Pettichord wrote:
Sounds like a synchronization problem. There was a known synchronization problem with IE.attach in 1.4.1. That can be avoided if you call wait after attach. Thus:
$ie=IE.attach(:title,/^Compli:/)
$ie.wait # add this line
$ie.set_fast_speed()
navigateToInbox($ie)
But depending on what is in navigateToInbox, i can't tell if that is the problem here. Can you show the code in navigateToInbox?
And if this change fixes your problem, let us know. I'm wondering if we shouldn't release this fix as 1.4.2.
Bret
_______________________________________________
Wtr-general mailing list
HYPERLINK "mailto:Wtr-general at rubyforge.org" \nWtr-general at rubyforge.org
HYPERLINK "http://rubyforge.org/mailman/listinfo/wtr-general" \nhttp://rubyforge.org/mailman/listinfo/wtr-general
--
"I am the most humble person in the world!"
_______________________________________________
Wtr-general mailing list
HYPERLINK "mailto:Wtr-general at rubyforge.org"Wtr-general at rubyforge.org
HYPERLINK "http://rubyforge.org/mailman/listinfo/wtr-general" \nhttp://rubyforge.org/mailman/listinfo/wtr-general
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/385 - Release Date: 7/11/2006
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/387 - Release Date: 7/12/2006
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060713/a75a6dbd/attachment.html
From ChintakrindiMeghana at managementdynamics.com Thu Jul 13 10:48:05 2006
From: ChintakrindiMeghana at managementdynamics.com (Chintakrindi Meghanath )
Date: Thu, 13 Jul 2006 10:48:05 -0400
Subject: [Wtr-general] Watir Framework?
Message-ID: <6CF3AA425295C7479483AC0018EDF98B01DAE14E@MI8NYCMAIL03.Mi8.com>
Hi Aidy
Thanks for your information.
Does the framework has the feature which I mentioned in my eariler email
like the enduser need not to worry about the ruby/watir, he needs to modify only the data files or
the user needs to modify the script ?
Thanks
Meghanath
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Adrian Rutter
Sent: Thursday, July 13, 2006 6:16 AM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] Watir Framework?
> Are you in the process of developing any framework using the watir ?
> If yes, can you send some information about it ?
With every test case, I write a Test Class
An example:
class ST_LTD_3
def initialize
$log.test_info(self.class, 'Select Depot which has territories and
click search',
'All matching territories are
displayed')
string_to_search = ["DF1", "MA Portfolio"]
start_browser
login
goto_territory_list
search_territory("UNITED KINGDOM", "BRISTOL")
click_search
string_to_search.each {|x|
$log.verify_html(x)
}
rescue => e
p "test failed: #{e.message}"
p e.backtrace
ensure
log_out
close_window
end
end
breakdown
$log.test_info(self.class, 'Select Depot which has territories and click
search',
'All matching territories are
displayed')
This logs the test name, a description of the test and the expected result
to an xml file
start_browser
login
each window or area of funtionality is in a module
module Browser
def
start_browser(url='http://gbahevm06l24.gb.tntpost.com:9081/wps/portal')
$ie = Watir::IE.new
$ie.goto(url)
$ie.maximize()
end
end
module Login
def login(username='g126ahe', password='g126ahe')
$ie.link(:text, 'Log in').click
$ie.text_field(:name, /userid/).set(username)
$ie.text_field(:name, /password/).set(password)
$ie.button(:value,'Log in').click
end
def log_out
$ie.link(:text, 'Log out').click
end
end
this logs a pass or fail to the xml log
$log.verify_html(x)
full xml log file
class Logging
def initialize
@doc = Document.new
xmldecl = XMLDecl.default
@doc.add(xmldecl)
@root = @doc.add_element 'testresults'
end
def verify_html(vp_text) #add optional params
if $ie.contains_text(vp_text)
self.test_results('pass')
else
self.test_results('fail', "#{vp_text} is NOT on the page")
end
#do a not here
end
def test_info(test_name, desc, exp)
@test = @root.add_element 'test'
@test.attributes["id"] = test_name
des= @test.add_element 'description'
des.text = desc
res = @test.add_element 'expected'
res.text = exp
end
def test_results(result, *msg)
if result.upcase == 'PASS' then
test_status= @test.add_element 'teststatus'
test_status.text = 'PASS'
elsif result.upcase == 'FAIL' then
fail = @test.add_element 'teststatus'
fail.text = 'FAIL!'
fail_msg = @test.add_element 'failmessage'
fail_msg.text = msg
elsif result.upcase == 'SKIP'
skip = @test.add_element 'teststatus'
skip.text = 'SKIP'
skip_msg = @test.add_element 'skipmessage'
fail_msg.text = msg
end
end
def write_xml_to_file
@doc.write($stdout, 1)
@doc.write(File.open("C:/test_results.xml","w"))
end
end
the xml output is something like this
- Check that window displayed is correctCorrect image is displayedPASS
- Select to Add an employee in a roleEmployee was assigned to territory successfullyFAIL!security not implemented gonna fail
to read in a csv do something like this
def enter_territory
require 'csv'
reader = CSV.open('C:\test_data', 'r')
header = reader.shift
reader.each{|row| next unless row.any?
p row
}
end
the appmap bit, I am going to steal of Bret's suggestion in a previous post
feedback or suggestions welcome
aidy
---------------------------------------------------------------------------------------------------------------
This message and any attachment are confidential and may be privileged or otherwise protected from disclosure.
If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system.
If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person.
---------------------------------------------------------------------------------------------------------------
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
From bret at pettichord.com Thu Jul 13 10:58:48 2006
From: bret at pettichord.com (Bret Pettichord)
Date: Thu, 13 Jul 2006 09:58:48 -0500
Subject: [Wtr-general] `method_missing': document (WIN32OLERuntimeError)
In-Reply-To: <58a2be440607130657u64a0a7fcg2e341d22948289a1@mail.gmail.com>
References: <58a2be440607130657u64a0a7fcg2e341d22948289a1@mail.gmail.com>
Message-ID:
Can you try using a "click_no_wait" instead of "click" to submit the form
and close the popup window, and tell us whether the error stops happening?
Bret
On 7/13/06, Christian Leskowsky wrote:
>
> Hi guys,
>
> I've found a problem similar to mine that was discussed on the list in May
> (I've borrowed the message header). Does anybody know what happened with it?
> I've hit it again in my testing. Let me explain what's happening...
>
> My environment:
>
> Windows XP SP2
> ruby 1.8.4 (2005-12-24) [i386-mswin32]
> watir-1.5.1.1045
>
> The error:
>
> OLE error code:80004005 in
>
> HRESULT error code:0x80020009
> Exception occurred. from c:/ruby/lib/ruby/gems/1.8/gems/watir-
> 1.5.1.1045/./watir.rb:1640:in `wait'
> from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1045/./watir.rb:2401:in
> `click'
> from b.rb:57
>
> What's happening in the web application:
>
> 1/ A popup window with a form is created and attached to
> 2/ assorted text fields are filled in
> 3/ the form is submitted causing the popup window to close
> 4/ ruby exits with the exception thrown above
>
> Thanks for any help,
>
> --
> -
>
> 'There was an owl lived in an oak.
> The more he heard, the less he spoke.
> The less he spoke, the more he heard.'
>
> Christian Leskowsky
> christian.leskowsky at gmail.com
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060713/7bcc635d/attachment.html
From christian.leskowsky at gmail.com Thu Jul 13 11:14:25 2006
From: christian.leskowsky at gmail.com (Christian Leskowsky)
Date: Thu, 13 Jul 2006 11:14:25 -0400
Subject: [Wtr-general] `method_missing': document (WIN32OLERuntimeError)
In-Reply-To:
References: <58a2be440607130657u64a0a7fcg2e341d22948289a1@mail.gmail.com>
Message-ID: <58a2be440607130814x15ae9358h531e758af81d2d96@mail.gmail.com>
Hey Bret,
Thanks for your quick response!
"click_no_wait" doesn't seem to work either.
On 7/13/06, Bret Pettichord wrote:
>
> Can you try using a "click_no_wait" instead of "click" to submit the form
> and close the popup window, and tell us whether the error stops happening?
>
> Bret
>
> On 7/13/06, Christian Leskowsky wrote:
> Hi guys,
>
> I've found a problem similar to mine that was discussed on the list in May
> (I've borrowed the message header). Does anybody know what happened with it?
> I've hit it again in my testing. Let me explain what's happening...
>
> My environment:
>
> Windows XP SP2
> ruby 1.8.4 (2005-12-24) [i386-mswin32]
> watir-1.5.1.1045
>
> The error:
>
> OLE error code:80004005 in
>
> HRESULT error code:0x80020009
> Exception occurred. from c:/ruby/lib/ruby/gems/1.8/gems/watir-
> 1.5.1.1045/./watir.rb:1640:in `wait'
> from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1045/./watir.rb:2401:in
> `click'
> from b.rb:57
>
> What's happening in the web application:
>
> 1/ A popup window with a form is created and attached to
> 2/ assorted text fields are filled in
> 3/ the form is submitted causing the popup window to close
> 4/ ruby exits with the exception thrown above
>
> Thanks for any help,
>
> --
> -
>
> 'There was an owl lived in an oak.
> The more he heard, the less he spoke.
> The less he spoke, the more he heard.'
>
> Christian Leskowsky
> christian.leskowsky at gmail.com
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
--
-
'There was an owl lived in an oak.
The more he heard, the less he spoke.
The less he spoke, the more he heard.'
Christian Leskowsky
christian.leskowsky at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060713/e06e3fdd/attachment.html
From Adrian.Rutter at tnt.com Thu Jul 13 11:37:16 2006
From: Adrian.Rutter at tnt.com (Adrian Rutter)
Date: Thu, 13 Jul 2006 16:37:16 +0100
Subject: [Wtr-general] Wtr-general Digest, Vol 32, Issue 18
In-Reply-To:
Message-ID:
> Hi Aidy
> Thanks for your information.
> Does the framework has the feature which I mentioned in my eariler email
> like the enduser need not to worry about the ruby/watir, he needs to
modify only the data files or
> the user needs to modify the script ?
> Thanks
> Meghanath
Not keyword driven if that is what you mean. But I don't know if I believe
in that any more. Have a look at WET or converting the CSDDT.
aidy
---------------------------------------------------------------------------------------------------------------
This message and any attachment are confidential and may be privileged or otherwise protected from disclosure.
If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system.
If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person.
---------------------------------------------------------------------------------------------------------------
From ChintakrindiMeghana at managementdynamics.com Thu Jul 13 11:59:49 2006
From: ChintakrindiMeghana at managementdynamics.com (Chintakrindi Meghanath )
Date: Thu, 13 Jul 2006 11:59:49 -0400
Subject: [Wtr-general] Wtr-general Digest, Vol 32, Issue 18
Message-ID: <6CF3AA425295C7479483AC0018EDF98B01DAE14F@MI8NYCMAIL03.Mi8.com>
Hi Aidy
Yes you are right. I am talking about the Keyword driven framework.
So,your framework code needs to be modified /added whenever new functionality is
incorporated in the AUT ?
Thanks
Meghanath
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Adrian Rutter
Sent: Thursday, July 13, 2006 11:37 AM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] Wtr-general Digest, Vol 32, Issue 18
> Hi Aidy
> Thanks for your information.
> Does the framework has the feature which I mentioned in my eariler email
> like the enduser need not to worry about the ruby/watir, he needs to
modify only the data files or
> the user needs to modify the script ?
> Thanks
> Meghanath
Not keyword driven if that is what you mean. But I don't know if I believe
in that any more. Have a look at WET or converting the CSDDT.
aidy
---------------------------------------------------------------------------------------------------------------
This message and any attachment are confidential and may be privileged or otherwise protected from disclosure.
If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system.
If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person.
---------------------------------------------------------------------------------------------------------------
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
From bret at pettichord.com Thu Jul 13 12:27:21 2006
From: bret at pettichord.com (Bret Pettichord)
Date: Thu, 13 Jul 2006 11:27:21 -0500
Subject: [Wtr-general] `method_missing': document (WIN32OLERuntimeError)
In-Reply-To: <58a2be440607130814x15ae9358h531e758af81d2d96@mail.gmail.com>
References: <58a2be440607130657u64a0a7fcg2e341d22948289a1@mail.gmail.com>
<58a2be440607130814x15ae9358h531e758af81d2d96@mail.gmail.com>
Message-ID:
What error message does it give when you use "click_no_wait"
Bret
On 7/13/06, Christian Leskowsky wrote:
>
> Hey Bret,
>
> Thanks for your quick response!
>
> "click_no_wait" doesn't seem to work either.
>
>
>
> On 7/13/06, Bret Pettichord < bret at pettichord.com> wrote:
> >
> > Can you try using a "click_no_wait" instead of "click" to submit the
> > form and close the popup window, and tell us whether the error stops
> > happening?
> >
> > Bret
> >
> > On 7/13/06, Christian Leskowsky < christian.leskowsky at gmail.com> wrote:
> > Hi guys,
> >
> > I've found a problem similar to mine that was discussed on the list in
> > May (I've borrowed the message header). Does anybody know what happened with
> > it? I've hit it again in my testing. Let me explain what's happening...
> >
> > My environment:
> >
> > Windows XP SP2
> > ruby 1.8.4 (2005-12-24) [i386-mswin32]
> > watir-1.5.1.1045
> >
> > The error:
> >
> > OLE error code:80004005 in
> >
> > HRESULT error code:0x80020009
> > Exception occurred. from
> > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1045/./watir.rb:1640:in
> > `wait'
> > from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1045/./watir.rb:2401:in
> > `click'
> > from b.rb:57
> >
> > What's happening in the web application:
> >
> > 1/ A popup window with a form is created and attached to
> > 2/ assorted text fields are filled in
> > 3/ the form is submitted causing the popup window to close
> > 4/ ruby exits with the exception thrown above
> >
> > Thanks for any help,
> >
> > --
> > -
> >
> > 'There was an owl lived in an oak.
> > The more he heard, the less he spoke.
> > The less he spoke, the more he heard.'
> >
> > Christian Leskowsky
> > christian.leskowsky at gmail.com
> >
> > _______________________________________________
> > Wtr-general mailing list
> > Wtr-general at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/wtr-general
> >
> >
> >
> > _______________________________________________
> > Wtr-general mailing list
> > Wtr-general at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/wtr-general
> >
> >
>
>
> --
> -
>
> 'There was an owl lived in an oak.
> The more he heard, the less he spoke.
> The less he spoke, the more he heard.'
>
> Christian Leskowsky
> christian.leskowsky at gmail.com
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060713/2d9e1c21/attachment.html
From bret at pettichord.com Thu Jul 13 12:46:23 2006
From: bret at pettichord.com (Bret Pettichord)
Date: Thu, 13 Jul 2006 11:46:23 -0500
Subject: [Wtr-general] Watir Framework (SAFS)
In-Reply-To:
References:
Message-ID:
Aidy,
Thanks for sharing Carl's thoughts with us.
I should mention that i have a lot of respect for Carl and the SAFS team. I
had detailed meetings with them to learn about open-source projects. It was
only after that meeting that decide to commit to what eventually became
Watir.
Details from that meeting can be found here:
http://www.pettichord.com/awta5.html
Bret
On 7/13/06, Adrian Rutter wrote:
>
>
>
> Carl Nagle wrote around 12 Jul 2006 on the RRAFS list
>
> You seem to be missing part of the appeal behind the purpose of SAFS and
> the original post concerning a WATIR engine. With a WATIR engine we could
> be testing our web content with WATIR as a SAFS engine. We could take a
> test that originally ran with SAFS for Rational Robot (RRAFS) and run it
> with SAFS for WATIR (WAFS?) instead, and vice-versa. We could also use
> both and not have to pick just one tool or the other. And when we have to
> run the same tests on Linux or Unix the tests could still be portable on
> whatever engine we choose to provide there (Selenium, LiveConnect, Common
> DOM, etc.).
>
> The idea is to provide test portability, tool-independence, and a common
> infrastructure for test development, reporting, and execution regardless
> of
> the tools that will be used. As a SAS example, we would still use the
> same
> test development tools (Excel or Test Composer) regardless of whether we
> were using SAFS for Rational Robot (slow) or SAFS for Watir (fast). The
> "test data" would be unified because both engines are SAFS engines, and
> the
> reporting would all stem from the same SAFS assets and services.
>
> Your ideas of what could\should be unified or shared is exactly what SAFS
> attempts to satisfy--a framework on which any and all of these things can
> be attached and shared. Most actually exist already in one form or
> another
> and the mechanisms to add others is present and documented. The issue, of
> course, is largely one of time and resources. You or anyone could help
> implement a Watir engine for SAFS. Then folks wouldn't have to choose
> between writing Watir tests in Ruby or writing portable tests in SAFS.
>
> In any event, thanks for sharing your ideas and furthering this
> discussion!
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060713/9844a90d/attachment.html
From bret at pettichord.com Thu Jul 13 13:08:30 2006
From: bret at pettichord.com (Bret Pettichord)
Date: Thu, 13 Jul 2006 12:08:30 -0500
Subject: [Wtr-general] FireWatir deserves its own project
In-Reply-To: <11c8704e0607120420m77ef53fbmfa83169c919640e7@mail.gmail.com>
References:
<11c8704e0607120420m77ef53fbmfa83169c919640e7@mail.gmail.com>
Message-ID:
On 7/12/06, Dave Hoover wrote:
>
> It's probably too obvious to mention, but since I am the master of all
> things obvious, I will: let's make sure that every driver conforms to
> as much as the Watir API as is reasonable. Ultimately, if we can have
> more than one driver then we should be able to use the same Watir
> scripts regardless of which browser/OS we're on.
It may be that the Watir tests should be packaged as a configurable set of
tests that could be used with any of the Watir-Browser projects. Each test
would be tagged to indicate which browser suites it is included in. This
feature could even be used with Watir/IE -- in that we have some tests that
will work with IE in background mode and others that require it be in the
foreground.
But the bigger issue of ensuring compatability between versions of Watir is
tricky. For example, FireWatir doesn't support frames. Is this reasonable?
Fit has something called FAT which are the tests that a Fit implementation
is expected to meet. I think there may be a 1.0 and 1.1 version of these.
We'd have to do something similar for MultiWatir.
And even then, i suspect that each implementation would have some additional
features that were not part of the standard API. For example, Watir gives
direct access to the ole object, but any tests that make use of these won't
be portable. This suggests that each implementation also should have a
"strict" mode where it only allows execution against the core API or least
creates warnings for all other uses. This way, users (or their managers)
could make sure their tests were portable. Otherwise they wouldn't know
until they tried.
Bret
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060713/2cc5a316/attachment.html
From christian.leskowsky at gmail.com Thu Jul 13 14:09:57 2006
From: christian.leskowsky at gmail.com (Christian Leskowsky)
Date: Thu, 13 Jul 2006 14:09:57 -0400
Subject: [Wtr-general] `method_missing': document (WIN32OLERuntimeError)
In-Reply-To:
References: <58a2be440607130657u64a0a7fcg2e341d22948289a1@mail.gmail.com>
<58a2be440607130814x15ae9358h531e758af81d2d96@mail.gmail.com>
Message-ID: <58a2be440607131109h14640f7emaa576220ff114c2d@mail.gmail.com>
Hmm... well I feel a little silly. It did work. Changed the wrong click in
my script. :-(
Thanks for the help Bret.
On 7/13/06, Bret Pettichord wrote:
>
> What error message does it give when you use "click_no_wait"
>
>
> Bret
>
> On 7/13/06, Christian Leskowsky < christian.leskowsky at gmail.com> wrote:
> >
> > Hey Bret,
> >
> > Thanks for your quick response!
> >
> > "click_no_wait" doesn't seem to work either.
> >
> >
> >
> > On 7/13/06, Bret Pettichord < bret at pettichord.com> wrote:
> > >
> > > Can you try using a "click_no_wait" instead of "click" to submit the
> > > form and close the popup window, and tell us whether the error stops
> > > happening?
> > >
> > > Bret
> > >
> > > On 7/13/06, Christian Leskowsky < christian.leskowsky at gmail.com>
> > > wrote:
> > > Hi guys,
> > >
> > > I've found a problem similar to mine that was discussed on the list in
> > > May (I've borrowed the message header). Does anybody know what happened with
> > > it? I've hit it again in my testing. Let me explain what's happening...
> > >
> > > My environment:
> > >
> > > Windows XP SP2
> > > ruby 1.8.4 (2005-12-24) [i386-mswin32]
> > > watir-1.5.1.1045
> > >
> > > The error:
> > >
> > > OLE error code:80004005 in
> > >
> > > HRESULT error code:0x80020009
> > > Exception occurred. from
> > > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1045/./watir.rb:1640:in
> > > `wait'
> > > from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1045/./watir.rb:2401:in
> > > `click'
> > > from b.rb:57
> > >
> > > What's happening in the web application:
> > >
> > > 1/ A popup window with a form is created and attached to
> > > 2/ assorted text fields are filled in
> > > 3/ the form is submitted causing the popup window to close
> > > 4/ ruby exits with the exception thrown above
> > >
> > > Thanks for any help,
> > >
> > > --
> > > -
> > >
> > > 'There was an owl lived in an oak.
> > > The more he heard, the less he spoke.
> > > The less he spoke, the more he heard.'
> > >
> > > Christian Leskowsky
> > > christian.leskowsky at gmail.com
> > >
> > > _______________________________________________
> > > Wtr-general mailing list
> > > Wtr-general at rubyforge.org
> > > http://rubyforge.org/mailman/listinfo/wtr-general
> > >
> > >
> > >
> > > _______________________________________________
> > > Wtr-general mailing list
> > > Wtr-general at rubyforge.org
> > > http://rubyforge.org/mailman/listinfo/wtr-general
> > >
> > >
> >
> >
> > --
> > -
> >
> > 'There was an owl lived in an oak.
> > The more he heard, the less he spoke.
> > The less he spoke, the more he heard.'
> >
> > Christian Leskowsky
> > christian.leskowsky at gmail.com
> >
> > _______________________________________________
> > Wtr-general mailing list
> > Wtr-general at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/wtr-general
> >
> >
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
--
-
'There was an owl lived in an oak.
The more he heard, the less he spoke.
The less he spoke, the more he heard.'
Christian Leskowsky
christian.leskowsky at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060713/7ccf2f2b/attachment.html
From dave.hoover at gmail.com Thu Jul 13 15:03:07 2006
From: dave.hoover at gmail.com (Dave Hoover)
Date: Thu, 13 Jul 2006 14:03:07 -0500
Subject: [Wtr-general] FireWatir deserves its own project
In-Reply-To:
References:
<11c8704e0607120420m77ef53fbmfa83169c919640e7@mail.gmail.com>
Message-ID: <11c8704e0607131203k42f34f79r5124594f6871c16@mail.gmail.com>
> But the bigger issue of ensuring compatability between versions of Watir is
> tricky. For example, FireWatir doesn't support frames. Is this reasonable?
I suppose that is up to whatever minimum standard is used to determine
whether an API is sufficiently compatible or not. I like the idea of
having a test suite that determines whether the API has met the
standard ... and I suggest the suite be named Poseidon (god of
wat[i]r).
> And even then, i suspect that each implementation would have some additional
> features that were not part of the standard API.
No doubt. For example, SafariWatir has close and quit methods. One
closes the window, while the other quits the application. Another
example: SafariWatir has an alert method that returns an AlertWindow
that has a click method. :-)
> This suggests that each implementation also should have a
> "strict" mode where it only allows execution against the core API or least
> creates warnings for all other uses. This way, users (or their managers)
> could make sure their tests were portable. Otherwise they wouldn't know
> until they tried.
Great idea.
From bret at pettichord.com Thu Jul 13 16:16:13 2006
From: bret at pettichord.com (Bret Pettichord)
Date: Thu, 13 Jul 2006 15:16:13 -0500
Subject: [Wtr-general] FireWatir deserves its own project
In-Reply-To: <11c8704e0607131203k42f34f79r5124594f6871c16@mail.gmail.com>
References:
<11c8704e0607120420m77ef53fbmfa83169c919640e7@mail.gmail.com>
<11c8704e0607131203k42f34f79r5124594f6871c16@mail.gmail.com>
Message-ID:
On 7/13/06, Dave Hoover wrote:
>
> > And even then, i suspect that each implementation would have some
> additional
> > features that were not part of the standard API.
>
> No doubt. For example, SafariWatir has close and quit methods. One
> closes the window, while the other quits the application. Another
> example: SafariWatir has an alert method that returns an AlertWindow
> that has a click method. :-)
I put together a half-baked implementation of this in watir/ie in trunk
(watir/dialog.rb, watir/unittests/dialog_test.rb).
I called my method "dialog" instead of "alert". I guess this is a good
question for the community -- what should this method be called? I don't
think anyone is using this method and i have no emotional attachment.
With mine this is how you click an alert button:
ie.dialog.button("OK").click
Comments?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060713/610a0301/attachment.html
From dave.hoover at gmail.com Thu Jul 13 16:30:34 2006
From: dave.hoover at gmail.com (Dave Hoover)
Date: Thu, 13 Jul 2006 15:30:34 -0500
Subject: [Wtr-general] FireWatir deserves its own project
In-Reply-To:
References:
<11c8704e0607120420m77ef53fbmfa83169c919640e7@mail.gmail.com>
<11c8704e0607131203k42f34f79r5124594f6871c16@mail.gmail.com>
Message-ID: <11c8704e0607131330g1b378574t95665d6f38f9bf34@mail.gmail.com>
On 7/13/06, Bret Pettichord wrote:
> With mine this is how you click an alert button:
>
> ie.dialog.button("OK").click
For clarification, this is how you click an alert button with SafariWatir:
browser.alert.click
It doesn't take a parameter since alert boxes only have one button.
There would be a separate method for confirm boxes:
browser.confirm("OK").click
browser.confirm("Cancel").click
Like Bret, I have no emotional attachment. Just looking to fit in
with the rest of the API.
From manishs at reconnex.net Fri Jul 14 03:31:26 2006
From: manishs at reconnex.net (Manish Sapariya)
Date: Fri, 14 Jul 2006 13:01:26 +0530
Subject: [Wtr-general] why win32ole needed to be patched or modified
In-Reply-To:
References: <44AE86DE.1050209@reconnex.net>
Message-ID: <44B7484E.6070307@reconnex.net>
Hi Bret,
I was trying to understand in general how Ruby provides access to
win32ole library.
If I want to drive my custom application, do I need to patch win32ole
binding in
such a way.
I think I will have to do my homework better about ole and ruby ole binding.
I didnt understand the need for patch quite exactly, but more
understanding of ruby
ole binding will make picture clear.
Thanks anyways.
Regards,
Manish
Bret Pettichord wrote:
> On 7/7/06, *Manish Sapariya* > wrote:
>
> Hi,
> Bret mentioned in one of the posts that in order for watir to be
> working,
> win32ole ruby bindings needed to be patched.
>
> I was wondering for what kind of patch this was?
> If I want my own app to be driven using ole, what kind of patch I
> might
> require to add?
>
> I would appreciate pointers to the right forum if this is not the one.
> Thanks and Regards,
> Manish
>
>
> I'm not quite sure what the basis for your question is. So i'll say
> some things and i hope you will find them useful. If not, please
> provide more details about what you are looking for.
>
> Please don't take this personally, but since it seems like this is not
> clear to everyone on the list, i feel like i need to say that you
> should not feel insulted by my response and if you do, it would be
> better to say so than respond rudely yourself.
>
> Now for your question.
>
> The WIN32OLE patch was needed for our support for modal dialogs --
> which are an IE-only feature. Specifically, we wrote a DLL that
> returned a reference to the DOM in the modal dialog. We needed a way
> to "cast" this into a WIN32OLE object. We patched the WIN32OLE library
> to provide this "casting" ability. The WIN32OLE patch is included in
> the Watir source so you can look at it yourself, if that helps.
>
> Does this help?
>
> Bret
> ------------------------------------------------------------------------
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
From Adrian.Rutter at tnt.com Fri Jul 14 10:34:30 2006
From: Adrian.Rutter at tnt.com (Adrian Rutter)
Date: Fri, 14 Jul 2006 15:34:30 +0100
Subject: [Wtr-general] UI Mapping Revisited
Message-ID:
Instead of having a class map
i.e.
class ObjectMap
def login_link;$ie.link(:text, 'Log in');end
def logout_link;$ie.link(:text, 'Log out');end
end
Then
map = ObjectMap.new
map.login_link.click
map.logout_link.click
why not put the app map in a module
so in the script we could just go
login_link.click
logout_link.click ?
Cheers
aidy
---------------------------------------------------------------------------------------------------------------
This message and any attachment are confidential and may be privileged or otherwise protected from disclosure.
If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system.
If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person.
---------------------------------------------------------------------------------------------------------------
From bret at pettichord.com Fri Jul 14 12:17:02 2006
From: bret at pettichord.com (Bret Pettichord)
Date: Fri, 14 Jul 2006 11:17:02 -0500
Subject: [Wtr-general] UI Mapping Revisited
In-Reply-To:
References:
Message-ID:
The purpose of classes and objects (which are created from classes) is to
encapsulate data. In your example, you are on encapsulating data, so you
correct in saying that a module is as good as a class.
This gives you the encapsulation:
class ObjectMap
def new ie; @ie = ie; end
def login_link;$ie.link(:text, 'Log in');end
def logout_link;$ie.link(:text, 'Log out');end
end
Then
map = ObjectMap.new $ie
map.login_link.click
map.logout_link.click
And if you want a cleaner syntax you can do...
ObjectMap.new($ie).instance_eval do
login_link.click
logout_link.click
end
Bret
On 7/14/06, Adrian Rutter wrote:
>
>
> Instead of having a class map
>
> i.e.
>
> class ObjectMap
> def login_link;$ie.link(:text, 'Log in');end
> def logout_link;$ie.link(:text, 'Log out');end
> end
>
> Then
>
> map = ObjectMap.new
> map.login_link.click
> map.logout_link.click
>
> why not put the app map in a module
>
> so in the script we could just go
>
> login_link.click
> logout_link.click ?
>
> Cheers
>
> aidy
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060714/8c1e323f/attachment.html
From bret at pettichord.com Fri Jul 14 13:05:28 2006
From: bret at pettichord.com (Bret Pettichord)
Date: Fri, 14 Jul 2006 12:05:28 -0500
Subject: [Wtr-general] on vacation
Message-ID:
I will be on vacation and offline next week.
The list mostly takes care of itself, but once or twice a week a post comes
in that requires approval. the list automatically screens any post that is
over 40 KB. These are either long threads, that haven't been cropped, or
posts that include HTML attachments (normally a good thing). I almost always
approve them, but like the fact that these require manual intervention,
because it probably makes people think twice about long posts in the future.
Would anyone be interested in helping to moderate the list? Paul Rogers is
also set up as a moderator, but I know he sometimes has trouble directly
accessing the list.
Speak up today, before I'm gone. Contact me directly (not the list).
Bret
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060714/bf265dae/attachment.html
From paul.rogers at shaw.ca Sun Jul 16 23:49:56 2006
From: paul.rogers at shaw.ca (Paul Rogers)
Date: Sun, 16 Jul 2006 21:49:56 -0600
Subject: [Wtr-general] on vacation
References:
Message-ID: <00ee01c6a954$11882580$6400a8c0@laptop>
ok, I can watch out for any problems.
Paul
----- Original Message -----
From: Bret Pettichord
To: wtr-general at rubyforge.org
Sent: Friday, July 14, 2006 11:05 AM
Subject: [Wtr-general] on vacation
I will be on vacation and offline next week.
The list mostly takes care of itself, but once or twice a week a post comes in that requires approval. the list automatically screens any post that is over 40 KB. These are either long threads, that haven't been cropped, or posts that include HTML attachments (normally a good thing). I almost always approve them, but like the fact that these require manual intervention, because it probably makes people think twice about long posts in the future.
Would anyone be interested in helping to moderate the list? Paul Rogers is also set up as a moderator, but I know he sometimes has trouble directly accessing the list.
Speak up today, before I'm gone. Contact me directly (not the list).
Bret
------------------------------------------------------------------------------
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060716/6e8f3a4b/attachment.html
From jatinder.saundh at gmail.com Mon Jul 17 09:34:03 2006
From: jatinder.saundh at gmail.com (Jatinder Singh)
Date: Mon, 17 Jul 2006 19:04:03 +0530
Subject: [Wtr-general] Including Features of Universally used commercial
test automation tools.
Message-ID: <6368279b0607170634o341e4997tdf3c084d473f9f18@mail.gmail.com>
Hi,
I have spent around 2+ years working with Test Automation tools,
specifically Rational Robot, Rational XDE Tester(now known as RFT).
I was looking through the features of WATIR tool and found it lacking some
good features of commercial tool(may be I overlooked them).
May be I found following missing,
1. objects maps(so that there is centralized repositry of object
definations)
2. Verification points.
3. Inbuilt Logging mechanisms.(this feature many projects ignore, but I
believe this is the most important feature as logs are what finally to be
seen)
4. Managing Tests.
5. Inbuilt keyword driven testing(a DSL to let test writers write tests
without writing ruby code)
6. Recording tool. (I am not sure if it really does not exist in WATIR
world)
Apart from above there are some pain areas with various automation tools.
such things should not be repeated in WATIR.
>From my past expereince, I have few suggestions and I would be glad to share
and contribute to WATIR project.
Please let me know the process/procedure for contributing to WATIR project.
Regards,
Jatinder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060717/ccdd5633/attachment.html
From Adrian.Rutter at tnt.com Mon Jul 17 11:11:44 2006
From: Adrian.Rutter at tnt.com (Adrian Rutter)
Date: Mon, 17 Jul 2006 16:11:44 +0100
Subject: [Wtr-general] svn download
Message-ID:
Hi Charly,
I am working off ruby 184.17. I have un-installed the one-click installer
and locally gem installed the new watir build to C:\Program Files\Watir.
However the new build (or the way I am setting it up) freezes my i.e. Is
everyone using ruby 182? Has anyone experienced this problem? The only
thing I really need the latest watir build for is the multiple param object
hook.
aidy
---------------------------------------------------------------------------------------------------------------
This message and any attachment are confidential and may be privileged or otherwise protected from disclosure.
If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system.
If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person.
---------------------------------------------------------------------------------------------------------------
From charley.baker at gmail.com Mon Jul 17 11:22:30 2006
From: charley.baker at gmail.com (Charley Baker)
Date: Mon, 17 Jul 2006 09:22:30 -0600
Subject: [Wtr-general] Including Features of Universally used commercial
test automation tools.
In-Reply-To: <6368279b0607170634o341e4997tdf3c084d473f9f18@mail.gmail.com>
References: <6368279b0607170634o341e4997tdf3c084d473f9f18@mail.gmail.com>
Message-ID:
Hi Jatinder,
One of the best ways to contribute is to follow the mailing list and
post. I've answered some of your points below:
On 7/17/06, Jatinder Singh wrote:
>
> Hi,
>
> I have spent around 2+ years working with Test Automation tools,
> specifically Rational Robot, Rational XDE Tester(now known as RFT).
> I was looking through the features of WATIR tool and found it lacking some
> good features of commercial tool(may be I overlooked them).
> May be I found following missing,
> 1. objects maps(so that there is centralized repositry of object
> definations)
>
Object maps are easy to create in Ruby, you might look at a previous thread
in the last few days on UI Mapping:
http://www.mail-archive.com/wtr-general%40rubyforge.org/msg04233.html
2. Verification points.
>
Take a look at the Watir user guide which lists one way of doing this
through Test Unit Assertions: http://wtr.rubyforge.org/watir_user_guide.html
3. Inbuilt Logging mechanisms.(this feature many projects ignore, but I
> believe this is the most important feature as logs are what finally to be
> seen)
>
Watir has a logger built into it which has a default logger subclass that
writes to STDERR. You can use ie.log(message) if you want to use the default
logger, you can override with your own logger by using the ruby standard
logging library:
http://www.ruby-doc.org/stdlib/libdoc/logger/rdoc/index.html
4. Managing Tests.
>
There are several ways to do this, see below for a link to WET.
5. Inbuilt keyword driven testing(a DSL to let test writers write tests
> without writing ruby code)
>
Several people have done this, again see below for a link to WET or take a
look at Systir which is a basic framework to accomplish this.
http://atomicobject.com/systir.page
6. Recording tool. (I am not sure if it really does not exist in WATIR
> world)
>
Recording tools are of dubious use, you can search the mailing list for some
discussion about automation recording tools. There are a couple of recording
tools that were made for Watir, most of us find them to be unnecessary in
general.
Apart from above there are some pain areas with various automation tools.
> such things should not be repeated in WATIR.
>
Watir is designed to be a base automation library able to be used by a
framework. With Ruby as it's scripting language, it is designed to be as
extensible as you'd like it to be. If you're looking for an example of an
already built framework around Watir, you might want to take a look at WET
which has many of the points you've listed above:
http://www.openqa.org/wet/
Suggestions, questions and feedback are of course always welcome. I hope
that helps.
-Charley
>From my past expereince, I have few suggestions and I would be glad to share
> and contribute to WATIR project.
>
> Please let me know the process/procedure for contributing to WATIR
> project.
>
> Regards,
> Jatinder
>
>
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060717/655f245c/attachment.html
From jatinder.saundh at gmail.com Mon Jul 17 11:29:08 2006
From: jatinder.saundh at gmail.com (Jatinder Singh)
Date: Mon, 17 Jul 2006 20:59:08 +0530
Subject: [Wtr-general] Including Features of Universally used commercial
test automation tools.
In-Reply-To:
References: <6368279b0607170634o341e4997tdf3c084d473f9f18@mail.gmail.com>
Message-ID: <6368279b0607170829j796a9923sadfadb50aff7d1c6@mail.gmail.com>
Charley, Thanks for the summary!
I will go through the pointers you have given and reply back with
suggestions if I have any.
Regards,
Jatinder
On 7/17/06, Charley Baker wrote:
>
> Hi Jatinder,
>
> One of the best ways to contribute is to follow the mailing list and
> post. I've answered some of your points below:
>
> On 7/17/06, Jatinder Singh wrote:
> >
> > Hi,
> >
> > I have spent around 2+ years working with Test Automation tools,
> > specifically Rational Robot, Rational XDE Tester(now known as RFT).
> > I was looking through the features of WATIR tool and found it lacking
> > some good features of commercial tool(may be I overlooked them).
> > May be I found following missing,
> > 1. objects maps(so that there is centralized repositry of object
> > definations)
> >
>
> Object maps are easy to create in Ruby, you might look at a previous
> thread in the last few days on UI Mapping:
> http://www.mail-archive.com/wtr-general%40rubyforge.org/msg04233.html
>
> 2. Verification points.
> >
>
> Take a look at the Watir user guide which lists one way of doing this
> through Test Unit Assertions: http://wtr.rubyforge.org/watir_user_guide.html
>
>
> 3. Inbuilt Logging mechanisms.(this feature many projects ignore, but I
> > believe this is the most important feature as logs are what finally to be
> > seen)
> >
>
> Watir has a logger built into it which has a default logger subclass that
> writes to STDERR. You can use ie.log(message) if you want to use the
> default logger, you can override with your own logger by using the ruby
> standard logging library:
> http://www.ruby-doc.org/stdlib/libdoc/logger/rdoc/index.html
>
> 4. Managing Tests.
> >
>
> There are several ways to do this, see below for a link to WET.
>
> 5. Inbuilt keyword driven testing(a DSL to let test writers write tests
> > without writing ruby code)
> >
>
> Several people have done this, again see below for a link to WET or take
> a look at Systir which is a basic framework to accomplish this.
> http://atomicobject.com/systir.page
>
> 6. Recording tool. (I am not sure if it really does not exist in WATIR
> > world)
> >
> Recording tools are of dubious use, you can search the mailing list for
> some discussion about automation recording tools. There are a couple of
> recording tools that were made for Watir, most of us find them to be
> unnecessary in general.
>
>
> Apart from above there are some pain areas with various automation tools.
> > such things should not be repeated in WATIR.
> >
>
>
> Watir is designed to be a base automation library able to be used by a
> framework. With Ruby as it's scripting language, it is designed to be as
> extensible as you'd like it to be. If you're looking for an example of an
> already built framework around Watir, you might want to take a look at WET
> which has many of the points you've listed above:
> http://www.openqa.org/wet/
>
> Suggestions, questions and feedback are of course always welcome. I hope
> that helps.
>
> -Charley
>
> From my past expereince, I have few suggestions and I would be glad to
> share and contribute to WATIR project.
>
> Please let me know the process/procedure for contributing to WATIR
> project.
>
> Regards,
> Jatinder
>
>
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060717/03ed2e48/attachment.html
From ChintakrindiMeghana at managementdynamics.com Mon Jul 17 11:33:21 2006
From: ChintakrindiMeghana at managementdynamics.com (Chintakrindi Meghanath )
Date: Mon, 17 Jul 2006 11:33:21 -0400
Subject: [Wtr-general] Watir Framework
Message-ID: <6CF3AA425295C7479483AC0018EDF98B01DAE159@MI8NYCMAIL03.Mi8.com>
Hi Aidy
Is your framework is available as open source or its only for the internal purpose ?
Thanks
Meghanath
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Adrian Rutter
Sent: Thursday, July 13, 2006 6:16 AM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] Watir Framework?
> Are you in the process of developing any framework using the watir ?
> If yes, can you send some information about it ?
With every test case, I write a Test Class
An example:
class ST_LTD_3
def initialize
$log.test_info(self.class, 'Select Depot which has territories and
click search',
'All matching territories are
displayed')
string_to_search = ["DF1", "MA Portfolio"]
start_browser
login
goto_territory_list
search_territory("UNITED KINGDOM", "BRISTOL")
click_search
string_to_search.each {|x|
$log.verify_html(x)
}
rescue => e
p "test failed: #{e.message}"
p e.backtrace
ensure
log_out
close_window
end
end
breakdown
$log.test_info(self.class, 'Select Depot which has territories and click
search',
'All matching territories are
displayed')
This logs the test name, a description of the test and the expected result
to an xml file
start_browser
login
each window or area of funtionality is in a module
module Browser
def
start_browser(url='http://gbahevm06l24.gb.tntpost.com:9081/wps/portal')
$ie = Watir::IE.new
$ie.goto(url)
$ie.maximize()
end
end
module Login
def login(username='g126ahe', password='g126ahe')
$ie.link(:text, 'Log in').click
$ie.text_field(:name, /userid/).set(username)
$ie.text_field(:name, /password/).set(password)
$ie.button(:value,'Log in').click
end
def log_out
$ie.link(:text, 'Log out').click
end
end
this logs a pass or fail to the xml log
$log.verify_html(x)
full xml log file
class Logging
def initialize
@doc = Document.new
xmldecl = XMLDecl.default
@doc.add(xmldecl)
@root = @doc.add_element 'testresults'
end
def verify_html(vp_text) #add optional params
if $ie.contains_text(vp_text)
self.test_results('pass')
else
self.test_results('fail', "#{vp_text} is NOT on the page")
end
#do a not here
end
def test_info(test_name, desc, exp)
@test = @root.add_element 'test'
@test.attributes["id"] = test_name
des= @test.add_element 'description'
des.text = desc
res = @test.add_element 'expected'
res.text = exp
end
def test_results(result, *msg)
if result.upcase == 'PASS' then
test_status= @test.add_element 'teststatus'
test_status.text = 'PASS'
elsif result.upcase == 'FAIL' then
fail = @test.add_element 'teststatus'
fail.text = 'FAIL!'
fail_msg = @test.add_element 'failmessage'
fail_msg.text = msg
elsif result.upcase == 'SKIP'
skip = @test.add_element 'teststatus'
skip.text = 'SKIP'
skip_msg = @test.add_element 'skipmessage'
fail_msg.text = msg
end
end
def write_xml_to_file
@doc.write($stdout, 1)
@doc.write(File.open("C:/test_results.xml","w"))
end
end
the xml output is something like this
- Check that window displayed is correctCorrect image is displayedPASS
- Select to Add an employee in a roleEmployee was assigned to territory successfullyFAIL!security not implemented gonna fail
to read in a csv do something like this
def enter_territory
require 'csv'
reader = CSV.open('C:\test_data', 'r')
header = reader.shift
reader.each{|row| next unless row.any?
p row
}
end
the appmap bit, I am going to steal of Bret's suggestion in a previous post
feedback or suggestions welcome
aidy
---------------------------------------------------------------------------------------------------------------
This message and any attachment are confidential and may be privileged or otherwise protected from disclosure.
If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system.
If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person.
---------------------------------------------------------------------------------------------------------------
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
From charley.baker at gmail.com Mon Jul 17 11:35:19 2006
From: charley.baker at gmail.com (Charley Baker)
Date: Mon, 17 Jul 2006 09:35:19 -0600
Subject: [Wtr-general] svn download
In-Reply-To:
References:
Message-ID:
Hey Aidy,
I've been working off of 182, but just moved to 184 last week and
everything's working fine. The gem install should install it to your local
ruby gems directory, I'm not sure what you mean when you say you installed
it to c:\program files\watir, you shouldn't have anything there. You might
want to double check the installed versions by running the Ruby and Watir
version steps in the FAQ. Make sure any previous watir files are cleaned out
from your ruby directory, site_install. Let me know what you find.
-Charley
On 7/17/06, Adrian Rutter wrote:
>
>
> Hi Charly,
>
> I am working off ruby 184.17. I have un-installed the one-click installer
> and locally gem installed the new watir build to C:\Program Files\Watir.
> However the new build (or the way I am setting it up) freezes my i.e. Is
> everyone using ruby 182? Has anyone experienced this problem? The only
> thing I really need the latest watir build for is the multiple param
> object
> hook.
>
> aidy
>
>
>
>
> ---------------------------------------------------------------------------------------------------------------
> This message and any attachment are confidential and may be privileged or
> otherwise protected from disclosure.
> If you are not the intended recipient, please telephone or email the
> sender and delete this message and any attachment from your system.
> If you are not the intended recipient you must not copy this message or
> attachment or disclose the contents to any other person.
>
> ---------------------------------------------------------------------------------------------------------------
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060717/b8d3a600/attachment.html
From M.Muralidhar at ps.net Mon Jul 17 12:34:53 2006
From: M.Muralidhar at ps.net (Muralidhar, M)
Date: Mon, 17 Jul 2006 22:04:53 +0530
Subject: [Wtr-general] Welcome to the "Wtr-general" mailing list (Digest
mode)
Message-ID: <2B2F52B02BA81643B599BB9E561407496D7CF0@pscbanpexch01.perotsystems.net>
Hi,
I want to know if WATIR can be integrated with a defect tracking and a
requirement management tool? If so, please specify to which tools WATIR
can be integrated to.
Regards,
Murali
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of
wtr-general-request at rubyforge.org
Sent: Monday, July 17, 2006 10:03 PM
To: Muralidhar, M
Subject: Welcome to the "Wtr-general" mailing list (Digest mode)
Welcome to the Wtr-general at rubyforge.org mailing list! Howdy - welcome
to the Web Testing with Ruby general mailing list.
To post to this list, send your email to:
wtr-general at rubyforge.org
General information about the mailing list is at:
http://rubyforge.org/mailman/listinfo/wtr-general
If you ever want to unsubscribe or change your options (eg, switch to
or from digest mode, change your password, etc.), visit your
subscription page at:
http://rubyforge.org/mailman/options/wtr-general/m.muralidhar%40ps.net
You can also make such adjustments via email by sending a message to:
Wtr-general-request at rubyforge.org
with the word `help' in the subject or body (don't include the
quotes), and you will get back a message with instructions.
You must know your password to change your options (including changing
the password, itself) or to unsubscribe. It is:
$Murali99
Normally, Mailman will remind you of your rubyforge.org mailing list
passwords once every month, although you can disable this if you
prefer. This reminder will also include instructions on how to
unsubscribe or change your account options. There is also a button on
your options page that will email your current password to you.
From arkie at compli.com Mon Jul 17 13:19:05 2006
From: arkie at compli.com (Alan Ark)
Date: Mon, 17 Jul 2006 12:19:05 -0500
Subject: [Wtr-general] Welcome to the "Wtr-general" mailing list
(Digestmode)
In-Reply-To: <2B2F52B02BA81643B599BB9E561407496D7CF0@pscbanpexch01.perotsystems.net>
Message-ID: <7F2DAB1053EC4D47B821DA0A7BA5E3EBC5F8A5@mail-21ps.atlarge.net>
I am not aware of any out of the box integration with any defect tracking/ RM tools, but that is not to say that it can't be done.
Since Watir is written in ruby, and you can pretty much do anything you want to in Ruby, it probably can be done. But it will probably require some investment on your part to make it work.
-----Original Message-----
From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Muralidhar, M
Sent: Monday, July 17, 2006 9:35 AM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] Welcome to the "Wtr-general" mailing list (Digestmode)
Hi,
I want to know if WATIR can be integrated with a defect tracking and a
requirement management tool? If so, please specify to which tools WATIR
can be integrated to.
Regards,
Murali
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of
wtr-general-request at rubyforge.org
Sent: Monday, July 17, 2006 10:03 PM
To: Muralidhar, M
Subject: Welcome to the "Wtr-general" mailing list (Digest mode)
Welcome to the Wtr-general at rubyforge.org mailing list! Howdy - welcome
to the Web Testing with Ruby general mailing list.
To post to this list, send your email to:
wtr-general at rubyforge.org
General information about the mailing list is at:
http://rubyforge.org/mailman/listinfo/wtr-general
If you ever want to unsubscribe or change your options (eg, switch to
or from digest mode, change your password, etc.), visit your
subscription page at:
http://rubyforge.org/mailman/options/wtr-general/m.muralidhar%40ps.net
You can also make such adjustments via email by sending a message to:
Wtr-general-request at rubyforge.org
with the word `help' in the subject or body (don't include the
quotes), and you will get back a message with instructions.
You must know your password to change your options (including changing
the password, itself) or to unsubscribe. It is:
$Murali99
Normally, Mailman will remind you of your rubyforge.org mailing list
passwords once every month, although you can disable this if you
prefer. This reminder will also include instructions on how to
unsubscribe or change your account options. There is also a button on
your options page that will email your current password to you.
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.1/389 - Release Date: 7/14/2006
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.1/389 - Release Date: 7/14/2006
From ben_simo at standardandpoors.com Mon Jul 17 18:44:37 2006
From: ben_simo at standardandpoors.com (Simo, Ben)
Date: Mon, 17 Jul 2006 16:44:37 -0600
Subject: [Wtr-general] Install problem?
Message-ID:
Hello,
I have just installed Ruby and WATIR on a Windows XP box.
When I try to run the unit tests, I get an error stating that "gem_original_require" is missing.
C:\watir\unittests>all_tests.rb
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- watir (LoadError)
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from C:/watir/unittests/../unittests/setup.rb:4
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from C:/watir/unittests/all_tests.rb:4
I'm not sure if it matters: when I installed WATIR from the .exe package, I got errors about not being able to write to c:\watir until I manually created the directory. I manually created the c:\watir directory and then installed to it.
Any ideas why I can't run the all_tests.rb script?
Thank you,
Ben Simo
--------------------------------------------------------
The information contained in this message is intended only for the recipient, and may be a confidential attorney-client communication or may otherwise be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, please be aware that any dissemination or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the message and deleting it from your computer.
--------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060717/6d692f78/attachment.html
From kperez at cardinalsolutions.com Mon Jul 17 15:47:12 2006
From: kperez at cardinalsolutions.com (Ken Perez)
Date: Mon, 17 Jul 2006 15:47:12 -0400
Subject: [Wtr-general] Attaching a Popup
Message-ID: <67A1E8E424B41744A599459FE59EA4D40C5EC4@csgcinml01.cardinalsolutions.com>
The app that I am working with has a lot of popups with important functionality on them. I have been unsuccessful in getting Watir to see these new windows, and I cant figure out why. The window Im looking at now appears after a button click:
ie.button(:name, "addItem").click
and Ive tried all these variations to get it to work:
ie2 = Watir::IE.attach(:title, "Project - Administration -- Web Page Dialog")
ie2 = Watir::IE.attach(:title, "Project - Administration")
ie2 = Watir::IE.attach(:title, /Project/)
ie2 = Watir::IE.attach(:title, /project/)
ie2 = Watir::IE.attach(:url, "website list at the bottom of the new window")
ie2 = Watir::IE.attach(:url, "website found in the properties of the button")
ie2 = Watir::IE.attach(:url, /Project/)
ie2 = Watir::IE.attach(:url, /project/)
plus a few others, followed by
ie2.button(:value, "Cancel").click
to see if it worked.
It either gives me 'Unable to locate a window with X' (#'s 5 & 6) or it does nothing (most of the rest of them). When it gets to the window, it just sits and waits, and when I click Cancel it stops the run, and exits with no errors. So its not finding the window, but not giving me any errors.
I use Starclicker to deal with 'Are you sure Y/N' popups, but I have to actually edit things in these popups. Is there another way to attach a window, or use functionality on it?
From vikashkumar051 at yahoo.co.in Tue Jul 18 07:05:31 2006
From: vikashkumar051 at yahoo.co.in (VIKASH KUMAR)
Date: Tue, 18 Jul 2006 12:05:31 +0100 (BST)
Subject: [Wtr-general] Getting problem in calling click event where various
buttons have the same name
Message-ID: <20060718110531.18277.qmail@web7813.mail.in.yahoo.com>
Sir,
In my web page there are lots of buttons having same name, they are called using _javascript. They are as follows:
I am unable to call the click event using ie.button(:name,'delete').click as because all the buttons have same name.
Please send me the solution for this.
Thanks in Advance
With Regards
Vikash Kumar
---------------------------------
Find out what India is talking about on Yahoo! Answers India.
Send FREE SMS from New Yahoo! Messenger to Mobile: Download NOW!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060718/50faf289/attachment.html
From Mark_Cain at RL.gov Tue Jul 18 10:08:47 2006
From: Mark_Cain at RL.gov (Cain, Mark)
Date: Tue, 18 Jul 2006 07:08:47 -0700
Subject: [Wtr-general] Attaching a Popup
In-Reply-To: <67A1E8E424B41744A599459FE59EA4D40C5EC4@csgcinml01.cardinalsolutions.com>
Message-ID:
What you are trying to do can't be done with the version of Watir.rb you
are using because the page you are trying to attach to is a Modal
window. Try this one at:
https://svn.openqa.org/svn/watir/branches/modal_dialog/watir/ (you will
also need the files from the Watir folder--the IEDialog and Win32ole
forders.)
Copy the Watir.rb file (and the watir directory mentioned above) into
you ruby installation directory like:
C:\ruby\lib\ruby\site_ruby\1.8
ie2 = $ie.attach_modal('Project - Administration')
ie2.button(:value, "Cancel").click
--Mark
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Ken Perez
Sent: Monday, July 17, 2006 12:47 PM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] Attaching a Popup
The app that I am working with has a lot of popups with important
functionality on them. I have been unsuccessful in getting Watir to see
these new windows, and I cant figure out why. The window Im looking at
now appears after a button click:
ie.button(:name, "addItem").click
and Ive tried all these variations to get it to work:
ie2 = Watir::IE.attach(:title, "Project - Administration -- Web Page
Dialog")
ie2 = Watir::IE.attach(:title, "Project - Administration")
ie2 = Watir::IE.attach(:title, /Project/)
ie2 = Watir::IE.attach(:title, /project/)
ie2 = Watir::IE.attach(:url, "website list at the bottom of the new
window")
ie2 = Watir::IE.attach(:url, "website found in the properties of the
button")
ie2 = Watir::IE.attach(:url, /Project/)
ie2 = Watir::IE.attach(:url, /project/)
plus a few others, followed by
ie2.button(:value, "Cancel").click
to see if it worked.
It either gives me 'Unable to locate a window with X' (#'s 5 & 6) or it
does nothing (most of the rest of them). When it gets to the window, it
just sits and waits, and when I click Cancel it stops the run, and exits
with no errors. So its not finding the window, but not giving me any
errors.
I use Starclicker to deal with 'Are you sure Y/N' popups, but I have to
actually edit things in these popups. Is there another way to attach a
window, or use functionality on it?
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
From Mark_Cain at RL.gov Tue Jul 18 10:13:12 2006
From: Mark_Cain at RL.gov (Cain, Mark)
Date: Tue, 18 Jul 2006 07:13:12 -0700
Subject: [Wtr-general] Getting problem in calling click event where
variousbuttons have the same name
In-Reply-To: <20060718110531.18277.qmail@web7813.mail.in.yahoo.com>
Message-ID:
Starting at the topmost delete button, count them until you get to the
desired button.
$ie.button(:index,3).click -- would click the third from the top delete
button on the page.
--Mark
________________________________
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of VIKASH KUMAR
Sent: Tuesday, July 18, 2006 4:06 AM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] Getting problem in calling click event where
variousbuttons have the same name
Sir,
In my web page there are lots of buttons having same name, they are
called using _javascript. They are as follows:
I am unable to call the click event using
ie.button(:name,'delete').click as because all the buttons have same
name.
Please send me the solution for this.
Thanks in Advance
With Regards
Vikash Kumar
________________________________
Find out what India is talking about on Yahoo! Answers India.
Send FREE SMS from New Yahoo! Messenger to Mobile: Download NOW!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060718/effbb77a/attachment.html
From Mark_Cain at RL.gov Tue Jul 18 10:14:05 2006
From: Mark_Cain at RL.gov (Cain, Mark)
Date: Tue, 18 Jul 2006 07:14:05 -0700
Subject: [Wtr-general] Install problem?
In-Reply-To:
Message-ID:
I have always had to install rubygems for a new ruby install.
Get the gem here:
http://rubyforge.org/projects/rubygems/
Download it somewhere. Open a command prompt and navigate to where you
downloaded it. Type gem install rubygems*.gem
This fix the same problem for me on a new install.
Hope this helps,
--Mark
________________________________
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Simo, Ben
Sent: Monday, July 17, 2006 3:45 PM
To: Wtr-general at rubyforge.org
Subject: [Wtr-general] Install problem?
Hello,
I have just installed Ruby and WATIR on a Windows XP box.
When I try to run the unit tests, I get an error stating that
"gem_original_require" is missing.
C:\watir\unittests>all_tests.rb
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require': no such file to load -- watir (LoadError)
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from C:/watir/unittests/../unittests/setup.rb:4
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from C:/watir/unittests/all_tests.rb:4
I'm not sure if it matters: when I installed WATIR from the .exe
package, I got errors about not being able to write to c:\watir until I
manually created the directory. I manually created the c:\watir
directory and then installed to it.
Any ideas why I can't run the all_tests.rb script?
Thank you,
Ben Simo
________________________________
The information contained in this message is intended only for the
recipient, and may be a confidential attorney-client communication or
may otherwise be privileged and confidential and protected from
disclosure. If the reader of this message is not the intended recipient,
or an employee or agent responsible for delivering this message to the
intended recipient, please be aware that any dissemination or copying of
this communication is strictly prohibited. If you have received this
communication in error, please immediately notify us by replying to the
message and deleting it from your computer.
________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060718/16063a1f/attachment.html
From mb at michaelbolton.net Tue Jul 18 10:18:27 2006
From: mb at michaelbolton.net (Michael Bolton)
Date: Tue, 18 Jul 2006 10:18:27 -0400
Subject: [Wtr-general] Attaching a Popup
In-Reply-To: <67A1E8E424B41744A599459FE59EA4D40C5EC4@csgcinml01.cardinalsolutions.com>
Message-ID: <01ee01c6aa75$09f95ab0$6501a8c0@Koko>
>The app that I am working with has a lot of popups with important
functionality on them. I have been unsuccessful in
getting Watir to see these new windows, and I cant figure out why. The
window Im looking at now appears after a button click:
>ie.button(:name, "addItem").click
>and Ive tried all these variations to get it to work:
>ie2 = Watir::IE.attach(:title, "Project - Administration -- Web Page
Dialog")
>ie2 = Watir::IE.attach(:title, "Project - Administration")
>ie2 = Watir::IE.attach(:title, /Project/)
>ie2 = Watir::IE.attach(:title, /project/)
>ie2 = Watir::IE.attach(:url, "website list at the bottom of the new
window")
>ie2 = Watir::IE.attach(:url, "website found in the properties of the
button")
>ie2 = Watir::IE.attach(:url, /Project/)
>ie2 = Watir::IE.attach(:url, /project/)
>plus a few others, followed by
>ie2.button(:value, "Cancel").click
>to see if it worked.
>It either gives me 'Unable to locate a window with X' (#'s 5 & 6) or it
does nothing (most of the rest of them). When it gets to the window, it
just sits and waits, and when I click Cancel it stops the run, and exits
with no errors. So its not finding the window, but not giving me any
errors.
None of your :urls look very much like URLS to me, and if the titles in your
second window are also titles of your first window, you're not likely to
have success.
Try working with IRB, the interactive Ruby interpreter. After your first
click, try attaching using various options (maybe try matching any pattern
that isn't in your first IE object, using negation?) and then type
ie2.html
and see what you get.
---Michael B.
From Adrian.Rutter at tnt.com Tue Jul 18 10:22:18 2006
From: Adrian.Rutter at tnt.com (Adrian Rutter)
Date: Tue, 18 Jul 2006 15:22:18 +0100
Subject: [Wtr-general] UI Mapping Revisited
Message-ID:
bret wrote
> ObjectMap.new($ie).instance_eval do
> login_link.click
> logout_link.click
> end
Nice method, from what I can gather #instance_eval is pre-fixing self on
the custom methods. But why are you passing a global into the constructor?
cheers
aidy
---------------------------------------------------------------------------------------------------------------
This message and any attachment are confidential and may be privileged or otherwise protected from disclosure.
If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system.
If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person.
---------------------------------------------------------------------------------------------------------------
From rand.thacker at gmail.com Tue Jul 18 11:26:08 2006
From: rand.thacker at gmail.com (Rand Thacker)
Date: Tue, 18 Jul 2006 10:26:08 -0500
Subject: [Wtr-general] UI Mapping Revisited
In-Reply-To:
References:
Message-ID: <33dc42ea0607180826sb6a98f1x4f290f90b4b19c23@mail.gmail.com>
If I remember correctly, this was part of a larger thread, and they were
simply providing examples in the context of the code snippets provided. So,
the $ie was simply part of that code, and Bret was just providing an answer
that could work for non-globals, as well.
On 7/18/06, Adrian Rutter wrote:
>
>
> bret wrote
>
> > ObjectMap.new($ie).instance_eval do
> > login_link.click
> > logout_link.click
> > end
>
> Nice method, from what I can gather #instance_eval is pre-fixing self on
> the custom methods. But why are you passing a global into the constructor?
>
> cheers
>
> aidy
>
>
>
>
> ---------------------------------------------------------------------------------------------------------------
> This message and any attachment are confidential and may be privileged or
> otherwise protected from disclosure.
> If you are not the intended recipient, please telephone or email the
> sender and delete this message and any attachment from your system.
> If you are not the intended recipient you must not copy this message or
> attachment or disclose the contents to any other person.
>
> ---------------------------------------------------------------------------------------------------------------
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
--
"I am the most humble person in the world!"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060718/fbf4ab66/attachment.html
From arkie at compli.com Tue Jul 18 12:52:58 2006
From: arkie at compli.com (Alan Ark)
Date: Tue, 18 Jul 2006 11:52:58 -0500
Subject: [Wtr-general] WIN32OLERuntimeError redux - innertext
In-Reply-To: <7F2DAB1053EC4D47B821DA0A7BA5E3EBC5F582@mail-21ps.atlarge.net>
Message-ID: <7F2DAB1053EC4D47B821DA0A7BA5E3EBC5FA0B@mail-21ps.atlarge.net>
Hi guys.
Just wanted to report back to the list on this issue.
What I had done:
Put watir/waiter into my 1.4.1 version of watir. I also had to update watir/exceptions.rb as well.
Initially I thought that was working, but after running more tests, the error still appears once in a while.
The next suggestion was to upgrade my Watir version to 1.5. I?ll try this at a future time, but not at this moment.
Thanks for the suggestions.
-Alan
_____
From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Alan Ark
Sent: Thursday, July 13, 2006 7:46 AM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] WIN32OLERuntimeError redux - innertext
Thanks for the leads folks.
I?m busy with a new hire, but once I try these ideas, I will report back to the list.
Much appreciated.
-Alan
_____
From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord
Sent: Wednesday, July 12, 2006 5:20 PM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] WIN32OLERuntimeError redux - innertext
That confirms that it is a synchronization problem. I think those useless calls are really the moral equivalent of sleep statements.
Probably the cleanest and most reliable solution would be to use this after your call to IE.attach:
require 'watir/waiter'
WATIR::Waiter.wait_until { $ie.some_element_i_know_should_be_there.exists? }
Although this library is packaged with Watir 1.5, it is a separate file (watir/waiter.rb) and can be used with 1.4 if you copy it over manually.
Bret
On 7/12/06, Rand Thacker wrote:
I've even run into problems before where $ie.wait didn't seem to do the trick. Usually it was when the pages where doing a redirect or some other craziness that I hadn't planned on.
My workaround was to go ahead and do the $ie.wait, then I threw in some thing like this:
xUselessVariable = $ie.contains_text('it_would_never_contain_this_phrase')
xUselessVariable = $ie.contains_text('it_would_never_contain_this_phrase_either')
and just ignore the return values... and do your actions/assertions after this.
I've did it twice because once helped, but didn't solve it everytime.
I'm not running into those issues anymore.
I know it's a hack, but it sure worked for me. Hope it helps someone else out there.
On 7/12/06, Bret Pettichord wrote:
Sounds like a synchronization problem. There was a known synchronization problem with IE.attach in 1.4.1. That can be avoided if you call wait after attach. Thus:
$ie=IE.attach(:title,/^Compli:/)
$ie.wait # add this line
$ie.set_fast_speed()
navigateToInbox($ie)
But depending on what is in navigateToInbox, i can't tell if that is the problem here. Can you show the code in navigateToInbox?
And if this change fixes your problem, let us know. I'm wondering if we shouldn't release this fix as 1.4.2.
Bret
_______________________________________________
Wtr-general mailing list
HYPERLINK "mailto:Wtr-general at rubyforge.org" \nWtr-general at rubyforge.org
HYPERLINK "http://rubyforge.org/mailman/listinfo/wtr-general" \nhttp://rubyforge.org/mailman/listinfo/wtr-general
--
"I am the most humble person in the world!"
_______________________________________________
Wtr-general mailing list
HYPERLINK "mailto:Wtr-general at rubyforge.org"Wtr-general at rubyforge.org
HYPERLINK "http://rubyforge.org/mailman/listinfo/wtr-general" \nhttp://rubyforge.org/mailman/listinfo/wtr-general
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/385 - Release Date: 7/11/2006
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/387 - Release Date: 7/12/2006
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/387 - Release Date: 7/12/2006
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.1/390 - Release Date: 7/17/2006
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060718/fcf2e372/attachment.html
From ChintakrindiMeghana at managementdynamics.com Tue Jul 18 14:23:57 2006
From: ChintakrindiMeghana at managementdynamics.com (Chintakrindi Meghanath )
Date: Tue, 18 Jul 2006 14:23:57 -0400
Subject: [Wtr-general] Watir Framework
Message-ID: <6CF3AA425295C7479483AC0018EDF98B01DAE161@MI8NYCMAIL03.Mi8.com>
Hi Aidy
We have written the following watir script for calling SAFS.
require 'Watir'
require 'Win32API'
class STAF_Watir_Interface
def processRequest(otrd)
oresult = Win32API.new("DDVariableStore","STAFResult","","")
ostaf = otrd.getSTAFHelper()
status = ostaf.sendQueueMessage(debuglog, sinfo & "HookScript processing request...")
otrd.setStatusCode(-1)
otrd.setStatusInfo("")
message = "I did good on line "& otrd.getLineNumber()
details = "I deserve something special!"
status = ostaf.logPassedMessage(otrd.getFac(), message, details, oresult)
processRequest = otrd.getStatusCode()
end
engine = "SAFS/Watir"
shutdown = "False"
astaf = Win32API.new("DDVariableStore","STAFUtilities","","")
otrd = Win32API.new("DDVariableStore","TestRecordData","","")
oresult = Win32API.new("DDVariableStore","STAFResult","","")
otrd.setSTAFHelper(ostaf)
status = ostaf.registerNewProcess(engine)
handleid = ostaf.getHandleID()
status = ostaf.sendQueueMessage(debuglog, sinfo & "HookScript initializing...")
status = ostaf.resetHookEvents(engine)
status = ostaf.postEvent(engine & "Start")
while (shutdown == False) do
status = ostaf.sendQueueMessage(debuglog, sinfo & "HookScript Ready")
status = ostaf.postEvent(engine & "Ready")
status = ostaf.getNextHookTestEvent(engine)
status = ostaf.sendQueueMessage(debuglog, sinfo & "HookScript Dispatched")
otrd.reinitialize()
status = ostaf.getTestRecordDataVariant(otrd)
record = otrd.getInputRecord()
if record == "SHUTDOWN_HOOK" then
shutdown = "True"
end
if (shutdown == "False") then
status = processRequest(otrd)
status = ostaf.sendQueueMessage(debuglog, sinfo & "HookScript Results: "& status)
status = ostaf.sendTestRecordResultsVariant (otrd)
status = ostaf.setHookTestResultsEvents(engine, 2)
status = ostaf.resetEvent(engine & "Running")
else
status = ostaf.sendQueueMessage(debuglog, sinfo & "HookScript Shutting Down")
status = ostaf.postEvent(engine &"Results")
end
end
status = ostaf.resetHookEvents(engine)
status = ostaf.postEvent(engine &"Shutdown")
status = ostaf.sendQueueMessage(debuglog, sinfo & "HookScript Shutdown")
status = ostaf.unRegisterProcess ()
end
But we are getting the following error.
D:/Program Files/Watir/unittests/11.rb:35:1n 'initialize': GetProcAddress: STAFUtilities or STAFUtilitiesA
from D:/Program Files/Watir/unittests/11.rb:35
Can you help us to solve the issue ?
Thanks
Meghanath
From ben_simo at standardandpoors.com Tue Jul 18 15:21:01 2006
From: ben_simo at standardandpoors.com (Simo, Ben)
Date: Tue, 18 Jul 2006 13:21:01 -0600
Subject: [Wtr-general] Install problem?
Message-ID:
Mark,
Thanks, but that didn't seem to fix the problem. I am having the same problem on two different Windows XP PCs (one SP1, the other SP2).
Ben
-----Original Message-----
From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Cain, Mark
Sent: Tuesday, July 18, 2006 8:14 AM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] Install problem?
I have always had to install rubygems for a new ruby install.
Get the gem here:
http://rubyforge.org/projects/rubygems/
Download it somewhere. Open a command prompt and navigate to where you downloaded it. Type gem install rubygems*.gem
This fix the same problem for me on a new install.
Hope this helps,
--Mark
_____
From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Simo, Ben
Sent: Monday, July 17, 2006 3:45 PM
To: Wtr-general at rubyforge.org
Subject: [Wtr-general] Install problem?
Hello,
I have just installed Ruby and WATIR on a Windows XP box.
When I try to run the unit tests, I get an error stating that "gem_original_require" is missing.
C:\watir\unittests>all_tests.rb
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- watir (LoadError)
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from C:/watir/unittests/../unittests/setup.rb:4
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from C:/watir/unittests/all_tests.rb:4
I'm not sure if it matters: when I installed WATIR from the .exe package, I got errors about not being able to write to c:\watir until I manually created the directory. I manually created the c:\watir directory and then installed to it.
Any ideas why I can't run the all_tests.rb script?
Thank you,
Ben Simo
_____
The information contained in this message is intended only for the recipient, and may be a confidential attorney-client communication or may otherwise be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, please be aware that any dissemination or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the message and deleting it from your computer.
_____
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060718/b035bd65/attachment.html
From Mark_Cain at RL.gov Tue Jul 18 15:29:39 2006
From: Mark_Cain at RL.gov (Cain, Mark)
Date: Tue, 18 Jul 2006 12:29:39 -0700
Subject: [Wtr-general] Install problem?
In-Reply-To:
Message-ID:
I just remembered, one of the last times I installed ruby (either rc 3
or final I can't remember which) blew away ALL of my path information.
You might check to make sure ruby/bin and ruby/lib are in your path
environment variable.
--Mark
________________________________
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Simo, Ben
Sent: Tuesday, July 18, 2006 12:21 PM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] Install problem?
Mark,
Thanks, but that didn't seem to fix the problem. I am having the same
problem on two different Windows XP PCs (one SP1, the other SP2).
Ben
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Cain, Mark
Sent: Tuesday, July 18, 2006 8:14 AM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] Install problem?
I have always had to install rubygems for a new ruby install.
Get the gem here:
http://rubyforge.org/projects/rubygems/
Download it somewhere. Open a command prompt and navigate to
where you downloaded it. Type gem install rubygems*.gem
This fix the same problem for me on a new install.
Hope this helps,
--Mark
________________________________
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Simo, Ben
Sent: Monday, July 17, 2006 3:45 PM
To: Wtr-general at rubyforge.org
Subject: [Wtr-general] Install problem?
Hello,
I have just installed Ruby and WATIR on a Windows XP box.
When I try to run the unit tests, I get an error stating that
"gem_original_require" is missing.
C:\watir\unittests>all_tests.rb
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require': no such file to load -- watir (LoadError)
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from C:/watir/unittests/../unittests/setup.rb:4
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from C:/watir/unittests/all_tests.rb:4
I'm not sure if it matters: when I installed WATIR from the .exe
package, I got errors about not being able to write to c:\watir until I
manually created the directory. I manually created the c:\watir
directory and then installed to it.
Any ideas why I can't run the all_tests.rb script?
Thank you,
Ben Simo
________________________________
The information contained in this message is intended only for
the recipient, and may be a confidential attorney-client communication
or may otherwise be privileged and confidential and protected from
disclosure. If the reader of this message is not the intended recipient,
or an employee or agent responsible for delivering this message to the
intended recipient, please be aware that any dissemination or copying of
this communication is strictly prohibited. If you have received this
communication in error, please immediately notify us by replying to the
message and deleting it from your computer.
________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060718/06813f1a/attachment.html
From ben_simo at standardandpoors.com Tue Jul 18 15:34:18 2006
From: ben_simo at standardandpoors.com (Simo, Ben)
Date: Tue, 18 Jul 2006 13:34:18 -0600
Subject: [Wtr-general] Install problem?
Message-ID:
I just reinstalled WATIR using the GEM file instead of the one-step install. Now it works. Thank you.
Ben
-----Original Message-----
From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Cain, Mark
Sent: Tuesday, July 18, 2006 1:30 PM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] Install problem?
I just remembered, one of the last times I installed ruby (either rc 3 or final I can't remember which) blew away ALL of my path information. You might check to make sure ruby/bin and ruby/lib are in your path environment variable.
--Mark
_____
From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Simo, Ben
Sent: Tuesday, July 18, 2006 12:21 PM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] Install problem?
Mark,
Thanks, but that didn't seem to fix the problem. I am having the same problem on two different Windows XP PCs (one SP1, the other SP2).
Ben
-----Original Message-----
From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Cain, Mark
Sent: Tuesday, July 18, 2006 8:14 AM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] Install problem?
I have always had to install rubygems for a new ruby install.
Get the gem here:
http://rubyforge.org/projects/rubygems/
Download it somewhere. Open a command prompt and navigate to where you downloaded it. Type gem install rubygems*.gem
This fix the same problem for me on a new install.
Hope this helps,
--Mark
_____
From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Simo, Ben
Sent: Monday, July 17, 2006 3:45 PM
To: Wtr-general at rubyforge.org
Subject: [Wtr-general] Install problem?
Hello,
I have just installed Ruby and WATIR on a Windows XP box.
When I try to run the unit tests, I get an error stating that "gem_original_require" is missing.
C:\watir\unittests>all_tests.rb
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- watir (LoadError)
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from C:/watir/unittests/../unittests/setup.rb:4
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from C:/watir/unittests/all_tests.rb:4
I'm not sure if it matters: when I installed WATIR from the .exe package, I got errors about not being able to write to c:\watir until I manually created the directory. I manually created the c:\watir directory and then installed to it.
Any ideas why I can't run the all_tests.rb script?
Thank you,
Ben Simo
_____
The information contained in this message is intended only for the recipient, and may be a confidential attorney-client communication or may otherwise be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, please be aware that any dissemination or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the message and deleting it from your computer.
_____
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060718/5368a04f/attachment.html
From fxn at hashref.com Tue Jul 18 17:20:38 2006
From: fxn at hashref.com (Xavier Noria)
Date: Tue, 18 Jul 2006 23:20:38 +0200
Subject: [Wtr-general] problem with nested frames
Message-ID:
Just in case this rings some bell.
I go to a page that has frames A and B. The latter in turn is a
frameset with 4 frames, say B1, ..., B4. The main area of the page is
B3 and I need to follow a link in B2 to change the main area. Problem
is B3, accessed as
ie.frame('B').frame('B3')
has the same HTML before and after the link in B2 is clicked. This
website is quite convoluted, but since Watir asks for frames to IE
each time I invoke frame() I don't understand what may be happening.
Any idea?
-- fxn
From mdove at pheedo.com Tue Jul 18 19:23:15 2006
From: mdove at pheedo.com (mi)
Date: Tue, 18 Jul 2006 16:23:15 -0700
Subject: [Wtr-general] for loop syntax??
Message-ID: <44BD6D63.6040708@pheedo.com>
Hi all,
I'm using a for loop to access arrays to fill all the text fields in my
forms. For some reason, i'm getting the following error at the end of
the for loop execution???
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in `assert_exists': Unable
to locate object, using name and (Watir::Exception::UnknownObjectException)
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3382:in `set'
from c:/ruby/lib/ruby/site_ruby/1.8/watir/watir_simple.rb:402:in
`fill_text_field'
from SmokeTest.rb:25
from SmokeTest.rb:24
Thanks in advance!
<<<<>
require 'watir' # the watir controller\
require 'watir/watir_simple'
include Watir
include Watir::Simple
Simple1 = Simple
test_site = 'http://dev01.pheedo.com'
pubInfoTextFields = ['user', 'email', 'password', 'repass', 'url',
'ssn', 'payment_address', 'payment_city', 'payment_zip']
pubInfo = ['pubUserName', 'mdove at pheedo.com', '1', '1',
'http://www.test.com', '1234', '123 st', 'some city', '97035']
#[user name, emaildAdd, passwd1, passwd2, yourSite, TaxID, StreetAdd,
CityName, State, ZipCode]
Simple1.new_browser_at(test_site)
Simple1.click_link_with_text("Sign up now") #same as
Simple::click_link_with_text("Sign up now")
#click on Publisher's sign up page
Simple1.click_link_with_url(test_site+"/register.phdo?mode=publish")
#Enter all the required fields
x=0
for x in 0..9 do
Simple1.fill_text_field(pubInfoTextFields[x], pubInfo[x])
puts "pubInfoTextFields = "+pubInfoTextFields[x]+" pubInfo =
"+pubInfo[x]
end
From dsolis at yahoo.com Tue Jul 18 22:36:39 2006
From: dsolis at yahoo.com (David Solis)
Date: Tue, 18 Jul 2006 19:36:39 -0700 (PDT)
Subject: [Wtr-general] Page Loading Problem
Message-ID: <20060719023639.92061.qmail@web82805.mail.mud.yahoo.com>
I have a problem with a site taking too long to load. I'm hoping somebody can point in the right direction.
The test environment in which my script runs takes a long time to load images. The following statement waits for the page to be loaded:
$ie.text_field(:name, "username").set(casino_user)
Is there a way that I can force this statement to start running without waiting for the page to completely load?
class LoginCasino
def initialize(casino_user, casino_password, casino_url, casino_submit_key, cgc_submit_key)
$ie = Watir::IE.start(casino_url)
if $ie.contains_text("Username:")
$ie.goto($casino_url+"/security/logoff.do")
end
$ie.text_field(:name, "username").set(casino_user)
$ie.text_field(:name, "password").set(casino_password)
if (($casino_url=~/wpt/) || ($casino_url=~/msn/) || ($casino_url=~/vgfo/))
$ie.button(:value, casino_submit_key).click
elsif (($casino_url=~/cqa/) || ($casino_url=~/cdev/))
$ie.button(:value, cgc_submit_key).click
end
#$ie.image(:src, submit_key).click()
end
def logout (casino_url)
if (($casino_url=~/wpt/) || ($casino_url=~/msn/) || ($casino_url=~/vgfo/))
$ie.goto($casino_url+"/security/logoff.do")
elsif (($casino_url=~/cqa/) || ($casino_url=~/cdev/))
$ie.link(:text, "Log Out").click
end
end
def shutdown
$ie.close
sleep 1
end
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060718/75ebd76e/attachment.html
From vikashkumar051 at yahoo.co.in Wed Jul 19 01:04:27 2006
From: vikashkumar051 at yahoo.co.in (VIKASH KUMAR)
Date: Wed, 19 Jul 2006 06:04:27 +0100 (BST)
Subject: [Wtr-general] Just wanted to invoke click event where the
button have parameters in it
Message-ID: <20060719050427.44746.qmail@web7814.mail.in.yahoo.com>
Sir,
In my web page there are lots of buttons having same name, they are called using javascript. They are as follows:
ie.button(:index,3).click , this works great if we know the index, but if someone just doesn't know the index, knows only the parameter which is ('delete', 'KH'), then what is the solution for it?
Please send me the solution for this.
Thanks in Advance
With Regards
Vikash Kumar
---------------------------------
Find out what India is talking about on Yahoo! Answers India.
Send FREE SMS from New Yahoo! Messenger to Mobile: Download NOW!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060719/90ac207c/attachment.html
From vikashkumar051 at yahoo.co.in Wed Jul 19 01:52:20 2006
From: vikashkumar051 at yahoo.co.in (VIKASH KUMAR)
Date: Wed, 19 Jul 2006 06:52:20 +0100 (BST)
Subject: [Wtr-general] selecting multiple values from on list and passing it
to other list
Message-ID: <20060719055220.78195.qmail@web7809.mail.in.yahoo.com>
Sir,
I am facing a problem in selecting multiple values from a list and passing it over to another list box with any button click, it should do it automatically.
for example the list is as given below:
and the other list as :
Please send me a solution for selecting multiple values from list "assigned" and passing it over to list "availableSystem", without any button click event.
Thanks in advance.
Vikash Kumar
---------------------------------
Find out what India is talking about on Yahoo! Answers India.
Send FREE SMS from New Yahoo! Messenger to Mobile: Download NOW!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060719/ec23e65d/attachment.html
From areed at relocationcentral.com Wed Jul 19 09:51:13 2006
From: areed at relocationcentral.com (Adam Reed)
Date: Wed, 19 Jul 2006 08:51:13 -0500
Subject: [Wtr-general] Best way to log Watir output?
Message-ID: <2757CAE9849293409BFE6562B949516219A4A7@rccexh001.relocationcentral.com>
What is the best way to create a log file, or otherwise manipulate Watir
test output?
I am looking a building a framework for testing, and it would be nice to
output test results to a webpage, flat file, or even to a dashboard
"results window". I would want to include variables used (eg,
username/password for a login script, this seems straightforward), but
most importantly assertion results, test date and time, etc.
Thanks,
Adam
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of
wtr-general-request at rubyforge.org
Sent: Tuesday, July 18, 2006 9:37 PM
To: wtr-general at rubyforge.org
Subject: Wtr-general Digest, Vol 32, Issue 26
Send Wtr-general mailing list submissions to
wtr-general at rubyforge.org
To subscribe or unsubscribe via the World Wide Web, visit
http://rubyforge.org/mailman/listinfo/wtr-general
or, via email, send a message with subject or body 'help' to
wtr-general-request at rubyforge.org
You can reach the person managing the list at
wtr-general-owner at rubyforge.org
When replying, please edit your Subject line so it is more specific than
"Re: Contents of Wtr-general digest..."
Today's Topics:
1. Re: Install problem? (Simo, Ben)
2. problem with nested frames (Xavier Noria)
3. for loop syntax?? (mi)
4. Page Loading Problem (David Solis)
----------------------------------------------------------------------
Message: 1
Date: Tue, 18 Jul 2006 13:34:18 -0600
From: "Simo, Ben"
Subject: Re: [Wtr-general] Install problem?
To:
Message-ID:
Content-Type: text/plain; charset="iso-8859-1"
I just reinstalled WATIR using the GEM file instead of the one-step
install. Now it works. Thank you.
Ben
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Cain, Mark
Sent: Tuesday, July 18, 2006 1:30 PM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] Install problem?
I just remembered, one of the last times I installed ruby (either rc 3
or final I can't remember which) blew away ALL of my path information.
You might check to make sure ruby/bin and ruby/lib are in your path
environment variable.
--Mark
_____
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Simo, Ben
Sent: Tuesday, July 18, 2006 12:21 PM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] Install problem?
Mark,
Thanks, but that didn't seem to fix the problem. I am having the same
problem on two different Windows XP PCs (one SP1, the other SP2).
Ben
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Cain, Mark
Sent: Tuesday, July 18, 2006 8:14 AM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] Install problem?
I have always had to install rubygems for a new ruby install.
Get the gem here:
http://rubyforge.org/projects/rubygems/
Download it somewhere. Open a command prompt and navigate to where you
downloaded it. Type gem install rubygems*.gem
This fix the same problem for me on a new install.
Hope this helps,
--Mark
_____
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Simo, Ben
Sent: Monday, July 17, 2006 3:45 PM
To: Wtr-general at rubyforge.org
Subject: [Wtr-general] Install problem?
Hello,
I have just installed Ruby and WATIR on a Windows XP box.
When I try to run the unit tests, I get an error stating that
"gem_original_require" is missing.
C:\watir\unittests>all_tests.rb
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require': no such file to load -- watir (LoadError)
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from C:/watir/unittests/../unittests/setup.rb:4
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from C:/watir/unittests/all_tests.rb:4
I'm not sure if it matters: when I installed WATIR from the .exe
package, I got errors about not being able to write to c:\watir until I
manually created the directory. I manually created the c:\watir
directory and then installed to it.
Any ideas why I can't run the all_tests.rb script?
Thank you,
Ben Simo
_____
The information contained in this message is intended only for the
recipient, and may be a confidential attorney-client communication or
may otherwise be privileged and confidential and protected from
disclosure. If the reader of this message is not the intended recipient,
or an employee or agent responsible for delivering this message to the
intended recipient, please be aware that any dissemination or copying of
this communication is strictly prohibited. If you have received this
communication in error, please immediately notify us by replying to the
message and deleting it from your computer.
_____
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://rubyforge.org/pipermail/wtr-general/attachments/20060718/5368a04f
/attachment-0001.html
------------------------------
Message: 2
Date: Tue, 18 Jul 2006 23:20:38 +0200
From: Xavier Noria
Subject: [Wtr-general] problem with nested frames
To: Wtr-general at rubyforge.org
Message-ID:
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Just in case this rings some bell.
I go to a page that has frames A and B. The latter in turn is a frameset
with 4 frames, say B1, ..., B4. The main area of the page is
B3 and I need to follow a link in B2 to change the main area. Problem is
B3, accessed as
ie.frame('B').frame('B3')
has the same HTML before and after the link in B2 is clicked. This
website is quite convoluted, but since Watir asks for frames to IE each
time I invoke frame() I don't understand what may be happening.
Any idea?
-- fxn
------------------------------
Message: 3
Date: Tue, 18 Jul 2006 16:23:15 -0700
From: mi
Subject: [Wtr-general] for loop syntax??
To: wtr-general at rubyforge.org
Message-ID: <44BD6D63.6040708 at pheedo.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hi all,
I'm using a for loop to access arrays to fill all the text fields in my
forms. For some reason, i'm getting the following error at the end of
the for loop execution???
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in `assert_exists': Unable
to locate object, using name and
(Watir::Exception::UnknownObjectException)
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3382:in `set'
from c:/ruby/lib/ruby/site_ruby/1.8/watir/watir_simple.rb:402:in
`fill_text_field'
from SmokeTest.rb:25
from SmokeTest.rb:24
Thanks in advance!
<<<<>
require 'watir' # the watir controller\
require 'watir/watir_simple'
include Watir
include Watir::Simple
Simple1 = Simple
test_site = 'http://dev01.pheedo.com'
pubInfoTextFields = ['user', 'email', 'password', 'repass', 'url',
'ssn', 'payment_address', 'payment_city', 'payment_zip'] pubInfo =
['pubUserName', 'mdove at pheedo.com', '1', '1', 'http://www.test.com',
'1234', '123 st', 'some city', '97035'] #[user name, emaildAdd, passwd1,
passwd2, yourSite, TaxID, StreetAdd, CityName, State, ZipCode]
Simple1.new_browser_at(test_site)
Simple1.click_link_with_text("Sign up now") #same as
Simple::click_link_with_text("Sign up now")
#click on Publisher's sign up page
Simple1.click_link_with_url(test_site+"/register.phdo?mode=publish")
#Enter all the required fields
x=0
for x in 0..9 do
Simple1.fill_text_field(pubInfoTextFields[x], pubInfo[x])
puts "pubInfoTextFields = "+pubInfoTextFields[x]+" pubInfo =
"+pubInfo[x]
end
------------------------------
Message: 4
Date: Tue, 18 Jul 2006 19:36:39 -0700 (PDT)
From: David Solis
Subject: [Wtr-general] Page Loading Problem
To: wtr-general at rubyforge.org
Message-ID: <20060719023639.92061.qmail at web82805.mail.mud.yahoo.com>
Content-Type: text/plain; charset="iso-8859-1"
I have a problem with a site taking too long to load. I'm hoping
somebody can point in the right direction.
The test environment in which my script runs takes a long time to load
images. The following statement waits for the page to be loaded:
$ie.text_field(:name, "username").set(casino_user)
Is there a way that I can force this statement to start running
without waiting for the page to completely load?
class LoginCasino
def initialize(casino_user, casino_password, casino_url,
casino_submit_key, cgc_submit_key)
$ie = Watir::IE.start(casino_url)
if $ie.contains_text("Username:")
$ie.goto($casino_url+"/security/logoff.do")
end
$ie.text_field(:name, "username").set(casino_user)
$ie.text_field(:name, "password").set(casino_password)
if (($casino_url=~/wpt/) || ($casino_url=~/msn/) ||
($casino_url=~/vgfo/))
$ie.button(:value, casino_submit_key).click
elsif (($casino_url=~/cqa/) || ($casino_url=~/cdev/))
$ie.button(:value, cgc_submit_key).click
end
#$ie.image(:src, submit_key).click()
end
def logout (casino_url)
if (($casino_url=~/wpt/) || ($casino_url=~/msn/) ||
($casino_url=~/vgfo/))
$ie.goto($casino_url+"/security/logoff.do")
elsif (($casino_url=~/cqa/) || ($casino_url=~/cdev/))
$ie.link(:text, "Log Out").click
end
end
def shutdown
$ie.close
sleep 1
end
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://rubyforge.org/pipermail/wtr-general/attachments/20060718/75ebd76e
/attachment.html
------------------------------
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
End of Wtr-general Digest, Vol 32, Issue 26
*******************************************
From Mark_Cain at RL.gov Wed Jul 19 10:01:16 2006
From: Mark_Cain at RL.gov (Cain, Mark)
Date: Wed, 19 Jul 2006 07:01:16 -0700
Subject: [Wtr-general] selecting multiple values from on list and
passing itto other list
In-Reply-To: <20060719055220.78195.qmail@web7809.mail.in.yahoo.com>
Message-ID:
You could do something like this:
dbList = $ie.select_list( :name, 'assigned').getAllContents
for dbl in dbList
$ie.selectBox( :name, 'assigned').select("#{dbl}")
end
Hope this helps,
--Mark
________________________________
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of VIKASH KUMAR
Sent: Tuesday, July 18, 2006 10:52 PM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] selecting multiple values from on list and
passing itto other list
Sir,
I am facing a problem in selecting multiple values from a list and
passing it over to another list box with any button click, it should do
it automatically.
for example the list is as given below:
and the other list as :
Please send me a solution for selecting multiple values from list
"assigned" and passing it over to list "availableSystem", without any
button click event.
Thanks in advance.
Vikash Kumar
________________________________
Find out what India is talking about on Yahoo! Answers India.
Send FREE SMS from New Yahoo! Messenger to Mobile: Download NOW!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060719/312b410f/attachment.html
From Mark_Cain at RL.gov Wed Jul 19 10:05:53 2006
From: Mark_Cain at RL.gov (Cain, Mark)
Date: Wed, 19 Jul 2006 07:05:53 -0700
Subject: [Wtr-general] for loop syntax??
In-Reply-To: <44BD6D63.6040708@pheedo.com>
Message-ID:
You will need to these:
require 'test/unit'
require 'test/unit/ui/console/testrunner'
require 'watir/testUnitAddons'
require 'watir/testcase'
I usually add the setup.rb from the unittest directory instead because
these requires are already in it.
--Mark
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of mi
Sent: Tuesday, July 18, 2006 4:23 PM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] for loop syntax??
Hi all,
I'm using a for loop to access arrays to fill all the text fields in my
forms. For some reason, i'm getting the following error at the end of
the for loop execution???
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in `assert_exists': Unable
to locate object, using name and
(Watir::Exception::UnknownObjectException)
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3382:in `set'
from c:/ruby/lib/ruby/site_ruby/1.8/watir/watir_simple.rb:402:in
`fill_text_field'
from SmokeTest.rb:25
from SmokeTest.rb:24
Thanks in advance!
<<<<>
require 'watir' # the watir controller\
require 'watir/watir_simple'
include Watir
include Watir::Simple
Simple1 = Simple
test_site = 'http://dev01.pheedo.com'
pubInfoTextFields = ['user', 'email', 'password', 'repass', 'url',
'ssn', 'payment_address', 'payment_city', 'payment_zip']
pubInfo = ['pubUserName', 'mdove at pheedo.com', '1', '1',
'http://www.test.com', '1234', '123 st', 'some city', '97035']
#[user name, emaildAdd, passwd1, passwd2, yourSite, TaxID, StreetAdd,
CityName, State, ZipCode]
Simple1.new_browser_at(test_site)
Simple1.click_link_with_text("Sign up now") #same as
Simple::click_link_with_text("Sign up now")
#click on Publisher's sign up page
Simple1.click_link_with_url(test_site+"/register.phdo?mode=publish")
#Enter all the required fields
x=0
for x in 0..9 do
Simple1.fill_text_field(pubInfoTextFields[x], pubInfo[x])
puts "pubInfoTextFields = "+pubInfoTextFields[x]+" pubInfo =
"+pubInfo[x]
end
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
From charley.baker at gmail.com Wed Jul 19 10:43:20 2006
From: charley.baker at gmail.com (Charley Baker)
Date: Wed, 19 Jul 2006 08:43:20 -0600
Subject: [Wtr-general] for loop syntax??
In-Reply-To:
References: <44BD6D63.6040708@pheedo.com>
Message-ID:
Your loop is 0-9 which is 10, your arrays are only 9 items long. You've
overshot it by one.
for x in 0..8 do
.......
-Charley
On 7/19/06, Cain, Mark wrote:
>
> You will need to these:
>
> require 'test/unit'
> require 'test/unit/ui/console/testrunner'
> require 'watir/testUnitAddons'
> require 'watir/testcase'
>
> I usually add the setup.rb from the unittest directory instead because
> these requires are already in it.
>
> --Mark
>
> -----Original Message-----
> From: wtr-general-bounces at rubyforge.org
> [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of mi
> Sent: Tuesday, July 18, 2006 4:23 PM
> To: wtr-general at rubyforge.org
> Subject: [Wtr-general] for loop syntax??
>
> Hi all,
>
> I'm using a for loop to access arrays to fill all the text fields in my
>
> forms. For some reason, i'm getting the following error at the end of
> the for loop execution???
> c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in `assert_exists': Unable
> to locate object, using name and
> (Watir::Exception::UnknownObjectException)
> from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3382:in `set'
> from c:/ruby/lib/ruby/site_ruby/1.8/watir/watir_simple.rb:402:in
> `fill_text_field'
> from SmokeTest.rb:25
> from SmokeTest.rb:24
>
>
> Thanks in advance!
>
> <<<<>
>
> require 'watir' # the watir controller\
> require 'watir/watir_simple'
> include Watir
> include Watir::Simple
>
> Simple1 = Simple
>
> test_site = 'http://dev01.pheedo.com'
> pubInfoTextFields = ['user', 'email', 'password', 'repass', 'url',
> 'ssn', 'payment_address', 'payment_city', 'payment_zip']
> pubInfo = ['pubUserName', 'mdove at pheedo.com', '1', '1',
> 'http://www.test.com', '1234', '123 st', 'some city', '97035']
> #[user name, emaildAdd, passwd1, passwd2, yourSite, TaxID, StreetAdd,
> CityName, State, ZipCode]
>
> Simple1.new_browser_at(test_site)
> Simple1.click_link_with_text("Sign up now") #same as
> Simple::click_link_with_text("Sign up now")
>
> #click on Publisher's sign up page
> Simple1.click_link_with_url(test_site+"/register.phdo?mode=publish")
>
> #Enter all the required fields
> x=0
> for x in 0..9 do
> Simple1.fill_text_field(pubInfoTextFields[x], pubInfo[x])
> puts "pubInfoTextFields = "+pubInfoTextFields[x]+" pubInfo =
> "+pubInfo[x]
> end
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060719/0a9c6244/attachment.html
From charley.baker at gmail.com Wed Jul 19 10:58:34 2006
From: charley.baker at gmail.com (Charley Baker)
Date: Wed, 19 Jul 2006 08:58:34 -0600
Subject: [Wtr-general] Page Loading Problem
In-Reply-To: <20060719023639.92061.qmail@web82805.mail.mud.yahoo.com>
References: <20060719023639.92061.qmail@web82805.mail.mud.yahoo.com>
Message-ID:
You can turn off image loading in the ie options dialog under advanced. I'm
not aware of any other way to set Watir not to wait for ready state from the
browser.
-Charley
On 7/18/06, David Solis wrote:
>
> I have a problem with a site taking too long to load. I'm hoping somebody
> can point in the right direction.
> The test environment in which my script runs takes a long time to load
> images. The following statement waits for the page to be loaded:
>
> $ie.text_field(:name, "username").set(casino_user)
>
> Is there a way that I can force this statement to start running without
> waiting for the page to completely load?
>
> class LoginCasino
> def initialize(casino_user, casino_password, casino_url,
> casino_submit_key, cgc_submit_key)
> $ie = Watir::IE.start(casino_url)
> if $ie.contains_text("Username:")
> $ie.goto($casino_url+"/security/logoff.do")
> end
> $ie.text_field(:name, "username").set(casino_user)
> $ie.text_field(:name, "password").set(casino_password)
> if (($casino_url=~/wpt/) || ($casino_url=~/msn/) ||
> ($casino_url=~/vgfo/))
> $ie.button(:value, casino_submit_key).click
> elsif (($casino_url=~/cqa/) || ($casino_url=~/cdev/))
> $ie.button(:value, cgc_submit_key).click
> end
>
> #$ie.image(:src, submit_key).click()
> end
> def logout (casino_url)
> if (($casino_url=~/wpt/) || ($casino_url=~/msn/) ||
> ($casino_url=~/vgfo/))
> $ie.goto($casino_url+"/security/logoff.do")
> elsif (($casino_url=~/cqa/) || ($casino_url=~/cdev/))
> $ie.link(:text, "Log Out").click
> end
> end
>
> def shutdown
> $ie.close
> sleep 1
> end
> end
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060719/431ca445/attachment.html
From charley.baker at gmail.com Wed Jul 19 11:04:29 2006
From: charley.baker at gmail.com (Charley Baker)
Date: Wed, 19 Jul 2006 09:04:29 -0600
Subject: [Wtr-general] Best way to log Watir output?
In-Reply-To: <2757CAE9849293409BFE6562B949516219A4A7@rccexh001.relocationcentral.com>
References: <2757CAE9849293409BFE6562B949516219A4A7@rccexh001.relocationcentral.com>
Message-ID:
Adam,
If you want to create a log file look at logger which is a Ruby library,
Watir makes use of it in WatirLogger. Otherwise if you're looking for a
junit type of test run dashboard and you're using Test::Unit, take a look at
Test Unit Reporter:
http://rubyforge.org/frs/?group_id=319
It can dump out reports in either html or xml.
-Charley
On 7/19/06, Adam Reed wrote:
>
> What is the best way to create a log file, or otherwise manipulate Watir
> test output?
>
> I am looking a building a framework for testing, and it would be nice to
> output test results to a webpage, flat file, or even to a dashboard
> "results window". I would want to include variables used (eg,
> username/password for a login script, this seems straightforward), but
> most importantly assertion results, test date and time, etc.
>
> Thanks,
> Adam
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060719/3d37e621/attachment.html
From mb at michaelbolton.net Wed Jul 19 11:20:53 2006
From: mb at michaelbolton.net (Michael Bolton)
Date: Wed, 19 Jul 2006 11:20:53 -0400
Subject: [Wtr-general] Best way to log Watir output?
In-Reply-To: <2757CAE9849293409BFE6562B949516219A4A7@rccexh001.relocationcentral.com>
Message-ID: <011e01c6ab46$ed201140$6501a8c0@Koko>
Ruby's Logger object? What do you mean by "best"?
---Michael B.
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Adam Reed
Sent: July 19, 2006 9:51 AM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] Best way to log Watir output?
What is the best way to create a log file, or otherwise manipulate Watir
test output?
I am looking a building a framework for testing, and it would be nice to
output test results to a webpage, flat file, or even to a dashboard
"results window". I would want to include variables used (eg,
username/password for a login script, this seems straightforward), but
most importantly assertion results, test date and time, etc.
Thanks,
Adam
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of
wtr-general-request at rubyforge.org
Sent: Tuesday, July 18, 2006 9:37 PM
To: wtr-general at rubyforge.org
Subject: Wtr-general Digest, Vol 32, Issue 26
Send Wtr-general mailing list submissions to
wtr-general at rubyforge.org
To subscribe or unsubscribe via the World Wide Web, visit
http://rubyforge.org/mailman/listinfo/wtr-general
or, via email, send a message with subject or body 'help' to
wtr-general-request at rubyforge.org
You can reach the person managing the list at
wtr-general-owner at rubyforge.org
When replying, please edit your Subject line so it is more specific than
"Re: Contents of Wtr-general digest..."
Today's Topics:
1. Re: Install problem? (Simo, Ben)
2. problem with nested frames (Xavier Noria)
3. for loop syntax?? (mi)
4. Page Loading Problem (David Solis)
----------------------------------------------------------------------
Message: 1
Date: Tue, 18 Jul 2006 13:34:18 -0600
From: "Simo, Ben"
Subject: Re: [Wtr-general] Install problem?
To:
Message-ID:
Content-Type: text/plain; charset="iso-8859-1"
I just reinstalled WATIR using the GEM file instead of the one-step
install. Now it works. Thank you.
Ben
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Cain, Mark
Sent: Tuesday, July 18, 2006 1:30 PM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] Install problem?
I just remembered, one of the last times I installed ruby (either rc 3
or final I can't remember which) blew away ALL of my path information.
You might check to make sure ruby/bin and ruby/lib are in your path
environment variable.
--Mark
_____
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Simo, Ben
Sent: Tuesday, July 18, 2006 12:21 PM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] Install problem?
Mark,
Thanks, but that didn't seem to fix the problem. I am having the same
problem on two different Windows XP PCs (one SP1, the other SP2).
Ben
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Cain, Mark
Sent: Tuesday, July 18, 2006 8:14 AM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] Install problem?
I have always had to install rubygems for a new ruby install.
Get the gem here:
http://rubyforge.org/projects/rubygems/
Download it somewhere. Open a command prompt and navigate to where you
downloaded it. Type gem install rubygems*.gem
This fix the same problem for me on a new install.
Hope this helps,
--Mark
_____
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Simo, Ben
Sent: Monday, July 17, 2006 3:45 PM
To: Wtr-general at rubyforge.org
Subject: [Wtr-general] Install problem?
Hello,
I have just installed Ruby and WATIR on a Windows XP box.
When I try to run the unit tests, I get an error stating that
"gem_original_require" is missing.
C:\watir\unittests>all_tests.rb
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require': no such file to load -- watir (LoadError)
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from C:/watir/unittests/../unittests/setup.rb:4
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from C:/watir/unittests/all_tests.rb:4
I'm not sure if it matters: when I installed WATIR from the .exe
package, I got errors about not being able to write to c:\watir until I
manually created the directory. I manually created the c:\watir
directory and then installed to it.
Any ideas why I can't run the all_tests.rb script?
Thank you,
Ben Simo
_____
The information contained in this message is intended only for the
recipient, and may be a confidential attorney-client communication or
may otherwise be privileged and confidential and protected from
disclosure. If the reader of this message is not the intended recipient,
or an employee or agent responsible for delivering this message to the
intended recipient, please be aware that any dissemination or copying of
this communication is strictly prohibited. If you have received this
communication in error, please immediately notify us by replying to the
message and deleting it from your computer.
_____
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://rubyforge.org/pipermail/wtr-general/attachments/20060718/5368a04f
/attachment-0001.html
------------------------------
Message: 2
Date: Tue, 18 Jul 2006 23:20:38 +0200
From: Xavier Noria
Subject: [Wtr-general] problem with nested frames
To: Wtr-general at rubyforge.org
Message-ID:
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Just in case this rings some bell.
I go to a page that has frames A and B. The latter in turn is a frameset
with 4 frames, say B1, ..., B4. The main area of the page is
B3 and I need to follow a link in B2 to change the main area. Problem is
B3, accessed as
ie.frame('B').frame('B3')
has the same HTML before and after the link in B2 is clicked. This
website is quite convoluted, but since Watir asks for frames to IE each
time I invoke frame() I don't understand what may be happening.
Any idea?
-- fxn
------------------------------
Message: 3
Date: Tue, 18 Jul 2006 16:23:15 -0700
From: mi
Subject: [Wtr-general] for loop syntax??
To: wtr-general at rubyforge.org
Message-ID: <44BD6D63.6040708 at pheedo.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hi all,
I'm using a for loop to access arrays to fill all the text fields in my
forms. For some reason, i'm getting the following error at the end of
the for loop execution???
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in `assert_exists': Unable
to locate object, using name and
(Watir::Exception::UnknownObjectException)
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3382:in `set'
from c:/ruby/lib/ruby/site_ruby/1.8/watir/watir_simple.rb:402:in
`fill_text_field'
from SmokeTest.rb:25
from SmokeTest.rb:24
Thanks in advance!
<<<<>
require 'watir' # the watir controller\
require 'watir/watir_simple'
include Watir
include Watir::Simple
Simple1 = Simple
test_site = 'http://dev01.pheedo.com'
pubInfoTextFields = ['user', 'email', 'password', 'repass', 'url',
'ssn', 'payment_address', 'payment_city', 'payment_zip'] pubInfo =
['pubUserName', 'mdove at pheedo.com', '1', '1', 'http://www.test.com',
'1234', '123 st', 'some city', '97035'] #[user name, emaildAdd, passwd1,
passwd2, yourSite, TaxID, StreetAdd, CityName, State, ZipCode]
Simple1.new_browser_at(test_site)
Simple1.click_link_with_text("Sign up now") #same as
Simple::click_link_with_text("Sign up now")
#click on Publisher's sign up page
Simple1.click_link_with_url(test_site+"/register.phdo?mode=publish")
#Enter all the required fields
x=0
for x in 0..9 do
Simple1.fill_text_field(pubInfoTextFields[x], pubInfo[x])
puts "pubInfoTextFields = "+pubInfoTextFields[x]+" pubInfo =
"+pubInfo[x]
end
------------------------------
Message: 4
Date: Tue, 18 Jul 2006 19:36:39 -0700 (PDT)
From: David Solis
Subject: [Wtr-general] Page Loading Problem
To: wtr-general at rubyforge.org
Message-ID: <20060719023639.92061.qmail at web82805.mail.mud.yahoo.com>
Content-Type: text/plain; charset="iso-8859-1"
I have a problem with a site taking too long to load. I'm hoping
somebody can point in the right direction.
The test environment in which my script runs takes a long time to load
images. The following statement waits for the page to be loaded:
$ie.text_field(:name, "username").set(casino_user)
Is there a way that I can force this statement to start running
without waiting for the page to completely load?
class LoginCasino
def initialize(casino_user, casino_password, casino_url,
casino_submit_key, cgc_submit_key)
$ie = Watir::IE.start(casino_url)
if $ie.contains_text("Username:")
$ie.goto($casino_url+"/security/logoff.do")
end
$ie.text_field(:name, "username").set(casino_user)
$ie.text_field(:name, "password").set(casino_password)
if (($casino_url=~/wpt/) || ($casino_url=~/msn/) ||
($casino_url=~/vgfo/))
$ie.button(:value, casino_submit_key).click
elsif (($casino_url=~/cqa/) || ($casino_url=~/cdev/))
$ie.button(:value, cgc_submit_key).click
end
#$ie.image(:src, submit_key).click()
end
def logout (casino_url)
if (($casino_url=~/wpt/) || ($casino_url=~/msn/) ||
($casino_url=~/vgfo/))
$ie.goto($casino_url+"/security/logoff.do")
elsif (($casino_url=~/cqa/) || ($casino_url=~/cdev/))
$ie.link(:text, "Log Out").click
end
end
def shutdown
$ie.close
sleep 1
end
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://rubyforge.org/pipermail/wtr-general/attachments/20060718/75ebd76e
/attachment.html
------------------------------
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
End of Wtr-general Digest, Vol 32, Issue 26
*******************************************
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
From areed at relocationcentral.com Wed Jul 19 11:35:32 2006
From: areed at relocationcentral.com (Adam Reed)
Date: Wed, 19 Jul 2006 10:35:32 -0500
Subject: [Wtr-general] Best way to log Watir output?
Message-ID: <2757CAE9849293409BFE6562B9495162198BA6@rccexh001.relocationcentral.com>
Michael,
The only resource I was able to find online pointed me back to
the test_logger.rb script in watir/examples/logging. This script
manually logs each action by doing a result/escape on each assertion to
output the result to a .txt file. While this works, it's tedious and
inefficient for a large script. I thought there would have to be a
better way, such as "grabbing" the SCIte output, since it contains
exactly what I would want.
Someone has now suggested that I take a look at WET to accompany
Ruby. Is this, or another method, an accepted "best practice" as far as
Watir scripting goes?
Thanks again,
Adam
--------------------------------------------------
Ruby's Logger object? What do you mean by "best"?
---Michael B.
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of
wtr-general-request at rubyforge.org
Sent: Wednesday, July 19, 2006 10:21 AM
To: wtr-general at rubyforge.org
Subject: Wtr-general Digest, Vol 32, Issue 28
Send Wtr-general mailing list submissions to
wtr-general at rubyforge.org
To subscribe or unsubscribe via the World Wide Web, visit
http://rubyforge.org/mailman/listinfo/wtr-general
or, via email, send a message with subject or body 'help' to
wtr-general-request at rubyforge.org
You can reach the person managing the list at
wtr-general-owner at rubyforge.org
When replying, please edit your Subject line so it is more specific than
"Re: Contents of Wtr-general digest..."
Today's Topics:
1. Re: for loop syntax?? (Cain, Mark)
2. Re: for loop syntax?? (Charley Baker)
3. Re: Page Loading Problem (Charley Baker)
4. Re: Best way to log Watir output? (Charley Baker)
5. Re: Best way to log Watir output? (Michael Bolton)
----------------------------------------------------------------------
Message: 1
Date: Wed, 19 Jul 2006 07:05:53 -0700
From: "Cain, Mark"
Subject: Re: [Wtr-general] for loop syntax??
To:
Message-ID:
Content-Type: text/plain; charset="US-ASCII"
You will need to these:
require 'test/unit'
require 'test/unit/ui/console/testrunner'
require 'watir/testUnitAddons'
require 'watir/testcase'
I usually add the setup.rb from the unittest directory instead because
these requires are already in it.
--Mark
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of mi
Sent: Tuesday, July 18, 2006 4:23 PM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] for loop syntax??
Hi all,
I'm using a for loop to access arrays to fill all the text fields in my
forms. For some reason, i'm getting the following error at the end of
the for loop execution???
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in `assert_exists': Unable
to locate object, using name and
(Watir::Exception::UnknownObjectException)
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3382:in `set'
from c:/ruby/lib/ruby/site_ruby/1.8/watir/watir_simple.rb:402:in
`fill_text_field'
from SmokeTest.rb:25
from SmokeTest.rb:24
Thanks in advance!
<<<<>
require 'watir' # the watir controller\
require 'watir/watir_simple'
include Watir
include Watir::Simple
Simple1 = Simple
test_site = 'http://dev01.pheedo.com'
pubInfoTextFields = ['user', 'email', 'password', 'repass', 'url',
'ssn', 'payment_address', 'payment_city', 'payment_zip'] pubInfo =
['pubUserName', 'mdove at pheedo.com', '1', '1', 'http://www.test.com',
'1234', '123 st', 'some city', '97035'] #[user name, emaildAdd, passwd1,
passwd2, yourSite, TaxID, StreetAdd, CityName, State, ZipCode]
Simple1.new_browser_at(test_site)
Simple1.click_link_with_text("Sign up now") #same as
Simple::click_link_with_text("Sign up now")
#click on Publisher's sign up page
Simple1.click_link_with_url(test_site+"/register.phdo?mode=publish")
#Enter all the required fields
x=0
for x in 0..9 do
Simple1.fill_text_field(pubInfoTextFields[x], pubInfo[x])
puts "pubInfoTextFields = "+pubInfoTextFields[x]+" pubInfo =
"+pubInfo[x]
end
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
------------------------------
Message: 2
Date: Wed, 19 Jul 2006 08:43:20 -0600
From: "Charley Baker"
Subject: Re: [Wtr-general] for loop syntax??
To: wtr-general at rubyforge.org
Message-ID:
Content-Type: text/plain; charset="iso-8859-1"
Your loop is 0-9 which is 10, your arrays are only 9 items long. You've
overshot it by one.
for x in 0..8 do
.......
-Charley
On 7/19/06, Cain, Mark wrote:
>
> You will need to these:
>
> require 'test/unit'
> require 'test/unit/ui/console/testrunner'
> require 'watir/testUnitAddons'
> require 'watir/testcase'
>
> I usually add the setup.rb from the unittest directory instead because
> these requires are already in it.
>
> --Mark
>
> -----Original Message-----
> From: wtr-general-bounces at rubyforge.org
> [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of mi
> Sent: Tuesday, July 18, 2006 4:23 PM
> To: wtr-general at rubyforge.org
> Subject: [Wtr-general] for loop syntax??
>
> Hi all,
>
> I'm using a for loop to access arrays to fill all the text fields in
> my
>
> forms. For some reason, i'm getting the following error at the end of
> the for loop execution???
> c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in `assert_exists':
> Unable to locate object, using name and
> (Watir::Exception::UnknownObjectException)
> from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3382:in `set'
> from c:/ruby/lib/ruby/site_ruby/1.8/watir/watir_simple.rb:402:in
> `fill_text_field'
> from SmokeTest.rb:25
> from SmokeTest.rb:24
>
>
> Thanks in advance!
>
> <<<<>
>
> require 'watir' # the watir controller\
> require 'watir/watir_simple'
> include Watir
> include Watir::Simple
>
> Simple1 = Simple
>
> test_site = 'http://dev01.pheedo.com'
> pubInfoTextFields = ['user', 'email', 'password', 'repass', 'url',
> 'ssn', 'payment_address', 'payment_city', 'payment_zip'] pubInfo =
> ['pubUserName', 'mdove at pheedo.com', '1', '1', 'http://www.test.com',
> '1234', '123 st', 'some city', '97035'] #[user name, emaildAdd,
> passwd1, passwd2, yourSite, TaxID, StreetAdd, CityName, State,
> ZipCode]
>
> Simple1.new_browser_at(test_site)
> Simple1.click_link_with_text("Sign up now") #same as
> Simple::click_link_with_text("Sign up now")
>
> #click on Publisher's sign up page
> Simple1.click_link_with_url(test_site+"/register.phdo?mode=publish")
>
> #Enter all the required fields
> x=0
> for x in 0..9 do
> Simple1.fill_text_field(pubInfoTextFields[x], pubInfo[x])
> puts "pubInfoTextFields = "+pubInfoTextFields[x]+" pubInfo =
> "+pubInfo[x]
> end
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://rubyforge.org/pipermail/wtr-general/attachments/20060719/0a9c6244
/attachment-0001.html
------------------------------
Message: 3
Date: Wed, 19 Jul 2006 08:58:34 -0600
From: "Charley Baker"
Subject: Re: [Wtr-general] Page Loading Problem
To: wtr-general at rubyforge.org
Message-ID:
Content-Type: text/plain; charset="iso-8859-1"
You can turn off image loading in the ie options dialog under advanced.
I'm not aware of any other way to set Watir not to wait for ready state
from the browser.
-Charley
On 7/18/06, David Solis wrote:
>
> I have a problem with a site taking too long to load. I'm hoping
> somebody can point in the right direction.
> The test environment in which my script runs takes a long time to load
> images. The following statement waits for the page to be loaded:
>
> $ie.text_field(:name, "username").set(casino_user)
>
> Is there a way that I can force this statement to start running
> without waiting for the page to completely load?
>
> class LoginCasino
> def initialize(casino_user, casino_password, casino_url,
> casino_submit_key, cgc_submit_key)
> $ie = Watir::IE.start(casino_url)
> if $ie.contains_text("Username:")
> $ie.goto($casino_url+"/security/logoff.do")
> end
> $ie.text_field(:name, "username").set(casino_user)
> $ie.text_field(:name, "password").set(casino_password)
> if (($casino_url=~/wpt/) || ($casino_url=~/msn/) ||
> ($casino_url=~/vgfo/))
> $ie.button(:value, casino_submit_key).click
> elsif (($casino_url=~/cqa/) || ($casino_url=~/cdev/))
> $ie.button(:value, cgc_submit_key).click
> end
>
> #$ie.image(:src, submit_key).click()
> end
> def logout (casino_url)
> if (($casino_url=~/wpt/) || ($casino_url=~/msn/) ||
> ($casino_url=~/vgfo/))
> $ie.goto($casino_url+"/security/logoff.do")
> elsif (($casino_url=~/cqa/) || ($casino_url=~/cdev/))
> $ie.link(:text, "Log Out").click
> end
> end
>
> def shutdown
> $ie.close
> sleep 1
> end
> end
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://rubyforge.org/pipermail/wtr-general/attachments/20060719/431ca445
/attachment-0001.html
------------------------------
Message: 4
Date: Wed, 19 Jul 2006 09:04:29 -0600
From: "Charley Baker"
Subject: Re: [Wtr-general] Best way to log Watir output?
To: wtr-general at rubyforge.org
Message-ID:
Content-Type: text/plain; charset="iso-8859-1"
Adam,
If you want to create a log file look at logger which is a Ruby
library, Watir makes use of it in WatirLogger. Otherwise if you're
looking for a junit type of test run dashboard and you're using
Test::Unit, take a look at Test Unit Reporter:
http://rubyforge.org/frs/?group_id=319
It can dump out reports in either html or xml.
-Charley
On 7/19/06, Adam Reed wrote:
>
> What is the best way to create a log file, or otherwise manipulate
> Watir test output?
>
> I am looking a building a framework for testing, and it would be nice
> to output test results to a webpage, flat file, or even to a dashboard
> "results window". I would want to include variables used (eg,
> username/password for a login script, this seems straightforward), but
> most importantly assertion results, test date and time, etc.
>
> Thanks,
> Adam
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://rubyforge.org/pipermail/wtr-general/attachments/20060719/3d37e621
/attachment-0001.html
------------------------------
Message: 5
Date: Wed, 19 Jul 2006 11:20:53 -0400
From: "Michael Bolton"
Subject: Re: [Wtr-general] Best way to log Watir output?
To:
Message-ID: <011e01c6ab46$ed201140$6501a8c0 at Koko>
Content-Type: text/plain; charset="us-ascii"
Ruby's Logger object? What do you mean by "best"?
---Michael B.
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Adam Reed
Sent: July 19, 2006 9:51 AM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] Best way to log Watir output?
What is the best way to create a log file, or otherwise manipulate Watir
test output?
I am looking a building a framework for testing, and it would be nice to
output test results to a webpage, flat file, or even to a dashboard
"results window". I would want to include variables used (eg,
username/password for a login script, this seems straightforward), but
most importantly assertion results, test date and time, etc.
Thanks,
Adam
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of
wtr-general-request at rubyforge.org
Sent: Tuesday, July 18, 2006 9:37 PM
To: wtr-general at rubyforge.org
Subject: Wtr-general Digest, Vol 32, Issue 26
Send Wtr-general mailing list submissions to
wtr-general at rubyforge.org
To subscribe or unsubscribe via the World Wide Web, visit
http://rubyforge.org/mailman/listinfo/wtr-general
or, via email, send a message with subject or body 'help' to
wtr-general-request at rubyforge.org
You can reach the person managing the list at
wtr-general-owner at rubyforge.org
When replying, please edit your Subject line so it is more specific than
"Re: Contents of Wtr-general digest..."
Today's Topics:
1. Re: Install problem? (Simo, Ben)
2. problem with nested frames (Xavier Noria)
3. for loop syntax?? (mi)
4. Page Loading Problem (David Solis)
----------------------------------------------------------------------
Message: 1
Date: Tue, 18 Jul 2006 13:34:18 -0600
From: "Simo, Ben"
Subject: Re: [Wtr-general] Install problem?
To:
Message-ID:
Content-Type: text/plain; charset="iso-8859-1"
I just reinstalled WATIR using the GEM file instead of the one-step
install. Now it works. Thank you.
Ben
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Cain, Mark
Sent: Tuesday, July 18, 2006 1:30 PM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] Install problem?
I just remembered, one of the last times I installed ruby (either rc 3
or final I can't remember which) blew away ALL of my path information.
You might check to make sure ruby/bin and ruby/lib are in your path
environment variable.
--Mark
_____
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Simo, Ben
Sent: Tuesday, July 18, 2006 12:21 PM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] Install problem?
Mark,
Thanks, but that didn't seem to fix the problem. I am having the same
problem on two different Windows XP PCs (one SP1, the other SP2).
Ben
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Cain, Mark
Sent: Tuesday, July 18, 2006 8:14 AM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] Install problem?
I have always had to install rubygems for a new ruby install.
Get the gem here:
http://rubyforge.org/projects/rubygems/
Download it somewhere. Open a command prompt and navigate to where you
downloaded it. Type gem install rubygems*.gem
This fix the same problem for me on a new install.
Hope this helps,
--Mark
_____
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Simo, Ben
Sent: Monday, July 17, 2006 3:45 PM
To: Wtr-general at rubyforge.org
Subject: [Wtr-general] Install problem?
Hello,
I have just installed Ruby and WATIR on a Windows XP box.
When I try to run the unit tests, I get an error stating that
"gem_original_require" is missing.
C:\watir\unittests>all_tests.rb
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require': no such file to load -- watir (LoadError)
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from C:/watir/unittests/../unittests/setup.rb:4
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from C:/watir/unittests/all_tests.rb:4
I'm not sure if it matters: when I installed WATIR from the .exe
package, I got errors about not being able to write to c:\watir until I
manually created the directory. I manually created the c:\watir
directory and then installed to it.
Any ideas why I can't run the all_tests.rb script?
Thank you,
Ben Simo
_____
The information contained in this message is intended only for the
recipient, and may be a confidential attorney-client communication or
may otherwise be privileged and confidential and protected from
disclosure. If the reader of this message is not the intended recipient,
or an employee or agent responsible for delivering this message to the
intended recipient, please be aware that any dissemination or copying of
this communication is strictly prohibited. If you have received this
communication in error, please immediately notify us by replying to the
message and deleting it from your computer.
_____
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://rubyforge.org/pipermail/wtr-general/attachments/20060718/5368a04f
/attachment-0001.html
------------------------------
Message: 2
Date: Tue, 18 Jul 2006 23:20:38 +0200
From: Xavier Noria
Subject: [Wtr-general] problem with nested frames
To: Wtr-general at rubyforge.org
Message-ID:
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Just in case this rings some bell.
I go to a page that has frames A and B. The latter in turn is a frameset
with 4 frames, say B1, ..., B4. The main area of the page is
B3 and I need to follow a link in B2 to change the main area. Problem is
B3, accessed as
ie.frame('B').frame('B3')
has the same HTML before and after the link in B2 is clicked. This
website is quite convoluted, but since Watir asks for frames to IE each
time I invoke frame() I don't understand what may be happening.
Any idea?
-- fxn
------------------------------
Message: 3
Date: Tue, 18 Jul 2006 16:23:15 -0700
From: mi
Subject: [Wtr-general] for loop syntax??
To: wtr-general at rubyforge.org
Message-ID: <44BD6D63.6040708 at pheedo.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hi all,
I'm using a for loop to access arrays to fill all the text fields in my
forms. For some reason, i'm getting the following error at the end of
the for loop execution???
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in `assert_exists': Unable
to locate object, using name and
(Watir::Exception::UnknownObjectException)
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3382:in `set'
from c:/ruby/lib/ruby/site_ruby/1.8/watir/watir_simple.rb:402:in
`fill_text_field'
from SmokeTest.rb:25
from SmokeTest.rb:24
Thanks in advance!
<<<<>
require 'watir' # the watir controller\
require 'watir/watir_simple'
include Watir
include Watir::Simple
Simple1 = Simple
test_site = 'http://dev01.pheedo.com'
pubInfoTextFields = ['user', 'email', 'password', 'repass', 'url',
'ssn', 'payment_address', 'payment_city', 'payment_zip'] pubInfo =
['pubUserName', 'mdove at pheedo.com', '1', '1', 'http://www.test.com',
'1234', '123 st', 'some city', '97035'] #[user name, emaildAdd, passwd1,
passwd2, yourSite, TaxID, StreetAdd, CityName, State, ZipCode]
Simple1.new_browser_at(test_site)
Simple1.click_link_with_text("Sign up now") #same as
Simple::click_link_with_text("Sign up now")
#click on Publisher's sign up page
Simple1.click_link_with_url(test_site+"/register.phdo?mode=publish")
#Enter all the required fields
x=0
for x in 0..9 do
Simple1.fill_text_field(pubInfoTextFields[x], pubInfo[x])
puts "pubInfoTextFields = "+pubInfoTextFields[x]+" pubInfo =
"+pubInfo[x]
end
------------------------------
Message: 4
Date: Tue, 18 Jul 2006 19:36:39 -0700 (PDT)
From: David Solis
Subject: [Wtr-general] Page Loading Problem
To: wtr-general at rubyforge.org
Message-ID: <20060719023639.92061.qmail at web82805.mail.mud.yahoo.com>
Content-Type: text/plain; charset="iso-8859-1"
I have a problem with a site taking too long to load. I'm hoping
somebody can point in the right direction.
The test environment in which my script runs takes a long time to load
images. The following statement waits for the page to be loaded:
$ie.text_field(:name, "username").set(casino_user)
Is there a way that I can force this statement to start running
without waiting for the page to completely load?
class LoginCasino
def initialize(casino_user, casino_password, casino_url,
casino_submit_key, cgc_submit_key)
$ie = Watir::IE.start(casino_url)
if $ie.contains_text("Username:")
$ie.goto($casino_url+"/security/logoff.do")
end
$ie.text_field(:name, "username").set(casino_user)
$ie.text_field(:name, "password").set(casino_password)
if (($casino_url=~/wpt/) || ($casino_url=~/msn/) ||
($casino_url=~/vgfo/))
$ie.button(:value, casino_submit_key).click
elsif (($casino_url=~/cqa/) || ($casino_url=~/cdev/))
$ie.button(:value, cgc_submit_key).click
end
#$ie.image(:src, submit_key).click()
end
def logout (casino_url)
if (($casino_url=~/wpt/) || ($casino_url=~/msn/) ||
($casino_url=~/vgfo/))
$ie.goto($casino_url+"/security/logoff.do")
elsif (($casino_url=~/cqa/) || ($casino_url=~/cdev/))
$ie.link(:text, "Log Out").click
end
end
def shutdown
$ie.close
sleep 1
end
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://rubyforge.org/pipermail/wtr-general/attachments/20060718/75ebd76e
/attachment.html
------------------------------
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
End of Wtr-general Digest, Vol 32, Issue 26
*******************************************
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
------------------------------
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
End of Wtr-general Digest, Vol 32, Issue 28
*******************************************
From mdove at pheedo.com Wed Jul 19 11:53:17 2006
From: mdove at pheedo.com (mi)
Date: Wed, 19 Jul 2006 08:53:17 -0700
Subject: [Wtr-general] for loop syntax??
In-Reply-To:
References: <44BD6D63.6040708@pheedo.com>
Message-ID: <44BE556D.5080909@pheedo.com>
ahhhhhhhhhhh, That was it!!! I'm just NOT used to start an iteration
form 0:-( THANKS a million!!!!!!!!
Charley Baker wrote:
> Your loop is 0-9 which is 10, your arrays are only 9 items long.
> You've overshot it by one.
>
> for x in 0..8 do
> .......
>
> -Charley
>
> On 7/19/06, * Cain, Mark* >
> wrote:
>
> You will need to these:
>
> require 'test/unit'
> require 'test/unit/ui/console/testrunner'
> require 'watir/testUnitAddons'
> require 'watir/testcase'
>
> I usually add the setup.rb from the unittest directory instead because
> these requires are already in it.
>
> --Mark
>
> -----Original Message-----
> From: wtr-general-bounces at rubyforge.org
>
> [mailto:wtr-general-bounces at rubyforge.org
> ] On Behalf Of mi
> Sent: Tuesday, July 18, 2006 4:23 PM
> To: wtr-general at rubyforge.org
> Subject: [Wtr-general] for loop syntax??
>
> Hi all,
>
> I'm using a for loop to access arrays to fill all the text fields
> in my
>
> forms. For some reason, i'm getting the following error at the end of
> the for loop execution???
> c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in `assert_exists':
> Unable
> to locate object, using name and
> (Watir::Exception::UnknownObjectException)
> from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3382:in `set'
> from c:/ruby/lib/ruby/site_ruby/1.8/watir/watir_simple.rb:402:in
> `fill_text_field'
> from SmokeTest.rb :25
> from SmokeTest.rb:24
>
>
> Thanks in advance!
>
> <<<<>
>
> require 'watir' # the watir controller\
> require 'watir/watir_simple'
> include Watir
> include Watir::Simple
>
> Simple1 = Simple
>
> test_site = 'http://dev01.pheedo.com'
> pubInfoTextFields = ['user', 'email', 'password', 'repass', 'url',
> 'ssn', 'payment_address', 'payment_city', 'payment_zip']
> pubInfo = ['pubUserName', 'mdove at pheedo.com
> ', '1', '1',
> 'http://www.test.com', '1234', '123 st', 'some city', '97035']
> #[user name, emaildAdd, passwd1, passwd2, yourSite, TaxID, StreetAdd,
> CityName, State, ZipCode]
>
> Simple1.new_browser_at(test_site)
> Simple1.click_link_with_text("Sign up now") #same as
> Simple::click_link_with_text("Sign up now")
>
> #click on Publisher's sign up page
> Simple1.click_link_with_url(test_site+"/register.phdo?mode=publish")
>
> #Enter all the required fields
> x=0
> for x in 0..9 do
> Simple1.fill_text_field(pubInfoTextFields[x], pubInfo[x])
> puts "pubInfoTextFields = "+pubInfoTextFields[x]+" pubInfo =
> "+pubInfo[x]
> end
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
From christopher.mcmahon at gmail.com Wed Jul 19 12:02:25 2006
From: christopher.mcmahon at gmail.com (Chris McMahon)
Date: Wed, 19 Jul 2006 09:02:25 -0700
Subject: [Wtr-general] for loop syntax??
In-Reply-To: <44BE556D.5080909@pheedo.com>
References: <44BD6D63.6040708@pheedo.com>
<44BE556D.5080909@pheedo.com>
Message-ID: <72799cd70607190902u290903a3w31d35c9120ba4903@mail.gmail.com>
On 7/19/06, mi wrote:
> ahhhhhhhhhhh, That was it!!! I'm just NOT used to start an iteration
> form 0:-( THANKS a million!!!!!!!!
Ruby folks don't generally use for loops:
1.upto 9 do |x|
puts x
end
ruby loop.rb
1
2
3
4
5
6
7
8
9
>Exit code: 0
From tester.paul at gmail.com Wed Jul 19 12:20:05 2006
From: tester.paul at gmail.com (Paul Carvalho)
Date: Wed, 19 Jul 2006 12:20:05 -0400
Subject: [Wtr-general] for loop syntax??
In-Reply-To: <72799cd70607190902u290903a3w31d35c9120ba4903@mail.gmail.com>
References: <44BD6D63.6040708@pheedo.com>
<44BE556D.5080909@pheedo.com>
<72799cd70607190902u290903a3w31d35c9120ba4903@mail.gmail.com>
Message-ID: <37c405480607190920w126a23aax5c732828a22ed8b6@mail.gmail.com>
Ruby rocks! My fav is:
9.times {|x| puts x}
It doesn't get any clearer for me than just telling it how many times I want
it to loop without worrying about extra syntax that I'm likely to get
wrong.. ;)
On 19/07/06, Chris McMahon wrote:
>
> On 7/19/06, mi wrote:
> > ahhhhhhhhhhh, That was it!!! I'm just NOT used to start an iteration
> > form 0:-( THANKS a million!!!!!!!!
>
> Ruby folks don't generally use for loops:
>
>
> 1.upto 9 do |x|
> puts x
> end
>
> ruby loop.rb
> 1
> 2
> 3
> 4
> 5
> 6
> 7
> 8
> 9
> >Exit code: 0
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060719/31cef6d7/attachment.html
From rand.thacker at gmail.com Wed Jul 19 12:43:04 2006
From: rand.thacker at gmail.com (Rand Thacker)
Date: Wed, 19 Jul 2006 11:43:04 -0500
Subject: [Wtr-general] for loop syntax??
In-Reply-To: <37c405480607190920w126a23aax5c732828a22ed8b6@mail.gmail.com>
References: <44BD6D63.6040708@pheedo.com>
<44BE556D.5080909@pheedo.com>
<72799cd70607190902u290903a3w31d35c9120ba4903@mail.gmail.com>
<37c405480607190920w126a23aax5c732828a22ed8b6@mail.gmail.com>
Message-ID: <33dc42ea0607190943t49bec021i5bc17e560c0b640@mail.gmail.com>
Let's not forget the each_index method, then the size of the array no longer
matters:
pubInfoTextFields.each_index {|x|
Simple1.fill_text_field(pubInfoTextFields[x], pubInfo[x])
puts "pubInfoTextFields = "+pubInfoTextFields[x]+" pubInfo =
"+pubInfo[x]
}
On 7/19/06, Paul Carvalho wrote:
>
> Ruby rocks! My fav is:
>
> 9.times {|x| puts x}
>
> It doesn't get any clearer for me than just telling it how many times I
> want it to loop without worrying about extra syntax that I'm likely to get
> wrong.. ;)
>
>
>
>
> On 19/07/06, Chris McMahon wrote:
> >
> > On 7/19/06, mi wrote:
> > > ahhhhhhhhhhh, That was it!!! I'm just NOT used to start an iteration
> > > form 0:-( THANKS a million!!!!!!!!
> >
> > Ruby folks don't generally use for loops:
> >
> >
> > 1.upto 9 do |x|
> > puts x
> > end
> >
> > ruby loop.rb
> > 1
> > 2
> > 3
> > 4
> > 5
> > 6
> > 7
> > 8
> > 9
> > >Exit code: 0
> >
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
--
"I am the most humble person in the world!"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060719/e53a0166/attachment.html
From mb at michaelbolton.net Wed Jul 19 13:20:30 2006
From: mb at michaelbolton.net (Michael Bolton)
Date: Wed, 19 Jul 2006 13:20:30 -0400
Subject: [Wtr-general] Best way to log Watir output?
In-Reply-To: <2757CAE9849293409BFE6562B9495162198BA6@rccexh001.relocationcentral.com>
Message-ID: <017401c6ab57$a2bdf3e0$6501a8c0@Koko>
>The only resource I was able to find online pointed me back to
the test_logger.rb script in watir/examples/logging. This script
manually logs each action by doing a result/escape on each assertion to
output the result to a .txt file. While this works, it's tedious and
inefficient for a large script. I thought there would have to be a
better way, such as "grabbing" the SCIte output, since it contains
exactly what I would want.
If all you want to do it to grab the output, the simple thing to do is to
pipe the output to a file:
myscript.rb > outputfile.txt
That's simplest; it may not be best.
>Someone has now suggested that I take a look at WET to accompany
Ruby. Is this, or another method, an accepted "best practice" as far as
Watir scripting goes?
There are no best practices. Who cares what other people claim is best?
What works for /you/?
---Michael B.
From zeljko.filipin at gmail.com Wed Jul 19 15:33:30 2006
From: zeljko.filipin at gmail.com (Zeljko Filipin)
Date: Wed, 19 Jul 2006 21:33:30 +0200
Subject: [Wtr-general] How to handle tab buttons
In-Reply-To: <000f01c6a66d$6cd321e0$6520a8c0@caseshare.com>
References:
<000f01c6a66d$6cd321e0$6520a8c0@caseshare.com>
Message-ID:
Your tab is just a cell in a table.
ie.cell(:id, "tbJobstd0").click
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060719/c8fb8c3b/attachment.html
From zeljko.filipin at gmail.com Wed Jul 19 16:09:57 2006
From: zeljko.filipin at gmail.com (Zeljko Filipin)
Date: Wed, 19 Jul 2006 22:09:57 +0200
Subject: [Wtr-general] Just wanted to invoke click event where the
button have parameters in it
In-Reply-To: <20060719050427.44746.qmail@web7814.mail.in.yahoo.com>
References: <20060719050427.44746.qmail@web7814.mail.in.yahoo.com>
Message-ID:
HTML that you provided is not valid. Three tags have the same id. Ids should
be unique.
Can you ask your developer to change
to
In short, change id="delete" to id="KH".
Then you could access it like this
ie.button(:id, "KH").click
On 7/19/06, VIKASH KUMAR wrote:
>
> Sir,
> In my web page there are lots of buttons having same name, they are called
> using javascript. They are as follows:
>
>
>
>
>
>
>
>
> *ie.button(:index,3).click* , this works great if we know the index, but *if
> someone just doesn't know the index, knows only the parameter which is
> ('delete', 'KH'), then what is the solution for it?*
>
> Please send me the solution for this.
> Thanks in Advance
>
> With Regards
>
> Vikash Kumar
>
> ------------------------------
> Find out what India is talking about on Yahoo! Answers India.
> Send FREE SMS from New Yahoo! Messenger to Mobile: Download NOW!
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060719/2583ab12/attachment.html
From krystynak at gmail.com Wed Jul 19 20:06:13 2006
From: krystynak at gmail.com (John Krystynak)
Date: Wed, 19 Jul 2006 17:06:13 -0700
Subject: [Wtr-general] File Download dialog never gets attached/found
Message-ID:
I want to get Watir to load a page, press a "download file" button and
save the file.
This first part works fine - and the "File Download" dialog comes up
--------- PART 1 ----------------
require 'Watir'
include Watir
ie = IE.new
ie.goto("http://example.com")
ie.button(:value,"Login").click
ie.link(:id, "csv_link").click
-------------------------------------
If I run PART 1 from the command line, it never exits, it just keeps
running while the File Download dialog is up.
However, if I include the autoit code (below) in the same file, it
never clicks the file dialog.
If I kill it the running PART I script, and then run the following:
% ruby autoitFS.rb myfile
where the autoitFS.rb is code like this:
----- autoitFS.rb ---------------------
require 'win32ole'
autoit = WIN32OLE.new("AutoItX3.Control")
file = ARGV[0]
autoit.WinWait("File Download")
autoit.ControlClick("File Download", "Would you like to open the file
or save it to your computer?", "&Save")
autoit.WinWait("Save As", "Save &in", 3)
autoit.ControlSetText("Save As", "Save &in", "Edit1", "E\:\\Docs\\" +
file + ".csv")
autoit.ControlClick("Save As", "Save &in", "&Save")
--------------------------
It works...
To summarize: it works if I run the scripts separately - and I Ctrl-C
the first script when the dialog comes up. It doesn't work if I
combine the scripts into one ruby file.
How can I get this to work from within one .rb file so I can loop over
a bunch of URLs?
Also, how can I get the first script to exit by itself?
I tried doing this from at the bottom of PART 1
system( "ruby autoitFS.rb myfile" )
but nothing happenend.
Thanks,
johnk
--
Compare New & Used Networking Equipment
http://routercomp.com
From manishs at reconnex.net Thu Jul 20 00:41:28 2006
From: manishs at reconnex.net (manishs at reconnex.net)
Date: Thu, 20 Jul 2006 10:11:28 +0530
Subject: [Wtr-general] for loop syntax??
In-Reply-To: <37c405480607190920w126a23aax5c732828a22ed8b6@mail.gmail.com>
References: <44BD6D63.6040708@pheedo.com>
<72799cd70607190902u290903a3w31d35c9120ba4903@mail.gmail.com>
<37c405480607190920w126a23aax5c732828a22ed8b6@mail.gmail.com>
Message-ID: <200607201011.29378.manishs@reconnex.net>
Does these constructs provide the current index value somehow?
Regards,
Manish
On Wednesday 19 July 2006 21:50, Paul Carvalho wrote:
> Ruby rocks! My fav is:
>
> 9.times {|x| puts x}
>
> It doesn't get any clearer for me than just telling it how many times I
> want it to loop without worrying about extra syntax that I'm likely to get
> wrong.. ;)
>
> On 19/07/06, Chris McMahon wrote:
> > On 7/19/06, mi wrote:
> > > ahhhhhhhhhhh, That was it!!! I'm just NOT used to start an iteration
> > > form 0:-( THANKS a million!!!!!!!!
> >
> > Ruby folks don't generally use for loops:
> >
> >
> > 1.upto 9 do |x|
> > puts x
> > end
> >
> > ruby loop.rb
> > 1
> > 2
> > 3
> > 4
> > 5
> > 6
> > 7
> > 8
> > 9
> >
> > >Exit code: 0
From sikander at marlabs.com Thu Jul 20 02:56:37 2006
From: sikander at marlabs.com (sikander)
Date: Thu, 20 Jul 2006 12:26:37 +0530
Subject: [Wtr-general] Check Syntax in SciTE Version 1.67
Message-ID: <002201c6abc9$a8758c90$6520a8c0@caseshare.com>
Hi!!
There is no option called 'Check Syntax - Ctrl + 1' in SciTE Version 1.67 of
Ruby, Please add it
Regards,
Sikander
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060720/192f5edc/attachment.html
From zeljko.filipin at gmail.com Thu Jul 20 06:21:27 2006
From: zeljko.filipin at gmail.com (Zeljko Filipin)
Date: Thu, 20 Jul 2006 12:21:27 +0200
Subject: [Wtr-general] Check Syntax in SciTE Version 1.67
In-Reply-To: <002201c6abc9$a8758c90$6520a8c0@caseshare.com>
References: <002201c6abc9$a8758c90$6520a8c0@caseshare.com>
Message-ID:
You should probably post this to some scite mailing list (
http://www.scintilla.org/SciTE.html).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060720/500b6d2d/attachment.html
From polleu at xpiece.com Thu Jul 20 10:05:35 2006
From: polleu at xpiece.com (polleu at xpiece.com)
Date: Thu, 20 Jul 2006 16:05:35 +0200 (CEST)
Subject: [Wtr-general] Rounding values
Message-ID: <20060720140535.3250C80DA5D@mail.tamergotchya.de>
Hi all,
I want to verify if the text is correctly displayed depending on
different input scenarios. The web application however rounds values,
e.g. if the calculated result is 170500 then displayed should be
180000.
How can i do same in Ruby/Watir?
Thanks,
Ulrike
From rand.thacker at gmail.com Thu Jul 20 10:46:10 2006
From: rand.thacker at gmail.com (Rand Thacker)
Date: Thu, 20 Jul 2006 09:46:10 -0500
Subject: [Wtr-general] Rounding values
In-Reply-To: <20060720140535.3250C80DA5D@mail.tamergotchya.de>
References: <20060720140535.3250C80DA5D@mail.tamergotchya.de>
Message-ID: <33dc42ea0607200746u236exd48deea5e769bcb5@mail.gmail.com>
You could do something like this:
x = (y/10000 + 1) * 10000
Of course, if the exponent of the numbers changes, you might want to define
a function that can put more intelligence in there.
On 7/20/06, polleu at xpiece.com wrote:
>
> Hi all,
>
> I want to verify if the text is correctly displayed depending on
> different input scenarios. The web application however rounds values,
> e.g. if the calculated result is 170500 then displayed should be
> 180000.
>
> How can i do same in Ruby/Watir?
>
> Thanks,
> Ulrike
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
--
"I am the most humble person in the world!"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060720/ad253fec/attachment.html
From christopher.mcmahon at gmail.com Thu Jul 20 11:11:41 2006
From: christopher.mcmahon at gmail.com (Chris McMahon)
Date: Thu, 20 Jul 2006 08:11:41 -0700
Subject: [Wtr-general] for loop syntax??
In-Reply-To: <200607201011.29378.manishs@reconnex.net>
References: <44BD6D63.6040708@pheedo.com>
<72799cd70607190902u290903a3w31d35c9120ba4903@mail.gmail.com>
<37c405480607190920w126a23aax5c732828a22ed8b6@mail.gmail.com>
<200607201011.29378.manishs@reconnex.net>
Message-ID: <72799cd70607200811h56f30e36ga7e5f9a88b003848@mail.gmail.com>
On 7/19/06, manishs at reconnex.net wrote:
> Does these constructs provide the current index value somehow?
> Regards,
> Manish
There are probably lots of ways to do that. Here's one, if I
understand the question correctly:
list = ["foo","bar","baz"]
0.upto 2 do |x|
puts "index " + x.to_s + " : " + list[x]
end
>ruby bah.rb
index 0 : foo
index 1 : bar
index 2 : baz
>Exit code: 0
From mb at michaelbolton.net Thu Jul 20 11:18:54 2006
From: mb at michaelbolton.net (Michael Bolton)
Date: Thu, 20 Jul 2006 11:18:54 -0400
Subject: [Wtr-general] Rounding values
In-Reply-To: <20060720140535.3250C80DA5D@mail.tamergotchya.de>
Message-ID: <002201c6ac0f$d0569560$6501a8c0@Koko>
>I want to verify if the text is correctly displayed depending on
different input scenarios. The web application however rounds values,
e.g. if the calculated result is 170500 then displayed should be
180000.
>How can i do same in Ruby/Watir?
I'm not sure I understand the question and the context. Is there a decimal
point involved? Are you trying to round up to some ceiling of thousands?
Can you express your rounding rules in English or math? If so, we can
probably help you to write some Ruby code to do it. Otherwise, there are
lots of ways to interpret the single example you've given, and all but one
of those interpretations will be wrong.
Note that there are different kinds of rounding in different kinds of
contexts.
http://en.wikipedia.org/wiki/Rounding
---Michael B.
From christopher.mcmahon at gmail.com Thu Jul 20 11:22:50 2006
From: christopher.mcmahon at gmail.com (Chris McMahon)
Date: Thu, 20 Jul 2006 08:22:50 -0700
Subject: [Wtr-general] Rounding values
In-Reply-To: <20060720140535.3250C80DA5D@mail.tamergotchya.de>
References: <20060720140535.3250C80DA5D@mail.tamergotchya.de>
Message-ID: <72799cd70607200822u5dd30756w6a9d42ffd68498ba@mail.gmail.com>
On 7/20/06, polleu at xpiece.com wrote:
> Hi all,
>
> I want to verify if the text is correctly displayed depending on
> different input scenarios. The web application however rounds values,
> e.g. if the calculated result is 170500 then displayed should be
> 180000.
>
> How can i do same in Ruby/Watir?
Ruby test/unit has an assert method "assert_in_delta" that looks like
it would do what you want. The code for it is in
C:\ruby\lib\ruby\1.8\test\unit\assertions.rb and it's pretty easy to
read if you want to see exactly how it works.
Also, one of the coolest parts about Ruby is that much of Ruby is
actually written in Ruby-- so if assert_in_delta doesn't do *exactly*
what you want, it's pretty easy to write an assert_foo(() method that
does do exactly what you want.
From kperez at cardinalsolutions.com Thu Jul 20 13:54:23 2006
From: kperez at cardinalsolutions.com (Ken Perez)
Date: Thu, 20 Jul 2006 13:54:23 -0400
Subject: [Wtr-general] Attaching a Popup
Message-ID: <67A1E8E424B41744A599459FE59EA4D40C5EC6@csgcinml01.cardinalsolutions.com>
I copied all the files I needed from here, but when I run that command I get:
undefined method `attach_modal' for # (NoMethodError).
Ive checked the files multiple times, and Im sure I got what you said to. Is there something else I need to do for this to work?
>What you are trying to do can't be done with the version of Watir.rb you
>are using because the page you are trying to attach to is a Modal
>window. Try this one at:
>https://svn.openqa.org/svn/watir/branches/modal_dialog/watir/ (you will
>also need the files from the Watir folder--the IEDialog and Win32ole
>forders.)
>
>Copy the Watir.rb file (and the watir directory mentioned above) into
>you ruby installation directory like:
>C:\ruby\lib\ruby\site_ruby\1.8
>
>ie2 = $ie.attach_modal('Project - Administration')
>
>ie2.button(:value, "Cancel").click
>
>--Mark
From charley.baker at gmail.com Thu Jul 20 14:17:37 2006
From: charley.baker at gmail.com (Charley Baker)
Date: Thu, 20 Jul 2006 12:17:37 -0600
Subject: [Wtr-general] Attaching a Popup
In-Reply-To: <67A1E8E424B41744A599459FE59EA4D40C5EC6@csgcinml01.cardinalsolutions.com>
References: <67A1E8E424B41744A599459FE59EA4D40C5EC6@csgcinml01.cardinalsolutions.com>
Message-ID:
Ken,
You might want to follow the instructions for getting the latest
development gem installed:
http://wiki.openqa.org/display/WTR/FAQ#FAQ-devgem
And if you are working with an IE modal dialog, which you can verify from
the html source, it should have a function showModalDialog() for the popup.
Ugly stuff usually used only on internal apps, I've had to deal with a lot
of them. If it is an ie modal dialog then you can use this to get to it:
modal = ie.modal_dialog
There are some examples in modal_dialog_test.rb in the unittests directory.
The unittests really serve as great documentation for the project in
general.
cheers,
Charley
On 7/20/06, Ken Perez wrote:
>
> I copied all the files I needed from here, but when I run that command I
> get:
> undefined method `attach_modal' for #
> (NoMethodError).
>
> Ive checked the files multiple times, and Im sure I got what you said
> to. Is there something else I need to do for this to work?
>
> >What you are trying to do can't be done with the version of Watir.rb you
> >are using because the page you are trying to attach to is a Modal
> >window. Try this one at:
> >https://svn.openqa.org/svn/watir/branches/modal_dialog/watir/ (you will
> >also need the files from the Watir folder--the IEDialog and Win32ole
> >forders.)
> >
> >Copy the Watir.rb file (and the watir directory mentioned above) into
> >you ruby installation directory like:
> >C:\ruby\lib\ruby\site_ruby\1.8
> >
> >ie2 = $ie.attach_modal('Project - Administration')
> >
> >ie2.button(:value, "Cancel").click
> >
> >--Mark
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060720/cab098da/attachment.html
From NSandhu at raleys.com Thu Jul 20 14:44:42 2006
From: NSandhu at raleys.com (NIcky Sandhu)
Date: Thu, 20 Jul 2006 11:44:42 -0700
Subject: [Wtr-general] Popup menus
Message-ID: <882C8B6492C05E48AEA0C7B2D7D4254E03D463BB@EMAIL.RALEYSNT.SECNET.RALEYS.COM>
I have scanned the mailing list but found nothing for the popup menu as
described in this microsoft document
http://msdn.microsoft.com/workshop/author/om/popup_overview.asp#Navigati
on_With_Popups
Has anyone dealt with these kind of menus, typically implemented by a
call to window.createPopup on the page. I have tried winclicker and
autoit but I cannot get a handle to this window. Any suggestions?
Warning: this e-mail may contain information proprietary to Raley's and is intended only for the use of the intended recipients. If the reader of this message is not an intended recipient, you are hereby notified that you have received this message in error and that any review, dissemination, distribution or copying of this message is strictly prohibited. If you have received this message in error, please notify the sender immediately.
From acalvo at netactica.com Thu Jul 20 17:10:21 2006
From: acalvo at netactica.com (Aureliano Calvo)
Date: Thu, 20 Jul 2006 19:10:21 -0200
Subject: [Wtr-general] Handle pop-ups and simple authentication
Message-ID: <20060720210405.M2571@netactica.com>
Hi!
I'm looking in the Watir documentation, and googled for it, but I can't find a
way to handle pop-ups generated with the javascript method "alert" and be able
to login to a site secured with basic authentication.
Wandering through the source code I've found the WinClicker class, but I don't
understand how to use it.
How can I click on the alerts and/or login to a basic authenticated site?
Thanks in advance,
Aureliano.
From manishs at reconnex.net Fri Jul 21 00:18:57 2006
From: manishs at reconnex.net (Manish Sapariya)
Date: Fri, 21 Jul 2006 09:48:57 +0530
Subject: [Wtr-general] for loop syntax??
In-Reply-To: <72799cd70607200811h56f30e36ga7e5f9a88b003848@mail.gmail.com>
References: <44BD6D63.6040708@pheedo.com> <72799cd70607190902u290903a3w31d35c9120ba4903@mail.gmail.com> <37c405480607190920w126a23aax5c732828a22ed8b6@mail.gmail.com> <200607201011.29378.manishs@reconnex.net>
<72799cd70607200811h56f30e36ga7e5f9a88b003848@mail.gmail.com>
Message-ID: <44C055B1.5020003@reconnex.net>
This is neat.
I used for loops because i wanted to index array like you explained.
Thanks,
Manish
On 07/20/2006 08:41 PM, Chris McMahon wrote:
> On 7/19/06, manishs at reconnex.net wrote:
>
>> Does these constructs provide the current index value somehow?
>> Regards,
>> Manish
>>
>
> There are probably lots of ways to do that. Here's one, if I
> understand the question correctly:
>
>
> list = ["foo","bar","baz"]
>
> 0.upto 2 do |x|
> puts "index " + x.to_s + " : " + list[x]
> end
>
>
>> ruby bah.rb
>>
> index 0 : foo
> index 1 : bar
> index 2 : baz
>
>> Exit code: 0
>>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
From sikander at marlabs.com Fri Jul 21 03:22:25 2006
From: sikander at marlabs.com (sikander)
Date: Fri, 21 Jul 2006 12:52:25 +0530
Subject: [Wtr-general] Getting WIN32OLERuntimeError: focus - Error
Message-ID: <000301c6ac96$6afdaf00$6520a8c0@caseshare.com>
Hi!
I was using the following code to execute my scripts but uncounted
WIN32OLERuntimeError: focus - Error
Code:
$ie.frame("Main").text_field(:id,
"tbJobs__ctl0_txtTbPrnPageNumber").set("2")
$ie.frame("Main").button(:id, "tbJobs__ctl0_btnTbPrnGo").click
Error is:
WIN32OLERuntimeError: focus
OLE error code:800A083E in htmlfile
Can't move focus to the control because it is invisible, not enabled,
or of a type that does not accept the focus.
HRESULT error code:0x80020009
Exception occurred.
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3388:in `method_missing'
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3388:in `set'
Will you plz suggest me how to handle this.
Thanks,
SIkander
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060721/5aca4184/attachment.html
From vikashkumar051 at yahoo.co.in Fri Jul 21 03:52:37 2006
From: vikashkumar051 at yahoo.co.in (VIKASH KUMAR)
Date: Fri, 21 Jul 2006 08:52:37 +0100 (BST)
Subject: [Wtr-general] problem in click event of "div"
In-Reply-To:
Message-ID: <20060721075237.44558.qmail@web7802.mail.in.yahoo.com>
Sir,
How to focus on "div" element & click on that element. I am using HTML having source:
I wanted to click on div having id="tCt2", the below code is not working:
id.div(:id,"tCt2").click
Please send me a solution for this.
Thanks in advance
Vikash Kumar
---------------------------------
Find out what India is talking about on Yahoo! Answers India.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060721/4cbdfe1f/attachment.html
From zeljko.filipin at gmail.com Fri Jul 21 03:58:39 2006
From: zeljko.filipin at gmail.com (Zeljko Filipin)
Date: Fri, 21 Jul 2006 09:58:39 +0200
Subject: [Wtr-general] problem in click event of "div"
In-Reply-To: <20060721075237.44558.qmail@web7802.mail.in.yahoo.com>
References:
<20060721075237.44558.qmail@web7802.mail.in.yahoo.com>
Message-ID:
It seems like a spelling error to me, because this works for me (change
first "id" to "ie"):
ie.div(:id,"tCt2").click
On 7/21/06, VIKASH KUMAR wrote:
>
>
> I wanted to click on div having id="tCt2", the below code is not working:
> *id.div(:id,"tCt2").click*
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060721/be557fcb/attachment.html
From christian.leskowsky at gmail.com Fri Jul 21 08:11:05 2006
From: christian.leskowsky at gmail.com (Christian Leskowsky)
Date: Fri, 21 Jul 2006 08:11:05 -0400
Subject: [Wtr-general] problem in click event of "div"
In-Reply-To:
References:
<20060721075237.44558.qmail@web7802.mail.in.yahoo.com>
Message-ID: <58a2be440607210511m727cb22ag8dcec091d3c43860@mail.gmail.com>
Not sure what clicking on the div will do here. Does it translate into a
click on the inner checkbox?
On 7/21/06, Zeljko Filipin