From wangjun at neusoft.com Tue Nov 1 01:06:29 2005
From: wangjun at neusoft.com (JamesWang)
Date: Tue, 01 Nov 2005 14:06:29 +0800
Subject: [Wtr-general] The problem about method logon of WindowHelper
Message-ID: <008d01c5deaa$6647b830$3824a8c0@jameswangneu>
Hi,
The example WindowLogonExample.rb with watir 1.4 can't work in my
computer.
I think the problem is in the code of WindowLogonExtra.rb of below:
helper = WindowHelper.new
helper.logon('Connect to clio.lyris.com')
there should be three parameters in method logon of WindowHelper as declared
in WindowHelper.rb
def logon(title,name = 'john doe',password = 'john doe')
@autoit.WinWait title, ""
@autoit.Send name
@autoit.Send "{TAB}"
@autoit.Send password
@autoit.Send "{ENTER}"
end
Why is there only title defined in WindowLogonExtra.rb?
Why the title is "Connect to clio.lyris.com" instead of "Enter Network
Password"?
Thanks in advance and best regards!
James
From theebh at gmail.com Tue Nov 1 10:43:21 2005
From: theebh at gmail.com (boonhoo)
Date: Tue, 1 Nov 2005 23:43:21 +0800
Subject: [Wtr-general] Preceding text of textfield
Message-ID: <158e6acb0511010743r10dab3c6o2f7ab1d5a1818ee1@mail.gmail.com>
Hi, is it possible to obtain the preceding text of a textfield in
Watir? For e.g. consider this html -
username :
I would like to obtain the string 'username' that appear before the
textfield. Thanks!
Regards
boonhoo
From john.lloydjones at gmail.com Tue Nov 1 12:10:17 2005
From: john.lloydjones at gmail.com (John Lloyd-Jones)
Date: Tue, 1 Nov 2005 09:10:17 -0800
Subject: [Wtr-general] Preceding text of textfield
In-Reply-To: <158e6acb0511010743r10dab3c6o2f7ab1d5a1818ee1@mail.gmail.com>
References: <158e6acb0511010743r10dab3c6o2f7ab1d5a1818ee1@mail.gmail.com>
Message-ID: <6fcd26f10511010910t21f29c92t6577b010a4b71f7@mail.gmail.com>
For the example you provide, the string you want is a text node. Watir
doesn't really support this very well. I do note that internally, Watir does
use the method "getAdjacentText" to get preceding
(object.getAdjacentText("beforeBegin"))
or following (object.getAdjacentText("afterEnd")) text. The object is the
Element's OLE object (use getOLEObject to get it).
The draw-back is that this stuff might change in later versions (See the
comment for getOLEObject which suggests that it will be "renamed
appropriately").
Use with care.
John
On 11/1/05, boonhoo wrote:
>
> Hi, is it possible to obtain the preceding text of a textfield in
> Watir? For e.g. consider this html -
>
> username :
>
> I would like to obtain the string 'username' that appear before the
> textfield. Thanks!
>
> Regards
> boonhoo
>
> _______________________________________________
> 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/20051101/ab3a4d10/attachment.html
From christopher.mcmahon at gmail.com Tue Nov 1 12:28:16 2005
From: christopher.mcmahon at gmail.com (Chris McMahon)
Date: Tue, 1 Nov 2005 11:28:16 -0600
Subject: [Wtr-general] Preceding text of textfield
In-Reply-To: <158e6acb0511010743r10dab3c6o2f7ab1d5a1818ee1@mail.gmail.com>
References: <158e6acb0511010743r10dab3c6o2f7ab1d5a1818ee1@mail.gmail.com>
Message-ID: <72799cd70511010928k7e4b6e30y8a81c49739108609@mail.gmail.com>
On 11/1/05, boonhoo wrote:
> Hi, is it possible to obtain the preceding text of a textfield in
> Watir? For e.g. consider this html -
>
> username :
>
> I would like to obtain the string 'username' that appear before the
> textfield. Thanks!
Here's a Perlish sort of approach:
################################33
string = "username : "
string =~ /:/
before = $`
match = $&
after = $'
puts before
puts after
#################
Hope that helps.
From bret at pettichord.com Tue Nov 1 13:22:45 2005
From: bret at pettichord.com (Bret Pettichord)
Date: Tue, 01 Nov 2005 12:22:45 -0600
Subject: [Wtr-general] Preceding text of textfield
In-Reply-To: <158e6acb0511010743r10dab3c6o2f7ab1d5a1818ee1@mail.gmail.co
m>
Message-ID: <5.1.0.14.2.20051101122053.036c7698@pop.gmail.com>
At 09:43 AM 11/1/2005, boonhoo wrote:
>Hi, is it possible to obtain the preceding text of a textfield in
>Watir? For e.g. consider this html -
>
>username :
>
>I would like to obtain the string 'username' that appear before the
>textfield. Thanks!
try ie.text_field(:beforeText, 'username')
_____________________
Bret Pettichord
www.pettichord.com
From bret at pettichord.com Tue Nov 1 13:27:02 2005
From: bret at pettichord.com (Bret Pettichord)
Date: Tue, 01 Nov 2005 12:27:02 -0600
Subject: [Wtr-general] MAP and AREA tags...
In-Reply-To: <656F1E1AF2CF664AB5A82AB678EBD81D02AA3B04@TCMAIL1.tcpl.ca>
Message-ID: <5.1.0.14.2.20051101122558.0373a6d8@pop.gmail.com>
At 02:50 PM 10/31/2005, Gary Maxwell wrote:
>I have some html web pages that use the html tags MAP and AREA. Is there
>a way in watir to access and click these types of tags?
Watir can be extended to support any tag. Look at how we support Spans.
Because Ruby is dynamic, you can add methods to existing classes. You don't
actually have to edit the watir.rb file.
Bret
_____________________
Bret Pettichord
www.pettichord.com
From john.lloydjones at gmail.com Tue Nov 1 13:47:06 2005
From: john.lloydjones at gmail.com (John Lloyd-Jones)
Date: Tue, 1 Nov 2005 10:47:06 -0800
Subject: [Wtr-general] Preceding text of textfield
In-Reply-To: <5.1.0.14.2.20051101122053.036c7698@pop.gmail.com>
References: <5.1.0.14.2.20051101122053.036c7698@pop.gmail.com>
Message-ID: <6fcd26f10511011047k77e00413jb3d8984d5fad02a8@mail.gmail.com>
Bret
That's the right way if you know the preceding text. If I understood the
original question correctly, the aim was to find the (possibly unknown) text
preceding a known text input field.
John
On 11/1/05, Bret Pettichord wrote:
>
> At 09:43 AM 11/1/2005, boonhoo wrote:
> >Hi, is it possible to obtain the preceding text of a textfield in
> >Watir? For e.g. consider this html -
> >
> >username :
> >
> >I would like to obtain the string 'username' that appear before the
> >textfield. Thanks!
>
> try ie.text_field(:beforeText, 'username')
>
>
> _____________________
> Bret Pettichord
> www.pettichord.com
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051101/947534c8/attachment.html
From bret at pettichord.com Tue Nov 1 15:37:27 2005
From: bret at pettichord.com (Bret Pettichord)
Date: Tue, 01 Nov 2005 14:37:27 -0600
Subject: [Wtr-general] Preceding text of textfield
In-Reply-To: <6fcd26f10511011047k77e00413jb3d8984d5fad02a8@mail.gmail.co
m>
References: <5.1.0.14.2.20051101122053.036c7698@pop.gmail.com>
<5.1.0.14.2.20051101122053.036c7698@pop.gmail.com>
Message-ID: <5.1.0.14.2.20051101143621.037c6c08@pop.gmail.com>
At 12:47 PM 11/1/2005, John Lloyd-Jones wrote:
>That's the right way if you know the preceding text. If I understood the
>original question correctly, the aim was to find the (possibly unknown)
>text preceding a known text input field.
My mistake. In HEAD, this can be done as
ie.text_field(:name, "whatever").before_text
Bret
_____________________
Bret Pettichord
www.pettichord.com
From lsusilo at rsasecurity.com Tue Nov 1 16:08:21 2005
From: lsusilo at rsasecurity.com (Susilo, Laudhi)
Date: Tue, 1 Nov 2005 13:08:21 -0800
Subject: [Wtr-general] Accessing IE toolbar
Message-ID: <2548B245CD5B9D45AC32CF3889D2E6D0028C20A2@rsana-ex-va1.NA.RSA.NET>
Hi,
I know that Watir provides some functions to control IE menus such as
refresh, maximize, etc.
I was wondering whether it is possible to extend the control to third
party toolbars such as Google or Yahoo toolbar. Is there a way to
programmatically control those toolbars?
Thanks,
Laudhi
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of boonhoo
Sent: Tuesday, November 01, 2005 7:43 AM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] Preceding text of textfield
Hi, is it possible to obtain the preceding text of a textfield in
Watir? For e.g. consider this html -
username :
I would like to obtain the string 'username' that appear before the
textfield. Thanks!
Regards
boonhoo
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
From john.lloydjones at gmail.com Tue Nov 1 18:02:03 2005
From: john.lloydjones at gmail.com (John Lloyd-Jones)
Date: Tue, 1 Nov 2005 15:02:03 -0800
Subject: [Wtr-general] Preceding text of textfield
In-Reply-To: <5.1.0.14.2.20051101143621.037c6c08@pop.gmail.com>
References: <5.1.0.14.2.20051101122053.036c7698@pop.gmail.com>
<5.1.0.14.2.20051101143621.037c6c08@pop.gmail.com>
Message-ID: <6fcd26f10511011502q67a7cb54u671f628fc5b28f@mail.gmail.com>
Splendid.
On 11/1/05, Bret Pettichord wrote:
>
> At 12:47 PM 11/1/2005, John Lloyd-Jones wrote:
> >That's the right way if you know the preceding text. If I understood the
> >original question correctly, the aim was to find the (possibly unknown)
> >text preceding a known text input field.
>
> My mistake. In HEAD, this can be done as
>
> ie.text_field(:name, "whatever").before_text
>
> Bret
>
> _____________________
> Bret Pettichord
> www.pettichord.com
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051101/d8040616/attachment.html
From spammer.sbt at gmail.com Tue Nov 1 18:07:56 2005
From: spammer.sbt at gmail.com (SPAMMER.ME)
Date: Tue, 1 Nov 2005 15:07:56 -0800
Subject: [Wtr-general] The problem about method logon of WindowHelper
References: <008d01c5deaa$6647b830$3824a8c0@jameswangneu>
Message-ID: <004f01c5df39$18970ed0$6bb0a042@corp.lyris.com>
Hi James,
I'm kinda new at Watir and i was looking at the same WindowLogonExtra.rb
example last week.
>>> def logon(title,name = 'john doe',password = 'john doe')
Means that if the 'name' and 'password' variables are not passed in, use the
default values of 'john doe' and 'john doe'. That is what is happening in
WindowLogonExtra.rb.
> Why the title is "Connect to clio.lyris.com" instead of "Enter Network
> Password"?
The title needs to match the frame caption of the logon window. In the
example, the page we are pointing to contains the caption "Connect to
clio....". For your usage you'll have to figure out the caption of the page
you are trying to login to.
Hope that helps.
Steve
----- Original Message -----
From: "JamesWang"
To:
Sent: Monday, October 31, 2005 10:06 PM
Subject: [Wtr-general] The problem about method logon of WindowHelper
> Hi,
> The example WindowLogonExample.rb with watir 1.4 can't work in my
> computer.
> I think the problem is in the code of WindowLogonExtra.rb of below:
>
> helper = WindowHelper.new
> helper.logon('Connect to clio.lyris.com')
>
> there should be three parameters in method logon of WindowHelper as
> declared
> in WindowHelper.rb
>
> def logon(title,name = 'john doe',password = 'john doe')
> @autoit.WinWait title, ""
> @autoit.Send name
> @autoit.Send "{TAB}"
> @autoit.Send password
> @autoit.Send "{ENTER}"
> end
>
> Why is there only title defined in WindowLogonExtra.rb?
> Why the title is "Connect to clio.lyris.com" instead of "Enter Network
> Password"?
>
> Thanks in advance and best regards!
>
> James
>
>
--------------------------------------------------------------------------------
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
From roy_sin at yahoo.com Tue Nov 1 19:56:11 2005
From: roy_sin at yahoo.com (Roy Sin)
Date: Tue, 1 Nov 2005 16:56:11 -0800 (PST)
Subject: [Wtr-general] I'm still unable to click Ok on a confirmation
javascript popup
Message-ID: <20051102005611.8028.qmail@web52911.mail.yahoo.com>
Hi wtr lists
I have tried a few options like WinClicker, and the
jscript_test in the unittests examples but I couldn't get
it to work. Now I'm invoking autoIt from my Watir script.
Description:
I click a delete asset icon which brings up a javascript
popup with the title "Microsoft Internet Explorer" and with
the text "Are you sure you want to delete this asset?". The
popup has two buttons: Ok and Cancel.
This is what i have at the top of my script
require 'win32ole'
autoit = WIN32OLE.new('AutoItX3.Control')
...
and to click the Ok button on the popup I have
autoit.ControlGetFocus "Microsoft Internet Explorer", "Are
you sure you want to delete this asset?"
autoit.ControlClick "Microsoft Internet Explorer", "Ok",
"1", "left", 1
but my Watir script just hangs there without throwing any
errors.
thanks
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
From theebh at gmail.com Tue Nov 1 20:06:26 2005
From: theebh at gmail.com (boonhoo)
Date: Wed, 2 Nov 2005 09:06:26 +0800
Subject: [Wtr-general] Preceding text of textfield
In-Reply-To: <5.1.0.14.2.20051101143621.037c6c08@pop.gmail.com>
References: <5.1.0.14.2.20051101122053.036c7698@pop.gmail.com>
<5.1.0.14.2.20051101143621.037c6c08@pop.gmail.com>
Message-ID: <158e6acb0511011706pc7b6c3ck32707e8d21e4e08e@mail.gmail.com>
great! I will try it later... i was toying with
ie.document.forms(i).elements(i) and it doesn't seem to support the
before_text() method. I will try this method on text_field..
My purpose is to find the preceding text to 'guess' what possible
value to enter into the text field. Thanks eveyrone :)
boonhoo
On 11/2/05, Bret Pettichord wrote:
> At 12:47 PM 11/1/2005, John Lloyd-Jones wrote:
> >That's the right way if you know the preceding text. If I understood the
> >original question correctly, the aim was to find the (possibly unknown)
> >text preceding a known text input field.
>
> My mistake. In HEAD, this can be done as
>
> ie.text_field(:name, "whatever").before_text
>
> Bret
>
> _____________________
> Bret Pettichord
> www.pettichord.com
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
From Tuyet.Ctn at mscibarra.com Tue Nov 1 20:18:28 2005
From: Tuyet.Ctn at mscibarra.com (Cong-Ton-Nu, Tuyet (MSCIBARRA))
Date: Tue, 1 Nov 2005 20:18:28 -0500
Subject: [Wtr-general] Architecting WATIR for a WEB application
Message-ID: <937C75B544E7E8428436C67056A3A1730CC6DD@NYWEXMB83.msad.ms.com>
What are some considerations that will help the planning and layout of
WATIR architecture if you are to start from scratch to automate a WEB
site? I would appreciate hearing from experienced WATIR users on what
approaches you have chosen to structure/architect the way you use WATIR
for your WEB application. Thanks.
--------------------------------------------------------
NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051101/b0044ed6/attachment.html
From jeff.darklight at gmail.com Tue Nov 1 20:25:25 2005
From: jeff.darklight at gmail.com (Jeff Wood)
Date: Tue, 1 Nov 2005 17:25:25 -0800
Subject: [Wtr-general] CookieManager::WatirHelper ... ???
In-Reply-To: <1678386167807c.167807c1678386@shaw.ca>
References: <1678386167807c.167807c1678386@shaw.ca>
Message-ID:
I'm kinda surprised, with as well as so many other parts of watir are
covered with test cases, this slipped by...
It would be cool to simply add a small webrick script into the distro to
actually have a web server to test some of this stuff with...
j.
On 10/31/05, Paul Rogers wrote:
>
> I recently went to use this and had problems too. I have a fix, I'll see
> if I can get it in. Wont be this week though
>
> Paul
> Content-Type: multipart/alternative;
> boundary="----=_Part_4823_25613369.1130805182222"
>
>
> ------=_Part_4823_25613369.1130805182222
> Content-Type: text/plain; charset=ISO-8859-1
> Content-Transfer-Encoding: quoted-printable
> Content-Disposition: inline
>
> I went looking through the Unittests for Watir and I couldn't find one
> testcase/example of use with the CookieManager.
> So, I dug around a bit, and when I thought I'd figured it out, I'm getting
> a "can't load Dir::Find" ...
> Can anybody shed some light?
> I'd like to clear my cookies ??? Is there an easy way?
> j.
>
> --
> "http://ruby-lang.org -- do you ruby?"
>
> Jeff Wood
>
> ------=_Part_4823_25613369.1130805182222
> Content-Type: text/html; charset=ISO-8859-1
> Content-Transfer-Encoding: quoted-printable
> Content-Disposition: inline
>
>
I went looking through the Unittests for Watir and I couldn't find
> one=
> testcase/example of use with the CookieManager.
>
>
So, I dug around a bit, and when I thought I'd figured it out, I'm
> get=
> ting a "can't load Dir::Find" ...
>
>
Can anybody shed some light?
>
>
I'd like to clear my cookies ??? Is there an easy way?
>
> ------=_Part_4823_25613369.1130805182222--
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
>
--
"http://ruby-lang.org -- do you ruby?"
Jeff Wood
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051101/c1986e59/attachment.html
From amithashettyb at yahoo.co.in Tue Nov 1 23:48:15 2005
From: amithashettyb at yahoo.co.in (Amitha Shetty)
Date: Wed, 2 Nov 2005 04:48:15 +0000 (GMT)
Subject: [Wtr-general] Text box gives an Alert Window when input is
giventhrough Watir
In-Reply-To: <5.1.0.14.2.20051028004451.03aa4058@pop.gmail.com>
Message-ID: <20051102044815.62316.qmail@web8514.mail.in.yahoo.com>
I tried $ie.text_field(:name, "NAME").o.value = '60000'
But I got the following exception:
undefined method `o' for # (NoMethodError)
>Exit code: 1
Bret Pettichord wrote:
At 12:17 AM 10/26/2005, Amitha Shetty wrote:
>$ie.text_field(:name,"NAME").set('60000') also gives alert window but does
>not throw any exception.On clicking 'Ok' on alert window, 6(first digit)
>will be entered onto the text box followed by an alert window again for
>the next digit.
>This continues for all the digits of the number given as a string.
Try $ie.text_field(:name, "NAME").o.value = '60000'
_____________________
Bret Pettichord
www.pettichord.com
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
---------------------------------
Enjoy this Diwali with Y! India Click here
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051102/dad8e149/attachment.html
From bret at pettichord.com Wed Nov 2 01:29:19 2005
From: bret at pettichord.com (Bret Pettichord)
Date: Wed, 02 Nov 2005 00:29:19 -0600
Subject: [Wtr-general] CookieManager::WatirHelper ... ???
In-Reply-To:
References: <1678386167807c.167807c1678386@shaw.ca>
<1678386167807c.167807c1678386@shaw.ca>
Message-ID: <5.1.0.14.2.20051102002458.03828df0@pop.gmail.com>
At 07:25 PM 11/1/2005, Jeff Wood wrote:
>I'm kinda surprised, with as well as so many other parts of watir are
>covered with test cases, this slipped by...
It didn't slip by. Someone wrote it and it seemed useful, so we added it to
the distribution.
However, you have to specifically require this (require
'watir/cookiemanager') to get it.
I have wondered whether we shouldn't have a clearer way of separating the
supported part of Watir from the random contributions. Especially, since we
are in the process of beefing up the supported stuff.
I'd appreciate any suggestions. We often get pleas for example code, so it
would seem nasty to omit stuff like this just because it didn't have tests.
Yet it obviously is misleading/surprising to include untested and possibly
half-baked stuff like this in our library.
Suggestions?
>It would be cool to simply add a small webrick script into the distro to
>actually have a web server to test some of this stuff with...
We have a test in there somewhere (else) that does just this.
Bret
_____________________
Bret Pettichord
www.pettichord.com
From jeff.darklight at gmail.com Wed Nov 2 02:23:43 2005
From: jeff.darklight at gmail.com (Jeff Wood)
Date: Tue, 1 Nov 2005 23:23:43 -0800
Subject: [Wtr-general] CookieManager::WatirHelper ... ???
In-Reply-To: <5.1.0.14.2.20051102002458.03828df0@pop.gmail.com>
References: <1678386167807c.167807c1678386@shaw.ca>
<5.1.0.14.2.20051102002458.03828df0@pop.gmail.com>
Message-ID:
I had used
require 'watir/cookiemanager'
it's just when trying to use it I get a wierd error about not being able to
find Dir::Find
I'll send a copy later. Don't have it handy @ the moment.
j.
On 11/1/05, Bret Pettichord wrote:
>
> At 07:25 PM 11/1/2005, Jeff Wood wrote:
> >I'm kinda surprised, with as well as so many other parts of watir are
> >covered with test cases, this slipped by...
>
> It didn't slip by. Someone wrote it and it seemed useful, so we added it
> to
> the distribution.
>
> However, you have to specifically require this (require
> 'watir/cookiemanager') to get it.
>
> I have wondered whether we shouldn't have a clearer way of separating the
> supported part of Watir from the random contributions. Especially, since
> we
> are in the process of beefing up the supported stuff.
>
> I'd appreciate any suggestions. We often get pleas for example code, so it
> would seem nasty to omit stuff like this just because it didn't have
> tests.
> Yet it obviously is misleading/surprising to include untested and possibly
> half-baked stuff like this in our library.
>
> Suggestions?
>
> >It would be cool to simply add a small webrick script into the distro to
> >actually have a web server to test some of this stuff with...
>
> We have a test in there somewhere (else) that does just this.
>
> Bret
>
>
> _____________________
> Bret Pettichord
> www.pettichord.com
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
--
"http://ruby-lang.org -- do you ruby?"
Jeff Wood
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051101/8bd28056/attachment.html
From amithashettyb at yahoo.co.in Wed Nov 2 07:25:25 2005
From: amithashettyb at yahoo.co.in (Amitha Shetty)
Date: Wed, 2 Nov 2005 12:25:25 +0000 (GMT)
Subject: [Wtr-general] How to get Image Source from Excel Input file?
Message-ID: <20051102122525.47836.qmail@web8506.mail.in.yahoo.com>
Hi,
I am getting Inputs from an Excel file for my test cases and its working fine for all except Image source.
I tried:
IMAGE = worksheet.range('b11')['Value'] and value in excel corresponding to Cell b11 is /icons2.gif/
$ie.image(:src,IMAGE).click gives the following exception-
`assert_exists': Unable to locate object, using src and /icons2.gif/(Watir::Exception::UnknownObjectException)
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2009:in `click'
However if I hardcode the source it works fine....
i.e $ie.image(:src,/icons2.gif/).click
clicks on the image.
I think the problem is because input is read from excel as a string.How do I handle this?
Thanks,
Amitha
---------------------------------
Enjoy this Diwali with Y! India Click here
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051102/bdb51d78/attachment.html
From zeljko.filipin at gmail.com Wed Nov 2 07:44:28 2005
From: zeljko.filipin at gmail.com (Zeljko Filipin)
Date: Wed, 2 Nov 2005 13:44:28 +0100
Subject: [Wtr-general] How to get Image Source from Excel Input file?
In-Reply-To: <20051102122525.47836.qmail@web8506.mail.in.yahoo.com>
Message-ID: <001301c5dfab$2afb2170$c6e7fea9@officezg.wa>
Enter icons2.gif in excel instead of /icons2.gif/.
Then try this:
IMAGE = worksheet.range('b11')['Value']
$ie.image(:src, /#{IMAGE}/).click
Zeljko
________________________________
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Amitha Shetty
Sent: Wednesday, November 02, 2005 1:25 PM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] How to get Image Source from Excel Input file?
Hi,
I am getting Inputs from an Excel file for my test cases and its working
fine for all except Image source.
I tried:
IMAGE = worksheet.range('b11')['Value'] and value in excel corresponding to
Cell b11 is /icons2.gif/
$ie.image(:src,IMAGE).click gives the following exception-
`assert_exists': Unable to locate object, using src and
/icons2.gif/(Watir::Exception::UnknownObjectException)
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2009:in `click'
However if I hardcode the source it works fine....
i.e $ie.image(:src,/icons2.gif/).click
clicks on the image.
I think the problem is because input is read from excel as a string.How do I
handle this?
Thanks,
Amitha
________________________________
Enjoy this Diwali with Y! India Click here
From christopher.mcmahon at gmail.com Wed Nov 2 09:33:32 2005
From: christopher.mcmahon at gmail.com (Chris McMahon)
Date: Wed, 2 Nov 2005 08:33:32 -0600
Subject: [Wtr-general] Architecting WATIR for a WEB application
In-Reply-To: <937C75B544E7E8428436C67056A3A1730CC6DD@NYWEXMB83.msad.ms.com>
References: <937C75B544E7E8428436C67056A3A1730CC6DD@NYWEXMB83.msad.ms.com>
Message-ID: <72799cd70511020633heb94bd3r64b74ee79ac5bbf6@mail.gmail.com>
> What are some considerations that will help the planning and layout of WATIR
> architecture if you are to start from scratch to automate a WEB site? I
> would appreciate hearing from experienced WATIR users on what approaches you
> have chosen to structure/architect the way you use WATIR for your WEB
> application. Thanks.
I suspect that the sophisticated Watir users on this list would tell
you that the answer to your question depends on individual context.
That is, every project is different.
As a general principle, though, a lot of people suggest that your
framework should be abstracted from your implementation. In other
words: start solving problems; refactor; repeat; don't worry about
architecture so much as you worry about solving the immediate
problem-- your architecture will grow as your ability to solve
problems does. As always, I'll cite Kevin Lawrence's March 2005
Better Software article called "Grow Your Test Harness Naturally"
which seems to be the most important reference out there for doing
this sort of work.
-Chris
From jkohl at telusplanet.net Wed Nov 2 09:51:43 2005
From: jkohl at telusplanet.net (Jonathan Kohl)
Date: Wed, 2 Nov 2005 07:51:43 -0700
Subject: [Wtr-general] Architecting WATIR for a WEB application
In-Reply-To: <72799cd70511020633heb94bd3r64b74ee79ac5bbf6@mail.gmail.com>
Message-ID: <002001c5dfbc$f10a58c0$6500a8c0@tintin>
+1
> -----Original Message-----
> From: wtr-general-bounces at rubyforge.org
> [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon
> Sent: November 2, 2005 7:34 AM
> To: wtr-general at rubyforge.org
> Subject: Re: [Wtr-general] Architecting WATIR for a WEB application
>
> > What are some considerations that will help the planning
> and layout of
> > WATIR architecture if you are to start from scratch to
> automate a WEB
> > site? I would appreciate hearing from experienced WATIR
> users on what
> > approaches you have chosen to structure/architect the way you use
> > WATIR for your WEB application. Thanks.
>
>
> I suspect that the sophisticated Watir users on this list
> would tell you that the answer to your question depends on
> individual context.
> That is, every project is different.
>
> As a general principle, though, a lot of people suggest that
> your framework should be abstracted from your implementation.
> In other
> words: start solving problems; refactor; repeat; don't worry
> about architecture so much as you worry about solving the immediate
> problem-- your architecture will grow as your ability to
> solve problems does. As always, I'll cite Kevin Lawrence's
> March 2005 Better Software article called "Grow Your Test
> Harness Naturally"
> which seems to be the most important reference out there for
> doing this sort of work.
>
> -Chris
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
From bret at pettichord.com Wed Nov 2 13:58:17 2005
From: bret at pettichord.com (Bret Pettichord)
Date: Wed, 02 Nov 2005 12:58:17 -0600
Subject: [Wtr-general] Architecting WATIR for a WEB application
In-Reply-To: <72799cd70511020633heb94bd3r64b74ee79ac5bbf6@mail.gmail.com
>
References: <937C75B544E7E8428436C67056A3A1730CC6DD@NYWEXMB83.msad.ms.com>
<937C75B544E7E8428436C67056A3A1730CC6DD@NYWEXMB83.msad.ms.com>
Message-ID: <5.1.0.14.2.20051102125758.037e04a8@pop.gmail.com>
At 08:33 AM 11/2/2005, Chris McMahon wrote:
>start solving problems; refactor
+1. This is how i always proceed.
_____________________
Bret Pettichord
www.pettichord.com
From alex at verk.info Wed Nov 2 21:19:29 2005
From: alex at verk.info (Alexey Verkhovsky)
Date: Wed, 02 Nov 2005 19:19:29 -0700
Subject: [Wtr-general] Architecting WATIR for a WEB application
In-Reply-To: <002001c5dfbc$f10a58c0$6500a8c0@tintin>
References: <002001c5dfbc$f10a58c0$6500a8c0@tintin>
Message-ID: <436973B1.5080702@verk.info>
+1
I, too, am scared when I hear the 'A' word applied to something as
simple as an automated test suite :)
Having said that, there is certain amount of design that can go into a
test suite before you start writing it.
So, how about turning the conversation in a direction like this:
GENERAL GUIDELINES FOR ORGANISING A SUITE OF WATIR TESTS
-------------------------------
Organize the tests as a Test::Unit suite. Start with a single
Test::Unit:TestCase class in a single file, split it into smaller
logical pieces when it becomes too big (around 1000 lines).
As soon as you have to repeat the same code twice, think about
extracting a method. Certainly extract a method from anything that is
repeated three times.
Expect at least the following helper classes (or modules) to evolve:
* URL generator, to extract things like ie.goto url_for('AccountView',
:account_id => 1, :billing_month => '2005-11')
* GUI navigator, to extract things like logon(:user => 'tester',
:password => '12345') )
* custom assertions, for methods like assert_current_account_is_active
Your real tests will probably have to talk to the database, to test
assertions about things that are hard or impossible to access through
the GUI, to generate expected results, to manage initial state of the
database before the test, etc. This often means that you need something
quite similar to domain and data access layers. It will probably be much
simpler than the production domain, but the same design principles
generally apply. Resist the temptation to reuse the production domain
layer (you don't want your test oracles to share implementation with the
system under test). Production data access layer, on the other hand, is OK.
Test results may need to be published and/or reported. Roll your own, or
use http://rubyforge.org/projects/test-report/ It is not currently
supported by anybody, but I've heard some people were still using it.
After all, it's merely a few hundred lines of Ruby :)
Other than reporting along the lines of "TestAccountView => PASS/FAIL",
don't try to make contents of Watir tests accessible to non-programmers.
It proves counter-productive. If you need automated tests that business
can understand, use FIT and test the domain logic with it.
...
Beg pardon if I'm answering a wrong question here :) But I'd like to
hear what other people do.
Alexey Verkhovsky
Jonathan Kohl wrote:
>+1
>
>
>>-----Original Message-----
>>From: wtr-general-bounces at rubyforge.org
>>[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon
>>
>>
>>start solving problems; refactor; repeat; don't worry
>>about architecture so much as you worry about solving the immediate
>>problem-- your architecture will grow as your ability to
>>solve problems does.
>>
From amithashettyb at yahoo.co.in Thu Nov 3 00:07:08 2005
From: amithashettyb at yahoo.co.in (Amitha Shetty)
Date: Thu, 3 Nov 2005 05:07:08 +0000 (GMT)
Subject: [Wtr-general] How to get Image Source from Excel Input file?
In-Reply-To: <001301c5dfab$2afb2170$c6e7fea9@officezg.wa>
Message-ID: <20051103050708.67527.qmail@web8505.mail.in.yahoo.com>
This works fine. Thanks.
Zeljko Filipin wrote:Enter icons2.gif in excel instead of /icons2.gif/.
Then try this:
IMAGE = worksheet.range('b11')['Value']
$ie.image(:src, /#{IMAGE}/).click
Zeljko
________________________________
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Amitha Shetty
Sent: Wednesday, November 02, 2005 1:25 PM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] How to get Image Source from Excel Input file?
Hi,
I am getting Inputs from an Excel file for my test cases and its working
fine for all except Image source.
I tried:
IMAGE = worksheet.range('b11')['Value'] and value in excel corresponding to
Cell b11 is /icons2.gif/
$ie.image(:src,IMAGE).click gives the following exception-
`assert_exists': Unable to locate object, using src and
/icons2.gif/(Watir::Exception::UnknownObjectException)
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2009:in `click'
However if I hardcode the source it works fine....
i.e $ie.image(:src,/icons2.gif/).click
clicks on the image.
I think the problem is because input is read from excel as a string.How do I
handle this?
Thanks,
Amitha
________________________________
Enjoy this Diwali with Y! India Click here
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
---------------------------------
Enjoy this Diwali with Y! India Click here
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051103/1b426945/attachment.html
From zeljko.filipin at gmail.com Thu Nov 3 03:19:44 2005
From: zeljko.filipin at gmail.com (Zeljko Filipin)
Date: Thu, 3 Nov 2005 09:19:44 +0100
Subject: [Wtr-general] OO and test/unit
In-Reply-To: <4353B568.7070105@clabs.org>
Message-ID: <000e01c5e04f$5985b420$c6e7fea9@officezg.wa>
I forgot to say thanks. :)
I do not use test/unit any more, but this:
require 'test/unit/assertions'
include Test::Unit::Assertions
and now I can use assert where ever I like. :)
Zeljko
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris Morris
Sent: Monday, October 17, 2005 4:30 PM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] OO and test/unit
Zeljko Filipin wrote:
>When I comment assertions (lines 16 and 20) it works. But I really like
>assertions. I made class User child of Test::Unit::TestCase (class User <
>Test::Unit::TestCase) but it does not work.
>
That /should/ work, perhaps you could report your error message on that.
Another (perhaps better option) is to use a Module and mixins. Instead
of making User a class, make it a Module, then include that module in
whatever TestCase class you make. I don't have time to detail this for
you, but look at rubycentral.com for the older 1.6 Ruby book and find
its write-up on Modules and mixins, or hit up the main Ruby list for
more assistance with this.
--
Chris
http://clabs.org/blogki
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
From Jan.Montano at thomson.com Thu Nov 3 03:26:54 2005
From: Jan.Montano at thomson.com (Jan.Montano at thomson.com)
Date: Thu, 3 Nov 2005 16:26:54 +0800
Subject: [Wtr-general] if textfield is read only?
Message-ID:
How will we know if a text box is read only or not?
From zeljko.filipin at gmail.com Thu Nov 3 03:53:36 2005
From: zeljko.filipin at gmail.com (Zeljko Filipin)
Date: Thu, 3 Nov 2005 09:53:36 +0100
Subject: [Wtr-general] if textfield is read only?
In-Reply-To:
Message-ID: <001101c5e054$152c59f0$c6e7fea9@officezg.wa>
html:
watir: ie.textField(:index, 1).readonly?
Watir code will return true if text box is readonly, and false if not.
I found it at http://wtr.rubyforge.org/rdoc/index.html
Zeljko
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of
Jan.Montano at thomson.com
Sent: Thursday, November 03, 2005 9:27 AM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] if textfield is read only?
How will we know if a text box is read only or not?
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
From chaya_b_s at yahoo.co.in Thu Nov 3 07:19:56 2005
From: chaya_b_s at yahoo.co.in (chaya shetty)
Date: Thu, 3 Nov 2005 12:19:56 +0000 (GMT)
Subject: [Wtr-general] Unintialized Constant exception is thrown when All
tests is run
In-Reply-To: <001101c5e054$152c59f0$c6e7fea9@officezg.wa>
Message-ID: <20051103121956.50296.qmail@web8311.mail.in.yahoo.com>
Hi,
I am using excel file as input to my test cases.
In a test case "TESTCASE1" I am calling a "Methods.rb"(which includes only methods) which requires a constant "CONSTANT1".
"CONSTANT1" is initialized in excel input file.
When I run "TESTCASE1" individually ,it runs successfully but when All Tests is run it throws " Unintialized Constant" exception.
When I initialize "CONSTANT1" in a input ruby file or declare "CONSTANT1" as a global and then run "AllTests" it runs successfully. Hence I think it is the excel input which is the problem.
How do I handle this??
Thanks,
Chaya
---------------------------------
Enjoy this Diwali with Y! India Click here
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051103/8ffde690/attachment.html
From carl.l.shaulis at convergys.com Thu Nov 3 11:50:22 2005
From: carl.l.shaulis at convergys.com (carl.l.shaulis at convergys.com)
Date: Thu, 3 Nov 2005 10:50:22 -0600
Subject: [Wtr-general] Reliability and thread management
Message-ID:
Good morning:
I hope this is not a redundant post. I submitted it yesterday, but I did
not see this topic in the archives.
We have successfully been able to work with modals and pop ups; however, I
am concerned about the reliability of the scripts. We will run script A
and it makes it through the modals and pop ups just fine and completes
without error. We make no changes to this script and run it a second time
and the script fails on the modals. In my opinion it a timing issue
between the browser, latency and using multiple threads.
Our application is extremely sensitive to double clicks. Occasionally a
routine click will act as though it was clicked twice and the script breaks
due to the error message generated on a doubleclick. Only one click is
specified in Ruby. Again I suspect this is a timing concern.
Has anyone else experienced this type of concern?
What are some things that can be done to manage threads and the timing of
the browser interactions?
What are the best ways to control script speed?
Any thoughts on making these scripts more reliable would be greatly
appreciated.
Thanks,
Carl
--
"NOTICE: The information contained in this electronic mail transmission is
intended by Convergys Corporation for the use of the named individual or
entity to which it is directed and may contain information that is
privileged or otherwise confidential. If you have received this electronic
mail transmission in error, please delete it from your system without
copying or forwarding it, and notify the sender of the error by reply email
or by telephone (collect), so that the sender's address records can be
corrected."
From christopher.mcmahon at gmail.com Thu Nov 3 13:22:08 2005
From: christopher.mcmahon at gmail.com (Chris McMahon)
Date: Thu, 3 Nov 2005 12:22:08 -0600
Subject: [Wtr-general] whytheluckystiff on Selenium and Watir
Message-ID: <72799cd70511031022k3dc83069nea5d37ac24b861c7@mail.gmail.com>
http://redhanded.hobix.com/inspect/theSoundsOfSeleniumTestingYourWeblickation.html
The comment from user "<|:{" is really funny.
BTW, if you're not surfing redhanded.hobix.com, and "why's Poignant
Guide To Ruby", you should do so. Immediately.
-Chris
From theebh at gmail.com Fri Nov 4 02:13:34 2005
From: theebh at gmail.com (boonhoo)
Date: Fri, 4 Nov 2005 15:13:34 +0800
Subject: [Wtr-general] Preceding text of textfield
In-Reply-To: <158e6acb0511011706pc7b6c3ck32707e8d21e4e08e@mail.gmail.com>
References: <5.1.0.14.2.20051101122053.036c7698@pop.gmail.com>
<5.1.0.14.2.20051101143621.037c6c08@pop.gmail.com>
<158e6acb0511011706pc7b6c3ck32707e8d21e4e08e@mail.gmail.com>
Message-ID: <158e6acb0511032313i63b6e220md754353dd5717e00@mail.gmail.com>
Latest update - i copied the 'before_text' and 'after_text' code from
HEAD to my version of watir, but the functions return empty string
when i try it on a text field. Likewise when i use
object.getAdjacentText("beforeBegin")...
On 11/2/05, boonhoo wrote:
> great! I will try it later... i was toying with
> ie.document.forms(i).elements(i) and it doesn't seem to support the
> before_text() method. I will try this method on text_field..
>
> My purpose is to find the preceding text to 'guess' what possible
> value to enter into the text field. Thanks eveyrone :)
>
> boonhoo
>
> On 11/2/05, Bret Pettichord wrote:
> > At 12:47 PM 11/1/2005, John Lloyd-Jones wrote:
> > >That's the right way if you know the preceding text. If I understood the
> > >original question correctly, the aim was to find the (possibly unknown)
> > >text preceding a known text input field.
> >
> > My mistake. In HEAD, this can be done as
> >
> > ie.text_field(:name, "whatever").before_text
> >
> > Bret
> >
> > _____________________
> > Bret Pettichord
> > www.pettichord.com
> >
> > _______________________________________________
> > Wtr-general mailing list
> > Wtr-general at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/wtr-general
> >
>
From amit.garde at gmail.com Fri Nov 4 02:15:53 2005
From: amit.garde at gmail.com (Amit Garde)
Date: Fri, 4 Nov 2005 12:45:53 +0530
Subject: [Wtr-general] WATiR for Mozilla/Firefox
Message-ID: <7661e6730511032315w7b1fddc3r8553635f07213dfa@mail.gmail.com>
(I think this question has come up before, but please bear with me...)
What would it take to write a layer of code for Mozilla/Firefox on the lines
of what WATiR currently has available for IE, that would let WATiR drive
Mozilla/Firefox instances the way it's done for IE right now ? Specifically,
what to target and what to use to target it ? Some delving suggests that an
XPCOM based approach might be the way to go, but I haven't been able to
figure out exactly how to approach this. Can anyone on this list offer some
advice or pointers ? We might be able to offer some resources to work on
this, but right now knowing where to look and how to start is the tough
part.
It would be kind of neat to have the browser parameterized so that apart
from the instantiation of a specific browser, a WATiR script for a given
application could run unchanged for IE/FireFox/, modulo
differences in browser functionality (e.g. tabs).
Amit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051104/d81299eb/attachment.html
From theebh at gmail.com Fri Nov 4 04:02:34 2005
From: theebh at gmail.com (boonhoo)
Date: Fri, 4 Nov 2005 17:02:34 +0800
Subject: [Wtr-general] submit form
Message-ID: <158e6acb0511040102r7ab5f4aaj6e92299af47c3ec4@mail.gmail.com>
Hi,
(hope my question is not confusing).
Is there a way in watir to determine if after submitting a form,
a) whether the form really make a POST and move to a new page, or
b) the form just redisplay itself and did not get POSTed? (e.g. if
there are incomplete fields and caught by javascript validation)
I was thinking probably by comparing the last url in the history
object, i would be able to tell whether the form really did a POST.
However from Microsoft DHTML website, the history object don't seem to
show the last URL traversed due to security reason...
Appreciate any reply. Thanks...
bh
From wkruse at sars.gov.za Fri Nov 4 04:12:23 2005
From: wkruse at sars.gov.za (Walter Kruse)
Date: Fri, 4 Nov 2005 11:12:23 +0200
Subject: [Wtr-general] submit form
Message-ID: <373AA889F642934D8983245F7A5145880106F03F@gaptarcbnt00002.sars.prod>
NB: This email and its contents are subject to our email legal notice
which can be viewed at http://www.sars.gov.za/Email_Disclaimer.pdf
----
I check if the insert happened on the database.
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org]
Sent: 04 November 2005 11:03
To: wtr-general at rubyforge.org
Subject: [Wtr-general] submit form
Hi,
(hope my question is not confusing).
Is there a way in watir to determine if after submitting a form,
a) whether the form really make a POST and move to a new page, or
b) the form just redisplay itself and did not get POSTed? (e.g. if there
are incomplete fields and caught by javascript validation)
I was thinking probably by comparing the last url in the history object,
i would be able to tell whether the form really did a POST. However from
Microsoft DHTML website, the history object don't seem to show the last
URL traversed due to security reason...
Appreciate any reply. Thanks...
bh
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
From chaya_b_s at yahoo.co.in Fri Nov 4 05:48:51 2005
From: chaya_b_s at yahoo.co.in (chaya shetty)
Date: Fri, 4 Nov 2005 10:48:51 +0000 (GMT)
Subject: [Wtr-general] How to hide the explorer window in Watir
Message-ID: <20051104104851.59415.qmail@web8304.mail.in.yahoo.com>
Hi,
I want the internet explorer window to be hidden while my script is running.
One option for this is:
$ie.getIE.visible = false
But this will just hide the main window, the popups are not hidden.
Is there any other way to do this??
Thanks
Chaya
---------------------------------
Enjoy this Diwali with Y! India Click here
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051104/ddd09735/attachment.html
From tomfeo at presslogic.com Fri Nov 4 09:41:39 2005
From: tomfeo at presslogic.com (Tom)
Date: Fri, 4 Nov 2005 07:41:39 -0700
Subject: [Wtr-general] How to hide the explorer window in Watir
In-Reply-To: <20051104104851.59415.qmail@web8304.mail.in.yahoo.com>
Message-ID:
You could try:
$ie.minimize, but I'm not sure if that will also keep your pop ups
minimized.
Failing that, you could run the -b when calling your script from the command
line:
>C:/Watir/my_script.rb -b
This will make your script run in the background. Since this does not create
an ie window, you will not be able peek at what's happening. I believe this
should avoid the pop ups from appearing, but I haven't tried this myself.
Tom
_____
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of chaya shetty
Sent: Friday, November 04, 2005 3:49 AM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] How to hide the explorer window in Watir
Hi,
I want the internet explorer window to be hidden while my script
is running.
One option for this is:
$ie.getIE.visible = false
But this will just hide the main window, the popups are not hidden.
Is there any other way to do this??
Thanks
Chaya
_____
Enjoy this Diwali with Y! India Click here
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051104/d6bc3365/attachment.html
From zeljko.filipin at gmail.com Fri Nov 4 09:49:08 2005
From: zeljko.filipin at gmail.com (Zeljko Filipin)
Date: Fri, 4 Nov 2005 15:49:08 +0100
Subject: [Wtr-general] How to hide the explorer window in Watir
In-Reply-To:
Message-ID: <002e01c5e14e$ea40ef70$c6e7fea9@officezg.wa>
I just tried -b option and file upload pop-ups appear.
Zeljko
_____
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tom
Sent: Friday, November 04, 2005 3:42 PM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] How to hide the explorer window in Watir
You could try:
$ie.minimize, but I'm not sure if that will also keep your pop ups
minimized.
Failing that, you could run the -b when calling your script from the command
line:
>C:/Watir/my_script.rb -b
This will make your script run in the background. Since this does not create
an ie window, you will not be able peek at what's happening. I believe this
should avoid the pop ups from appearing, but I haven't tried this myself.
Tom
_____
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of chaya shetty
Sent: Friday, November 04, 2005 3:49 AM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] How to hide the explorer window in Watir
Hi,
I want the internet explorer window to be hidden while my script
is running.
One option for this is:
$ie.getIE.visible = false
But this will just hide the main window, the popups are not hidden.
Is there any other way to do this??
Thanks
Chaya
_____
Enjoy this Diwali with Y! India Click
here
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051104/802f5227/attachment.html
From vishalworld at sqatester.com Fri Nov 4 09:59:31 2005
From: vishalworld at sqatester.com (Vishal Chavan)
Date: Fri, 4 Nov 2005 06:59:31 -0800 (PST)
Subject: [Wtr-general] Help required for custom JS Menu
Message-ID: <20051104065931.59D17A55@dm21.mta.everyone.net>
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051104/64166521/attachment.html
From mooola00 at hotmail.com Fri Nov 4 11:01:22 2005
From: mooola00 at hotmail.com (Eugene Kula)
Date: Fri, 04 Nov 2005 09:01:22 -0700
Subject: [Wtr-general] Assertions trouble
Message-ID:
My apologies in advance if this turns out to be a double-post by me.
We are extracting test methods from test cases into helper scripts. The
problem I'm running across is I'm not able to assert(NoMethodError:
undefined method 'assert'), and I assume it's because I'm either not
requiring the right scripts or I'm not inheriting from TestCase. Any help
much appreciated!
My Test Case script:
require 'tabularHelper.rb'
include TabularHelper
class TC_EventTabular < Test::Unit::TestCase
def test_Columns
columntable = [
{'col'=>'Date/Time', 'issortable'=>true},
{'col'=>'Description', 'issortable'=>true},
{'col'=>'Lead', 'issortable'=>true},
{'col'=>'Folder', 'issortable'=>true}
]
TabularHelper.run_column_test(columntable, $ie)
end
end
MY Helper script:
require 'watir'
require 'test/unit'
require 'test/unit/ui/console/testrunner'
require 'watir/testUnitAddons'
module TabularHelper
def run_column_test(columntable, ie)
assert($ie.something.exists?)
assert_equal(somevalue, $ie.something.value)
end
end
From zeljko.filipin at gmail.com Fri Nov 4 11:07:48 2005
From: zeljko.filipin at gmail.com (Zeljko Filipin)
Date: Fri, 4 Nov 2005 17:07:48 +0100
Subject: [Wtr-general] Assertions trouble
In-Reply-To:
Message-ID: <003c01c5e159$e839d3d0$c6e7fea9@officezg.wa>
Add this to your MY Helper script and it will work just fine.
require 'test/unit/assertions'
include Test::Unit::Assertions
I think you can remove
require 'test/unit'
require 'test/unit/ui/console/testrunner'
require 'watir/testUnitAddons'
from that script (but I am not sure).
Zeljko
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Eugene Kula
Sent: Friday, November 04, 2005 5:01 PM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] Assertions trouble
My apologies in advance if this turns out to be a double-post by me.
We are extracting test methods from test cases into helper scripts. The
problem I'm running across is I'm not able to assert(NoMethodError:
undefined method 'assert'), and I assume it's because I'm either not
requiring the right scripts or I'm not inheriting from TestCase. Any help
much appreciated!
My Test Case script:
require 'tabularHelper.rb'
include TabularHelper
class TC_EventTabular < Test::Unit::TestCase
def test_Columns
columntable = [
{'col'=>'Date/Time', 'issortable'=>true},
{'col'=>'Description', 'issortable'=>true},
{'col'=>'Lead', 'issortable'=>true},
{'col'=>'Folder', 'issortable'=>true}
]
TabularHelper.run_column_test(columntable, $ie)
end
end
MY Helper script:
require 'watir'
require 'test/unit'
require 'test/unit/ui/console/testrunner'
require 'watir/testUnitAddons'
module TabularHelper
def run_column_test(columntable, ie)
assert($ie.something.exists?)
assert_equal(somevalue, $ie.something.value)
end
end
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
From mooola00 at hotmail.com Fri Nov 4 11:14:39 2005
From: mooola00 at hotmail.com (Eugene Kula)
Date: Fri, 04 Nov 2005 09:14:39 -0700
Subject: [Wtr-general] Assertions trouble
In-Reply-To: <003c01c5e159$e839d3d0$c6e7fea9@officezg.wa>
Message-ID:
That worked!
Now that the assertions work, how do I get the results to display correctly
(e.g. 0 assertions, 0 failures, 0 errors)?
>From: "Zeljko Filipin"
>Reply-To: wtr-general at rubyforge.org
>To:
>Subject: Re: [Wtr-general] Assertions trouble
>Date: Fri, 4 Nov 2005 17:07:48 +0100
>
>Add this to your MY Helper script and it will work just fine.
>
>require 'test/unit/assertions'
>include Test::Unit::Assertions
>
>I think you can remove
>
>require 'test/unit'
>require 'test/unit/ui/console/testrunner'
>require 'watir/testUnitAddons'
>
>from that script (but I am not sure).
>
>Zeljko
>
>-----Original Message-----
>From: wtr-general-bounces at rubyforge.org
>[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Eugene Kula
>Sent: Friday, November 04, 2005 5:01 PM
>To: wtr-general at rubyforge.org
>Subject: [Wtr-general] Assertions trouble
>
>My apologies in advance if this turns out to be a double-post by me.
>
>We are extracting test methods from test cases into helper scripts. The
>problem I'm running across is I'm not able to assert(NoMethodError:
>undefined method 'assert'), and I assume it's because I'm either not
>requiring the right scripts or I'm not inheriting from TestCase. Any help
>much appreciated!
>
>My Test Case script:
>
>require 'tabularHelper.rb'
>include TabularHelper
>class TC_EventTabular < Test::Unit::TestCase
>def test_Columns
> columntable = [
> {'col'=>'Date/Time', 'issortable'=>true},
> {'col'=>'Description', 'issortable'=>true},
> {'col'=>'Lead', 'issortable'=>true},
> {'col'=>'Folder', 'issortable'=>true}
> ]
>
> TabularHelper.run_column_test(columntable, $ie)
>end
>end
>
>MY Helper script:
>require 'watir'
>require 'test/unit'
>require 'test/unit/ui/console/testrunner'
>require 'watir/testUnitAddons'
>
>module TabularHelper
>def run_column_test(columntable, ie)
> assert($ie.something.exists?)
> assert_equal(somevalue, $ie.something.value)
>end
>end
>
>
>_______________________________________________
>Wtr-general mailing list
>Wtr-general at rubyforge.org
>http://rubyforge.org/mailman/listinfo/wtr-general
>
>_______________________________________________
>Wtr-general mailing list
>Wtr-general at rubyforge.org
>http://rubyforge.org/mailman/listinfo/wtr-general
From vishalworld at sqatester.com Fri Nov 4 12:10:28 2005
From: vishalworld at sqatester.com (Vishal Chavan)
Date: Fri, 4 Nov 2005 09:10:28 -0800 (PST)
Subject: [Wtr-general] Calling function from another RB file.
Message-ID: <20051104091029.59D16F7E@dm20.mta.everyone.net>
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051104/d59de53f/attachment.html
From tomfeo at presslogic.com Fri Nov 4 12:27:23 2005
From: tomfeo at presslogic.com (Tom)
Date: Fri, 4 Nov 2005 10:27:23 -0700
Subject: [Wtr-general] Calling function from another RB file.
In-Reply-To: <20051104091029.59D16F7E@dm20.mta.everyone.net>
Message-ID:
Require statements use single quotes.
In your driver.rb file try:
require 'watir'
require 'one.rb'
load "one.rb"
Act.contains_html("test")
Note:
Commenting out load "one.rb" as in
require 'watir'
require 'one.rb'
#load "one.rb"
Act.contains_html("test")
also works, so not sure if you need this load statement or not. I'm guessing
not.
Tom
_____
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Vishal Chavan
Sent: Friday, November 04, 2005 10:10 AM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] Calling function from another RB file.
Hi All,
I wanted to seek your help in calling a function from another .RB file.
Suppose I have a file one.rb which has following function:
require 'watir'
class Act
def Act.contains_html( input )
puts input
end
end
Now from driver.rb file I want to call this Act.contains_html( input )
function. I have following code:
require 'watir'
require "one.rb"
load "one.rb"
Act.contains_html("test")
This does not work please advice how do I get this working...
Thanks,
Vishal
_____
Join SQAtester.com Community --->
http://www.sqatester.com/testersarea/joinus.htm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051104/8c066b32/attachment.html
From Sean.Gallagher at ticketmaster.com Fri Nov 4 12:31:54 2005
From: Sean.Gallagher at ticketmaster.com (Sean Gallagher)
Date: Fri, 4 Nov 2005 09:31:54 -0800
Subject: [Wtr-general] Calling function from another RB file.
Message-ID: <71D28C8451BFD5119B2B00508BE26E640B63F25C@pasmail3.office.tmcs>
Read up on Modules and Mixins:
http://www.rubycentral.com/book/tut_modules.html
-sean
_____
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Vishal Chavan
Sent: Friday, November 04, 2005 9:10 AM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] Calling function from another RB file.
Hi All,
I wanted to seek your help in calling a function from another .RB file.
Suppose I have a file one.rb which has following function:
require 'watir'
class Act
def Act.contains_html( input )
puts input
end
end
Now from driver.rb file I want to call this Act.contains_html( input )
function. I have following code:
require 'watir'
require "one.rb"
load "one.rb"
Act.contains_html("test")
This does not work please advice how do I get this working...
Thanks,
Vishal
_____
Join SQAtester.com Community --->
http://www.sqatester.com/testersarea/joinus.htm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051104/229c5cd7/attachment.html
From sy1234 at gmail.com Fri Nov 4 16:46:40 2005
From: sy1234 at gmail.com (Sy Ali)
Date: Fri, 4 Nov 2005 15:46:40 -0600
Subject: [Wtr-general] FAQ Update
In-Reply-To: <5.1.0.14.2.20051028010239.03a76340@pop.gmail.com>
References: <5.1.0.14.2.20051028010239.03a76340@pop.gmail.com>
Message-ID: <1e55af990511041346h496350a1l1448d00a37bd6935@mail.gmail.com>
On 10/28/05, Bret Pettichord wrote:
> Jonathan has updated the FAQ.
> http://wtr.rubyforge.org/wiki/wiki.pl?FrequentQuestions
>
> Awesome!
Good to see. I'd still rather like to update the entire wiki by
migrating it to mediawiki. It was rather annoying to have had to wade
through that FAQ the few times that I did in order to clean it up
somewhat (and also answer my own questions).
From sy1234 at gmail.com Fri Nov 4 17:03:50 2005
From: sy1234 at gmail.com (Sy Ali)
Date: Fri, 4 Nov 2005 16:03:50 -0600
Subject: [Wtr-general] iexplore process remains after closing IE?
In-Reply-To:
References: <72799cd70510311235p1f42f340v87cb9a6289d5eca2@mail.gmail.com>
Message-ID: <1e55af990511041403l4e39e7fdt6719b7559ba5693d@mail.gmail.com>
On 10/31/05, Jeff Wood wrote:
> require 'watir'
> include Watir
>
> ie = IE.new
> ie.goto "www.google.com"
> ie.close
Is there a way to report the pid of IE.new ?
From sy1234 at gmail.com Fri Nov 4 17:07:22 2005
From: sy1234 at gmail.com (Sy Ali)
Date: Fri, 4 Nov 2005 16:07:22 -0600
Subject: [Wtr-general] CookieManager::WatirHelper ... ???
In-Reply-To: <5.1.0.14.2.20051102002458.03828df0@pop.gmail.com>
References: <1678386167807c.167807c1678386@shaw.ca>
<5.1.0.14.2.20051102002458.03828df0@pop.gmail.com>
Message-ID: <1e55af990511041407w416de3a5r93cb67d09b3c57ed@mail.gmail.com>
On 11/2/05, Bret Pettichord wrote:
> I'd appreciate any suggestions. We often get pleas for example code, so it
> would seem nasty to omit stuff like this just because it didn't have tests.
> Yet it obviously is misleading/surprising to include untested and possibly
> half-baked stuff like this in our library.
>
> Suggestions?
Perhaps just have all that stuff called things like
"contrib-cookiemanager".. then note them in a nice list in the docs /
on the website, with a page per-item. Separate them somewhat from the
main documentation. Maybe also have it all downloadable as a separate
addon/gem?
From christopher.mcmahon at gmail.com Fri Nov 4 17:08:35 2005
From: christopher.mcmahon at gmail.com (Chris McMahon)
Date: Fri, 4 Nov 2005 16:08:35 -0600
Subject: [Wtr-general] iexplore process remains after closing IE?
In-Reply-To: <1e55af990511041403l4e39e7fdt6719b7559ba5693d@mail.gmail.com>
References: <72799cd70510311235p1f42f340v87cb9a6289d5eca2@mail.gmail.com>
<1e55af990511041403l4e39e7fdt6719b7559ba5693d@mail.gmail.com>
Message-ID: <72799cd70511041408o7c52a3cbl86ceb96979afeabe@mail.gmail.com>
> Is there a way to report the pid of IE.new ?
This question just got asked on the perlguitest mail list today, too.
I'll keep my eyes open there for an answer, too.
-Chris
From sy1234 at gmail.com Fri Nov 4 17:21:59 2005
From: sy1234 at gmail.com (Sy Ali)
Date: Fri, 4 Nov 2005 16:21:59 -0600
Subject: [Wtr-general] WATiR for Mozilla/Firefox
In-Reply-To: <7661e6730511032315w7b1fddc3r8553635f07213dfa@mail.gmail.com>
References: <7661e6730511032315w7b1fddc3r8553635f07213dfa@mail.gmail.com>
Message-ID: <1e55af990511041421n255c10ecj12f2925a3e91e3cb@mail.gmail.com>
On 11/4/05, Amit Garde wrote:
> What would it take to write a layer of code for Mozilla/Firefox on the
> lines of what WATiR currently has available for IE, that would let WATiR
> drive Mozilla/Firefox instances the way it's done for IE right now ?
I wonder if the plugin angle could help.. there is the TestGen4Web
project, for example:
http://developer.spikesource.com/wiki/index.php/Projects:TestGen4Web
From roy_sin at yahoo.com Fri Nov 4 20:55:26 2005
From: roy_sin at yahoo.com (Roy Sin)
Date: Fri, 4 Nov 2005 17:55:26 -0800 (PST)
Subject: [Wtr-general] How to leave the Browser Window open after test is
completed...
Message-ID: <20051105015527.92835.qmail@web52905.mail.yahoo.com>
this is weird I have a TC, which is not very different from
my other TCs. That is it requires setup which creates an
instance of IE and goto a URL. And in my report_test.rb,
all my tests
complete successfully but at the end the Browser closes.
My other TCs, the Browser window stays on the screen after
test completion only for that particular TC. Any idea!!
thanks
__________________________________
Start your day with Yahoo! - Make it your home page!
http://www.yahoo.com/r/hs
From vishalworld at sqatester.com Sat Nov 5 07:21:02 2005
From: vishalworld at sqatester.com (Vishal Chavan)
Date: Sat, 5 Nov 2005 04:21:02 -0800 (PST)
Subject: [Wtr-general] Calling function from another RB file.
Message-ID: <20051105042103.59D1D897@dm20.mta.everyone.net>
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051105/899536fc/attachment.html
From bret at pettichord.com Sat Nov 5 21:33:17 2005
From: bret at pettichord.com (Bret Pettichord)
Date: Sat, 05 Nov 2005 20:33:17 -0600
Subject: [Wtr-general] Assertions trouble
In-Reply-To:
References: <003c01c5e159$e839d3d0$c6e7fea9@officezg.wa>
Message-ID: <5.1.0.14.2.20051105202710.03c599f8@pop.gmail.com>
At 10:14 AM 11/4/2005, Eugene Kula wrote:
>Now that the assertions work, how do I get the results to display correctly
>(e.g. 0 assertions, 0 failures, 0 errors)?
The assert method in Test::Unit::Assertions is different from the assert
method in Test::Unit::TestCase in one way: it is not included in the total
count.
I am wondering if something like the following might not work for you. If
it does, let us know.
Bret
>def test_Columns
> columntable = [
> {'col'=>'Date/Time', 'issortable'=>true},
> {'col'=>'Description', 'issortable'=>true},
> {'col'=>'Lead', 'issortable'=>true},
> {'col'=>'Folder', 'issortable'=>true}
> ]
>
> TabularHelper.run_column_test(columntable, $ie, self)
>end
>
>MY Helper script:
>require 'watir'
>require 'test/unit'
>
>module TabularHelper
>def run_column_test(columntable, ie, testcase)
> testcase.assert($ie.something.exists?)
> testcase.assert_equal(somevalue, $ie.something.value)
>end
>end
_____________________
Bret Pettichord
www.pettichord.com
From bret at pettichord.com Sat Nov 5 21:37:29 2005
From: bret at pettichord.com (Bret Pettichord)
Date: Sat, 05 Nov 2005 20:37:29 -0600
Subject: [Wtr-general] FAQ Update
In-Reply-To: <1e55af990511041346h496350a1l1448d00a37bd6935@mail.gmail.co
m>
References: <5.1.0.14.2.20051028010239.03a76340@pop.gmail.com>
<5.1.0.14.2.20051028010239.03a76340@pop.gmail.com>
Message-ID: <5.1.0.14.2.20051105203413.03da8e88@pop.gmail.com>
At 03:46 PM 11/4/2005, Sy Ali wrote:
>I'd still rather like to update the entire wiki by
>migrating it to mediawiki. It was rather annoying to have had to wade
>through that FAQ the few times that I did in order to clean it up
>somewhat (and also answer my own questions).
Thanks for cleaning it up. It looks a lot bettter.
We are always open to specific proposals. Why would media wiki be better?
Where would it be hosted?
Bret
_____________________
Bret Pettichord
www.pettichord.com
From bret at pettichord.com Sat Nov 5 21:43:34 2005
From: bret at pettichord.com (Bret Pettichord)
Date: Sat, 05 Nov 2005 20:43:34 -0600
Subject: [Wtr-general] WATiR for Mozilla/Firefox
In-Reply-To: <7661e6730511032315w7b1fddc3r8553635f07213dfa@mail.gmail.co
m>
Message-ID: <5.1.0.14.2.20051105203836.03b5bbc8@pop.gmail.com>
At 01:15 AM 11/4/2005, Amit Garde wrote:
>What would it take to write a layer of code for Mozilla/Firefox on the
>lines of what WATiR currently has available for IE, that would let WATiR
>drive Mozilla/Firefox instances the way it's done for IE right now ?
>Specifically, what to target and what to use to target it ? Some delving
>suggests that an XPCOM based approach might be the way to go, but I
>haven't been able to figure out exactly how to approach this. Can anyone
>on this list offer some advice or pointers ? We might be able to offer
>some resources to work on this, but right now knowing where to look and
>how to start is the tough part.
This is a great idea. Several others have also looked into this and
threatened to write an implentation, but no one has yet to dive it. It
would be great to see you take a stab and this and share what you learn,
whether it be the start of an implementaiton or notes on what is difficult.
There are many people in the open source community who mostly like Watir,
except for the fact that is tied to proprietary technology. Supporting an
option of using Firefox would actually bring a lot support and involvement
and help from the larger Ruby community to Watir.
>It would be kind of neat to have the browser parameterized so that apart
>from the instantiation of a specific browser, a WATiR script for a given
>application could run unchanged for IE/FireFox/, modulo
>differences in browser functionality (e.g. tabs).
I completely agree and would be eager to work on developing a plug in
interface that separated and connected the existing Watir test API from its
currnet IE/COM driver interface.
Bret
_____________________
Bret Pettichord
www.pettichord.com
From paul.rogers at shaw.ca Sun Nov 6 00:50:22 2005
From: paul.rogers at shaw.ca (Paul Rogers)
Date: Sat, 05 Nov 2005 22:50:22 -0700
Subject: [Wtr-general] iexplore process remains after closing IE?
In-Reply-To: <1e55af990511041403l4e39e7fdt6719b7559ba5693d@mail.gmail.com>
Message-ID: <004601c5e295$fa46b6f0$6600a8c0@NewDell>
Try this
require 'Win32API'
hWnd = 985158 # use the hWnd for your process
# pid is a dword
pid=" " * 32
thread= Win32API.new("user32", "GetWindowThreadProcessId", 'IP',
'I').Call(hWnd,pid)
puts pid.unpack("L")[0]
I think you can do ie.hWnd to get the hWnd on the second line
Paul
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Sy Ali
Sent: 04 November 2005 15:04
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] iexplore process remains after closing IE?
On 10/31/05, Jeff Wood wrote:
> require 'watir'
> include Watir
>
> ie = IE.new
> ie.goto "www.google.com"
> ie.close
Is there a way to report the pid of IE.new ?
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
From bret at pettichord.com Sun Nov 6 13:02:00 2005
From: bret at pettichord.com (Bret Pettichord)
Date: Sun, 06 Nov 2005 12:02:00 -0600
Subject: [Wtr-general] Calling function from another RB file.
In-Reply-To: <20051105042103.59D1D897@dm20.mta.everyone.net>
Message-ID: <5.1.0.14.2.20051106120023.03cadb00@pop.gmail.com>
At 06:21 AM 11/5/2005, Vishal Chavan wrote:
>Finally, Wanted your opinion if its better to use Require or to load a
>library... Is there any other benefit between them when compared head to head?
Load just loads a library file.
Require will load a library
1. if it hasn't already been loaded
2. located anywhere in the load path
In general, people find it more useful to use require for libraries.
Bret
_____________________
Bret Pettichord
www.pettichord.com
From bret at pettichord.com Sun Nov 6 13:06:58 2005
From: bret at pettichord.com (Bret Pettichord)
Date: Sun, 06 Nov 2005 12:06:58 -0600
Subject: [Wtr-general] submit form
In-Reply-To: <158e6acb0511040102r7ab5f4aaj6e92299af47c3ec4@mail.gmail.co
m>
Message-ID: <5.1.0.14.2.20051106120627.03cc6548@pop.gmail.com>
At 03:02 AM 11/4/2005, boonhoo wrote:
>Is there a way in watir to determine if after submitting a form,
>a) whether the form really make a POST and move to a new page, or
>b) the form just redisplay itself and did not get POSTed? (e.g. if
>there are incomplete fields and caught by javascript validation)
You could check to see if the current page still contains the form after
submitting it.
_____________________
Bret Pettichord
www.pettichord.com
From paul.rogers at shaw.ca Sun Nov 6 15:18:00 2005
From: paul.rogers at shaw.ca (Paul Rogers)
Date: Sun, 06 Nov 2005 13:18:00 -0700
Subject: [Wtr-general] submit form
In-Reply-To: <5.1.0.14.2.20051106120627.03cc6548@pop.gmail.com>
Message-ID: <000201c5e30f$2f58a3c0$6600a8c0@NewDell>
Tghere used to be a variable - I think it was ie.pageHasReloaded or
similar thjat would show wether a page had been reloaded - just for
situations like this. I don't know if its still there or nor
Paul
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord
Sent: 06 November 2005 11:07
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] submit form
At 03:02 AM 11/4/2005, boonhoo wrote:
>Is there a way in watir to determine if after submitting a form,
>a) whether the form really make a POST and move to a new page, or
>b) the form just redisplay itself and did not get POSTed? (e.g. if
>there are incomplete fields and caught by javascript validation)
You could check to see if the current page still contains the form after
submitting it.
_____________________
Bret Pettichord
www.pettichord.com
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
From sy1234 at gmail.com Sun Nov 6 17:45:42 2005
From: sy1234 at gmail.com (Sy Ali)
Date: Sun, 6 Nov 2005 16:45:42 -0600
Subject: [Wtr-general] FAQ Update
In-Reply-To: <5.1.0.14.2.20051105203413.03da8e88@pop.gmail.com>
References: <5.1.0.14.2.20051028010239.03a76340@pop.gmail.com>
<5.1.0.14.2.20051105203413.03da8e88@pop.gmail.com>
Message-ID: <1e55af990511061445w72a16630x7526b44c60dd851e@mail.gmail.com>
On 11/5/05, Bret Pettichord wrote:
> At 03:46 PM 11/4/2005, Sy Ali wrote:
> >I'd still rather like to update the entire wiki by
> >migrating it to mediawiki. It was rather annoying to have had to wade
> >through that FAQ the few times that I did in order to clean it up
> >somewhat (and also answer my own questions).
>
> Thanks for cleaning it up. It looks a lot bettter.
>
> We are always open to specific proposals. Why would media wiki be better?
> Where would it be hosted?
My main issue with the existing wiki is their markup language. The
insistance of "CamelCase" links forces broken english titles and poor
sentances and is an eyesore to edit.
The main benefits of mediawiki would be the various different skins.
I'm a particular fan of the default skin. It's quite beautiful. This
is the first and foremost thing that everyday users would see. The
second would be the much nicer organization of the information. From
experience, I can say that it's been intuitive to organize and
maintain a lot of information within a mediawiki installation.
On the inside, the editing is very easy (the markup language is good).
It's extremely nice to be able to edit just a section of a page.. one
doesn't get lost on more complecated pages like a FAQ. Automatic
table of contents is nice. The templating engine allows for easy
re-use of snippets of information. Adding inline images is trivial.
For more technical reasons, mediawiki is very easy to update and
maintain. Updating it amounts to unpacking the new tarball over the
previous directory and running "php update.php" (or without ssh
access, it's still quite easy). It's extremely easy to supervise,
with controls for viewing recent changes and the lke.
For more social reasons, MediaWiki is wildly popular and in my mind
proved as an excellent tool because of its use for the Wikipedia.
This is what would assure continued development.. there are a lot of
interested people.
My only warnings are to require usernames for editing, to use the
spamblacklist extension and to include a one-liner regex to ban
certain types of content. I can provide help with these things.
If hosting is an issue, I'd be pleased to host it with my resources..
but it'll go anywhere php/mysql does.
Curiously, it looks like the markup language is almost the same from
the existing wiki to mediawiki. This means that it would be nearly
trivial to hand-port the content from the existing wiki to a mediawiki
installation. Yes, I would be willing to do this and unless you've
got hundreds of pages of content I could get it done within two weeks.
This would include the original wiki's content as well.
My own wiki:
http://jrandomhacker.info
http://jrandomhacker.info/MediaWiki
I also help maintain two other wikis:
My local Linux user group (GTALUG):
http://gtalug.org
My local Ruby user group (TRUG):
http://trug.stok.co.uk/wiki/
soon to be http://trug.ca
I've set up MediaWiki for my old work and my current business. This
is after a long and tiring history with a few other wikis. MediaWiki
has been amazing.
In the meantime, I intend to open up a Watir-specific section in TRUG
since I've just begun working with watir and need to begin a resource
and code repository. Sorry for being long-winded.. but I just got
back from our meeting and am revved up. =)
Sy,
From sy1234 at gmail.com Sun Nov 6 23:35:03 2005
From: sy1234 at gmail.com (Sy Ali)
Date: Sun, 6 Nov 2005 22:35:03 -0600
Subject: [Wtr-general] How to leave the Browser Window open after test
is completed...
In-Reply-To: <20051105015527.92835.qmail@web52905.mail.yahoo.com>
References: <20051105015527.92835.qmail@web52905.mail.yahoo.com>
Message-ID: <1e55af990511062035r4cf9248ey31bd580c6a50a55d@mail.gmail.com>
On 11/4/05, Roy Sin wrote:
> My other TCs, the Browser window stays on the screen after
> test completion only for that particular TC. Any idea!!
That's odd.. I had to specifically throw in a line to close the window
after my test case was done.
Perhaps what you could do is some kind of delay at the end. I do a simple:
foobar = gets
and the window will hang there waiting for input. This is a cheap
hack, but I should think it'd work.
From chaya_b_s at yahoo.co.in Mon Nov 7 00:17:07 2005
From: chaya_b_s at yahoo.co.in (chaya shetty)
Date: Mon, 7 Nov 2005 05:17:07 +0000 (GMT)
Subject: [Wtr-general] How to hide the explorer window in Watir
In-Reply-To:
Message-ID: <20051107051707.47490.qmail@web8301.mail.in.yahoo.com>
Hi,
I tried with both $ie.minimize and with -b option, but still the popups were not hidden. Is there any other way??
Thanks
Chaya
Tom wrote:
v\:* {behavior:url(#default#VML);}o\:* {behavior:url(#default#VML);}w\:* {behavior:url(#default#VML);}.shape {behavior:url(#default#VML);}st1\:*{behavior:url(#default#ieooui) }
You could try:
$ie.minimize, but I?m not sure if that will also keep your pop ups minimized.
Failing that, you could run the ?b when calling your script from the command line:
>C:/Watir/my_script.rb ?b
This will make your script run in the background. Since this does not create an ie window, you will not be able peek at what?s happening. I believe this should avoid the pop ups from appearing, but I haven?t tried this myself.
Tom
---------------------------------
From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of chaya shetty
Sent: Friday, November 04, 2005 3:49 AM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] How to hide the explorer window in Watir
Hi,
I want the internet explorer window to be hidden while my script is running.
One option for this is:
$ie.getIE.visible = false
But this will just hide the main window, the popups are not hidden.
Is there any other way to do this??
Thanks
Chaya
---------------------------------
Enjoy this Diwali with Y! India Click here
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
---------------------------------
Enjoy this Diwali with Y! India Click here
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051107/89ad327d/attachment.html
From satti at qantom.com Mon Nov 7 01:04:34 2005
From: satti at qantom.com (Sathya Shankar)
Date: Mon, 07 Nov 2005 11:34:34 +0530
Subject: [Wtr-general] How to hide the explorer window in Watir
In-Reply-To: <20051107051707.47490.qmail@web8301.mail.in.yahoo.com>
References: <20051107051707.47490.qmail@web8301.mail.in.yahoo.com>
Message-ID: <436EEE72.2000901@qantom.com>
Hi chaya shetty...
I think by definition popups or modal dialog windows cannot be hidden
eventhough the modal dialogs are owned by the IE at that point of time.
So you can make only the IE browser to run in the background but not any
Modal dialog boxes or Popups. :-(
Sathya Shankar
chaya shetty wrote:
> Hi,
> I tried with both $ie.minimize and with -b option, but still the
> popups were not hidden. Is there any other way??
> Thanks
> Chaya
>
> */Tom /* wrote:
>
> You could try:
>
> $ie.minimize, but I?m not sure if that will also keep your pop ups
> minimized.
>
> Failing that, you could run the ?b when calling your script from
> the command line:
>
>>C:/Watir/my_script.rb ?b
>
> This will make your script run in the background. Since this does
> not create an ie window, you will not be able peek at what?s
> happening. I believe this should avoid the pop ups from appearing,
> but I haven?t tried this myself.
>
> Tom
>
> ------------------------------------------------------------------------
>
> *From:* wtr-general-bounces at rubyforge.org
> [mailto:wtr-general-bounces at rubyforge.org] *On Behalf Of *chaya shetty
> *Sent:* Friday, November 04, 2005 3:49 AM
> *To:* wtr-general at rubyforge.org
> *Subject:* [Wtr-general] How to hide the explorer window in Watir
>
> / /
>
> //Hi,//
> I want the internet explorer window to be hidden while my script
> is running.
> One option for this is:
> $ie.getIE.visible = false
> But this will just hide the main window, the popups are not hidden.
> Is there any other way to do this??//
>
> / //Thanks /
>
> Chaya
>
> /
>
>
> /
>
> ------------------------------------------------------------------------
>
> Enjoy this Diwali with Y! India Click here
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
> ------------------------------------------------------------------------
> Enjoy this Diwali with Y! India Click here
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Wtr-general mailing list
>Wtr-general at rubyforge.org
>http://rubyforge.org/mailman/listinfo/wtr-general
>
>
--
Sathya Shankar M G
Software Testing Engineer
Qantom Software
http://www.qantom.com
Ph : 26799269 Xtn. 123
sip : satti at sip411.com
From christopher.mcmahon at gmail.com Mon Nov 7 10:07:23 2005
From: christopher.mcmahon at gmail.com (Chris McMahon)
Date: Mon, 7 Nov 2005 09:07:23 -0600
Subject: [Wtr-general] How to hide the explorer window in Watir
In-Reply-To: <20051107051707.47490.qmail@web8301.mail.in.yahoo.com>
References:
<20051107051707.47490.qmail@web8301.mail.in.yahoo.com>
Message-ID: <72799cd70511070707l52ced587mbb51b9d853f45aa3@mail.gmail.com>
On 11/6/05, chaya shetty wrote:
> Hi,
> I tried with both $ie.minimize and with -b option, but still the popups were
> not hidden. Is there any other way??
Selenium does this, I think-- but it intercepts the Javascript before
the popup fires, if I'm not mistaken.
-Chris
From theebh at gmail.com Mon Nov 7 10:43:20 2005
From: theebh at gmail.com (boonhoo)
Date: Mon, 7 Nov 2005 23:43:20 +0800
Subject: [Wtr-general] submit form
In-Reply-To: <5.1.0.14.2.20051106120627.03cc6548@pop.gmail.com>
References: <5.1.0.14.2.20051106120627.03cc6548@pop.gmail.com>
Message-ID: <158e6acb0511070743v11b8a75bjd3a9dd5c96277ffd@mail.gmail.com>
Hi, in situation where server-side validation is being used to check
the form submission, I believe the form will still exist in the page
after submitting.
I have decided to use proxomitron as a local proxy to remove
client-side validation code, so that all forms will act as (a), i.e.
submitted to server.
Rgds
boonhoo
On 11/7/05, Bret Pettichord wrote:
> At 03:02 AM 11/4/2005, boonhoo wrote:
> >Is there a way in watir to determine if after submitting a form,
> >a) whether the form really make a POST and move to a new page, or
> >b) the form just redisplay itself and did not get POSTed? (e.g. if
> >there are incomplete fields and caught by javascript validation)
>
> You could check to see if the current page still contains the form after
> submitting it.
>
>
> _____________________
> Bret Pettichord
> www.pettichord.com
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
From mooola00 at hotmail.com Mon Nov 7 11:14:01 2005
From: mooola00 at hotmail.com (Gene)
Date: Mon, 7 Nov 2005 09:14:01 -0700
Subject: [Wtr-general] Assertions trouble
In-Reply-To: <5.1.0.14.2.20051105202710.03c599f8@pop.gmail.com>
Message-ID:
I ended up stumbling across something similar by accident. I removed the
module name (TabularHelper) from the method in the test case and it works.
Thanks for the help!
require 'tabularHelper.rb'
include TabularHelper
class TC_EventTabular < Test::Unit::TestCase
def test_Columns
columntable = [
{'col'=>'Date/Time', 'issortable'=>true},
{'col'=>'Description', 'issortable'=>true},
{'col'=>'Lead', 'issortable'=>true},
{'col'=>'Folder', 'issortable'=>true}
]
run_column_test(columntable, $ie)
end
end
MY Helper script:
require 'watir'
require 'test/unit'
require 'test/unit/ui/console/testrunner'
require 'watir/testUnitAddons'
module TabularHelper
def run_column_test(columntable, ie)
assert($ie.something.exists?)
assert_equal(somevalue, $ie.something.value)
end
end
From christopher.mcmahon at gmail.com Mon Nov 7 12:33:47 2005
From: christopher.mcmahon at gmail.com (Chris McMahon)
Date: Mon, 7 Nov 2005 11:33:47 -0600
Subject: [Wtr-general] iexplore process remains after closing IE?
In-Reply-To: <004601c5e295$fa46b6f0$6600a8c0@NewDell>
References: <1e55af990511041403l4e39e7fdt6719b7559ba5693d@mail.gmail.com>
<004601c5e295$fa46b6f0$6600a8c0@NewDell>
Message-ID: <72799cd70511070933t70adecedv1fb3fc6ab5142a28@mail.gmail.com>
Paul, I'm not following your example below. It's clearly valid code,
I run it and pid.unpack("L")[0] is "538976288", but I don't get how
the pid is related to a Watir "IE.new". Sorry if it's a silly
question, but I'm not getting it...
-Chris
On 11/5/05, Paul Rogers wrote:
> Try this
>
> require 'Win32API'
>
> hWnd = 985158 # use the hWnd for your process
> # pid is a dword
> pid=" " * 32
> thread= Win32API.new("user32", "GetWindowThreadProcessId", 'IP',
> 'I').Call(hWnd,pid)
> puts pid.unpack("L")[0]
>
> I think you can do ie.hWnd to get the hWnd on the second line
>
> Paul
>
> -----Original Message-----
> From: wtr-general-bounces at rubyforge.org
> [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Sy Ali
> Sent: 04 November 2005 15:04
> To: wtr-general at rubyforge.org
> Subject: Re: [Wtr-general] iexplore process remains after closing IE?
>
>
> On 10/31/05, Jeff Wood wrote:
> > require 'watir'
> > include Watir
> >
> > ie = IE.new
> > ie.goto "www.google.com"
> > ie.close
>
> Is there a way to report the pid of IE.new ?
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
From paul.rogers at shaw.ca Mon Nov 7 13:04:11 2005
From: paul.rogers at shaw.ca (Paul Rogers)
Date: Mon, 07 Nov 2005 11:04:11 -0700
Subject: [Wtr-general] iexplore process remains after closing IE?
Message-ID: <8250a7f58d.7f58d8250a@shaw.ca>
you'll need to get the hWnd of the browser first
require 'Win32API'
ie = IE.new
ie.goto "www.google.com"
hWnd = ie.ie.hWnd
pid=" " * 32
thread= Win32API.new("user32", "GetWindowThreadProcessId", 'IP', 'I').Call(hWnd,pid)
puts pid.unpack("L")[0]
----- Original Message -----
From: Chris McMahon
Date: Monday, November 7, 2005 10:33 am
Subject: Re: [Wtr-general] iexplore process remains after closing IE?
> Paul, I'm not following your example below. It's clearly valid code,
> I run it and pid.unpack("L")[0] is "538976288", but I don't get how
> the pid is related to a Watir "IE.new". Sorry if it's a silly
> question, but I'm not getting it...
> -Chris
>
> On 11/5/05, Paul Rogers wrote:
> > Try this
> >
> > require 'Win32API'
> >
> > hWnd = 985158 # use the hWnd for your process
> > # pid is a dword
> > pid=" " * 32
> > thread= Win32API.new("user32", "GetWindowThreadProcessId", 'IP',
> > 'I').Call(hWnd,pid)
> > puts pid.unpack("L")[0]
> >
> > I think you can do ie.hWnd to get the hWnd on the second line
> >
> > Paul
> >
> > -----Original Message-----
> > From: wtr-general-bounces at rubyforge.org
> > [wtr-general-bounces at rubyforge.org] On Behalf Of Sy Ali
> > Sent: 04 November 2005 15:04
> > To: wtr-general at rubyforge.org
> > Subject: Re: [Wtr-general] iexplore process remains after
> closing IE?
> >
> >
> > On 10/31/05, Jeff Wood wrote:
> > > require 'watir'
> > > include Watir
> > >
> > > ie = IE.new
> > > ie.goto "www.google.com"
> > > ie.close
> >
> > Is there a way to report the pid of IE.new ?
> >
> > _______________________________________________
> > Wtr-general mailing list
> > Wtr-general at rubyforge.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 roy_sin at yahoo.com Mon Nov 7 13:12:34 2005
From: roy_sin at yahoo.com (Roy Sin)
Date: Mon, 7 Nov 2005 10:12:34 -0800 (PST)
Subject: [Wtr-general] How to leave the Browser Window open after test
is completed...
In-Reply-To: <1e55af990511062035r4cf9248ey31bd580c6a50a55d@mail.gmail.com>
Message-ID: <20051107181234.59732.qmail@web52905.mail.yahoo.com>
Sy,
Instead of the gets I have added
puts "this test case has now completed."
at the end of my script works great now.
thanks
p.s: still weird :-) that is my only TC I had to do that.
--- Sy Ali wrote:
> On 11/4/05, Roy Sin wrote:
> > My other TCs, the Browser window stays on the screen
> after
> > test completion only for that particular TC. Any idea!!
>
> That's odd.. I had to specifically throw in a line to
> close the window
> after my test case was done.
>
> Perhaps what you could do is some kind of delay at the
> end. I do a simple:
> foobar = gets
> and the window will hang there waiting for input. This
> is a cheap
> hack, but I should think it'd work.
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
From christopher.mcmahon at gmail.com Mon Nov 7 13:54:55 2005
From: christopher.mcmahon at gmail.com (Chris McMahon)
Date: Mon, 7 Nov 2005 12:54:55 -0600
Subject: [Wtr-general] Last but not least Re: iexplore process remains after
closing IE?
Message-ID: <72799cd70511071054t3ff930bai8414a8a65b0f0b60@mail.gmail.com>
OK, I got it now--
What's the syntax to actually close the browser using the pid/wHnd?
-Chris
On 11/7/05, Paul Rogers wrote:
> you'll need to get the hWnd of the browser first
>
> require 'Win32API'
>
>
> ie = IE.new
> ie.goto "www.google.com"
>
> hWnd = ie.ie.hWnd
> pid=" " * 32
> thread= Win32API.new("user32", "GetWindowThreadProcessId", 'IP', 'I').Call(hWnd,pid)
> puts pid.unpack("L")[0]
>
>
From paul.rogers at shaw.ca Mon Nov 7 14:15:58 2005
From: paul.rogers at shaw.ca (Paul Rogers)
Date: Mon, 07 Nov 2005 12:15:58 -0700
Subject: [Wtr-general] Last but not least Re: iexplore process remains
after closing IE?
Message-ID:
I think its
Process.kill( 9 , pid)
http://www.ruby-doc.org/core/classes/Process.html#M001765
----- Original Message -----
From: Chris McMahon
Date: Monday, November 7, 2005 11:54 am
Subject: [Wtr-general] Last but not least Re: iexplore process remains after closing IE?
> OK, I got it now--
> What's the syntax to actually close the browser using the pid/wHnd?
> -Chris
>
> On 11/7/05, Paul Rogers wrote:
> > you'll need to get the hWnd of the browser first
> >
> > require 'Win32API'
> >
> >
> > ie = IE.new
> > ie.goto "www.google.com"
> >
> > hWnd = ie.ie.hWnd
> > pid=" " * 32
> > thread= Win32API.new("user32", "GetWindowThreadProcessId",
> 'IP', 'I').Call(hWnd,pid)
> > puts pid.unpack("L")[0]
> >
> >
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
From christopher.mcmahon at gmail.com Mon Nov 7 14:42:51 2005
From: christopher.mcmahon at gmail.com (Chris McMahon)
Date: Mon, 7 Nov 2005 13:42:51 -0600
Subject: [Wtr-general] Last but not least Re: iexplore process remains
after closing IE?
In-Reply-To:
References:
Message-ID: <72799cd70511071142g75b23c17waa17a7a07f270102@mail.gmail.com>
On 11/7/05, Paul Rogers wrote:
> I think its
>
> Process.kill( 9 , pid)
This rawks, thanks!
Works great.
(Note-- have to use the unpacked pid to kill the process, but it works
like a charm.)
-Chris
PS Whoda thunk Ruby would let you do a "kill -9" on Windows? I'm amused...
From christopher.mcmahon at gmail.com Mon Nov 7 15:17:35 2005
From: christopher.mcmahon at gmail.com (Chris McMahon)
Date: Mon, 7 Nov 2005 14:17:35 -0600
Subject: [Wtr-general] Code to really really really kill IE
Message-ID: <72799cd70511071217o4990a83bo8767c9a627102e40@mail.gmail.com>
Thanks Paul, I put it together in an easy example. This is tested and works:
require 'win32ole'
require 'watir' # the controller
include Watir
require 'Win32API'
@ie = IE.new
hWnd = @ie.ie.hWnd
pid=" " * 32
thread= Win32API.new("user32", "GetWindowThreadProcessId", 'IP',
'I').Call(hWnd,pid)
fixnum_pid = pid.unpack("L")[0]
puts fixnum_pid
Process.kill( 9 , fixnum_pid)
From carl.l.shaulis at convergys.com Mon Nov 7 15:55:01 2005
From: carl.l.shaulis at convergys.com (carl.l.shaulis at convergys.com)
Date: Mon, 7 Nov 2005 14:55:01 -0600
Subject: [Wtr-general] Controlling threads & testing speed
Message-ID:
Good afternoon,
Unfortunately I did not receive any response to a post on Nov. 3
-Reliability and thread management, so I thought I would try again.
I am having some problems with a couple of our scripts.
What tricks are available for timing threads and controlling the speed of
WATIR?
How can we make sure a thread has ended?
The basic concern is that the WATIR script will work, then it may not work,
and eventually it will work again without any modification to the code or
application. These scripts involve modals and pop ups. I believe it is a
timing issue, but I am not certain.
Has anyone else experienced this type of behavior?
Any thoughts and suggestions would be greatly appreciated.
Thanks,
Carl
--
"NOTICE: The information contained in this electronic mail transmission is
intended by Convergys Corporation for the use of the named individual or
entity to which it is directed and may contain information that is
privileged or otherwise confidential. If you have received this electronic
mail transmission in error, please delete it from your system without
copying or forwarding it, and notify the sender of the error by reply email
or by telephone (collect), so that the sender's address records can be
corrected."
From paul.rogers at shaw.ca Mon Nov 7 16:05:20 2005
From: paul.rogers at shaw.ca (Paul Rogers)
Date: Mon, 07 Nov 2005 14:05:20 -0700
Subject: [Wtr-general] Code to really really really kill IE
Message-ID:
we should probably add this as a ( or some ) methods
ie.hWnd
ie.pid
ie.kill
----- Original Message -----
From: Chris McMahon
Date: Monday, November 7, 2005 1:17 pm
Subject: [Wtr-general] Code to really really really kill IE
> Thanks Paul, I put it together in an easy example. This is tested
> and works:
>
> require 'win32ole'
> require 'watir' # the controller
> include Watir
> require 'Win32API'
>
> @ie = IE.new
> hWnd = @ie.ie.hWnd
> pid=" " * 32
> thread= Win32API.new("user32", "GetWindowThreadProcessId", 'IP',
> 'I').Call(hWnd,pid)
> fixnum_pid = pid.unpack("L")[0]
> puts fixnum_pid
> Process.kill( 9 , fixnum_pid)
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
From paul.rogers at shaw.ca Mon Nov 7 16:06:46 2005
From: paul.rogers at shaw.ca (Paul Rogers)
Date: Mon, 07 Nov 2005 14:06:46 -0700
Subject: [Wtr-general] Controlling threads & testing speed
Message-ID:
hi Carl,
if you can post some repeatable code/html unit tests that really helps getting things fixed.
The pop up handling has not been very good in watir, and we need to improve it.
Paul
----- Original Message -----
From: carl.l.shaulis at convergys.com
Date: Monday, November 7, 2005 1:55 pm
Subject: [Wtr-general] Controlling threads & testing speed
>
>
>
>
> Good afternoon,
>
> Unfortunately I did not receive any response to a post on Nov. 3
> -Reliability and thread management, so I thought I would try again.
>
> I am having some problems with a couple of our scripts.
>
> What tricks are available for timing threads and controlling the
> speed of
> WATIR?
> How can we make sure a thread has ended?
>
> The basic concern is that the WATIR script will work, then it may
> not work,
> and eventually it will work again without any modification to the
> code or
> application. These scripts involve modals and pop ups. I believe
> it is a
> timing issue, but I am not certain.
>
> Has anyone else experienced this type of behavior?
>
> Any thoughts and suggestions would be greatly appreciated.
>
> Thanks,
>
> Carl
> --
> "NOTICE: The information contained in this electronic mail
> transmission is
> intended by Convergys Corporation for the use of the named
> individual or
> entity to which it is directed and may contain information that is
> privileged or otherwise confidential. If you have received this
> electronicmail transmission in error, please delete it from your
> system without
> copying or forwarding it, and notify the sender of the error by
> reply email
> or by telephone (collect), so that the sender's address records
> can be
> corrected."
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
From bagee at aventail.com Mon Nov 7 16:12:36 2005
From: bagee at aventail.com (Bill Agee)
Date: Mon, 7 Nov 2005 13:12:36 -0800
Subject: [Wtr-general] Controlling threads & testing speed
Message-ID: <30561FB511309F44A56833A491C9FEC6026A1F1F@exchange2.in.aventail.com>
> -----Original Message-----
> Subject: [Wtr-general] Controlling threads & testing speed
> What tricks are available for timing threads and controlling
> the speed of WATIR? How can we make sure a thread has ended?
>
> The basic concern is that the WATIR script will work, then it
> may not work, and eventually it will work again without any
> modification to the code or application. These scripts
> involve modals and pop ups. I believe it is a timing issue,
> but I am not certain.
>
> Has anyone else experienced this type of behavior?
>
[...snip...]
I too initially had some problems with timing issues in my
popup-dismissing threads. But since then I've had success using sleep()
mixed in with creation of threads, as in the example below. Since doing
this I've had no further problems with timing issues and simple popup
dismissing tasks (knock wood):
=============================================
def navigate (address)
req01 = Thread.new { goto(address) }
# wait a sec for the 'entering HTTPS' IE prompt to appear:
sleep(1)
# dismiss first IE prompt:
req02 = Thread.new { btnclk('Security Alert', 'OK') }
# wait for the SSL y/n/cancel prompt to appear:
sleep(1)
# another button click to dismiss the SSL cert prompt:
req03 = Thread.new { btnclk('Security Alert', 'Yes') }
# wait for all threads to complete before continuing:
req01.join
req02.join
req03.join
end
=============================================
(The 'btnclk' method shown above is just a wrapper around an autoit-like
DLL I'm using to dismiss windows.)
Thanks
Bill
From sy1234 at gmail.com Mon Nov 7 21:51:19 2005
From: sy1234 at gmail.com (Sy Ali)
Date: Mon, 7 Nov 2005 20:51:19 -0600
Subject: [Wtr-general] How to leave the Browser Window open after test
is completed...
In-Reply-To: <20051107181234.59732.qmail@web52905.mail.yahoo.com>
References: <1e55af990511062035r4cf9248ey31bd580c6a50a55d@mail.gmail.com>
<20051107181234.59732.qmail@web52905.mail.yahoo.com>
Message-ID: <1e55af990511071851s467c70f2h30047a9e1570bc2a@mail.gmail.com>
On 11/7/05, Roy Sin wrote:
> Sy,
>
> Instead of the gets I have added
> puts "this test case has now completed."
> at the end of my script works great now.
>
> thanks
>
> p.s: still weird :-) that is my only TC I had to do that.
This is wierd enough that perhaps it should be posted and noted as a
bug.. I hate when inconsistant things like that happen.
From bret at pettichord.com Tue Nov 8 01:54:23 2005
From: bret at pettichord.com (Bret Pettichord)
Date: Tue, 08 Nov 2005 00:54:23 -0600
Subject: [Wtr-general] New Watir Wiki, was Re: FAQ Update
In-Reply-To: <1e55af990511061445w72a16630x7526b44c60dd851e@mail.gmail.co
m>
References: <5.1.0.14.2.20051105203413.03da8e88@pop.gmail.com>
<5.1.0.14.2.20051028010239.03a76340@pop.gmail.com>
<5.1.0.14.2.20051105203413.03da8e88@pop.gmail.com>
Message-ID: <5.1.0.14.2.20051108004740.03e0cf48@pop.gmail.com>
I'm very interested in Sy's proposal (below) to host the Watir project wiki
using Media Wiki.
I've used Wikipedia before, and i did find it to be a pretty good system. I
don't have any particular attachment to what we are using now, which is
just what rubyforge provides. I'm particular interested to know the views
of the people who've made a lot of contibutions to our wiki.
My only concern is that if we have usernames to access, it would be nice if
we could recycle the rubyforge usernames, just because that would make it
easier for our contributors. But i'm not sure if that is really possible.
Comments?
Bret
At 04:45 PM 11/6/2005, Sy Ali wrote:
>On 11/5/05, Bret Pettichord wrote:
> > At 03:46 PM 11/4/2005, Sy Ali wrote:
> > >I'd still rather like to update the entire wiki by
> > >migrating it to mediawiki. It was rather annoying to have had to wade
> > >through that FAQ the few times that I did in order to clean it up
> > >somewhat (and also answer my own questions).
> >
> > Thanks for cleaning it up. It looks a lot bettter.
> >
> > We are always open to specific proposals. Why would media wiki be better?
> > Where would it be hosted?
>
>My main issue with the existing wiki is their markup language. The
>insistance of "CamelCase" links forces broken english titles and poor
>sentances and is an eyesore to edit.
>
>The main benefits of mediawiki would be the various different skins.
>I'm a particular fan of the default skin. It's quite beautiful. This
>is the first and foremost thing that everyday users would see. The
>second would be the much nicer organization of the information. From
>experience, I can say that it's been intuitive to organize and
>maintain a lot of information within a mediawiki installation.
>
>On the inside, the editing is very easy (the markup language is good).
> It's extremely nice to be able to edit just a section of a page.. one
>doesn't get lost on more complecated pages like a FAQ. Automatic
>table of contents is nice. The templating engine allows for easy
>re-use of snippets of information. Adding inline images is trivial.
>
>For more technical reasons, mediawiki is very easy to update and
>maintain. Updating it amounts to unpacking the new tarball over the
>previous directory and running "php update.php" (or without ssh
>access, it's still quite easy). It's extremely easy to supervise,
>with controls for viewing recent changes and the lke.
>
>For more social reasons, MediaWiki is wildly popular and in my mind
>proved as an excellent tool because of its use for the Wikipedia.
>This is what would assure continued development.. there are a lot of
>interested people.
>
>
>My only warnings are to require usernames for editing, to use the
>spamblacklist extension and to include a one-liner regex to ban
>certain types of content. I can provide help with these things.
>
>If hosting is an issue, I'd be pleased to host it with my resources..
>but it'll go anywhere php/mysql does.
>
>Curiously, it looks like the markup language is almost the same from
>the existing wiki to mediawiki. This means that it would be nearly
>trivial to hand-port the content from the existing wiki to a mediawiki
>installation. Yes, I would be willing to do this and unless you've
>got hundreds of pages of content I could get it done within two weeks.
> This would include the original wiki's content as well.
>
>My own wiki:
>http://jrandomhacker.info
>http://jrandomhacker.info/MediaWiki
>
>I also help maintain two other wikis:
>My local Linux user group (GTALUG):
>http://gtalug.org
>
>My local Ruby user group (TRUG):
>http://trug.stok.co.uk/wiki/
>soon to be http://trug.ca
>
>I've set up MediaWiki for my old work and my current business. This
>is after a long and tiring history with a few other wikis. MediaWiki
>has been amazing.
>
>
>In the meantime, I intend to open up a Watir-specific section in TRUG
>since I've just begun working with watir and need to begin a resource
>and code repository. Sorry for being long-winded.. but I just got
>back from our meeting and am revved up. =)
>
>
>Sy,
>
>_______________________________________________
>Wtr-general mailing list
>Wtr-general at rubyforge.org
>http://rubyforge.org/mailman/listinfo/wtr-general
_____________________
Bret Pettichord
www.pettichord.com
From Jan.Montano at thomson.com Tue Nov 8 02:31:20 2005
From: Jan.Montano at thomson.com (Jan.Montano at thomson.com)
Date: Tue, 8 Nov 2005 15:31:20 +0800
Subject: [Wtr-general] 1.4_1
Message-ID:
hi! I installed 1.4_1.exe of watir
and It is installed on program files\watir.
I run myy script created from 1.3 but this error occurs
No such file to load -- unittests/setup
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__'
Press ENTER to close the window...
What's the meaning of this and how do I fix it? tnx.
From Jan.Montano at thomson.com Tue Nov 8 02:34:16 2005
From: Jan.Montano at thomson.com (Jan.Montano at thomson.com)
Date: Tue, 8 Nov 2005 15:34:16 +0800
Subject: [Wtr-general] 1.4_1
Message-ID:
I put my script on unittest from the 1.4 installation ffolder.
> -----Original Message-----
> From: Montano, Jan (Corp,IB&IM)
> Sent: Tuesday, November 08, 2005 3:31 PM
> To: Watir (E-mail)
> Subject: 1.4_1
>
> hi! I installed 1.4_1.exe of watir
>
> and It is installed on program files\watir.
>
> I run myy script created from 1.3 but this error occurs
>
> No such file to load -- unittests/setup
> c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__'
> Press ENTER to close the window...
>
> What's the meaning of this and how do I fix it? tnx.
From Jan.Montano at thomson.com Tue Nov 8 05:52:52 2005
From: Jan.Montano at thomson.com (Jan.Montano at thomson.com)
Date: Tue, 8 Nov 2005 18:52:52 +0800
Subject: [Wtr-general] if textfield is read only?
Message-ID:
Thanks! but how about if s radio, select_list is disabled or not? I can't find it in the rdoc.
-----Original Message-----
From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Zeljko Filipin
Sent: Thursday, November 03, 2005 4:54 PM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] if textfield is read only?
html:
watir: ie.textField(:index, 1).readonly?
Watir code will return true if text box is readonly, and false if not.
I found it at http://wtr.rubyforge.org/rdoc/index.html
Zeljko
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of
Jan.Montano at thomson.com
Sent: Thursday, November 03, 2005 9:27 AM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] if textfield is read only?
How will we know if a text box is read only or not?
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
From zeljko.filipin at gmail.com Tue Nov 8 06:16:45 2005
From: zeljko.filipin at gmail.com (Zeljko Filipin)
Date: Tue, 8 Nov 2005 12:16:45 +0100
Subject: [Wtr-general] if textfield is read only?
In-Reply-To:
Message-ID: <001401c5e455$e8b7f450$c6e7fea9@officezg.wa>
This works for me
ie.textField(:index, 1).disabled
and, yes, I also think this would be more intuititve
ie.textField(:index, 1).disabled?
Zeljko
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of
Jan.Montano at thomson.com
Sent: Tuesday, November 08, 2005 11:53 AM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] if textfield is read only?
Thanks! but how about if s radio, select_list is disabled or not? I can't
find it in the rdoc.
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Zeljko Filipin
Sent: Thursday, November 03, 2005 4:54 PM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] if textfield is read only?
html:
watir: ie.textField(:index, 1).readonly?
Watir code will return true if text box is readonly, and false if not.
I found it at http://wtr.rubyforge.org/rdoc/index.html
Zeljko
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of
Jan.Montano at thomson.com
Sent: Thursday, November 03, 2005 9:27 AM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] if textfield is read only?
How will we know if a text box is read only or not?
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
From zeljko.filipin at gmail.com Tue Nov 8 06:19:24 2005
From: zeljko.filipin at gmail.com (Zeljko Filipin)
Date: Tue, 8 Nov 2005 12:19:24 +0100
Subject: [Wtr-general] if textfield is read only?
In-Reply-To:
Message-ID: <001501c5e456$484a81d0$c6e7fea9@officezg.wa>
And I could not find it in rdoc, too. :)
Zeljko
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of
Jan.Montano at thomson.com
Sent: Tuesday, November 08, 2005 11:53 AM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] if textfield is read only?
Thanks! but how about if s radio, select_list is disabled or not? I can't
find it in the rdoc.
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Zeljko Filipin
Sent: Thursday, November 03, 2005 4:54 PM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] if textfield is read only?
html:
watir: ie.textField(:index, 1).readonly?
Watir code will return true if text box is readonly, and false if not.
I found it at http://wtr.rubyforge.org/rdoc/index.html
Zeljko
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of
Jan.Montano at thomson.com
Sent: Thursday, November 03, 2005 9:27 AM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] if textfield is read only?
How will we know if a text box is read only or not?
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
From Jan.Montano at thomson.com Tue Nov 8 09:42:28 2005
From: Jan.Montano at thomson.com (Jan.Montano at thomson.com)
Date: Tue, 8 Nov 2005 22:42:28 +0800
Subject: [Wtr-general] if textfield is read only?
Message-ID:
the funny thing is I only tried enabled and enabled? hehehe.
Thanks Zeljko
-----Original Message-----
From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Zeljko Filipin
Sent: Tuesday, November 08, 2005 7:19 PM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] if textfield is read only?
And I could not find it in rdoc, too. :)
Zeljko
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of
Jan.Montano at thomson.com
Sent: Tuesday, November 08, 2005 11:53 AM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] if textfield is read only?
Thanks! but how about if s radio, select_list is disabled or not? I can't
find it in the rdoc.
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Zeljko Filipin
Sent: Thursday, November 03, 2005 4:54 PM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] if textfield is read only?
html:
watir: ie.textField(:index, 1).readonly?
Watir code will return true if text box is readonly, and false if not.
I found it at http://wtr.rubyforge.org/rdoc/index.html
Zeljko
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of
Jan.Montano at thomson.com
Sent: Thursday, November 03, 2005 9:27 AM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] if textfield is read only?
How will we know if a text box is read only or not?
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
From zeljko.filipin at gmail.com Tue Nov 8 09:54:06 2005
From: zeljko.filipin at gmail.com (Zeljko Filipin)
Date: Tue, 8 Nov 2005 15:54:06 +0100
Subject: [Wtr-general] if textfield is read only?
In-Reply-To:
Message-ID: <003601c5e474$45575de0$c6e7fea9@officezg.wa>
I think I found it with this
ie.textField(:index, 1).methods
Zeljko
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of
Jan.Montano at thomson.com
Sent: Tuesday, November 08, 2005 3:42 PM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] if textfield is read only?
the funny thing is I only tried enabled and enabled? hehehe.
Thanks Zeljko
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Zeljko Filipin
Sent: Tuesday, November 08, 2005 7:19 PM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] if textfield is read only?
And I could not find it in rdoc, too. :)
Zeljko
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of
Jan.Montano at thomson.com
Sent: Tuesday, November 08, 2005 11:53 AM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] if textfield is read only?
Thanks! but how about if s radio, select_list is disabled or not? I can't
find it in the rdoc.
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Zeljko Filipin
Sent: Thursday, November 03, 2005 4:54 PM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] if textfield is read only?
html:
watir: ie.textField(:index, 1).readonly?
Watir code will return true if text box is readonly, and false if not.
I found it at http://wtr.rubyforge.org/rdoc/index.html
Zeljko
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of
Jan.Montano at thomson.com
Sent: Thursday, November 03, 2005 9:27 AM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] if textfield is read only?
How will we know if a text box is read only or not?
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
From maillist at roomity.com Tue Nov 8 16:51:07 2005
From: maillist at roomity.com (shenanigans)
Date: Tue, 8 Nov 2005 13:51:07 -0800 (PST)
Subject: [Wtr-general] Roomity.com v 1.5 is a web 2.01
Message-ID: <19884999.3171131486667278.JavaMail.tomcat5@slave1.roomity.com>
I was interested in getting feedback from current mail group users.
We have mirrored your mail list in a new application that provides a more aggregated and safe environment which utilizes the power of broadband.
Roomity.com v 1.5 is a web 2.01 community webapp. Our newest version adds broadcast video and social networking such as favorite authors and an html editor.
It?s free to join and any feedback would be appreciated.
S.
--------------------------------------------------------------------------------------------------------------------------------------------------
Broadband interface (RIA) + mail box saftey = WTR_General_Discussion_List.roomity.com
*Your* clubs, no sign up to read, ad supported; try broadband internet. ~~1131486667275~~
--------------------------------------------------------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051108/c08c10de/attachment.html
From Ben.Torres at rhi.com Tue Nov 8 20:04:54 2005
From: Ben.Torres at rhi.com (Torres, Ben (HQP))
Date: Tue, 8 Nov 2005 17:04:54 -0800
Subject: [Wtr-general] Get index for image
Message-ID: <1641BB0AA7287848817A63C3EE9677D508FD8234@hqp-ex-mb05.na.msds.rhi.com>
The web page I am testing has images that have the same src. I can
click the first one by doing ie.image(:src, /add/).click. Is there any
way I can click the next /add/ button? I was hoping the get the index
number of the first image and just do a +1 to get to the next button.
From bret at pettichord.com Tue Nov 8 23:28:57 2005
From: bret at pettichord.com (Bret Pettichord)
Date: Tue, 08 Nov 2005 22:28:57 -0600
Subject: [Wtr-general] Load error, was Re: 1.4_1
In-Reply-To:
Message-ID: <5.1.0.14.2.20051108222641.03df98d0@pop.gmail.com>
At 01:31 AM 11/8/2005, Jan.Montano at thomson.com wrote:
>No such file to load -- unittests/setup
>c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__'
>Press ENTER to close the window...
>
>What's the meaning of this and how do I fix it?
It means that the file unittests/setup.rb is not in your load path.
This file is part of the unit tests for Watir. You probably shouldn't be
using it for your own scripts.
This will show you what your load path is:
> ruby -e 'puts $LOAD_PATH'
_____________________
Bret Pettichord
www.pettichord.com
From jeff.darklight at gmail.com Wed Nov 9 04:04:01 2005
From: jeff.darklight at gmail.com (Jeff Wood)
Date: Wed, 9 Nov 2005 01:04:01 -0800
Subject: [Wtr-general] Get index for image
In-Reply-To: <1641BB0AA7287848817A63C3EE9677D508FD8234@hqp-ex-mb05.na.msds.rhi.com>
References: <1641BB0AA7287848817A63C3EE9677D508FD8234@hqp-ex-mb05.na.msds.rhi.com>
Message-ID:
Well, you could do
ie.images( :src, /add/ )[x].click
where x is the number you want.... 1, 2, 3 ( one-based index )
j.
On 11/8/05, Torres, Ben (HQP) wrote:
>
> The web page I am testing has images that have the same src. I can
> click the first one by doing ie.image(:src, /add/).click. Is there any
> way I can click the next /add/ button? I was hoping the get the index
> number of the first image and just do a +1 to get to the next button.
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
--
"http://ruby-lang.org -- do you ruby?"
Jeff Wood
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051109/3b0344aa/attachment.html
From buggins at byte-force.com Wed Nov 9 04:11:52 2005
From: buggins at byte-force.com (Yury Krasavin)
Date: Wed, 9 Nov 2005 12:11:52 +0300
Subject: [Wtr-general] Assertions trouble
Message-ID: <000701c5e50d$9fa01050$5864bbd5@byteforce.yar.ru>
>The assert method in Test::Unit::Assertions is different from the
>assert method in Test::Unit::TestCase in one way: it is not included in
>the total count.
>I am wondering if something like the following might not work for you.
>If it does, let us know.
>Bret
Hi. Many thanks for the tool! I preciate it much, and write here first
time, because
I have some ideas and questions on the subject.
To be included in the test case's count the class should call its
"add_assertion".
As the "assert" method itself calls its virtual "add_assertion", now I use
this kind of a mixin:
module TestManager
include Test::Unit::Assertions
def add_assertion
@currentCase.send :add_assertion
end
def assertions_bind_to(testCase)
@bindStack = Array.new unless @bindStack
@bindStack.push @currentCase if @currentCase
@currentCase = testCase
end
def assertions_unbind_from(testCase)
raise "No binds were made" unless @currentCase
raise ArgumentError.new(
"Last bind was to #{@currentCase} not to
#{testCase}"
) unless @currentCase ==
testCase
@currentCase = @bindStack.pop
end
end
That is the way I use it:
require 'TestManager'
class UserManager
include TestManager
def login
.
assert is_logged_in
end
.
end
And that is the test case will look like:
class TC_User < Test::Unit::TestCase
def test_scenario
user = UserManager.new
user.assertions_bind_to self
.
end
# I use setup and teardown methods to bind global asserting utilities.
def setup
TestApplication.assertions_bind_to self
end
def teardown
TestApplication.assertions_unbind_from self
end
end
But I still wonder if it could be done more elegant. For instance, I would
like to use reflection in the TestManager, to define the test case it was
called from. Still I am not aware it is possible.
Yury
From Ben.Torres at rhi.com Wed Nov 9 18:46:20 2005
From: Ben.Torres at rhi.com (Torres, Ben (HQP))
Date: Wed, 9 Nov 2005 15:46:20 -0800
Subject: [Wtr-general] Get index for image
Message-ID: <1641BB0AA7287848817A63C3EE9677D508FD863F@hqp-ex-mb05.na.msds.rhi.com>
I tried this:
ie.images(:src, /add/)[2].click
But got this error, "C:/watir/CRIScripts/test.rb:22:in `images': wrong
number of arguments (2 for 0)(ArgumentError)"
I tried using image instead of images:
ie.image(:src, /add/)[2].click
But got this error, "C:/watir/CRIScripts/test.rb:22: undefined method
`[]' for # (NoMethodError)"
Is my syntax correct?
From jeff.darklight at gmail.com Wed Nov 9 19:13:13 2005
From: jeff.darklight at gmail.com (Jeff Wood)
Date: Wed, 9 Nov 2005 16:13:13 -0800
Subject: [Wtr-general] Get index for image
In-Reply-To: <1641BB0AA7287848817A63C3EE9677D508FD863F@hqp-ex-mb05.na.msds.rhi.com>
References: <1641BB0AA7287848817A63C3EE9677D508FD863F@hqp-ex-mb05.na.msds.rhi.com>
Message-ID:
Interesting, in my testing
ie.images[1]
ie.images[2]
work fine, but if you add any selection criteria, you can't do the indexing.
.images is the correct thing to call.
we'll have to check with bret.
j.
On 11/9/05, Torres, Ben (HQP) wrote:
>
> I tried this:
> ie.images(:src, /add/)[2].click
>
> But got this error, "C:/watir/CRIScripts/test.rb:22:in `images': wrong
> number of arguments (2 for 0)(ArgumentError)"
>
> I tried using image instead of images:
> ie.image(:src, /add/)[2].click
>
> But got this error, "C:/watir/CRIScripts/test.rb:22: undefined method
> `[]' for # (NoMethodError)"
>
> Is my syntax correct?
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
--
"Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
Jeff Wood
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051109/5526b2ac/attachment.html
From dara.lillis at kiodex.com Wed Nov 9 19:27:34 2005
From: dara.lillis at kiodex.com (Dara Lillis)
Date: Wed, 9 Nov 2005 16:27:34 -0800
Subject: [Wtr-general] IE.contains_text and assert
Message-ID: <4AE2782C2093B34784E67971035A81600A83842E@ehost011-2.exch011.intermedia.net>
Hi,
I'm relatively new to Watir and am having some problems with asserts on
IE.contains_text, hoping for some enlightenment.
Basically, my problem is as follows; I have some code that says
(essentially):
assert(ie.contains_text("abcd"))
This seems to work ok when "abcd" is present, but fails (and causes my
test to stop running) when "abcd" is not present. The reason for the
failure seems to be that ie.contains_text returns rather than
"false"
In attempting to find out what is going on I've been outputting the
result of ie.contains_text to the console and notice that when "abcd" is
present (and the assert passes) the returned value of contains_text is
"522" when I was expecting "true"
I'm finding this all a bit confusing. Can someone explain it to me?
Thanks,
-Dara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051109/e20af5cf/attachment.html
From jeff.darklight at gmail.com Wed Nov 9 19:29:25 2005
From: jeff.darklight at gmail.com (Jeff Wood)
Date: Wed, 9 Nov 2005 16:29:25 -0800
Subject: [Wtr-general] Get index for image
In-Reply-To:
References: <1641BB0AA7287848817A63C3EE9677D508FD863F@hqp-ex-mb05.na.msds.rhi.com>
Message-ID:
Ah, images takes NO input parameters.
So, you can only get the collection. then iterate them.
So, to do what you want ... you would have to do something like:
ie.images.select { |curr| curr.src =~ /add] }[2].click
...
j.
On 11/9/05, Jeff Wood wrote:
>
> Interesting, in my testing
>
> ie.images[1]
> ie.images[2]
>
> work fine, but if you add any selection criteria, you can't do the
> indexing.
>
> .images is the correct thing to call.
>
> we'll have to check with bret.
>
> j.
>
>
> On 11/9/05, Torres, Ben (HQP) wrote:
> >
> > I tried this:
> > ie.images(:src, /add/)[2].click
> >
> > But got this error, "C:/watir/CRIScripts/test.rb:22:in `images': wrong
> > number of arguments (2 for 0)(ArgumentError)"
> >
> > I tried using image instead of images:
> > ie.image(:src, /add/)[2].click
> >
> > But got this error, "C:/watir/CRIScripts/test.rb:22: undefined method
> > `[]' for # (NoMethodError)"
> >
> > Is my syntax correct?
> >
> >
> > _______________________________________________
> > Wtr-general mailing list
> > Wtr-general at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/wtr-general
> >
>
>
>
> --
> "Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
>
> Jeff Wood
--
"Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
Jeff Wood
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051109/c87cfe3b/attachment.html
From jeff.darklight at gmail.com Wed Nov 9 19:30:00 2005
From: jeff.darklight at gmail.com (Jeff Wood)
Date: Wed, 9 Nov 2005 16:30:00 -0800
Subject: [Wtr-general] Get index for image
In-Reply-To:
References: <1641BB0AA7287848817A63C3EE9677D508FD863F@hqp-ex-mb05.na.msds.rhi.com>
Message-ID:
just remember that the index after the block is zero-based not one based
like watir does things.
j.
On 11/9/05, Jeff Wood wrote:
>
> Ah, images takes NO input parameters.
>
> So, you can only get the collection. then iterate them.
>
> So, to do what you want ... you would have to do something like:
>
> ie.images.select { |curr| curr.src =~ /add] }[2].click
>
> ...
>
> j.
>
> On 11/9/05, Jeff Wood wrote:
> >
> > Interesting, in my testing
> >
> > ie.images[1]
> > ie.images[2]
> >
> > work fine, but if you add any selection criteria, you can't do the
> > indexing.
> >
> > .images is the correct thing to call.
> >
> > we'll have to check with bret.
> >
> > j.
> >
> >
> > On 11/9/05, Torres, Ben (HQP) wrote:
> > >
> > > I tried this:
> > > ie.images(:src, /add/)[2].click
> > >
> > > But got this error, "C:/watir/CRIScripts/test.rb:22:in `images': wrong
> > > number of arguments (2 for 0)(ArgumentError)"
> > >
> > > I tried using image instead of images:
> > > ie.image(:src, /add/)[2].click
> > >
> > > But got this error, "C:/watir/CRIScripts/test.rb:22: undefined method
> > > `[]' for # (NoMethodError)"
> > >
> > > Is my syntax correct?
> > >
> > >
> > > _______________________________________________
> > > Wtr-general mailing list
> > > Wtr-general at rubyforge.org
> > > http://rubyforge.org/mailman/listinfo/wtr-general
> > >
> >
> >
> >
> > --
> > "Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
> >
> > Jeff Wood
>
>
>
>
> --
> "Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
>
> Jeff Wood
>
--
"Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
Jeff Wood
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051109/f3d0b336/attachment.html
From jeff.darklight at gmail.com Wed Nov 9 19:31:28 2005
From: jeff.darklight at gmail.com (Jeff Wood)
Date: Wed, 9 Nov 2005 16:31:28 -0800
Subject: [Wtr-general] IE.contains_text and assert
In-Reply-To: <4AE2782C2093B34784E67971035A81600A83842E@ehost011-2.exch011.intermedia.net>
References: <4AE2782C2093B34784E67971035A81600A83842E@ehost011-2.exch011.intermedia.net>
Message-ID:
contains_text returns the index where the text was found or nil when it's
not..
try
assert( ie.contains_text( "abcd" ) != nil )
j.
On 11/9/05, Dara Lillis wrote:
>
> Hi,
>
> I'm relatively new to Watir and am having some problems with asserts on
> IE.contains_text, hoping for some enlightenment.
>
> Basically, my problem is as follows; I have some code that says
> (essentially):
>
> assert(ie.contains_text("abcd"))
>
> This seems to work ok when "abcd" is present, but fails (and causes my
> test to stop running) when "abcd" is not present. The reason for the failure
> seems to be that ie.contains_text returns rather than "false"
>
> In attempting to find out what is going on I've been outputting the result
> of ie.contains_text to the console and notice that when "abcd" is present
> (and the assert passes) the returned value of contains_text is "522" when I
> was expecting "true"
>
> I'm finding this all a bit confusing. Can someone explain it to me?
>
> Thanks,
>
> -Dara
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
>
--
"Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
Jeff Wood
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051109/901eb852/attachment.html
From bret at pettichord.com Wed Nov 9 19:52:51 2005
From: bret at pettichord.com (Bret Pettichord)
Date: Wed, 09 Nov 2005 18:52:51 -0600
Subject: [Wtr-general] IE.contains_text and assert
In-Reply-To: <4AE2782C2093B34784E67971035A81600A83842E@ehost011-2.exch01
1.intermedia.net>
Message-ID: <5.1.0.14.2.20051109185100.029331a0@pop.gmail.com>
At 06:27 PM 11/9/2005, Dara Lillis wrote:
>assert(ie.contains_text("abcd"))
This is correct.
>This seems to work ok when "abcd" is present, but fails (and causes my
>test to stop running) when "abcd" is not present. The reason for the
>failure seems to be that ie.contains_text returns rather than "false"
This is how it is supposed to work. Assert means to fail and stop running.
In Ruby, nil counts as false, so that is not a problem at all.
What did you want it to do?
_____________________
Bret Pettichord
www.pettichord.com
From dara.lillis at kiodex.com Wed Nov 9 20:10:18 2005
From: dara.lillis at kiodex.com (Dara Lillis)
Date: Wed, 9 Nov 2005 17:10:18 -0800
Subject: [Wtr-general] IE.contains_text and assert
Message-ID: <4AE2782C2093B34784E67971035A81600A83848C@ehost011-2.exch011.intermedia.net>
That explains it. Thanks for the quick answer. No good deed goes
unpunished, so:
The Rdoc for contains_text
(http://wtr.rubyforge.org/rdoc/classes/Watir/IE.html#M000294) does say
"Returns true if the specified text was found." Is that wrong?
Why were my asserts passing when receiving an index (i.e. a number
string) rather than "true"?
-D
Date: Wed, 9 Nov 2005 16:31:28 -0800
From: Jeff Wood
Subject: Re: [Wtr-general] IE.contains_text and assert
To: wtr-general at rubyforge.org
Message-ID:
Content-Type: text/plain; charset="iso-8859-1"
contains_text returns the index where the text was found or nil when
it's not..
try
assert( ie.contains_text( "abcd" ) != nil )
j.
On 11/9/05, Dara Lillis wrote:
>
> Hi,
>
> I'm relatively new to Watir and am having some problems with asserts
> on IE.contains_text, hoping for some enlightenment.
>
> Basically, my problem is as follows; I have some code that says
> (essentially):
>
> assert(ie.contains_text("abcd"))
>
> This seems to work ok when "abcd" is present, but fails (and causes my
> test to stop running) when "abcd" is not present. The reason for the
> failure seems to be that ie.contains_text returns rather than
"false"
>
> In attempting to find out what is going on I've been outputting the
> result of ie.contains_text to the console and notice that when "abcd"
> is present (and the assert passes) the returned value of contains_text
> is "522" when I was expecting "true"
>
> I'm finding this all a bit confusing. Can someone explain it to me?
>
> Thanks,
>
> -Dara
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
>
--
"Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
Jeff Wood
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://rubyforge.org/pipermail/wtr-general/attachments/20051109/901eb852
/attachment.htm
------------------------------
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
End of Wtr-general Digest, Vol 24, Issue 12
*******************************************
From wmwilson01 at gmail.com Wed Nov 9 20:46:07 2005
From: wmwilson01 at gmail.com (wmwilson)
Date: Wed, 9 Nov 2005 20:46:07 -0500
Subject: [Wtr-general] IE.contains_text and assert
In-Reply-To: <4AE2782C2093B34784E67971035A81600A83848C@ehost011-2.exch011.intermedia.net>
References: <4AE2782C2093B34784E67971035A81600A83848C@ehost011-2.exch011.intermedia.net>
Message-ID: <501fe3800511091746o3f01a021g4ad0b96cda8fc575@mail.gmail.com>
On 11/9/05, Dara Lillis wrote:
> That explains it. Thanks for the quick answer. No good deed goes
> unpunished, so:
>
> The Rdoc for contains_text
> (http://wtr.rubyforge.org/rdoc/classes/Watir/IE.html#M000294) does say
> "Returns true if the specified text was found." Is that wrong?
>
> Why were my asserts passing when receiving an index (i.e. a number
> string) rather than "true"?
>
Because, in Ruby, everything is true except for nil and false
From Jan.Montano at thomson.com Wed Nov 9 22:47:16 2005
From: Jan.Montano at thomson.com (Jan.Montano at thomson.com)
Date: Thu, 10 Nov 2005 11:47:16 +0800
Subject: [Wtr-general] can't find label
Message-ID:
given:
2005/10
I tried this:
assert($ie.label(:id,"lblMonth1").innerText=="2005/10")
but:
Watir::Exception::UnknownObjectException: Unable to locate object, using id and lblMonth1
Am I doing it wrong?
From bret at pettichord.com Thu Nov 10 00:15:32 2005
From: bret at pettichord.com (Bret Pettichord)
Date: Wed, 09 Nov 2005 23:15:32 -0600
Subject: [Wtr-general] IE.contains_text and assert
In-Reply-To: <4AE2782C2093B34784E67971035A81600A83848C@ehost011-2.exch01
1.intermedia.net>
Message-ID: <5.1.0.14.2.20051109231433.02d47cd0@pop.gmail.com>
At 07:10 PM 11/9/2005, Dara Lillis wrote:
>The Rdoc for contains_text
>(http://wtr.rubyforge.org/rdoc/classes/Watir/IE.html#M000294) does say
>"Returns true if the specified text was found." Is that wrong?
>
>Why were my asserts passing when receiving an index (i.e. a number
>string) rather than "true"?
I'm happy to update the rdoc for this. Please suggest something that would
be accurate and helpful.
_____________________
Bret Pettichord
www.pettichord.com
From jeff.darklight at gmail.com Thu Nov 10 01:20:46 2005
From: jeff.darklight at gmail.com (Jeff Wood)
Date: Wed, 9 Nov 2005 22:20:46 -0800
Subject: [Wtr-general] can't find label
In-Reply-To:
References:
Message-ID:
It's not a label, it's a span.
try:
assert( $ie.span( :id, "lblMonth1" ).innerText == "2005/10" )
...
j.
On 11/9/05, Jan.Montano at thomson.com wrote:
> given:
>
2005/10
>
> I tried this:
> assert($ie.label(:id,"lblMonth1").innerText=="2005/10")
>
> but:
> Watir::Exception::UnknownObjectException: Unable to locate object, using id and lblMonth1
>
> Am I doing it wrong?
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
--
"Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
Jeff Wood
From mfeliz at hphis.com Thu Nov 10 03:52:14 2005
From: mfeliz at hphis.com (=?iso-8859-1?Q?Miguel_Jos=E9_MFB=2E_Feliz_Bernardino?=)
Date: Thu, 10 Nov 2005 09:52:14 +0100
Subject: [Wtr-general] Knowing when a browser closes
Message-ID: <5B2AE0722B941D459DDDB2D3B09C202A8960AA@hphis1.hisdom.hphis.com>
Hi
I'm having some problems with the use of wait(), so the first solution I took was to replace them in the places where i had problems, with some sleep() statement.
The problem is that the application I'm running my scripts on, takes different execution times every time I run the scripts. The solution was to place some while() routines in order to know if the application has finished it's work. Until this point no much problem....the real problem is that the application starts some other browsers that will auto close themselves, and that I'm unable to figure out when they're closed.
I'll show you a bit of the script: (I'm using a mix of Watir/Wet on this)
@b.Frame("name:=xxxxx").Link("title:=x").click()
b1 = Browser("title:=yyyy")
b1.Image("title:=yy").click()
sleep 3
b2 = Browser("title:=zzzzz")
b2.frame("z").text_field(:name, "zzz").set zzz
b2.Frame("name:=z1").Image("alt:=z").click()
sleep 2
b2.Frame("name:=z2").Link("text:=" + zzzzzzz).click()
sleep 5
b1.Image("title:=yyy").click()
The browser b2 closes itself.....how can I know when It closes?
Regards
Miguel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051110/918735d4/attachment.html
From satti at qantom.com Thu Nov 10 08:07:39 2005
From: satti at qantom.com (Sathya Shankar)
Date: Thu, 10 Nov 2005 18:37:39 +0530
Subject: [Wtr-general] Knowing when a browser closes
In-Reply-To: <5B2AE0722B941D459DDDB2D3B09C202A8960AA@hphis1.hisdom.hphis.com>
References: <5B2AE0722B941D459DDDB2D3B09C202A8960AA@hphis1.hisdom.hphis.com>
Message-ID: <4373461B.8080503@qantom.com>
Hi
Unfortunately there is no option for the checking the browser exists or
not :-( . But this is a nasty workaround for this issue. Here is the
sample script that i used to test this.
ie=Browser.new()
ie.goto("http://www.wet.qantom.org")
b = Browser("title:=/.*WET.*/")
puts b.browser_hwnd()
sleep 10
begin
puts b.browser_hwnd()
rescue
puts "Browser closed ? "
end
As soon as the browser was opened and then the website was opened. I
closed the browser(at lesser than 10 seconds). and it did work fine. So
use the browser_hwnd() option to check the existance of the Browser. I
am going to put a bug on your behalf in the wet bug tracker. The users
should be able to check weather the browser exists or not directly.
Sathya Shankar
Miguel Jos? MFB. Feliz Bernardino wrote:
> Hi
>
> I?m having some problems with the use of wait(), so the first solution
> I took was to replace them in the places where i had problems, with
> some sleep() statement.
>
> The problem is that the application I?m running my scripts on, takes
> different execution times every time I run the scripts. The solution
> was to place some while() routines in order to know if the application
> has finished it?s work. Until this point no much problem?.the real
> problem is that the application starts some other browsers that will
> auto close themselves, and that I?m unable to figure out when they?re
> closed.
>
> I?ll show you a bit of the script: (I?m using a mix of Watir/Wet on this)
>
> @b.Frame("name:=xxxxx").Link("title:=x").click()
>
> b1 = Browser("title:=yyyy")
>
> b1.Image("title:=yy").click()
>
> sleep 3
>
> b2 = Browser("title:=zzzzz")
>
> b2.frame("z").text_field(:name, "zzz").set zzz
>
> b2.Frame("name:=z1").Image("alt:=z").click()
>
> sleep 2
>
> b2.Frame("name:=z2").Link("text:=" + zzzzzzz).click()
>
> sleep 5
>
> b1.Image("title:=yyy").click()
>
> The browser b2 closes itself?..how can I know when It closes?
>
> Regards
>
> Miguel
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Wtr-general mailing list
>Wtr-general at rubyforge.org
>http://rubyforge.org/mailman/listinfo/wtr-general
>
>
--
Sathya Shankar M G
Software Testing Engineer
Qantom Software
http://www.qantom.com
Ph : 26799269 Xtn. 123
sip : satti at sip411.com
From christopher.mcmahon at gmail.com Thu Nov 10 10:19:57 2005
From: christopher.mcmahon at gmail.com (Chris McMahon)
Date: Thu, 10 Nov 2005 09:19:57 -0600
Subject: [Wtr-general] Watir bug?
Message-ID: <72799cd70511100719g4cd84b81kdedc9bbb5aabf046@mail.gmail.com>
This is strange, I don't think there should have been a security
error-- anyone know what's going on here?
irb(main):007:0> @ie.goto("http://msdn.microsoft.com/msdnmag/issues/05/11/CodeAc
cessSecurity/default.aspx#void")
W, [10-Nov-2005 09:18:55#3184] WARN -- : frame error in waitdocument
OLE error code:80070005 in
Access is denied.
HRESULT error code:0x80020009
Exception occurred.
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1340:in `method_missing'
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1340:in `wait'
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1339:in `upto'
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1339:in `wait'
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1179:in `goto'
(irb):7:in `irb_binding'
c:/ruby/lib/ruby/1.8/irb/workspace.rb:52:in `irb_binding'
:0
=> 0.02
irb(main):008:0>
-Chris
From dara.lillis at kiodex.com Thu Nov 10 10:57:46 2005
From: dara.lillis at kiodex.com (Dara Lillis)
Date: Thu, 10 Nov 2005 07:57:46 -0800
Subject: [Wtr-general] IE.contains_text and assert
Message-ID: <4AE2782C2093B34784E67971035A81600A89B808@ehost011-2.exch011.intermedia.net>
How about, "If found, returns the index the where text was found.
Returns nil when the text is not found."
The Watir Cheat Sheet entry for contains_text says "Return true if the
current page has the specified text somewhere on the page. Otherwise,
false." Perhaps this should be updated too?
Thanks,
-Dara
------------------------------
Date: Wed, 09 Nov 2005 23:15:32 -0600
From: Bret Pettichord
Subject: Re: [Wtr-general] IE.contains_text and assert
To: wtr-general at rubyforge.org
Message-ID: <5.1.0.14.2.20051109231433.02d47cd0 at pop.gmail.com>
Content-Type: text/plain; charset="us-ascii"; format=flowed
At 07:10 PM 11/9/2005, Dara Lillis wrote:
>The Rdoc for contains_text
>(http://wtr.rubyforge.org/rdoc/classes/Watir/IE.html#M000294) does say
>"Returns true if the specified text was found." Is that wrong?
>
>Why were my asserts passing when receiving an index (i.e. a number
>string) rather than "true"?
I'm happy to update the rdoc for this. Please suggest something that
would be accurate and helpful.
_____________________
Bret Pettichord
www.pettichord.com
------------------------------
From bret at pettichord.com Thu Nov 10 12:57:51 2005
From: bret at pettichord.com (Bret Pettichord)
Date: Thu, 10 Nov 2005 11:57:51 -0600
Subject: [Wtr-general] Watir bug?
In-Reply-To: <72799cd70511100719g4cd84b81kdedc9bbb5aabf046@mail.gmail.co
m>
Message-ID: <5.1.0.14.2.20051110115623.03b197d8@pop.gmail.com>
The page contains a frame that is posted on a separate server.
http://ads.ddj.com/msdnmag/premium.htm
This is known behavior, and this is only a warning. But perhaps we should
suppress it.
Bret
At 09:19 AM 11/10/2005, Chris McMahon wrote:
>This is strange, I don't think there should have been a security
>error-- anyone know what's going on here?
>
>
>irb(main):007:0>
>@ie.goto("http://msdn.microsoft.com/msdnmag/issues/05/11/CodeAc
>cessSecurity/default.aspx#void")
>W, [10-Nov-2005 09:18:55#3184] WARN -- : frame error in waitdocument
> OLE error code:80070005 in
> Access is denied.
>
> HRESULT error code:0x80020009
> Exception occurred.
>c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1340:in `method_missing'
>c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1340:in `wait'
>c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1339:in `upto'
>c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1339:in `wait'
>c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1179:in `goto'
>(irb):7:in `irb_binding'
>c:/ruby/lib/ruby/1.8/irb/workspace.rb:52:in `irb_binding'
>:0
>=> 0.02
>irb(main):008:0>
>
>-Chris
>
>_______________________________________________
>Wtr-general mailing list
>Wtr-general at rubyforge.org
>http://rubyforge.org/mailman/listinfo/wtr-general
_____________________
Bret Pettichord
www.pettichord.com
From christopher.mcmahon at gmail.com Thu Nov 10 13:24:23 2005
From: christopher.mcmahon at gmail.com (Chris McMahon)
Date: Thu, 10 Nov 2005 12:24:23 -0600
Subject: [Wtr-general] Watir bug?
In-Reply-To: <5.1.0.14.2.20051110115623.03b197d8@pop.gmail.com>
References: <5.1.0.14.2.20051110115623.03b197d8@pop.gmail.com>
Message-ID: <72799cd70511101024n3ead0017u6c7f116a955f92d2@mail.gmail.com>
On 11/10/05, Bret Pettichord wrote:
> The page contains a frame that is posted on a separate server.
> http://ads.ddj.com/msdnmag/premium.htm
DARN those Microsoft people !!! =)
-Chris
From bret at pettichord.com Thu Nov 10 13:13:21 2005
From: bret at pettichord.com (Bret Pettichord)
Date: Thu, 10 Nov 2005 12:13:21 -0600
Subject: [Wtr-general] Knowing when a browser closes
In-Reply-To: <5B2AE0722B941D459DDDB2D3B09C202A8960AA@hphis1.hisdom.hphis .com>
Message-ID: <5.1.0.14.2.20051110121244.03b6a780@pop.gmail.com>
At 02:52 AM 11/10/2005, Miguel Jos? MFB. Feliz Bernardino wrote:
>The browser b2 closes itself&..how can I know when It closes?
You could attach to the new window and then poll it in a while loop.
_____________________
Bret Pettichord
www.pettichord.com
From bret at pettichord.com Thu Nov 10 13:40:11 2005
From: bret at pettichord.com (Bret Pettichord)
Date: Thu, 10 Nov 2005 12:40:11 -0600
Subject: [Wtr-general] IE.contains_text and assert
In-Reply-To: <4AE2782C2093B34784E67971035A81600A89B808@ehost011-2.exch01
1.intermedia.net>
Message-ID: <5.1.0.14.2.20051110121353.03bd32f0@pop.gmail.com>
At 09:57 AM 11/10/2005, Dara Lillis wrote:
>How about, "If found, returns the index the where text was found.
>Returns nil when the text is not found."
This is accurate, but i'd like to also get accross that this is intended to
be used in if or assert statements.
I'm wondering if it might not be better to deprecate ie.contains_text and
just encourage people to use ie.text.index or ie.text.match instead.
Bret
_____________________
Bret Pettichord
www.pettichord.com
From Tuyet.Ctn at mscibarra.com Thu Nov 10 14:29:17 2005
From: Tuyet.Ctn at mscibarra.com (Cong-Ton-Nu, Tuyet (MSCIBARRA))
Date: Thu, 10 Nov 2005 14:29:17 -0500
Subject: [Wtr-general] Architecting/ Implementing WATIR for a WEB application
Message-ID: <937C75B544E7E8428436C67056A3A1730CC6F3@NYWEXMB83.msad.ms.com>
Thanks for all the good feedback. Sorry I used the "A" word.
What I meant is that we have the chance to start from a blank slate with
WATIR,
and I'd like to know how others have handled this so we can learn from
their experience.
It's not often that we get to start all over and I know we'll make
"mistakes" along the way, and may have to redo
some things, but I'd like to minimize this as much as possible. Thanks
again for your valuable input.
--------------------------------------------------------
NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051110/06cf63e3/attachment.html
From Peter.Ch at NETeller.com Thu Nov 10 15:36:59 2005
From: Peter.Ch at NETeller.com (Peter Chau)
Date: Thu, 10 Nov 2005 13:36:59 -0700
Subject: [Wtr-general] Knowing when a browser closes
Message-ID:
I ran into this problem before and create a method that looks like this
# detects whether an IE windows exists or not
# returns true if the IE browser still exists (hasn't been closed) or
false otherwise
class IE
def exists?
begin
return false if @ie.hWnd== -1
return true
rescue
return false
end
end
end
From jeff.darklight at gmail.com Thu Nov 10 15:48:20 2005
From: jeff.darklight at gmail.com (Jeff Wood)
Date: Thu, 10 Nov 2005 12:48:20 -0800
Subject: [Wtr-general] IE.contains_text and assert
In-Reply-To: <5.1.0.14.2.20051110121353.03bd32f0@pop.gmail.com>
References: <5.1.0.14.2.20051110121353.03bd32f0@pop.gmail.com>
Message-ID:
Actually, I would say changing the existing function to actually return true
or false would be appropriate. Add the ? to the end of the function name,
and then let people use ie.text.index etc to get the index of occurance.
j.
... the example would be:
assert( ie.contains_text? "blah" )
On 11/10/05, Bret Pettichord wrote:
>
> At 09:57 AM 11/10/2005, Dara Lillis wrote:
> >How about, "If found, returns the index the where text was found.
> >Returns nil when the text is not found."
>
> This is accurate, but i'd like to also get accross that this is intended
> to
> be used in if or assert statements.
>
> I'm wondering if it might not be better to deprecate ie.contains_text and
> just encourage people to use ie.text.index or ie.text.match instead.
>
> Bret
>
> _____________________
> Bret Pettichord
> www.pettichord.com
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
--
"Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
Jeff Wood
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051110/9d6ca2e8/attachment.html
From jkohl at telusplanet.net Thu Nov 10 17:08:43 2005
From: jkohl at telusplanet.net (jkohl at telusplanet.net)
Date: Thu, 10 Nov 2005 14:08:43 -0800
Subject: [Wtr-general] IE.contains_text and assert
In-Reply-To:
References: <5.1.0.14.2.20051110121353.03bd32f0@pop.gmail.com>
Message-ID: <1131660523.4373c4eb1106a@webmail.telusplanet.net>
+1
Quoting Jeff Wood :
> Actually, I would say changing the existing function to actually return true
> or false would be appropriate. Add the ? to the end of the function name,
> and then let people use ie.text.index etc to get the index of occurance.
>
> j.
>
> ... the example would be:
> assert( ie.contains_text? "blah" )
>
>
> On 11/10/05, Bret Pettichord wrote:
> >
> > At 09:57 AM 11/10/2005, Dara Lillis wrote:
> > >How about, "If found, returns the index the where text was found.
> > >Returns nil when the text is not found."
> >
> > This is accurate, but i'd like to also get accross that this is intended
> > to
> > be used in if or assert statements.
> >
> > I'm wondering if it might not be better to deprecate ie.contains_text and
> > just encourage people to use ie.text.index or ie.text.match instead.
> >
> > Bret
> >
> > _____________________
> > Bret Pettichord
> > www.pettichord.com
> >
> > _______________________________________________
> > Wtr-general mailing list
> > Wtr-general at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/wtr-general
> >
>
>
>
> --
> "Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
>
> Jeff Wood
>
From c_balzen at yahoo.com Thu Nov 10 19:38:04 2005
From: c_balzen at yahoo.com (Cecil)
Date: Thu, 10 Nov 2005 16:38:04 -0800 (PST)
Subject: [Wtr-general] Setting request headers
Message-ID: <20051111003805.77517.qmail@web34606.mail.mud.yahoo.com>
Hi,
Would someone share an example or supply links
demostrating how to set and get headers the browser
will send with the HTTP request?
I'm trying to create tests using watir for a site
where the returned content differs by header (such as
Accept-Language) values.
Thanks,
-Cecil
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
From roy_sin at yahoo.com Thu Nov 10 20:35:39 2005
From: roy_sin at yahoo.com (Roy Sin)
Date: Thu, 10 Nov 2005 17:35:39 -0800 (PST)
Subject: [Wtr-general] How to set a checkbox that has no id but has two
values attribute
Message-ID: <20051111013540.34489.qmail@web52902.mail.yahoo.com>
Hi Watir list,
I have a check box type as
How do I set the check box ?
I have tried
$ie.frame("admin").checkbox(:name, "nottype[]", 9,16).set
but as expected I'm getting wrong number of arguments (4
for 3).
thanks
__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
From Jan.Montano at thomson.com Thu Nov 10 20:35:07 2005
From: Jan.Montano at thomson.com (Jan.Montano at thomson.com)
Date: Fri, 11 Nov 2005 09:35:07 +0800
Subject: [Wtr-general] can't find label
Message-ID:
thanks!
-----Original Message-----
From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Jeff Wood
Sent: Thursday, November 10, 2005 2:21 PM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] can't find label
It's not a label, it's a span.
try:
assert( $ie.span( :id, "lblMonth1" ).innerText == "2005/10" )
...
j.
On 11/9/05, Jan.Montano at thomson.com wrote:
> given:
>
2005/10
>
> I tried this:
> assert($ie.label(:id,"lblMonth1").innerText=="2005/10")
>
> but:
> Watir::Exception::UnknownObjectException: Unable to locate object, using id and lblMonth1
>
> Am I doing it wrong?
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
--
"Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
Jeff Wood
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
From jeff.darklight at gmail.com Thu Nov 10 21:32:58 2005
From: jeff.darklight at gmail.com (Jeff Wood)
Date: Thu, 10 Nov 2005 18:32:58 -0800
Subject: [Wtr-general] How to set a checkbox that has no id but has two
values attribute
In-Reply-To: <20051111013540.34489.qmail@web52902.mail.yahoo.com>
References: <20051111013540.34489.qmail@web52902.mail.yahoo.com>
Message-ID:
hmm, try finding it by value using a regular expression
$ie.frame( "admin" ).checkbox( :value, /9,16/ ).click
... let me know. I'll try to come up with something else if necessary ...
use whatever value shows up when you do a show_all_objects ...
Hope that helps ... if it's something that's online, give a url then I can
play with it live. Look forward to hearing from you.
j.
On 11/10/05, Roy Sin wrote:
>
> Hi Watir list,
>
> I have a check box type as
>
>
> How do I set the check box ?
>
> I have tried
> $ie.frame("admin").checkbox(:name, "nottype[]", 9,16).set
> but as expected I'm getting wrong number of arguments (4
> for 3).
>
> thanks
>
>
>
>
> __________________________________
> Yahoo! FareChase: Search multiple travel sites in one click.
> http://farechase.yahoo.com
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
--
"Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
Jeff Wood
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051110/2128ef05/attachment.html
From jeff.darklight at gmail.com Thu Nov 10 21:39:53 2005
From: jeff.darklight at gmail.com (Jeff Wood)
Date: Thu, 10 Nov 2005 18:39:53 -0800
Subject: [Wtr-general] Setting request headers
In-Reply-To: <20051111003805.77517.qmail@web34606.mail.mud.yahoo.com>
References: <20051111003805.77517.qmail@web34606.mail.mud.yahoo.com>
Message-ID:
Hmm, I don't know of a way to do this with WATiR.
I would simply do it with a direct HTTP client... YMMV
j.
On 11/10/05, Cecil wrote:
>
> Hi,
>
> Would someone share an example or supply links
> demostrating how to set and get headers the browser
> will send with the HTTP request?
>
> I'm trying to create tests using watir for a site
> where the returned content differs by header (such as
> Accept-Language) values.
>
>
> Thanks,
> -Cecil
>
>
>
>
>
>
> __________________________________
> Yahoo! Mail - PC Magazine Editors' Choice 2005
> http://mail.yahoo.com
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
--
"Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
Jeff Wood
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051110/cdc6c598/attachment.html
From jkohl at telusplanet.net Thu Nov 10 22:02:28 2005
From: jkohl at telusplanet.net (Jonathan Kohl)
Date: Thu, 10 Nov 2005 20:02:28 -0700
Subject: [Wtr-general] Setting request headers
In-Reply-To:
Message-ID: <003a01c5e66c$5a7c7710$6500a8c0@tintin>
HTTPUnit, JWebUnit et al would probably work, or maybe something like
PureTest from Minq software.
-Jonathan
________________________________
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood
Sent: November 10, 2005 7:40 PM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] Setting request headers
Hmm, I don't know of a way to do this with WATiR.
I would simply do it with a direct HTTP client... YMMV
j.
On 11/10/05, Cecil wrote:
Hi,
Would someone share an example or supply links
demostrating how to set and get headers the browser
will send with the HTTP request?
I'm trying to create tests using watir for a site
where the returned content differs by header (such as
Accept-Language) values.
Thanks,
-Cecil
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
--
"Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
Jeff Wood
From paul.rogers at shaw.ca Thu Nov 10 23:08:13 2005
From: paul.rogers at shaw.ca (Paul Rogers)
Date: Thu, 10 Nov 2005 21:08:13 -0700
Subject: [Wtr-general] How to set a checkbox that has no id but has
twovalues attribute
In-Reply-To:
Message-ID: <00b501c5e675$890167e0$6600a8c0@NewDell>
ie.checkbox(:name , 'notype[]' , '9.16') should work
the third argument is a string value that is the value of the radio
button or check box
Paul
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood
Sent: 10 November 2005 19:33
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] How to set a checkbox that has no id but has
twovalues attribute
hmm, try finding it by value using a regular expression
$ie.frame( "admin" ).checkbox( :value, /9,16/ ).click
... let me know. I'll try to come up with something else if necessary
... use whatever value shows up when you do a show_all_objects ...
Hope that helps ... if it's something that's online, give a url then I
can play with it live. Look forward to hearing from you.
j.
On 11/10/05, Roy Sin wrote:
Hi Watir list,
I have a check box type as
How do I set the check box ?
I have tried
$ie.frame("admin").checkbox(:name, "nottype[]", 9,16).set
but as expected I'm getting wrong number of arguments (4
for 3).
thanks
__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
--
"Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
Jeff Wood
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051110/9c70e5f3/attachment.html
From bret at pettichord.com Fri Nov 11 00:37:15 2005
From: bret at pettichord.com (Bret Pettichord)
Date: Thu, 10 Nov 2005 23:37:15 -0600
Subject: [Wtr-general] IE.contains_text and assert
In-Reply-To:
References: <5.1.0.14.2.20051110121353.03bd32f0@pop.gmail.com>
<5.1.0.14.2.20051110121353.03bd32f0@pop.gmail.com>
Message-ID: <5.1.0.14.2.20051110230117.03c4d588@pop.gmail.com>
At 02:48 PM 11/10/2005, Jeff Wood wrote:
>Actually, I would say changing the existing function to actually return
>true or false would be appropriate. Add the ? to the end of the function
>name, and then let people use ie.text.index etc to get the index of occurance.
>
>j.
Hmm. That was how it originally was coded, but it was changed to the
current behavior (without updating the rdoc) based on an earlier request on
this list. Changing it back will break scripts.
Originally, we made several attempts to shield Watir users from Ruby, and
in the end, this only created more confusion -- the best of example of this
was how we decided to use 1-based indexing in Watir. The lesson i learned
is that we are much better off if we follow the Ruby conventions in Watir,
explaining them when they may not be intuitive to new users, rather than
trying to put together a separate set of conventions that are possibly more
intuitive.
The suggestion that this method end in a question mark, therefore a good
one, since this is the Ruby convention for this kind of thing.
But the Ruby way would be to do ie.text.contains? rather than
ie.contains_text. And in fact, to do ie.text.contain? since the Ruby
convention is to not use the final s (another convention we haven't yet
followed very closely with Watir, but would be good to move towards).
That suggests ie.text.contain? The biggest qualm i have with this is that
implementing this means adding a method to the string class. I don't object
to this in principle, but will this confuse users? Looking at the String
API, i see that it already provides the method string.include? which does
exactly what we want with string arguments. But users would have to use
ie.string.match() if they wanted to use regular expressions.
A little awkward, but then that is the awkwardness of Ruby and i think the
principle that we should follow is not to avoid this.
Another reason for my attention to this issue is that we also have
TextField#verify_contains which really should have the same method name as
IE#contains_text -- it does the same thing. This is another Watir
inconsistency that needs to be addressed -- it would be best to move things
correctly.
Therefore, my proposal:
Slowly, deprecate IE#contains_text(), starting with removing it from the
intro user documentation, instead encouraging users to use
IE#text.include?() instead. (And also introducing IE#text.match() when
regular expressions are used.) In the mean time, we update the rdoc for
IE#contains_text() to be more accurate, as suggested by the OP.
Both the rdoc for IE#contains_text and TextField#verify_contains would be
suggest that these more direct forms be used instead.
Bret
_____________________
Bret Pettichord
www.pettichord.com
From roy_sin at yahoo.com Fri Nov 11 02:03:09 2005
From: roy_sin at yahoo.com (Roy Sin)
Date: Thu, 10 Nov 2005 23:03:09 -0800 (PST)
Subject: [Wtr-general] How to set a checkbox that has no id but has
twovalues attribute
In-Reply-To: <00b501c5e675$890167e0$6600a8c0@NewDell>
Message-ID: <20051111070309.53769.qmail@web52908.mail.yahoo.com>
Happy to say that both solutions work.
i.e passing the two values as a regular expression and
passing the two values as a string as a single argument.
thanks this mailing list rocks
--- Paul Rogers wrote:
> ie.checkbox(:name , 'notype[]' , '9.16') should work
> the third argument is a string value that is the value of
> the radio
> button or check box
>
> Paul
>
> -----Original Message-----
> From: wtr-general-bounces at rubyforge.org
> [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of
> Jeff Wood
> Sent: 10 November 2005 19:33
> To: wtr-general at rubyforge.org
> Subject: Re: [Wtr-general] How to set a checkbox that has
> no id but has
> twovalues attribute
>
>
> hmm, try finding it by value using a regular expression
>
>
> $ie.frame( "admin" ).checkbox( :value, /9,16/ ).click
>
> ... let me know. I'll try to come up with something else
> if necessary
> ... use whatever value shows up when you do a
> show_all_objects ...
>
> Hope that helps ... if it's something that's online, give
> a url then I
> can play with it live. Look forward to hearing from you.
>
> j.
>
>
> On 11/10/05, Roy Sin wrote:
>
> Hi Watir list,
>
> I have a check box type as
>
>
> How do I set the check box ?
>
> I have tried
> $ie.frame("admin").checkbox(:name, "nottype[]", 9,16).set
>
> but as expected I'm getting wrong number of arguments (4
> for 3).
>
> thanks
>
>
>
>
> __________________________________
> Yahoo! FareChase: Search multiple travel sites in one
> click.
> http://farechase.yahoo.com
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
>
>
>
> --
> "Remember. Understand. Believe. Yield! ->
> http://ruby-lang.org"
>
> Jeff Wood
>
> > _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
From Sean.Gallagher at ticketmaster.com Fri Nov 11 09:46:04 2005
From: Sean.Gallagher at ticketmaster.com (Sean Gallagher)
Date: Fri, 11 Nov 2005 06:46:04 -0800
Subject: [Wtr-general] IE.contains_text and assert
Message-ID: <71D28C8451BFD5119B2B00508BE26E640B63F2AA@pasmail3.office.tmcs>
+1
I prefer that Watir conform as closely as possible to Ruby standards.
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord
Sent: Thursday, November 10, 2005 9:37 PM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] IE.contains_text and assert
At 02:48 PM 11/10/2005, Jeff Wood wrote:
>Actually, I would say changing the existing function to actually return
>true or false would be appropriate. Add the ? to the end of the function
>name, and then let people use ie.text.index etc to get the index of
occurance.
>
>j.
Hmm. That was how it originally was coded, but it was changed to the
current behavior (without updating the rdoc) based on an earlier request on
this list. Changing it back will break scripts.
Originally, we made several attempts to shield Watir users from Ruby, and
in the end, this only created more confusion -- the best of example of this
was how we decided to use 1-based indexing in Watir. The lesson i learned
is that we are much better off if we follow the Ruby conventions in Watir,
explaining them when they may not be intuitive to new users, rather than
trying to put together a separate set of conventions that are possibly more
intuitive.
The suggestion that this method end in a question mark, therefore a good
one, since this is the Ruby convention for this kind of thing.
But the Ruby way would be to do ie.text.contains? rather than
ie.contains_text. And in fact, to do ie.text.contain? since the Ruby
convention is to not use the final s (another convention we haven't yet
followed very closely with Watir, but would be good to move towards).
That suggests ie.text.contain? The biggest qualm i have with this is that
implementing this means adding a method to the string class. I don't object
to this in principle, but will this confuse users? Looking at the String
API, i see that it already provides the method string.include? which does
exactly what we want with string arguments. But users would have to use
ie.string.match() if they wanted to use regular expressions.
A little awkward, but then that is the awkwardness of Ruby and i think the
principle that we should follow is not to avoid this.
Another reason for my attention to this issue is that we also have
TextField#verify_contains which really should have the same method name as
IE#contains_text -- it does the same thing. This is another Watir
inconsistency that needs to be addressed -- it would be best to move things
correctly.
Therefore, my proposal:
Slowly, deprecate IE#contains_text(), starting with removing it from the
intro user documentation, instead encouraging users to use
IE#text.include?() instead. (And also introducing IE#text.match() when
regular expressions are used.) In the mean time, we update the rdoc for
IE#contains_text() to be more accurate, as suggested by the OP.
Both the rdoc for IE#contains_text and TextField#verify_contains would be
suggest that these more direct forms be used instead.
Bret
_____________________
Bret Pettichord
www.pettichord.com
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
From jeff.darklight at gmail.com Fri Nov 11 11:08:04 2005
From: jeff.darklight at gmail.com (Jeff Wood)
Date: Fri, 11 Nov 2005 08:08:04 -0800
Subject: [Wtr-general] IE.contains_text and assert
In-Reply-To: <71D28C8451BFD5119B2B00508BE26E640B63F2AA@pasmail3.office.tmcs>
References: <71D28C8451BFD5119B2B00508BE26E640B63F2AA@pasmail3.office.tmcs>
Message-ID:
yup, that all sounds good ... and the existing include? is just as good as
contain? ... there are times in ruby where they will provide aliases just so
names that make sense do the same thing.
class String
alias :contain? :include?
end
I don't see aliasing other methods as overly evil, you aren't changing
existing functionality.
Anyways, there's my $0.02 ... complete with free grain of salt.
j.
On 11/11/05, Sean Gallagher wrote:
>
> +1
>
> I prefer that Watir conform as closely as possible to Ruby standards.
>
> -----Original Message-----
> From: wtr-general-bounces at rubyforge.org
> [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord
> Sent: Thursday, November 10, 2005 9:37 PM
> To: wtr-general at rubyforge.org
> Subject: Re: [Wtr-general] IE.contains_text and assert
>
> At 02:48 PM 11/10/2005, Jeff Wood wrote:
> >Actually, I would say changing the existing function to actually return
> >true or false would be appropriate. Add the ? to the end of the function
> >name, and then let people use ie.text.index etc to get the index of
> occurance.
> >
> >j.
>
> Hmm. That was how it originally was coded, but it was changed to the
> current behavior (without updating the rdoc) based on an earlier request
> on
> this list. Changing it back will break scripts.
>
> Originally, we made several attempts to shield Watir users from Ruby, and
> in the end, this only created more confusion -- the best of example of
> this
> was how we decided to use 1-based indexing in Watir. The lesson i learned
> is that we are much better off if we follow the Ruby conventions in Watir,
> explaining them when they may not be intuitive to new users, rather than
> trying to put together a separate set of conventions that are possibly
> more
> intuitive.
>
> The suggestion that this method end in a question mark, therefore a good
> one, since this is the Ruby convention for this kind of thing.
>
> But the Ruby way would be to do ie.text.contains? rather than
> ie.contains_text. And in fact, to do ie.text.contain? since the Ruby
> convention is to not use the final s (another convention we haven't yet
> followed very closely with Watir, but would be good to move towards).
>
> That suggests ie.text.contain? The biggest qualm i have with this is that
> implementing this means adding a method to the string class. I don't
> object
> to this in principle, but will this confuse users? Looking at the String
> API, i see that it already provides the method string.include? which does
> exactly what we want with string arguments. But users would have to use
> ie.string.match() if they wanted to use regular expressions.
>
> A little awkward, but then that is the awkwardness of Ruby and i think the
> principle that we should follow is not to avoid this.
>
> Another reason for my attention to this issue is that we also have
> TextField#verify_contains which really should have the same method name as
> IE#contains_text -- it does the same thing. This is another Watir
> inconsistency that needs to be addressed -- it would be best to move
> things
> correctly.
>
> Therefore, my proposal:
>
> Slowly, deprecate IE#contains_text(), starting with removing it from the
> intro user documentation, instead encouraging users to use
> IE#text.include?() instead. (And also introducing IE#text.match() when
> regular expressions are used.) In the mean time, we update the rdoc for
> IE#contains_text() to be more accurate, as suggested by the OP.
>
> Both the rdoc for IE#contains_text and TextField#verify_contains would be
> suggest that these more direct forms be used instead.
>
> Bret
>
>
> _____________________
> Bret Pettichord
> www.pettichord.com
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
--
"Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
Jeff Wood
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051111/36019e5e/attachment.html
From bret at pettichord.com Fri Nov 11 11:38:50 2005
From: bret at pettichord.com (Bret Pettichord)
Date: Fri, 11 Nov 2005 10:38:50 -0600
Subject: [Wtr-general] IE.contains_text and assert
In-Reply-To:
References: <71D28C8451BFD5119B2B00508BE26E640B63F2AA@pasmail3.office.tmcs>
<71D28C8451BFD5119B2B00508BE26E640B63F2AA@pasmail3.office.tmcs>
Message-ID: <5.1.0.14.2.20051111103542.03cc9538@pop.gmail.com>
At 10:08 AM 11/11/2005, Jeff Wood wrote:
>I don't see aliasing other methods as overly evil, you aren't changing
>existing functionality.
I prefer to avoid using these for examples, unless you let people know you
are doing this.
For example, we create assert_false (which does the same as "assert !") for
our unit tests. This works fine, but has confused people who look at our
unit tests as examples and don't realize that we are using a slightly
tweaked set of assertions.
_____________________
Bret Pettichord
www.pettichord.com
From sy1234 at gmail.com Fri Nov 11 17:12:17 2005
From: sy1234 at gmail.com (Sy Ali)
Date: Fri, 11 Nov 2005 16:12:17 -0600
Subject: [Wtr-general] New Watir Wiki, was Re: FAQ Update
In-Reply-To: <5.1.0.14.2.20051108004740.03e0cf48@pop.gmail.com>
References: <5.1.0.14.2.20051028010239.03a76340@pop.gmail.com>
<5.1.0.14.2.20051105203413.03da8e88@pop.gmail.com>
<5.1.0.14.2.20051108004740.03e0cf48@pop.gmail.com>
Message-ID: <1e55af990511111412w5ec0cf7v67ee5fe1ff3cb07@mail.gmail.com>
On 11/8/05, Bret Pettichord wrote:
> My only concern is that if we have usernames to access, it would be nice if
> we could recycle the rubyforge usernames, just because that would make it
> easier for our contributors. But i'm not sure if that is really possible.
Unless someone performs some serious voodoo to make a bridge between
the two systems, people would themselves need to make usernames that
are the same as they exist with rubyforge, on an honour-system (and
post a note in their rubyforge profile).
I haven't looked into the possibility of having email validation.. I
don't know how that would work. I know there are some emailing
functions with mediawiki but I've never used them.
From cdahl at klick.com Fri Nov 11 17:14:44 2005
From: cdahl at klick.com (Cynthia Dahl)
Date: Fri, 11 Nov 2005 17:14:44 -0500
Subject: [Wtr-general] column_values
Message-ID:
Hello,
I'm having a problem with table.column_values. I have a table with 3
columns, but when I try to extract the values with a statement like
table.column_values(1), I get the following error:
WIN32OLERuntimeError: Unknown property or method `3'
HRESULT error code:0x80020006
Unknown name.
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2461:in `[]'
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2461:in `row'
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2411:in `[]'
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2471:in `column_values'
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2471:in `collect'
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2471:in `each'
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2471:in `collect'
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2471:in `column_values'
C:/Tests/eATMR/SpecialAccess.rb:78:in `test_NoAccess'
On the other hand, table.row_values is working just fine.
Thanks!
Cynthia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051111/440c019e/attachment.html
From vishalworld at sqatester.com Sun Nov 13 02:10:08 2005
From: vishalworld at sqatester.com (Vishal Chavan)
Date: Sat, 12 Nov 2005 23:10:08 -0800 (PST)
Subject: [Wtr-general] Can I get away from a warning for overwriting a
variable value in a Loop?
Message-ID: <20051112231009.59D6443B@dm22.mta.everyone.net>
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051112/1d3d7ad8/attachment.html
From vishalworld at sqatester.com Sun Nov 13 06:14:28 2005
From: vishalworld at sqatester.com (Vishal Chavan)
Date: Sun, 13 Nov 2005 03:14:28 -0800 (PST)
Subject: [Wtr-general] Big trouble working with Nested While & If loops
Message-ID: <20051113031428.59D65F8C@dm22.mta.everyone.net>
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051113/9a332ea1/attachment.html
From dave at burt.id.au Sun Nov 13 06:49:30 2005
From: dave at burt.id.au (Dave Burt)
Date: Sun, 13 Nov 2005 22:49:30 +1100
Subject: [Wtr-general] Can I get away from a warning for overwriting a
variable value in a Loop?
References: <20051112231009.59D6443B@dm22.mta.everyone.net>
Message-ID: <012e01c5e848$4f027e60$6602a8c0@telperion>
Vishal Chavan wrote:
> Hi All,
>
> I wanted to seek your advice for getting off following warning : "warning:
> already initialized constant Array_Index"
>
> I have loop where I change the value of a variable. I get this warning, can
> get off from this? Here's the loop I have
>
> count = 1
> Array_Index = 1
> Actual_array = [20]
In Ruby, local variables begin with lower-case letters. If you use upper-case,
you have created a constant.
You answer is to use "array_index" instead of "Array_Index", etc.
Cheers,
Dave
From Jan.Montano at thomson.com Sun Nov 13 22:26:59 2005
From: Jan.Montano at thomson.com (Jan.Montano at thomson.com)
Date: Mon, 14 Nov 2005 11:26:59 +0800
Subject: [Wtr-general] traversing through tr's and td's
Message-ID:
How do I traverse through a series of tr's and td's?
And consequently finding the content (inner text) of this tag:
107-0052
?
Many instances of that class exists, and it's not unique.
From dave at burt.id.au Mon Nov 14 00:01:46 2005
From: dave at burt.id.au (Dave Burt)
Date: Mon, 14 Nov 2005 16:01:46 +1100
Subject: [Wtr-general] Big trouble working with Nested While & If loops
In-Reply-To: <20051113031428.59D65F8C@dm22.mta.everyone.net>
References: <20051113031428.59D65F8C@dm22.mta.everyone.net>
Message-ID: <3ad74bc80511132101v5cf7d8ecucd746b0e19674ece@mail.gmail.com>
Hi,
Vishal wrote:
>
>
> Hi,
>
> I am getting a wierd error, whenever I have a nested loop, I have checked
> the length of array data its 1. The error read as below:
>
> irb(main):208:0> while rec_ctr < data.length
> irb(main):209:1>
> Display all 375 possibilities? (y or n)
> == cwws
> === d
> =~ data
> ARGF def
When you're in IRB with the Readline extension, pressing the Tab key
will trigger auto-completion. If you paste code with tabs into an IRB
session in a command window, the same. One tab at the start of a line
will ask before listing "all 375 possibilities" (Object and Kernel
methods); two tabs will list those methods.
Try starting irb with the --noreadline parameter:
% irb --noreadline
Cheers,
Dave
From vishalworld at sqatester.com Mon Nov 14 00:45:21 2005
From: vishalworld at sqatester.com (Vishal Chavan)
Date: Sun, 13 Nov 2005 21:45:21 -0800 (PST)
Subject: [Wtr-general] traversing through tr's and td's
Message-ID: <20051113214521.59D6D2EE@dm21.mta.everyone.net>
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051113/96b83ab6/attachment.html
From vishalworld at sqatester.com Mon Nov 14 01:03:42 2005
From: vishalworld at sqatester.com (Vishal Chavan)
Date: Sun, 13 Nov 2005 22:03:42 -0800 (PST)
Subject: [Wtr-general] Big trouble working with Nested While & If loops
Message-ID: <20051113220342.59D6D356@dm21.mta.everyone.net>
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051113/98821c24/attachment.html
From alex at verk.info Mon Nov 14 00:20:51 2005
From: alex at verk.info (Alexey Verkhovsky)
Date: Sun, 13 Nov 2005 23:20:51 -0600
Subject: [Wtr-general] traversing through tr's and td's
In-Reply-To: <20051113214521.59D6D2EE@dm21.mta.everyone.net>
References: <20051113214521.59D6D2EE@dm21.mta.everyone.net>
Message-ID: <43781EB3.1080900@verk.info>
Vishal Chavan wrote:
>
> Hi Jan,
>
> I have traversed the table using its index. Please have a look at the
> code below:
>
> count = 1
> array_index = 1
> actual_array = [20]
> while count < 11
> actual_array[array_index]=ie2.table(:index, "4")[count][2].text
> actual_array[array_index+1]=ie2.table(:index, "4")[count][4].text
> array_index +=2
> count +=1
> end
>
Or (not tested):
ie2.table(:index, 4).row_values.inject([]) { |all_cells, row| all_cells
+= row }
Does the same thing.
This is not some sort of black magic. In my humble opinion (to some
extent backed by the experience), one should learn to write Ruby code as
the one-liner above if one wants to successfully create and maintain a
non-trivial Watir test suite. It's not that hard to learn - all you need
is a few days of reading the documentation for the basic classes (Array,
Hash, String, Fixnum, Regexp) and playing with irb.
Do it, and the time you spend pays back for itself in one month, tops.
Don't do it, and a few weeks down the road you will walk away from your
test automation, with a firm opinion that test automation is too
difficult and expensive to be worth the trouble. This is a very common
fault for people who want to get some form of test automation going but
have no prior experience with it.
Alex
P.S. By the way, identifying a DOM object by index (as in
ie2.table(:index, 4)) is something you should try to avoid - you will
spend man-years updating all the indexes whenever the program changes,
and eventually it will make your test automation effort a negative value
exercise. Use a name or an id.
From amit.garde at gmail.com Mon Nov 14 02:39:39 2005
From: amit.garde at gmail.com (Amit Garde)
Date: Mon, 14 Nov 2005 13:09:39 +0530
Subject: [Wtr-general] traversing through tr's and td's
In-Reply-To: <43781EB3.1080900@verk.info>
References: <20051113214521.59D6D2EE@dm21.mta.everyone.net>
<43781EB3.1080900@verk.info>
Message-ID: <7661e6730511132339m3e3e931cpbf758c86a92645fc@mail.gmail.com>
On 11/14/05, Alexey Verkhovsky wrote:
P.S. By the way, identifying a DOM object by index (as in
> ie2.table(:index, 4)) is something you should try to avoid - you will
> spend man-years updating all the indexes whenever the program changes,
> and eventually it will make your test automation effort a negative value
> exercise. Use a name or an id.
>
Or an XPath expression...
Amit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051114/19f560f1/attachment.html
From alex at verk.info Mon Nov 14 02:32:20 2005
From: alex at verk.info (Alexey Verkhovsky)
Date: Mon, 14 Nov 2005 01:32:20 -0600
Subject: [Wtr-general] traversing through tr's and td's
In-Reply-To: <7661e6730511132339m3e3e931cpbf758c86a92645fc@mail.gmail.com>
References: <20051113214521.59D6D2EE@dm21.mta.everyone.net> <43781EB3.1080900@verk.info>
<7661e6730511132339m3e3e931cpbf758c86a92645fc@mail.gmail.com>
Message-ID: <43783D84.3010502@verk.info>
Amit Garde wrote:
> Or an XPath expression...
Now it's time for me to pledge ignorance. Is there something in the
Watir API that can do XPath queries?
Alex
From me at paulwistrand.com Mon Nov 14 05:44:03 2005
From: me at paulwistrand.com (Paul Wistrand)
Date: Mon, 14 Nov 2005 23:44:03 +1300
Subject: [Wtr-general] Watir VS.NET custom tool for NUnit
Message-ID: <000a01c5e908$5e5276c0$0200a8c0@WOOKIE>
Hi All, I've put together a Visual Studio custom tool to tie your Watir
tests into NUnit. Check it out here
http://www.paulwistrand.com/archives/22-Watir-VS.NET-Custom-Tool.html.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051114/30c19703/attachment.html
From chaya_b_s at yahoo.co.in Mon Nov 14 05:47:24 2005
From: chaya_b_s at yahoo.co.in (chaya shetty)
Date: Mon, 14 Nov 2005 10:47:24 +0000 (GMT)
Subject: [Wtr-general] How do I connect to an Oracle Database??
Message-ID: <20051114104725.55425.qmail@web8303.mail.in.yahoo.com>
Hi,
I want to write a test case which includes verification of variable value in Database. How do I connect to an 'Oracle' Database from Watir?
Do I need to install anything for this?
I am using 1.4.1 version of watir and 1.8.2 version of Ruby.
Thanks
Chaya
---------------------------------
Enjoy this Diwali with Y! India Click here
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051114/b0f46fb7/attachment.html
From jeff.darklight at gmail.com Mon Nov 14 12:47:45 2005
From: jeff.darklight at gmail.com (Jeff Wood)
Date: Mon, 14 Nov 2005 09:47:45 -0800
Subject: [Wtr-general] How do I connect to an Oracle Database??
In-Reply-To: <20051114104725.55425.qmail@web8303.mail.in.yahoo.com>
References: <20051114104725.55425.qmail@web8303.mail.in.yahoo.com>
Message-ID:
You need to install the OCI8 library & a copy of the oracle "instant
client".
j.
On 11/14/05, chaya shetty wrote:
>
> Hi,
> I want to write a test case which includes verification of variable value
> in Database. How do I connect to an 'Oracle' Database from Watir?
> Do I need to install anything for this?
> I am using 1.4.1 version of watir and 1.8.2 version of Ruby.
> Thanks
> Chaya
>
> ------------------------------
> Enjoy this Diwali with Y! India Click here
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
>
--
"Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
Jeff Wood
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051114/6eb886cf/attachment.html
From roy_sin at yahoo.com Mon Nov 14 12:55:09 2005
From: roy_sin at yahoo.com (Roy Sin)
Date: Mon, 14 Nov 2005 09:55:09 -0800 (PST)
Subject: [Wtr-general] How to set a checkbox next to a link...
Message-ID: <20051114175510.15402.qmail@web52905.mail.yahoo.com>
Hi Wtr list
I'm currently getting the html for the link as an example
below:
TA Notification
then parse the string to get the id which i add to another
number assign that to a string myStr and then pass into
$ie.frame('cpmain').frame('admin').checkbox(:name,
"nottype[]", myStr).set
Is there a more elegant way of just looking for the text
"TA notification" and set the checkbox to its left??
thanks
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
From chaya_b_s at yahoo.co.in Mon Nov 14 23:49:55 2005
From: chaya_b_s at yahoo.co.in (chaya shetty)
Date: Tue, 15 Nov 2005 04:49:55 +0000 (GMT)
Subject: [Wtr-general] How do I connect to an Oracle Database??
In-Reply-To:
Message-ID: <20051115044955.8234.qmail@web8310.mail.in.yahoo.com>
Hi,
The OCI8 library & oracle "instant client" has already been installed.
What is the syntax to connect to the Database??
Thanks
Chaya
Jeff Wood wrote:
You need to install the OCI8 library & a copy of the oracle "instant client".
j.
On 11/14/05, chaya shetty wrote: Hi,
I want to write a test case which includes verification of variable value in Database. How do I connect to an 'Oracle' Database from Watir?
Do I need to install anything for this?
I am using 1.4.1 version of watir and 1.8.2 version of Ruby.
Thanks
Chaya
---------------------------------
Enjoy this Diwali with Y! India Click here
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
--
"Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
Jeff Wood _______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
---------------------------------
Enjoy this Diwali with Y! India Click here
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051115/b3c38f85/attachment.html
From jeff.darklight at gmail.com Tue Nov 15 00:26:08 2005
From: jeff.darklight at gmail.com (Jeff Wood)
Date: Mon, 14 Nov 2005 21:26:08 -0800
Subject: [Wtr-general] How do I connect to an Oracle Database??
In-Reply-To: <20051115044955.8234.qmail@web8310.mail.in.yahoo.com>
References:
<20051115044955.8234.qmail@web8310.mail.in.yahoo.com>
Message-ID:
I would recommend using the help files on the OCI8 website.
They can be much more help than I can here... There are many things specific
to an installation.
Generally ... look at the information at :
http://www.jiubao.org/ruby-oci8/api.en.html
Hope that helps you get where you are trying to go.
j.
On 11/14/05, chaya shetty wrote:
>
>
> Hi,
> The OCI8 library & oracle "instant client" has already been installed.
> What is the syntax to connect to the Database??
> Thanks
> Chaya
> *Jeff Wood * wrote:
>
> You need to install the OCI8 library & a copy of the oracle "instant
> client".
>
> j.
>
> On 11/14/05, chaya shetty wrote:
> >
> > Hi,
> > I want to write a test case which includes verification of variable
> > value in Database. How do I connect to an 'Oracle' Database from Watir?
> > Do I need to install anything for this?
> > I am using 1.4.1 version of watir and 1.8.2 version of Ruby.
> > Thanks
> > Chaya
> > ------------------------------
> > Enjoy this Diwali with Y! India Click here
> >
> > _______________________________________________
> > Wtr-general mailing list
> > Wtr-general at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/wtr-general
> >
> >
> >
>
>
> --
> "Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
>
> Jeff Wood _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
> ------------------------------
> Enjoy this Diwali with Y! India Click here
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
>
--
"Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
Jeff Wood
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051114/446ea713/attachment.html
From chaya_b_s at yahoo.co.in Tue Nov 15 00:30:32 2005
From: chaya_b_s at yahoo.co.in (chaya shetty)
Date: Tue, 15 Nov 2005 05:30:32 +0000 (GMT)
Subject: [Wtr-general] How do I connect to an Oracle Database??
In-Reply-To:
Message-ID: <20051115053032.21019.qmail@web8310.mail.in.yahoo.com>
Hi,
I already have "standard Oracle client" installed on to my machine.
Is this enough for connecting to the database from Watir ??
Thanks
Chaya
Jeff Wood wrote:
You need to install the OCI8 library & a copy of the oracle "instant client".
j.
On 11/14/05, chaya shetty wrote: Hi,
I want to write a test case which includes verification of variable value in Database. How do I connect to an 'Oracle' Database from Watir?
Do I need to install anything for this?
I am using 1.4.1 version of watir and 1.8.2 version of Ruby.
Thanks
Chaya
---------------------------------
Enjoy this Diwali with Y! India Click here
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
--
"Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
Jeff Wood _______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
---------------------------------
Enjoy this Diwali with Y! India Click here
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051115/ddce7ff6/attachment.html
From vishalworld at sqatester.com Tue Nov 15 00:55:48 2005
From: vishalworld at sqatester.com (Vishal Chavan)
Date: Mon, 14 Nov 2005 21:55:48 -0800 (PST)
Subject: [Wtr-general] How do I connect to an Oracle Database??
Message-ID: <20051114215548.59D9ADFB@dm20.mta.everyone.net>
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051114/e996357d/attachment.html
From chaya_b_s at yahoo.co.in Tue Nov 15 02:12:23 2005
From: chaya_b_s at yahoo.co.in (chaya shetty)
Date: Tue, 15 Nov 2005 07:12:23 +0000 (GMT)
Subject: [Wtr-general] How do I connect to an Oracle Database??
In-Reply-To:
Message-ID: <20051115071223.39061.qmail@web8301.mail.in.yahoo.com>
Hi ,
Thanks for the help. I installed ruby-oci8-mswin. It worked fine. Now I am able to access the database using ruby.
Thanks
Chaya
Jeff Wood wrote: I would recommend using the help files on the OCI8 website.
They can be much more help than I can here... There are many things specific to an installation.
Generally ... look at the information at : http://www.jiubao.org/ruby-oci8/api.en.html
Hope that helps you get where you are trying to go.
j.
On 11/14/05, chaya shetty wrote:
Hi,
The OCI8 library & oracle "instant client" has already been installed.
What is the syntax to connect to the Database??
Thanks
Chaya
Jeff Wood wrote:
You need to install the OCI8 library & a copy of the oracle "instant client".
j.
On 11/14/05, chaya shetty < chaya_b_s at yahoo.co.in> wrote: Hi,
I want to write a test case which includes verification of variable value in Database. How do I connect to an 'Oracle' Database from Watir?
Do I need to install anything for this?
I am using 1.4.1 version of watir and 1.8.2 version of Ruby.
Thanks
Chaya
---------------------------------
Enjoy this Diwali with Y! India Click here
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
--
"Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
Jeff Wood _______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
---------------------------------
Enjoy this Diwali with Y! India Click here
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
--
"Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
Jeff Wood _______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
---------------------------------
Enjoy this Diwali with Y! India Click here
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051115/03104b8e/attachment.html
From shaorobics at gmail.com Tue Nov 15 14:00:11 2005
From: shaorobics at gmail.com (Shao Kang Tat)
Date: Tue, 15 Nov 2005 14:00:11 -0500
Subject: [Wtr-general] Span troubles
Message-ID: <593b9ae80511151100q3146179ctccd6bc4c99d48c56@mail.gmail.com>
I have a span that is not disabled, as follows:
Please enter your first name.
Certain user actions cause the text within this span to show up in red,
otherwise it is hidden to the user.
simply doing an ie.contains_text(span.text) does not work because
I still get non nil result whether the span is shown in red or not.
Is there anyway around this so that I can test whether the text in the span
is on the page or not?
Shao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051115/b2468059/attachment.html
From Jan.Montano at thomson.com Tue Nov 15 21:55:14 2005
From: Jan.Montano at thomson.com (Jan.Montano at thomson.com)
Date: Wed, 16 Nov 2005 10:55:14 +0800
Subject: [Wtr-general] traversing through tr's and td's
Message-ID:
Thanks a lot for all those who replied. It's working now.
-----Original Message-----
From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Alexey Verkhovsky
Sent: Monday, November 14, 2005 3:32 PM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] traversing through tr's and td's
Amit Garde wrote:
> Or an XPath expression...
Now it's time for me to pledge ignorance. Is there something in the
Watir API that can do XPath queries?
Alex
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
From bret at pettichord.com Tue Nov 15 13:08:29 2005
From: bret at pettichord.com (Bret Pettichord)
Date: Tue, 15 Nov 2005 12:08:29 -0600
Subject: [Wtr-general] New Watir Wiki
In-Reply-To: <1e55af990511111412w5ec0cf7v67ee5fe1ff3cb07@mail.gmail.com>
References: <5.1.0.14.2.20051108004740.03e0cf48@pop.gmail.com>
<5.1.0.14.2.20051028010239.03a76340@pop.gmail.com>
<5.1.0.14.2.20051105203413.03da8e88@pop.gmail.com>
<5.1.0.14.2.20051108004740.03e0cf48@pop.gmail.com>
Message-ID: <5.1.0.14.2.20051115120622.03c366b8@pop.gmail.com>
Sy,
Please go ahead with your plan to move the Watir wiki to mediaweb. Thank
you very much for offering to make this contribution to the project.
Bret
_____________________
Bret Pettichord
www.pettichord.com
From sy1234 at gmail.com Tue Nov 15 23:56:07 2005
From: sy1234 at gmail.com (Sy Ali)
Date: Tue, 15 Nov 2005 22:56:07 -0600
Subject: [Wtr-general] New Watir Wiki
In-Reply-To: <5.1.0.14.2.20051115120622.03c366b8@pop.gmail.com>
References: <5.1.0.14.2.20051028010239.03a76340@pop.gmail.com>
<5.1.0.14.2.20051105203413.03da8e88@pop.gmail.com>
<5.1.0.14.2.20051108004740.03e0cf48@pop.gmail.com>
<1e55af990511111412w5ec0cf7v67ee5fe1ff3cb07@mail.gmail.com>
<5.1.0.14.2.20051115120622.03c366b8@pop.gmail.com>
Message-ID: <1e55af990511152056m133d3f6ap969778a3b697aecd@mail.gmail.com>
On 11/15/05, Bret Pettichord wrote:
> Sy,
>
> Please go ahead with your plan to move the Watir wiki to mediaweb. Thank
> you very much for offering to make this contribution to the project.
I've replied off-list. Assuming sourceforge is good about it, the
setup should be very easy. It won't take me very long to migrate the
existing content. It should be usable a week from setup.
From smanish at gs-lab.com Wed Nov 16 01:53:38 2005
From: smanish at gs-lab.com (smanish)
Date: Wed, 16 Nov 2005 12:23:38 +0530
Subject: [Wtr-general] Can watir be used to drive gmail....
Message-ID: <437AD772.8020501@gs-lab.com>
I tried and after logging in...
I was simply lost....
Any clues??
Has any one used watir successfully to drive gmail?
Thanks and Regards,
Manish
From smanish at gs-lab.com Wed Nov 16 02:19:12 2005
From: smanish at gs-lab.com (smanish)
Date: Wed, 16 Nov 2005 12:49:12 +0530
Subject: [Wtr-general] watir exception...
Message-ID: <437ADD70.9050005@gs-lab.com>
Hi,
I have following simple script....but at the end of executiong..
I get exception as bellow
W, [16-Nov-2005 12:40:52#7832] WARN -- : frame error in waitdocument
OLE error code:80070005 in
Access is denied.
HRESULT error code:0x80020009
Exception occurred.
c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1405:in
`method_missing'
c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1405:in `wait'
c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1404:in `upto'
c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1404:in `wait'
c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:2014:in `click'
yahoomail.rb:10
c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in
`assert_exists': Unable to locate object, using text and Sign out
(Watir::Exception::UnknownObjectException)
from c:/program
files/ruby/lib/ruby/site_ruby/1.8/watir.rb:2009:in `click'
from yahoomail.rb:13
>Exit code: 1
-------------------------------------
require 'watir' # the watir controller
# open the IE browser
$ie = Watir::IE.new
$ie.set_fast_speed()
test_site="http://mail.yahoo.com/"
$ie.goto(test_site)
$ie.text_field(:name, "login").set("abc")
$ie.text_field(:id, "passwd").set("xyz")
$ie.button(:value, "Sign In").click
$ie.show_all_objects
$ie.link(:text, "Sign out").click
$ie.close
Any ideas??
Thanks,
Manish
From Jamuna.Nithyanandam at honeywell.com Wed Nov 16 02:44:14 2005
From: Jamuna.Nithyanandam at honeywell.com (Jamuna, Nithyanandam (IE10))
Date: Wed, 16 Nov 2005 13:14:14 +0530
Subject: [Wtr-general] watir exception...
Message-ID: <9F4FA7B367FAAD4E9D78594B289244FA03DF2560@IE10EV801.global.ds.honeywell.com>
Hi Manish,
Try accessing the link using the index. To view all the links try
$ie.show_links
Hope this code helps you,
require 'watir' # the watir controller
# open the IE browser
$ie = Watir::IE.new
$ie.set_fast_speed()
test_site="http://mail.yahoo.com/"
$ie.goto(test_site)
$ie.text_field(:name, "login").set("abc")
$ie.text_field(:id, "passwd").set("xyz")
$ie.button(:value, "Sign In").click
$ie.show_links
$ie.link(:index, 5).click
$ie.close
Regards,
Jamuna Nithyanandam
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of smanish
Sent: Wednesday, November 16, 2005 12:49 PM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] watir exception...
Hi,
I have following simple script....but at the end of executiong..
I get exception as bellow
W, [16-Nov-2005 12:40:52#7832] WARN -- : frame error in waitdocument
OLE error code:80070005 in
Access is denied.
HRESULT error code:0x80020009
Exception occurred.
c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1405:in
`method_missing'
c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1405:in `wait'
c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1404:in `upto'
c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1404:in `wait'
c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:2014:in `click'
yahoomail.rb:10
c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in
`assert_exists': Unable to locate object, using text and Sign out
(Watir::Exception::UnknownObjectException)
from c:/program
files/ruby/lib/ruby/site_ruby/1.8/watir.rb:2009:in `click'
from yahoomail.rb:13
>Exit code: 1
-------------------------------------
require 'watir' # the watir controller
# open the IE browser
$ie = Watir::IE.new
$ie.set_fast_speed()
test_site="http://mail.yahoo.com/"
$ie.goto(test_site)
$ie.text_field(:name, "login").set("abc")
$ie.text_field(:id, "passwd").set("xyz") $ie.button(:value, "Sign
In").click $ie.show_all_objects $ie.link(:text, "Sign out").click
$ie.close
Any ideas??
Thanks,
Manish
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
From zeljko.filipin at gmail.com Wed Nov 16 04:04:06 2005
From: zeljko.filipin at gmail.com (Zeljko Filipin)
Date: Wed, 16 Nov 2005 10:04:06 +0100
Subject: [Wtr-general] Can watir be used to drive gmail....
In-Reply-To: <437AD772.8020501@gs-lab.com>
Message-ID: <000e01c5ea8c$b43f8570$c6e7fea9@officezg.wa>
I just tried it too, and it really does not work.
Solution: log in, go to http://mail.google.com/mail/h/ and you will be
switched to basic HTML and watir will work.
Zeljko
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of smanish
Sent: Wednesday, November 16, 2005 7:54 AM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] Can watir be used to drive gmail....
I tried and after logging in...
I was simply lost....
Any clues??
Has any one used watir successfully to drive gmail?
Thanks and Regards,
Manish
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
From smanish at gs-lab.com Wed Nov 16 04:31:43 2005
From: smanish at gs-lab.com (smanish)
Date: Wed, 16 Nov 2005 15:01:43 +0530
Subject: [Wtr-general] Can watir be used to drive gmail....
In-Reply-To: <000e01c5ea8c$b43f8570$c6e7fea9@officezg.wa>
References: <000e01c5ea8c$b43f8570$c6e7fea9@officezg.wa>
Message-ID: <437AFC7F.1070402@gs-lab.com>
Hey thanks for the solution.
It works. But why it does not work with default gmail interface?
Regards,
Manish
On 11/16/2005 02:34 PM, Zeljko Filipin wrote:
>I just tried it too, and it really does not work.
>Solution: log in, go to http://mail.google.com/mail/h/ and you will be
>switched to basic HTML and watir will work.
>
>Zeljko
>
>-----Original Message-----
>From: wtr-general-bounces at rubyforge.org
>[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of smanish
>Sent: Wednesday, November 16, 2005 7:54 AM
>To: wtr-general at rubyforge.org
>Subject: [Wtr-general] Can watir be used to drive gmail....
>
>I tried and after logging in...
>I was simply lost....
>
>Any clues??
>Has any one used watir successfully to drive gmail?
>
>Thanks and Regards,
>Manish
>
>
>
>_______________________________________________
>Wtr-general mailing list
>Wtr-general at rubyforge.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 satti at qantom.com Wed Nov 16 04:51:58 2005
From: satti at qantom.com (Sathya Shankar)
Date: Wed, 16 Nov 2005 15:21:58 +0530
Subject: [Wtr-general] watir exception...
In-Reply-To: <437ADD70.9050005@gs-lab.com>
References: <437ADD70.9050005@gs-lab.com>
Message-ID: <437B013E.1060500@qantom.com>
Hi
[Sign Out,
Here the "," seems to be causing the problem. So in your script you can either use the "," in your script or the regular expressions
Then the script would look like
ie=IE.attach(:title, /.*Yahoo.*/)
ie.link(:text, /.*Sign Out.*/).click
ie.close()
The above script worked for me.
smanish wrote:
>Hi,
>I have following simple script....but at the end of executiong..
>I get exception as bellow
>
>W, [16-Nov-2005 12:40:52#7832] WARN -- : frame error in waitdocument
> OLE error code:80070005 in
> Access is denied.
> HRESULT error code:0x80020009
> Exception occurred.
>c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1405:in
>`method_missing'
>c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1405:in `wait'
>c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1404:in `upto'
>c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1404:in `wait'
>c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:2014:in `click'
>yahoomail.rb:10
>c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in
>`assert_exists': Unable to locate object, using text and Sign out
>(Watir::Exception::UnknownObjectException)
> from c:/program
>files/ruby/lib/ruby/site_ruby/1.8/watir.rb:2009:in `click'
> from yahoomail.rb:13
>
>
>>Exit code: 1
>>
>>
>
>-------------------------------------
>require 'watir' # the watir controller
># open the IE browser
>$ie = Watir::IE.new
>$ie.set_fast_speed()
>test_site="http://mail.yahoo.com/"
>$ie.goto(test_site)
>$ie.text_field(:name, "login").set("abc")
>$ie.text_field(:id, "passwd").set("xyz")
>$ie.button(:value, "Sign In").click
>$ie.show_all_objects
>$ie.link(:text, "Sign out").click
>$ie.close
>
>Any ideas??
>Thanks,
>Manish
>
>_______________________________________________
>Wtr-general mailing list
>Wtr-general at rubyforge.org
>http://rubyforge.org/mailman/listinfo/wtr-general
>
>
--
Sathya Shankar M G
Software Testing Engineer
Qantom Software
http://www.qantom.com
Ph : 26799269 Xtn. 123
sip : satti at sip411.com
From zeljko.filipin at gmail.com Wed Nov 16 04:50:28 2005
From: zeljko.filipin at gmail.com (Zeljko Filipin)
Date: Wed, 16 Nov 2005 10:50:28 +0100
Subject: [Wtr-general] Can watir be used to drive gmail....
In-Reply-To: <437AFC7F.1070402@gs-lab.com>
Message-ID: <001101c5ea93$2eae8ad0$c6e7fea9@officezg.wa>
HTML source will tell you why it does not work. :) It seems that gmail uses
a lot of ajax (or something like that).
Zeljko
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of smanish
Sent: Wednesday, November 16, 2005 10:32 AM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] Can watir be used to drive gmail....
Hey thanks for the solution.
It works. But why it does not work with default gmail interface?
Regards,
Manish
On 11/16/2005 02:34 PM, Zeljko Filipin wrote:
>I just tried it too, and it really does not work.
>Solution: log in, go to http://mail.google.com/mail/h/ and you will be
>switched to basic HTML and watir will work.
>
>Zeljko
>
>-----Original Message-----
>From: wtr-general-bounces at rubyforge.org
>[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of smanish
>Sent: Wednesday, November 16, 2005 7:54 AM
>To: wtr-general at rubyforge.org
>Subject: [Wtr-general] Can watir be used to drive gmail....
>
>I tried and after logging in...
>I was simply lost....
>
>Any clues??
>Has any one used watir successfully to drive gmail?
>
>Thanks and Regards,
>Manish
>
>
>
>_______________________________________________
>Wtr-general mailing list
>Wtr-general at rubyforge.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 Malcolm.Beaton at conchango.com Wed Nov 16 05:44:15 2005
From: Malcolm.Beaton at conchango.com (Beaton, Malcolm)
Date: Wed, 16 Nov 2005 10:44:15 -0000
Subject: [Wtr-general] How to capture current page in a variable?
Message-ID:
This is probably a really simple question (but I have only been using
ruby/WATiR for 2 days)
I am trying to test site navigation to each site portal using an array
and an iterative select and go command. (see below)
PortalArray.each do | x |
puts 'Step 2.'runNumber' : Select ' x ' for the Portal list'
$ie.select_list( :id, "gatewaycountry").select(x)
puts ' Action: selected ' runNumber ' for the Portal list.'
puts 'Step 2,' x '.1: click the "Go" button'
$ie.button(:id, "go").click
puts ' Action: clicked the Go button.'
assert??
runNumber = runNumber + 1
end
Now the question I have is I need to assert that the browser actually
went there (or at least tried to) I thought I could do this by capturing
the current page address in a variable and using another array to match
it against?
The other thing is the HTML knows what portal it is at using this method
(below)
Is there a way I can test for that instead? (my HTML is not so good to
be honest)
Any help would be appreciated
Mal
Malcolm Beaton
Technical Consultant
Conchango
'Innovative Change in Business'
D +44 (0) 1784 222127
S +44 (0) 1784 222222
M +44 (0) 777 071 3121
malcolm.beaton at conchango.com
http://www.conchango.com
No.2 New Media Age - Top 10 Technology Agencies 2004
No.5 New Media Age - Top 20 Interactive Agencies 2004
No.3 Marketing - Top 100 New Media Agencies 2005
Winner - Best Travel Website - New Media Age 2005
Winner - Best Retail Website - British Interactive Media Association
(BIMA) 2004
Winner - Information Management Business Intelligence Project of the
Year 2003
Winner - Microsoft European Business Intelligence Solutions Award 2003
More awards >
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin
Sent: 16 November 2005 09:50
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] Can watir be used to drive gmail....
HTML source will tell you why it does not work. :) It seems that gmail
uses
a lot of ajax (or something like that).
Zeljko
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of smanish
Sent: Wednesday, November 16, 2005 10:32 AM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] Can watir be used to drive gmail....
Hey thanks for the solution.
It works. But why it does not work with default gmail interface?
Regards,
Manish
On 11/16/2005 02:34 PM, Zeljko Filipin wrote:
>I just tried it too, and it really does not work.
>Solution: log in, go to http://mail.google.com/mail/h/ and you will be
>switched to basic HTML and watir will work.
>
>Zeljko
>
>-----Original Message-----
>From: wtr-general-bounces at rubyforge.org
>[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of smanish
>Sent: Wednesday, November 16, 2005 7:54 AM
>To: wtr-general at rubyforge.org
>Subject: [Wtr-general] Can watir be used to drive gmail....
>
>I tried and after logging in...
>I was simply lost....
>
>Any clues??
>Has any one used watir successfully to drive gmail?
>
>Thanks and Regards,
>Manish
>
>
>
>_______________________________________________
>Wtr-general mailing list
>Wtr-general at rubyforge.org
>http://rubyforge.org/mailman/listinfo/wtr-general
>
>_______________________________________________
>Wtr-general mailing list
>Wtr-general at rubyforge.org
>http://rubyforge.org/mailman/listinfo/wtr-general
>
>
>
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
_____________________________________________________________________
This e-mail has been scanned for viruses by MessageLabs. The information contained in this message is confidential and is intended for the addressee only. If you have received this message in error, please notify Conchango plc as soon as possible. The unauthorised use, disclosure, copying or alteration of this message is prohibited and may be unlawful. The internet cannot guarantee the integrity of this message and therefore Conchango plc will not be liable for the message if modified.
Reg. Heritage House, Church Road, Egham, Surrey, TW20 9QD T 44 (0) 1784 222 222 F 44 (0) 1784 222 200 E talktous at conchango.com No. 2598884
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051116/171d6b84/attachment.html
From manishs at reconnex.net Wed Nov 16 05:49:33 2005
From: manishs at reconnex.net (Manish Sapariya)
Date: Wed, 16 Nov 2005 16:19:33 +0530
Subject: [Wtr-general] watir exception...
In-Reply-To: <437B013E.1060500@qantom.com>
References: <437ADD70.9050005@gs-lab.com> <437B013E.1060500@qantom.com>
Message-ID: <437B0EBD.4080705@reconnex.net>
Nope,
I still get the same error.
Note that script runs fine.....only at the end it throws this error.
Regards,
Manish
On 11/16/2005 03:21 PM, Sathya Shankar wrote:
>Hi
>
>[Sign Out,
>
>Here the "," seems to be causing the problem. So in your script you can either use the "," in your script or the regular expressions
>Then the script would look like
>ie=IE.attach(:title, /.*Yahoo.*/)
>ie.link(:text, /.*Sign Out.*/).click
>ie.close()
>The above script worked for me.
>
>
>
>smanish wrote:
>
>
>
>>Hi,
>>I have following simple script....but at the end of executiong..
>>I get exception as bellow
>>
>>W, [16-Nov-2005 12:40:52#7832] WARN -- : frame error in waitdocument
>> OLE error code:80070005 in
>> Access is denied.
>> HRESULT error code:0x80020009
>> Exception occurred.
>>c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1405:in
>>`method_missing'
>>c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1405:in `wait'
>>c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1404:in `upto'
>>c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1404:in `wait'
>>c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:2014:in `click'
>>yahoomail.rb:10
>>c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in
>>`assert_exists': Unable to locate object, using text and Sign out
>>(Watir::Exception::UnknownObjectException)
>> from c:/program
>>files/ruby/lib/ruby/site_ruby/1.8/watir.rb:2009:in `click'
>> from yahoomail.rb:13
>>
>>
>>
>>
>>>Exit code: 1
>>>
>>>
>>>
>>>
>>-------------------------------------
>>require 'watir' # the watir controller
>># open the IE browser
>>$ie = Watir::IE.new
>>$ie.set_fast_speed()
>>test_site="http://mail.yahoo.com/"
>>$ie.goto(test_site)
>>$ie.text_field(:name, "login").set("abc")
>>$ie.text_field(:id, "passwd").set("xyz")
>>$ie.button(:value, "Sign In").click
>>$ie.show_all_objects
>>$ie.link(:text, "Sign out").click
>>$ie.close
>>
>>Any ideas??
>>Thanks,
>>Manish
>>
>>_______________________________________________
>>Wtr-general mailing list
>>Wtr-general at rubyforge.org
>>http://rubyforge.org/mailman/listinfo/wtr-general
>>
>>
>>
>>
>
>
>
>
From zeljko.filipin at gmail.com Wed Nov 16 05:54:41 2005
From: zeljko.filipin at gmail.com (Zeljko Filipin)
Date: Wed, 16 Nov 2005 11:54:41 +0100
Subject: [Wtr-general] How to capture current page in a variable?
In-Reply-To:
Message-ID: <003401c5ea9c$26c63990$c6e7fea9@officezg.wa>
I do not understand what do you need.
To capture url use ie.url, for text ie.text, for title ie.title, for html
ie.html...
Zeljko
_____
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Beaton, Malcolm
Sent: Wednesday, November 16, 2005 11:44 AM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] How to capture current page in a variable?
This is probably a really simple question (but I have only been using
ruby/WATiR for 2 days)
I am trying to test site navigation to each site portal using an array and
an iterative select and go command. (see below)
PortalArray.each do | x |
puts 'Step 2.'runNumber' : Select ' x ' for the Portal list'
$ie.select_list( :id, "gatewaycountry").select(x)
puts ' Action: selected ' runNumber ' for the Portal list.'
puts 'Step 2,' x '.1: click the "Go" button'
$ie.button(:id, "go").click
puts ' Action: clicked the Go button.'
assert??
runNumber = runNumber + 1
end
Now the question I have is I need to assert that the browser actually went
there (or at least tried to) I thought I could do this by capturing the
current page address in a variable and using another array to match it
against?
The other thing is the HTML knows what portal it is at using this method
(below)
Is there a way I can test for that instead? (my HTML is not so good to be
honest)
Any help would be appreciated
Mal
Malcolm Beaton
Technical Consultant
Conchango
'Innovative Change in Business'
D +44 (0) 1784 222127
S +44 (0) 1784 222222
M +44 (0) 777 071 3121
malcolm.beaton at conchango.com
http://www.conchango.com
No.2 New Media Age - Top 10 Technology Agencies 2004
No.5 New Media Age - Top 20 Interactive Agencies 2004
No.3 Marketing - Top 100 New Media Agencies 2005
Winner - Best Travel Website - New Media Age 2005
Winner - Best Retail Website - British Interactive Media Association (BIMA)
2004
Winner - Information Management Business Intelligence Project of the Year
2003
Winner - Microsoft European Business Intelligence Solutions Award 2003
More awards >
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin
Sent: 16 November 2005 09:50
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] Can watir be used to drive gmail....
HTML source will tell you why it does not work. :) It seems that gmail uses
a lot of ajax (or something like that).
Zeljko
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of smanish
Sent: Wednesday, November 16, 2005 10:32 AM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] Can watir be used to drive gmail....
Hey thanks for the solution.
It works. But why it does not work with default gmail interface?
Regards,
Manish
On 11/16/2005 02:34 PM, Zeljko Filipin wrote:
>I just tried it too, and it really does not work.
>Solution: log in, go to http://mail.google.com/mail/h/ and you will be
>switched to basic HTML and watir will work.
>
>Zeljko
>
>-----Original Message-----
>From: wtr-general-bounces at rubyforge.org
>[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of smanish
>Sent: Wednesday, November 16, 2005 7:54 AM
>To: wtr-general at rubyforge.org
>Subject: [Wtr-general] Can watir be used to drive gmail....
>
>I tried and after logging in...
>I was simply lost....
>
>Any clues??
>Has any one used watir successfully to drive gmail?
>
>Thanks and Regards,
>Manish
>
>
>
>_______________________________________________
>Wtr-general mailing list
>Wtr-general at rubyforge.org
>http://rubyforge.org/mailman/listinfo/wtr-general
>
>_______________________________________________
>Wtr-general mailing list
>Wtr-general at rubyforge.org
>http://rubyforge.org/mailman/listinfo/wtr-general
>
>
>
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
_____________________________________________________________________
This e-mail has been scanned for viruses by MessageLabs. The information
contained in this message is confidential and is intended for the addressee
only. If you have received this message in error, please notify Conchango
plc as soon as possible. The unauthorised use, disclosure, copying or
alteration of this message is prohibited and may be unlawful. The internet
cannot guarantee the integrity of this message and therefore Conchango plc
will not be liable for the message if modified.
Reg. Heritage House, Church Road, Egham, Surrey, TW20 9QD T 44 (0) 1784 222
222 F 44 (0) 1784 222 200 E talktous at conchango.com No. 2598884
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051116/7ec729f8/attachment.html
From zeljko.filipin at gmail.com Wed Nov 16 05:58:46 2005
From: zeljko.filipin at gmail.com (Zeljko Filipin)
Date: Wed, 16 Nov 2005 11:58:46 +0100
Subject: [Wtr-general] Can watir be used to drive gmail....
In-Reply-To: <437AFC7F.1070402@gs-lab.com>
Message-ID: <003901c5ea9c$b92da020$c6e7fea9@officezg.wa>
http://googleblog.blogspot.com/2005/10/guess-what-just-turned-34.html
More about gmail.
Zeljko
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of smanish
Sent: Wednesday, November 16, 2005 10:32 AM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] Can watir be used to drive gmail....
Hey thanks for the solution.
It works. But why it does not work with default gmail interface?
Regards,
Manish
On 11/16/2005 02:34 PM, Zeljko Filipin wrote:
>I just tried it too, and it really does not work.
>Solution: log in, go to http://mail.google.com/mail/h/ and you will be
>switched to basic HTML and watir will work.
>
>Zeljko
>
>-----Original Message-----
>From: wtr-general-bounces at rubyforge.org
>[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of smanish
>Sent: Wednesday, November 16, 2005 7:54 AM
>To: wtr-general at rubyforge.org
>Subject: [Wtr-general] Can watir be used to drive gmail....
>
>I tried and after logging in...
>I was simply lost....
>
>Any clues??
>Has any one used watir successfully to drive gmail?
>
>Thanks and Regards,
>Manish
>
>
>
>_______________________________________________
>Wtr-general mailing list
>Wtr-general at rubyforge.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 techpra at yahoo.co.in Wed Nov 16 06:17:23 2005
From: techpra at yahoo.co.in (pj jha)
Date: Wed, 16 Nov 2005 11:17:23 +0000 (GMT)
Subject: [Wtr-general] Problem in WATiR
Message-ID: <20051116111723.3908.qmail@web8309.mail.in.yahoo.com>
hi,
i am little bit confused, my confusion is as follow,
Suppose i want write the code for any control like textbox, drop down box etc in watir. I want to pass the field name associated with that control and the value which i have to entered(in case of textbox) or select(in case of dropdown box).
please send any sample code for above requirement.
thanks and regards,
--Prashant
---------------------------------
Enjoy this Diwali with Y! India Click here
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051116/a4d82d3f/attachment.html
From techpra at yahoo.co.in Wed Nov 16 06:19:43 2005
From: techpra at yahoo.co.in (pj jha)
Date: Wed, 16 Nov 2005 11:19:43 +0000 (GMT)
Subject: [Wtr-general] Problem in WATiR
Message-ID: <20051116111943.29499.qmail@web8305.mail.in.yahoo.com>
hi,
i am little bit confused, my confusion is as follow,
Suppose i want write the code for any control like textbox, drop down box etc in watir. I want to pass the field name associated with that control and the value which i have to entered(in case of textbox) or select(in case of dropdown box).
please send any sample code for above requirement.
thanks and regards,
--Prashant
---------------------------------
Enjoy this Diwali with Y! India Click here
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051116/125e9f02/attachment.html
From zeljko.filipin at gmail.com Wed Nov 16 06:58:01 2005
From: zeljko.filipin at gmail.com (Zeljko Filipin)
Date: Wed, 16 Nov 2005 12:58:01 +0100
Subject: [Wtr-general] Problem in WATiR
In-Reply-To: <20051116111723.3908.qmail@web8309.mail.in.yahoo.com>
Message-ID: <005a01c5eaa4$fff48c00$c6e7fea9@officezg.wa>
I do not understand what do you want to do.
You can enter 'watir rules' in textbox like this
ie.textField(:id, 'textField_id').set('watir rules')
and select 'watir rules'
ie.selectBox(:id, 'selectBox_id').select('watir rules')
More information on http://wtr.rubyforge.org/watir_user_guide.html (and even
more on http://wtr.rubyforge.org/)
Zeljko
_____
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of pj jha
Sent: Wednesday, November 16, 2005 12:17 PM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] Problem in WATiR
hi,
i am little bit confused, my confusion is as follow,
Suppose i want write the code for any control like textbox, drop down box
etc in watir. I want to pass the field name associated with that control and
the value which i have to entered(in case of textbox) or select(in case
of dropdown box).
please send any sample code for above requirement.
thanks and regards,
--Prashant
_____
Enjoy this Diwali with Y! India Click
here
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051116/622aabc5/attachment.html
From satti at qantom.com Wed Nov 16 06:40:05 2005
From: satti at qantom.com (Sathya Shankar)
Date: Wed, 16 Nov 2005 17:10:05 +0530
Subject: [Wtr-general] watir exception...
In-Reply-To: <437B0EBD.4080705@reconnex.net>
References: <437ADD70.9050005@gs-lab.com> <437B013E.1060500@qantom.com>
<437B0EBD.4080705@reconnex.net>
Message-ID: <437B1A95.3020406@qantom.com>
Its not an error message its a warning message and you can suppress that warning by using this code...
I think this is mainly because of the fact that the different frames are loaded from different domains.(not sure about it)
ie=IE.attach(:title, /.*Yahoo.*/)
begin
ie.link(:text, /.*Sign Out.*/).click
rescue
end
ie.close()
Let me know any issues.
Manish Sapariya wrote:
>Nope,
>I still get the same error.
>Note that script runs fine.....only at the end it throws this error.
>Regards,
>Manish
>
>
>On 11/16/2005 03:21 PM, Sathya Shankar wrote:
>
>
>
>>Hi
>>
>>[Sign Out,
>>
>>Here the "," seems to be causing the problem. So in your script you can either use the "," in your script or the regular expressions
>>Then the script would look like
>>ie=IE.attach(:title, /.*Yahoo.*/)
>>ie.link(:text, /.*Sign Out.*/).click
>>ie.close()
>>The above script worked for me.
>>
>>
>>
>>smanish wrote:
>>
>>
>>
>>
>>
>>>Hi,
>>>I have following simple script....but at the end of executiong..
>>>I get exception as bellow
>>>
>>>W, [16-Nov-2005 12:40:52#7832] WARN -- : frame error in waitdocument
>>> OLE error code:80070005 in
>>> Access is denied.
>>> HRESULT error code:0x80020009
>>> Exception occurred.
>>>c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1405:in
>>>`method_missing'
>>>c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1405:in `wait'
>>>c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1404:in `upto'
>>>c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1404:in `wait'
>>>c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:2014:in `click'
>>>yahoomail.rb:10
>>>c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in
>>>`assert_exists': Unable to locate object, using text and Sign out
>>>(Watir::Exception::UnknownObjectException)
>>> from c:/program
>>>files/ruby/lib/ruby/site_ruby/1.8/watir.rb:2009:in `click'
>>> from yahoomail.rb:13
>>>
>>>
>>>
>>>
>>>
>>>
>>>>Exit code: 1
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>-------------------------------------
>>>require 'watir' # the watir controller
>>># open the IE browser
>>>$ie = Watir::IE.new
>>>$ie.set_fast_speed()
>>>test_site="http://mail.yahoo.com/"
>>>$ie.goto(test_site)
>>>$ie.text_field(:name, "login").set("abc")
>>>$ie.text_field(:id, "passwd").set("xyz")
>>>$ie.button(:value, "Sign In").click
>>>$ie.show_all_objects
>>>$ie.link(:text, "Sign out").click
>>>$ie.close
>>>
>>>Any ideas??
>>>Thanks,
>>>Manish
>>>
>>>_______________________________________________
>>>Wtr-general mailing list
>>>Wtr-general at rubyforge.org
>>>http://rubyforge.org/mailman/listinfo/wtr-general
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>
>_______________________________________________
>Wtr-general mailing list
>Wtr-general at rubyforge.org
>http://rubyforge.org/mailman/listinfo/wtr-general
>
>
--
Sathya Shankar M G
Software Testing Engineer
Qantom Software
http://www.qantom.com
Ph : 26799269 Xtn. 123
sip : satti at sip411.com
From satti at qantom.com Wed Nov 16 07:23:28 2005
From: satti at qantom.com (Sathya Shankar)
Date: Wed, 16 Nov 2005 17:53:28 +0530
Subject: [Wtr-general] Problem in WATiR
In-Reply-To: <20051116111943.29499.qmail@web8305.mail.in.yahoo.com>
References: <20051116111943.29499.qmail@web8305.mail.in.yahoo.com>
Message-ID: <437B24C0.3030800@qantom.com>
Go through the user guide for watir and u can find it in ....
http://wtr.rubyforge.org/watir_user_guide.html
pj jha wrote:
> hi,
>
> i am little bit confused, my confusion is as follow,
>
> Suppose i want write the code for any control like textbox, drop down
> box etc in watir. I want to pass the field name associated with that
> control and the value which i have to entered(in case of textbox)
> or select(in case of dropdown box).
>
> please send any sample code for above requirement.
>
> thanks and regards,
> --Prashant
>
> ------------------------------------------------------------------------
> Enjoy this Diwali with Y! India Click here
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Wtr-general mailing list
>Wtr-general at rubyforge.org
>http://rubyforge.org/mailman/listinfo/wtr-general
>
>
--
Sathya Shankar M G
Software Testing Engineer
Qantom Software
http://www.qantom.com
Ph : 26799269 Xtn. 123
sip : satti at sip411.com
From Malcolm.Beaton at conchango.com Wed Nov 16 08:27:57 2005
From: Malcolm.Beaton at conchango.com (Beaton, Malcolm)
Date: Wed, 16 Nov 2005 13:27:57 -0000
Subject: [Wtr-general] How to capture current page in a variable?
Message-ID:
Hi Zeljko
Basically I want my browser to
1 - pick a site from an array
2 - enter it in the drop down
3 - press go (Thus loading the portal for that country)
4 - verify the correct site loaded
I can do all that except 4. So I thought if I can grab the URL from IE I
can compare that to another array of expected outcomes.
The Other option was to assert that the relevant part of the page source
after it loads looks like this
And not this
But I am unsure how to do either of these. So I am trying to find out if
there is an easy way like assert(ie.current_url('the_URL_I_Am_expecting)
(This is of course made up)
OR
Assert(:ID, "Gatewaycountry", :Value, "#").contains(Australia site)
(Again made up)
Does this help?
Malcolm Beaton
Technical Consultant
Conchango
'Innovative Change in Business'
D +44 (0) 1784 222127
S +44 (0) 1784 222222
M +44 (0) 777 071 3121
malcolm.beaton at conchango.com
http://www.conchango.com
No.2 New Media Age - Top 10 Technology Agencies 2004
No.5 New Media Age - Top 20 Interactive Agencies 2004
No.3 Marketing - Top 100 New Media Agencies 2005
Winner - Best Travel Website - New Media Age 2005
Winner - Best Retail Website - British Interactive Media Association
(BIMA) 2004
Winner - Information Management Business Intelligence Project of the
Year 2003
Winner - Microsoft European Business Intelligence Solutions Award 2003
More awards >
_____________________________________________________________________
This e-mail has been scanned for viruses by MessageLabs. The information contained in this message is confidential and is intended for the addressee only. If you have received this message in error, please notify Conchango plc as soon as possible. The unauthorised use, disclosure, copying or alteration of this message is prohibited and may be unlawful. The internet cannot guarantee the integrity of this message and therefore Conchango plc will not be liable for the message if modified.
Reg. Heritage House, Church Road, Egham, Surrey, TW20 9QD T 44 (0) 1784 222 222 F 44 (0) 1784 222 200 E talktous at conchango.com No. 2598884
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051116/b6736231/attachment.html
From Jan.Montano at thomson.com Wed Nov 16 08:27:50 2005
From: Jan.Montano at thomson.com (Jan.Montano at thomson.com)
Date: Wed, 16 Nov 2005 21:27:50 +0800
Subject: [Wtr-general] Problem in WATiR
Message-ID:
Is something like this you're after?
def MethodWrapper.insert_text(text, fieldname, description)
$ie.text_field(:name, fieldname ).value = text
puts ' ACTION: entered ' + text + ' in the ' + description + ' field'
#puts '\t- successful.'
end
#MethodWrapper.insert_text('2005/04',"txtBilDetRepTo",'End Date')
-----Original Message-----
From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of pj jha
Sent: Wednesday, November 16, 2005 7:20 PM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] Problem in WATiR
hi,
i am little bit confused, my confusion is as follow,
Suppose i want write the code for any control like textbox, drop down box etc in watir. I want to pass the field name associated with that control and the value which i have to entered(in case of textbox) or select(in case of dropdown box).
please send any sample code for above requirement.
thanks and regards,
--Prashant
_____
Enjoy this Diwali with Y! India Click here
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051116/e74ac56b/attachment.html
From zeljko.filipin at gmail.com Wed Nov 16 08:44:15 2005
From: zeljko.filipin at gmail.com (Zeljko Filipin)
Date: Wed, 16 Nov 2005 14:44:15 +0100
Subject: [Wtr-general] How to capture current page in a variable?
In-Reply-To:
Message-ID: <007601c5eab3$d727c300$c6e7fea9@officezg.wa>
You can do
assert(ie.url == 'the_URL_I_Am_expecting')
More information abuot select lists at http://wtr.rubyforge.org/rdoc/
(http://wtr.rubyforge.org/rdoc/classes/Watir/SelectList.html)
Zeljko
_____
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Beaton, Malcolm
Sent: Wednesday, November 16, 2005 2:28 PM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] How to capture current page in a variable?
Hi Zeljko
Basically I want my browser to
1 - pick a site from an array
2 - enter it in the drop down
3 - press go (Thus loading the portal for that country)
4 - verify the correct site loaded
I can do all that except 4. So I thought if I can grab the URL from IE I can
compare that to another array of expected outcomes.
The Other option was to assert that the relevant part of the page source
after it loads looks like this
And not this
But I am unsure how to do either of these. So I am trying to find out if
there is an easy way like assert(ie.current_url('the_URL_I_Am_expecting)
(This is of course made up)
OR
Assert(:ID, "Gatewaycountry", :Value, "#").contains(Australia site) (Again
made up)
Does this help?
Malcolm Beaton
Technical Consultant
Conchango
'Innovative Change in Business'
D +44 (0) 1784 222127
S +44 (0) 1784 222222
M +44 (0) 777 071 3121
malcolm.beaton at conchango.com
http://www.conchango.com
No.2 New Media Age - Top 10 Technology Agencies 2004
No.5 New Media Age - Top 20 Interactive Agencies 2004
No.3 Marketing - Top 100 New Media Agencies 2005
Winner - Best Travel Website - New Media Age 2005
Winner - Best Retail Website - British Interactive Media Association (BIMA)
2004
Winner - Information Management Business Intelligence Project of the Year
2003
Winner - Microsoft European Business Intelligence Solutions Award 2003
More
awards >
_____________________________________________________________________
This e-mail has been scanned for viruses by MessageLabs. The information
contained in this message is confidential and is intended for the addressee
only. If you have received this message in error, please notify Conchango
plc as soon as possible. The unauthorised use, disclosure, copying or
alteration of this message is prohibited and may be unlawful. The internet
cannot guarantee the integrity of this message and therefore Conchango plc
will not be liable for the message if modified.
Reg. Heritage House, Church Road, Egham, Surrey, TW20 9QD T 44 (0) 1784 222
222 F 44 (0) 1784 222 200 E talktous at conchango.com No. 2598884
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051116/10824b41/attachment.html
From Malcolm.Beaton at conchango.com Wed Nov 16 09:01:03 2005
From: Malcolm.Beaton at conchango.com (Beaton, Malcolm)
Date: Wed, 16 Nov 2005 14:01:03 -0000
Subject: [Wtr-general] How to capture current page in a variable?
Message-ID:
Thanks!!
Mal
Malcolm Beaton
Technical Consultant
Conchango
_____________________________________________________________________
This e-mail has been scanned for viruses by MessageLabs. The information contained in this message is confidential and is intended for the addressee only. If you have received this message in error, please notify Conchango plc as soon as possible. The unauthorised use, disclosure, copying or alteration of this message is prohibited and may be unlawful. The internet cannot guarantee the integrity of this message and therefore Conchango plc will not be liable for the message if modified.
Reg. Heritage House, Church Road, Egham, Surrey, TW20 9QD T 44 (0) 1784 222 222 F 44 (0) 1784 222 200 E talktous at conchango.com No. 2598884
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051116/4a9beb8d/attachment.html
From techpra at yahoo.co.in Wed Nov 16 09:17:49 2005
From: techpra at yahoo.co.in (pj jha)
Date: Wed, 16 Nov 2005 14:17:49 +0000 (GMT)
Subject: [Wtr-general] Problem in WATiR
Message-ID: <20051116141749.87848.qmail@web8301.mail.in.yahoo.com>
Hi,
Problem is not as you understand. I am going to explain in detail.
Actually I am writing test script in ruby and I am using WATiR for same. It?s an automatic testing script. When I start the execution of script it entered value and test the web pages. I am giving one example for that. Suppose I have to test login page, so for login page I have to entered user id and password in textbox and click the submit button. It will happen automatically.
So at first I write one library for login page then another fellow will call that library for testing of login page. The page structure is as
User Id:
Password:
So tester want to entered user id and password in the above textboxes, and tester does not know anything of textbox like id, name etc. but tester knows the name of label (i.e. User Id and Password), so he will pass the name of label and value which he/she wants to entered in that textbox.
So now I am not getting how I can write the code for this situation.
Please send me any sample if you get the time.
Thanks and regards,
-Prashant
---------------------------------
Enjoy this Diwali with Y! India Click here
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051116/6725999d/attachment.html
From vishalworld at sqatester.com Wed Nov 16 10:02:20 2005
From: vishalworld at sqatester.com (Vishal Chavan)
Date: Wed, 16 Nov 2005 07:02:20 -0800 (PST)
Subject: [Wtr-general] Problem in WATiR
Message-ID: <20051116070220.96D45D73@dm22.mta.everyone.net>
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051116/f08fca66/attachment.html
From paul.rogers at shaw.ca Wed Nov 16 10:58:01 2005
From: paul.rogers at shaw.ca (Paul Rogers)
Date: Wed, 16 Nov 2005 08:58:01 -0700
Subject: [Wtr-general] Span troubles
Message-ID: <2ca7c30bd8.30bd82ca7c@shaw.ca>
take a look at css test in the unit tests directory. That does something simlar to what you need.
I think you need to do something slightly different:
if /none/i.match( ie.span(:id , 'xxx').getOleObject.style.cssText )
puts "its hidden"
else
puts "displayed!"
end
Content-Type: multipart/alternative;
boundary="----=_Part_22865_26673201.1132081211626"
------=_Part_22865_26673201.1132081211626
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
I have a span that is not disabled, as follows:
Please enter your first name.
Certain user actions cause the text within this span to show up in red,
otherwise it is hidden to the user.
simply doing an ie.contains_text(span.text) does not work because
I still get non nil result whether the span is shown in red or not.
Is there anyway around this so that I can test whether the text in the spa=
n
is on the page or not?
Shao
------=_Part_22865_26673201.1132081211626
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
I have a span that is not disabled, as follows:
<span id=3D"ChangeProfileControl_FirstnameRequiredValidator&qu=
ot; controltovalidate=3D"ChangeProfileControl_first_name" errorme=
ssage=3D"Please enter your first name." display=3D"Dynamic&q=
uot; evaluationfunction=3D"RequiredFieldValidatorEvaluateIsValid"=
initialvalue=3D"" style=3D"color:Red;display:none;">=
;Please enter your first name.</span>
Certain user actions cause the text within this span to show up in red=
,
otherwise it is hidden to the user.
simply doing an ie.contains_text(span.text) does not work because
I still get non nil result whether the span is shown in red or not.
Is there anyway around this so that I can test whether the text in the=
span
is on the page or not?
Shao
------=_Part_22865_26673201.1132081211626--
-------------- next part --------------
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
From jeff.darklight at gmail.com Wed Nov 16 11:06:54 2005
From: jeff.darklight at gmail.com (Jeff Wood)
Date: Wed, 16 Nov 2005 08:06:54 -0800
Subject: [Wtr-general] Can watir be used to drive gmail....
In-Reply-To: <003901c5ea9c$b92da020$c6e7fea9@officezg.wa>
References: <437AFC7F.1070402@gs-lab.com>
<003901c5ea9c$b92da020$c6e7fea9@officezg.wa>
Message-ID:
It works, you just have to learn how to get around ... alot of ajax stuff
gets initialized when a mouse over or other javascript event happens.
j.
On 11/16/05, Zeljko Filipin wrote:
>
> http://googleblog.blogspot.com/2005/10/guess-what-just-turned-34.html
>
> More about gmail.
>
> Zeljko
>
> -----Original Message-----
> From: wtr-general-bounces at rubyforge.org
> [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of smanish
> Sent: Wednesday, November 16, 2005 10:32 AM
> To: wtr-general at rubyforge.org
> Subject: Re: [Wtr-general] Can watir be used to drive gmail....
>
> Hey thanks for the solution.
> It works. But why it does not work with default gmail interface?
>
> Regards,
> Manish
>
>
> On 11/16/2005 02:34 PM, Zeljko Filipin wrote:
>
> >I just tried it too, and it really does not work.
> >Solution: log in, go to http://mail.google.com/mail/h/ and you will be
> >switched to basic HTML and watir will work.
> >
> >Zeljko
> >
> >-----Original Message-----
> >From: wtr-general-bounces at rubyforge.org
> >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of smanish
> >Sent: Wednesday, November 16, 2005 7:54 AM
> >To: wtr-general at rubyforge.org
> >Subject: [Wtr-general] Can watir be used to drive gmail....
> >
> >I tried and after logging in...
> >I was simply lost....
> >
> >Any clues??
> >Has any one used watir successfully to drive gmail?
> >
> >Thanks and Regards,
> >Manish
> >
> >
> >
> >_______________________________________________
> >Wtr-general mailing list
> >Wtr-general at rubyforge.org
> >http://rubyforge.org/mailman/listinfo/wtr-general
> >
> >_______________________________________________
> >Wtr-general mailing list
> >Wtr-general at rubyforge.org
> >http://rubyforge.org/mailman/listinfo/wtr-general
> >
> >
> >
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
--
"Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
Jeff Wood
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051116/31674317/attachment.html
From mooola00 at hotmail.com Wed Nov 16 13:02:10 2005
From: mooola00 at hotmail.com (Eugene Kula)
Date: Wed, 16 Nov 2005 11:02:10 -0700
Subject: [Wtr-general] Best practices posting back to parent window from
child window
Message-ID:
What is the best way to assert something on a parent window that is posted
from a child window? When I run my assert the script fails because the
parent window isn't finishedl posting. Is there a way to tell when IE is
done posting? Many thanks!
From mooola00 at hotmail.com Wed Nov 16 13:18:38 2005
From: mooola00 at hotmail.com (Eugene Kula)
Date: Wed, 16 Nov 2005 11:18:38 -0700
Subject: [Wtr-general] Best practices posting back to parent window
fromchild window
In-Reply-To:
Message-ID:
Is it as simple as doing an $ie.wait before my assert after reattaching to
the parentwindow?
>From: "Eugene Kula"
>Reply-To: wtr-general at rubyforge.org
>To: wtr-general at rubyforge.org
>Subject: [Wtr-general] Best practices posting back to parent window
>fromchild window
>Date: Wed, 16 Nov 2005 11:02:10 -0700
>
>What is the best way to assert something on a parent window that is posted
>from a child window? When I run my assert the script fails because the
>parent window isn't finishedl posting. Is there a way to tell when IE is
>done posting? Many thanks!
>
>
>_______________________________________________
>Wtr-general mailing list
>Wtr-general at rubyforge.org
>http://rubyforge.org/mailman/listinfo/wtr-general
From iain.rose at gmail.com Wed Nov 16 14:54:24 2005
From: iain.rose at gmail.com (Iain Rose)
Date: Wed, 16 Nov 2005 11:54:24 -0800
Subject: [Wtr-general] Accessing Frames that show --Access Denied-
In-Reply-To: <5.1.0.14.2.20051005104639.031cd798@127.0.0.1>
References: <000601c5c69c$f934ebc0$0200a8c0@Study4700>
<5.1.0.14.2.20051005104639.031cd798@127.0.0.1>
Message-ID:
Are there any other options if neither of these workarounds are available?
I can't ask the developers to make the change you suggested and opening the
frames in seperate browsers doesn't work.
The test script I'm using is:
require 'watir'
require 'test/unit'
include Watir
class TC_Smoke_Test < Test::Unit::TestCase
def setup
#define constants
test_url = '
http://sedm3103.ent.agt.ab.ca:20003/desktopone/dashboard/initialAgent.do'
#launch browser
@ie = IE.new()
@ie.goto(test_url)
end
def teardown
#close browser
@ie.close()
end
def test_show_frames
puts @ie.show_frames()
end
end
The error message reads:
Loaded suite smoke_test
Started
there are 9 frames
frame index: 1 --Access Denied--
frame index: 2 --Access Denied--
frame index: 3 --Access Denied--
frame index: 4 --Access Denied--
frame index: 5 --Access Denied--
frame index: 6 --Access Denied--
frame index: 7 --Access Denied--
frame index: 8 --Access Denied--
frame index: 9 --Access Denied--
0..8
.
Finished in 9.531 seconds.
1 tests, 0 assertions, 0 failures, 0 errors
W, [16-Nov-2005 11:51:00#1360] WARN -- : frame error in waitdocument
OLE error code:80070005 in
Access is denied.
HRESULT error code:0x80020009
Exception occurred.
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1405:in
`method_missing'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1405:in `wait'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1404:in `upto'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1404:in `wait'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1254:in `goto'
smoke_test.rb:15:in `setup'
c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:69:in `run'
c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run'
c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each'
c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run'
c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run'
c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each'
c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run'
c:/ruby/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:44:in `run_suite'
c:/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:65:in
`start_mediator'
c:/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:39:in `start'
c:/ruby/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:27:in `run'
c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:194:in `run'
c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:14:in `run'
c:/ruby/lib/ruby/1.8/test/unit.rb:285
c:/ruby/lib/ruby/1.8/test/unit.rb:283
On 05/10/05, Bret Pettichord wrote:
>
> At 10:29 AM 10/1/2005, Peter wrote:
> >I am using WATIR to test a web application and have hit some problems. I
> >have reproduced the issue with an external website. My questions are:
> >
> >1. Can I safely ignore the frame error in waitdocument (it was been the
> >topic of previous threads) [I get this error on both my internal website
> >that I am testing as well as this external website].
>
> Yes. An error message was removed from waitdocument in Watir 1.4.1. If you
> still see an error message, then it is something else from what we
> discussed.
>
> >2. How do I access frames (show_objects, click link etc) that return
> >--Access Denied .
> >
> >v I am able to see the HTML on the screen (by right button view source)
> >
> >v ie.show_frames shows one of the frames as --Access Denied .
> >
> >v The second frame does not seem to appear in a show_all_objects
> >
> >v Attempting to access the second frame via index results in an error
> >`method_missing': document (WIN32OLERuntimeError)
> >
> >v I have verified that the same commands work for Frame 1 (which does
> >not report access denied)
>
> One workaround is to get the URL for the access-denied frame (which you
> should be able to get). And then open an IE browser that directly hosts
> that URL. This workaround may or may not be acceptable depending on your
> application.
>
> The only other workaround is to have your developers set up the pages
> hosted by separate subdomains to reference a common domain. This approach
> wouldn't apply to the specific example in your script
> (
> http://computer.howstuffworks.com/framed.htm?parent=web-page.htm&url=http://www.aquarium.ucsd.edu
> ),
> but it is applicable to many of the common situations that run into the
> access-denied problem. For more details, see
> http://www.mozilla.org/projects/security/components/same-origin.html
>
> Bret
>
>
> _____________________
> Bret Pettichord
> www.pettichord.com
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051116/ab0be4c0/attachment.html
From Jan.Montano at thomson.com Wed Nov 16 20:54:25 2005
From: Jan.Montano at thomson.com (Jan.Montano at thomson.com)
Date: Thu, 17 Nov 2005 09:54:25 +0800
Subject: [Wtr-general] japanese characters
Message-ID:
I know this is not a watir related question, but hope I could also find answers here.
Lately, My freeride doesn't accept japanese unicode characters anymore. it marks as ????. but i've set may language to japanese, and notepad accepts japanese characters.
Is there something I have to set with freeride? Thanks.
From Jan.Montano at thomson.com Wed Nov 16 21:03:21 2005
From: Jan.Montano at thomson.com (Jan.Montano at thomson.com)
Date: Thu, 17 Nov 2005 10:03:21 +0800
Subject: [Wtr-general] japanese characters
Message-ID:
I've got it to work now. Thanks. Windows gave me a hard time in setting those language settings. When I activate a window, it's english, when i activate another one, its japanese.
-----Original Message-----
From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Montano, Jan (Corp,IB&IM)
Sent: Thursday, November 17, 2005 9:54 AM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] japanese characters
I know this is not a watir related question, but hope I could also find answers here.
Lately, My freeride doesn't accept japanese unicode characters anymore. it marks as ????. but i've set may language to japanese, and notepad accepts japanese characters.
Is there something I have to set with freeride? Thanks.
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
From ASahu at thoughtworks.com Thu Nov 17 00:58:51 2005
From: ASahu at thoughtworks.com (Anand Jagadishprasad Sahu)
Date: Thu, 17 Nov 2005 11:28:51 +0530
Subject: [Wtr-general] Anand Jagadishprasad Sahu is out of the office.
Message-ID:
I will be out of the office starting 11/17/2005 and will not return until
11/21/2005.
I will respond to your message when I return on 21-Nov-2005. In case of any
urgency, please send an email to mnai at thoughtworks.com or
dsachdev at thoughtworks.com.
From Mark_Cain at rl.gov Wed Nov 16 15:49:46 2005
From: Mark_Cain at rl.gov (Cain, Mark)
Date: Wed, 16 Nov 2005 12:49:46 -0800
Subject: [Wtr-general] Best practices posting back to parent
windowfromchild window
Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D46F@EX5V.rl.gov>
You might try $ie.status()
--Mark
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Eugene Kula
Sent: Wednesday, November 16, 2005 10:19 AM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] Best practices posting back to parent
windowfromchild window
Is it as simple as doing an $ie.wait before my assert after reattaching
to
the parentwindow?
>From: "Eugene Kula"
>Reply-To: wtr-general at rubyforge.org
>To: wtr-general at rubyforge.org
>Subject: [Wtr-general] Best practices posting back to parent window
>fromchild window
>Date: Wed, 16 Nov 2005 11:02:10 -0700
>
>What is the best way to assert something on a parent window that is
posted
>from a child window? When I run my assert the script fails because the
>parent window isn't finishedl posting. Is there a way to tell when IE
is
>done posting? Many thanks!
>
>
>_______________________________________________
>Wtr-general mailing list
>Wtr-general at rubyforge.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 amit.garde at gmail.com Thu Nov 17 06:34:44 2005
From: amit.garde at gmail.com (Amit Garde)
Date: Thu, 17 Nov 2005 17:04:44 +0530
Subject: [Wtr-general] traversing through tr's and td's
In-Reply-To: <43783D84.3010502@verk.info>
References: <20051113214521.59D6D2EE@dm21.mta.everyone.net>
<43781EB3.1080900@verk.info>
<7661e6730511132339m3e3e931cpbf758c86a92645fc@mail.gmail.com>
<43783D84.3010502@verk.info>
Message-ID: <7661e6730511170334lcff91a5j29ab3a80a8bafa27@mail.gmail.com>
On 11/14/05, Alexey Verkhovsky wrote:
>
> Amit Garde wrote:
> > Or an XPath expression...
> Now it's time for me to pledge ignorance. Is there something in the
> Watir API that can do XPath queries?
>
There is code checked in (which should be in the next stable release) that
lets you identify elements using an XPath expression as a selector; this
allows constructs like the following to be used:
ie.element(:xpath, xpath-expression).method
Searching on XPath in the list archive should throw up several references
and examples of how this can be used in practice. Feel free to ask if you
hit any problems...
Amit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051117/fade15a1/attachment.html
From ASahu at thoughtworks.com Thu Nov 17 06:59:39 2005
From: ASahu at thoughtworks.com (Anand Jagadishprasad Sahu)
Date: Thu, 17 Nov 2005 17:29:39 +0530
Subject: [Wtr-general] Anand Jagadishprasad Sahu is out of the office.
Message-ID:
I will be out of the office starting 11/17/2005 and will not return until
11/21/2005.
I will respond to your message when I return on 21-Nov-2005. In case of any
urgency, please send an email to mnaig at thoughtworks.com or
dsachdev at thoughtworks.com.
From alex at verk.info Thu Nov 17 09:13:42 2005
From: alex at verk.info (Alexey Verkhovsky)
Date: Thu, 17 Nov 2005 08:13:42 -0600
Subject: [Wtr-general] traversing through tr's and td's
In-Reply-To: <7661e6730511170334lcff91a5j29ab3a80a8bafa27@mail.gmail.com>
References: <20051113214521.59D6D2EE@dm21.mta.everyone.net> <43781EB3.1080900@verk.info> <7661e6730511132339m3e3e931cpbf758c86a92645fc@mail.gmail.com> <43783D84.3010502@verk.info>
<7661e6730511170334lcff91a5j29ab3a80a8bafa27@mail.gmail.com>
Message-ID: <437C9016.20401@verk.info>
Amit Garde wrote:
> There is code checked in (which should be in the next stable release)
> that lets you identify elements using an XPath expression as a
> selector; this allows constructs like the following to be used:
That's MARVELOUS!
From Ben.Torres at rhi.com Thu Nov 17 13:00:23 2005
From: Ben.Torres at rhi.com (Torres, Ben (HQP))
Date: Thu, 17 Nov 2005 10:00:23 -0800
Subject: [Wtr-general] Accessing frames or anchors
Message-ID: <1641BB0AA7287848817A63C3EE9677D509330F6B@hqp-ex-mb05.na.msds.rhi.com>
I was wondering if anyone can help me with the following: I have a new
browser window that pops-up after clicking on a link, and it appears to
have frames within the browser:
In the "main" section, there is a form that I am trying to submit, but
for some reason when I try to submit the form by doing this
I get
an error saying "Unable to locate a frame with name main"
I viewed source of the "main" section and found this tag: . Is this how I access that area?
Thanks in advance,
ben
From Ben.Torres at rhi.com Thu Nov 17 13:36:50 2005
From: Ben.Torres at rhi.com (Torres, Ben (HQP))
Date: Thu, 17 Nov 2005 10:36:50 -0800
Subject: [Wtr-general] Accessing Frames that show --Access Denied-
Message-ID: <1641BB0AA7287848817A63C3EE9677D509330F99@hqp-ex-mb05.na.msds.rhi.com>
--- snip ---
> One workaround is to get the URL for the access-denied frame (which
you
> should be able to get). And then open an IE browser that directly
hosts
> that URL.
--- snip ---
Trying the workaround stated above. I'm able to manually open up the
frame that shows "--Access Denied---" in a new browser window. The only
thing is that the URL is dynamic (URL has ids unique to the links I
clicked from). How do I automate grabbing the URL from this page?
Manually, I just right-click on the frame and view properties and grab
the address.
Thanks,
Ben
From Mark_Cain at rl.gov Thu Nov 17 13:39:23 2005
From: Mark_Cain at rl.gov (Cain, Mark)
Date: Thu, 17 Nov 2005 10:39:23 -0800
Subject: [Wtr-general] showModalDialogs in 1.4
Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D471@EX5V.rl.gov>
I have searched the threads concerning IE windows launched as
showModalDialog, or showModeless. Has there been any progress on
handling windows launched as showModalDialog? I have been able to get
AUTOIT to work somewhat but it is not consistent and frequently does not
find the window until I manually close and re-launch it. Any thoughts?
Thanks,
____________________
Mark L. Cain
LMIT - E*STARS(r) ~ Lead Test Engineer
1981 Snyder, MSIN: G3-62, Richland, WA 99354
Mark_Cain at RL.gov
509.376.5458
"640 Kilobytes of computer memory ought to be enough for anybody." -
Bill Gates, 1981
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051117/07cff1e6/attachment.html
From Ben.Torres at rhi.com Thu Nov 17 13:39:44 2005
From: Ben.Torres at rhi.com (Torres, Ben (HQP))
Date: Thu, 17 Nov 2005 10:39:44 -0800
Subject: [Wtr-general] Accessing Frames that show --Access Denied-
Message-ID: <1641BB0AA7287848817A63C3EE9677D509330F9D@hqp-ex-mb05.na.msds.rhi.com>
--- snip ---
> One workaround is to get the URL for the access-denied frame (which
> you should be able to get). And then open an IE browser that directly
> hosts that URL.
--- snip ---
Trying the workaround stated above. I'm able to manually open up the
frame that shows "--Access Denied---" in a new browser window. The only
thing is that the URL is dynamic. How do I automate grabbing the URL
from this page? Manually, I just right-click on the frame and view
properties and grab the address.
Is there a way I can have Watir open up a new browser window when I
click on the button that opens the framed page?
Thanks,
Ben
From christopher.mcmahon at gmail.com Thu Nov 17 14:01:35 2005
From: christopher.mcmahon at gmail.com (Chris McMahon)
Date: Thu, 17 Nov 2005 13:01:35 -0600
Subject: [Wtr-general] Accessing frames or anchors
In-Reply-To: <1641BB0AA7287848817A63C3EE9677D509330F6B@hqp-ex-mb05.na.msds.rhi.com>
References: <1641BB0AA7287848817A63C3EE9677D509330F6B@hqp-ex-mb05.na.msds.rhi.com>
Message-ID: <72799cd70511171101k662228adrccd80eb184317831@mail.gmail.com>
> I viewed source of the "main" section and found this tag: name="mainContent">. Is this how I access that area?
What happens when you try? =)
In the case of nested frames, I remember finding that using irb and
ie.show_frames was generally more helpful than using "view source".
With irb, you always know which frame is inside which other frame.
-Chris
From Ben.Torres at rhi.com Thu Nov 17 14:39:58 2005
From: Ben.Torres at rhi.com (Torres, Ben (HQP))
Date: Thu, 17 Nov 2005 11:39:58 -0800
Subject: [Wtr-general] Open new browser after clicking button
Message-ID: <1641BB0AA7287848817A63C3EE9677D509331008@hqp-ex-mb05.na.msds.rhi.com>
Right now, when I click a button, the page shows on the same browser
page. Can Watir have the page open on a new browser page instead?
Thanks in advance,
ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051117/5e3cc016/attachment.html
From mooola00 at hotmail.com Thu Nov 17 15:17:18 2005
From: mooola00 at hotmail.com (Eugene Kula)
Date: Thu, 17 Nov 2005 13:17:18 -0700
Subject: [Wtr-general] Javascript tree problems
Message-ID:
I'm having difficulties getting to nodes in my javascript tree. One of the
problems is that I can't use the span text to select a node because there
may be nodes within the tree with the same text (most likely nested). And
the image icons (e.g. folder.gif) aren't unique either. So what I'd like to
do is be able to drilldown into the tree and click a span at a given level
(e.g. expand billing node to display expenses and time entry node and click
on time entry). L.gif is the plus sign. Following is what the (shortened)
HTML looks like:
Home
Documents
Billing
Expenses
Time Entry
Groups
From zeljko.filipin at gmail.com Thu Nov 17 15:23:02 2005
From: zeljko.filipin at gmail.com (Zeljko Filipin)
Date: Thu, 17 Nov 2005 21:23:02 +0100
Subject: [Wtr-general] Open new browser after clicking button
In-Reply-To: <1641BB0AA7287848817A63C3EE9677D509331008@hqp-ex-mb05.na.msds.rhi.com>
Message-ID: <000f01c5ebb4$b6d63760$c6e7fea9@officezg.wa>
It looks to me that your application does what it is supposed to do. Open
new page in the same browser. Watir has nothing with the fact what happens
after he clicks button.
Could you give me more detail (html...)?
Zeljko
_____
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Torres, Ben (HQP)
Sent: Thursday, November 17, 2005 8:40 PM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] Open new browser after clicking button
Right now, when I click a button, the page shows on the same browser page.
Can Watir have the page open on a new browser page instead?
Thanks in advance,
ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051117/b507ca7a/attachment.html
From Mark_Cain at rl.gov Thu Nov 17 15:37:10 2005
From: Mark_Cain at rl.gov (Cain, Mark)
Date: Thu, 17 Nov 2005 12:37:10 -0800
Subject: [Wtr-general] Open new browser after clicking button
Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D472@EX5V.rl.gov>
One of the things you can do is an IE setting. In IE:
1. Select the menu item Tools >> Internet Options.
2. Select the Advanced tab.
3. Under the heading 'Browser', uncheck the option 'Reuse windows for
launching shortcuts'
4. Click Apply
The other option is have your developers force a new window using
JavaScript something like:
Hope this helps,
--Mark
________________________________
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Torres, Ben
(HQP)
Sent: Thursday, November 17, 2005 11:40 AM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] Open new browser after clicking button
Right now, when I click a button, the page shows on the same browser
page. Can Watir have the page open on a new browser page instead?
Thanks in advance,
ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051117/221a21aa/attachment.html
From bret at pettichord.com Thu Nov 17 22:46:23 2005
From: bret at pettichord.com (Bret Pettichord)
Date: Thu, 17 Nov 2005 21:46:23 -0600
Subject: [Wtr-general] xpath, was: traversing through tr's and td's
In-Reply-To: <7661e6730511170334lcff91a5j29ab3a80a8bafa27@mail.gmail.com
>
References: <43783D84.3010502@verk.info>
<20051113214521.59D6D2EE@dm21.mta.everyone.net>
<43781EB3.1080900@verk.info>
<7661e6730511132339m3e3e931cpbf758c86a92645fc@mail.gmail.com>
<43783D84.3010502@verk.info>
Message-ID: <5.1.0.14.2.20051117214505.03cc4570@pop.gmail.com>
At 05:34 AM 11/17/2005, Amit Garde wrote:
>Searching on XPath in the list archive should throw up several references
>and examples of how this can be used in practice. Feel free to ask if you
>hit any problems...
Also see doc/Support for XPATH in Watir.doc
_____________________
Bret Pettichord
www.pettichord.com
From bret at pettichord.com Thu Nov 17 22:53:29 2005
From: bret at pettichord.com (Bret Pettichord)
Date: Thu, 17 Nov 2005 21:53:29 -0600
Subject: [Wtr-general] Span troubles
In-Reply-To: <2ca7c30bd8.30bd82ca7c@shaw.ca>
Message-ID: <5.1.0.14.2.20051117215253.03ca0030@pop.gmail.com>
At 09:58 AM 11/16/2005, Paul Rogers wrote:
> if /none/i.match( ie.span(:id , 'xxx').getOleObject.style.cssText )
> puts "its hidden"
>else
> puts "displayed!"
>end
It's ole_object, not getOleObject.
_____________________
Bret Pettichord
www.pettichord.com
From bret at pettichord.com Thu Nov 17 23:33:33 2005
From: bret at pettichord.com (Bret Pettichord)
Date: Thu, 17 Nov 2005 22:33:33 -0600
Subject: [Wtr-general] Open new browser after clicking button
In-Reply-To: <1641BB0AA7287848817A63C3EE9677D509331008@hqp-ex-mb05.na.ms
ds.rhi.com>
Message-ID: <5.1.0.14.2.20051117222829.03dd70a0@pop.gmail.com>
At 01:39 PM 11/17/2005, Torres, Ben (HQP) wrote:
>Right now, when I click a button, the page shows on the same browser
>page. Can Watir have the page open on a new browser page instead?
url = ie.image(:name, 'foo').src
Watir::IE.start(url)
Bret
_____________________
Bret Pettichord
www.pettichord.com
From bret at pettichord.com Thu Nov 17 23:34:41 2005
From: bret at pettichord.com (Bret Pettichord)
Date: Thu, 17 Nov 2005 22:34:41 -0600
Subject: [Wtr-general] Best practices posting back to parent window
fromchild window
In-Reply-To:
References:
Message-ID: <5.1.0.14.2.20051117223430.03d2ddf0@pop.gmail.com>
At 12:18 PM 11/16/2005, Eugene Kula wrote:
>Is it as simple as doing an $ie.wait before my assert after reattaching to
>the parentwindow?
could be. try it and let us know.
_____________________
Bret Pettichord
www.pettichord.com
From carl.l.shaulis at convergys.com Thu Nov 17 09:25:39 2005
From: carl.l.shaulis at convergys.com (carl.l.shaulis at convergys.com)
Date: Thu, 17 Nov 2005 08:25:39 -0600
Subject: [Wtr-general] Importing a .cvs file
Message-ID:
Good morning:
Our application permits a user to import a site file. I am able to attach
to the pop up utility, but I am not able to find the text_area. When we do
a ie.show_all_objects we are returned this
file name=file id= value=
alt= src=
The ruby code looks like this:
ie2 = IE.attach(:title, "Upload Site Data")
assert(ie2.contains_text('Import the site data file by
navigating to it using the Browse dialog. When finished, click Import.'))
ie2.show_all_objects
sleep 5
ie2.text_field(:name, "file").set(
"c:\Functional_Test_site_data.csv")
Here is a screen shot of the pop up. I can sent the html if needed.
(Embedded image moved to file: pic29641.jpg)
Here is the error message:
1) Error:
test1(SCP_Account_Mgmt_2):
NoMethodError: undefined method `text_file' for #
C:/SBC10/sbc/test/Functional/scp_Account_Mgmn_2.rb:119:in `test1'
How do I get Ruby to import this file?
Thanks in advance for your assistance!
Carl
--
"NOTICE: The information contained in this electronic mail transmission is
intended by Convergys Corporation for the use of the named individual or
entity to which it is directed and may contain information that is
privileged or otherwise confidential. If you have received this electronic
mail transmission in error, please delete it from your system without
copying or forwarding it, and notify the sender of the error by reply email
or by telephone (collect), so that the sender's address records can be
corrected."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pic29641.jpg
Type: image/jpeg
Size: 30806 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/wtr-general/attachments/20051117/b40c08c4/attachment.jpg
From manishs at reconnex.net Fri Nov 18 00:30:19 2005
From: manishs at reconnex.net (Manish Sapariya)
Date: Fri, 18 Nov 2005 11:00:19 +0530
Subject: [Wtr-general] Can watir be used to drive gmail....
In-Reply-To:
References: <437AFC7F.1070402@gs-lab.com> <003901c5ea9c$b92da020$c6e7fea9@officezg.wa>
Message-ID: <437D66EB.20109@reconnex.net>
Could you please more info on this.
How does exactly mouse over event will be generated.
I dont see any of the links seen in "view source file".
When I do show_all_objects it hardly gives me any object info.
What are other javascript event?
Thanks for all help.
Manish
On 11/16/2005 09:36 PM, Jeff Wood wrote:
> It works, you just have to learn how to get around ... alot of ajax
> stuff gets initialized when a mouse over or other javascript event
> happens.
>
> j.
>
> On 11/16/05, *Zeljko Filipin* > wrote:
>
> http://googleblog.blogspot.com/2005/10/guess-what-just-turned-34.html
>
> More about gmail.
>
> Zeljko
>
> -----Original Message-----
> From: wtr-general-bounces at rubyforge.org
>
> [mailto:wtr-general-bounces at rubyforge.org
> ] On Behalf Of smanish
> Sent: Wednesday, November 16, 2005 10:32 AM
> To: wtr-general at rubyforge.org
> Subject: Re: [Wtr-general] Can watir be used to drive gmail....
>
> Hey thanks for the solution.
> It works. But why it does not work with default gmail interface?
>
> Regards,
> Manish
>
>
> On 11/16/2005 02:34 PM, Zeljko Filipin wrote:
>
> >I just tried it too, and it really does not work.
> >Solution: log in, go to http://mail.google.com/mail/h/ and you
> will be
> >switched to basic HTML and watir will work.
> >
> >Zeljko
> >
> >-----Original Message-----
> >From: wtr-general-bounces at rubyforge.org
>
> >[mailto:wtr-general-bounces at rubyforge.org
> ] On Behalf Of smanish
> >Sent: Wednesday, November 16, 2005 7:54 AM
> >To: wtr-general at rubyforge.org
> >Subject: [Wtr-general] Can watir be used to drive gmail....
> >
> >I tried and after logging in...
> >I was simply lost....
> >
> >Any clues??
> >Has any one used watir successfully to drive gmail?
> >
> >Thanks and Regards,
> >Manish
> >
> >
> >
> >_______________________________________________
> >Wtr-general mailing list
> >Wtr-general at rubyforge.org
> >http://rubyforge.org/mailman/listinfo/wtr-general
> >
> >_______________________________________________
> >Wtr-general mailing list
> >Wtr-general at rubyforge.org
> >http://rubyforge.org/mailman/listinfo/wtr-general
>
> >
> >
> >
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
>
>
> --
> "Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
>
> Jeff Wood
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Wtr-general mailing list
>Wtr-general at rubyforge.org
>http://rubyforge.org/mailman/listinfo/wtr-general
>
>
From bret at pettichord.com Fri Nov 18 01:25:24 2005
From: bret at pettichord.com (Bret Pettichord)
Date: Fri, 18 Nov 2005 00:25:24 -0600
Subject: [Wtr-general] showModalDialogs in 1.4
In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D471@EX5V.rl.gov>
Message-ID: <5.1.0.14.2.20051118002410.024aa9b8@pop.gmail.com>
At 12:39 PM 11/17/2005, Cain, Mark wrote:
>I have searched the threads concerning IE windows launched as
>showModalDialog, or showModeless. Has there been any progress on handling
>windows launched as showModalDialog? I have been able to get AUTOIT to
>work somewhat but it is not consistent and frequently does not find the
>window until I manually close and re-launch it. Any thoughts?
I've got working support for showModalDialog that actually gives you full
access to the DOM.
I'm hoping to find time over the next week to commit this.
Bret
_____________________
Bret Pettichord
www.pettichord.com
From jeff.darklight at gmail.com Fri Nov 18 01:44:25 2005
From: jeff.darklight at gmail.com (Jeff Wood)
Date: Thu, 17 Nov 2005 22:44:25 -0800
Subject: [Wtr-general] Can watir be used to drive gmail....
In-Reply-To: <437D66EB.20109@reconnex.net>
References: <437AFC7F.1070402@gs-lab.com>
<003901c5ea9c$b92da020$c6e7fea9@officezg.wa>
<437D66EB.20109@reconnex.net>
Message-ID:
Manish,
Really, this is a situation where the specifics of the implementation used
by the app you are trying to test is the more important thing to know.
Different applications that use ajax style dynamic messaging with the server
side do it uniquely.
You really need to study up on your application. I don't want to start
giving you information and lead you in a direction that isn't necessarily
in-line with what you actually need to know.
I hope you understand.
j.
On 11/17/05, Manish Sapariya wrote:
>
> Could you please more info on this.
> How does exactly mouse over event will be generated.
> I dont see any of the links seen in "view source file".
> When I do show_all_objects it hardly gives me any object info.
> What are other javascript event?
>
> Thanks for all help.
> Manish
>
>
> On 11/16/2005 09:36 PM, Jeff Wood wrote:
>
> > It works, you just have to learn how to get around ... alot of ajax
> > stuff gets initialized when a mouse over or other javascript event
> > happens.
> >
> > j.
> >
> > On 11/16/05, *Zeljko Filipin* > > wrote:
> >
> > http://googleblog.blogspot.com/2005/10/guess-what-just-turned-34.html
> >
> > More about gmail.
> >
> > Zeljko
> >
> > -----Original Message-----
> > From: wtr-general-bounces at rubyforge.org
> >
> > [mailto:wtr-general-bounces at rubyforge.org
> > ] On Behalf Of smanish
> > Sent: Wednesday, November 16, 2005 10:32 AM
> > To: wtr-general at rubyforge.org
> > Subject: Re: [Wtr-general] Can watir be used to drive gmail....
> >
> > Hey thanks for the solution.
> > It works. But why it does not work with default gmail interface?
> >
> > Regards,
> > Manish
> >
> >
> > On 11/16/2005 02:34 PM, Zeljko Filipin wrote:
> >
> > >I just tried it too, and it really does not work.
> > >Solution: log in, go to http://mail.google.com/mail/h/ and you
> > will be
> > >switched to basic HTML and watir will work.
> > >
> > >Zeljko
> > >
> > >-----Original Message-----
> > >From: wtr-general-bounces at rubyforge.org
> >
> > >[mailto:wtr-general-bounces at rubyforge.org
> > ] On Behalf Of smanish
> > >Sent: Wednesday, November 16, 2005 7:54 AM
> > >To: wtr-general at rubyforge.org
> > >Subject: [Wtr-general] Can watir be used to drive gmail....
> > >
> > >I tried and after logging in...
> > >I was simply lost....
> > >
> > >Any clues??
> > >Has any one used watir successfully to drive gmail?
> > >
> > >Thanks and Regards,
> > >Manish
> > >
> > >
> > >
> > >_______________________________________________
> > >Wtr-general mailing list
> > >Wtr-general at rubyforge.org
> > >http://rubyforge.org/mailman/listinfo/wtr-general
> > >
> > >_______________________________________________
> > >Wtr-general mailing list
> > >Wtr-general at rubyforge.org
> > >http://rubyforge.org/mailman/listinfo/wtr-general
> >
> > >
> > >
> > >
> >
> > _______________________________________________
> > Wtr-general mailing list
> > Wtr-general at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/wtr-general
> >
> > _______________________________________________
> > Wtr-general mailing list
> > Wtr-general at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/wtr-general
> >
> >
> >
> >
> > --
> > "Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
> >
> > Jeff Wood
> >
> >------------------------------------------------------------------------
> >
> >_______________________________________________
> >Wtr-general mailing list
> >Wtr-general at rubyforge.org
> >http://rubyforge.org/mailman/listinfo/wtr-general
> >
> >
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
--
"Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
Jeff Wood
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051117/1476493e/attachment.html
From jeff.darklight at gmail.com Fri Nov 18 01:54:19 2005
From: jeff.darklight at gmail.com (Jeff Wood)
Date: Thu, 17 Nov 2005 22:54:19 -0800
Subject: [Wtr-general] Importing a .cvs file
In-Reply-To:
References:
Message-ID:
Take a look at your objects, uploads aren't considered text fields. try
using a file_field
ie.file_field( :name, "file" ).set "c:\\Functional_Test_site_data.csv"
On 11/17/05, carl.l.shaulis at convergys.com
wrote:
>
>
>
>
>
> Good morning:
>
> Our application permits a user to import a site file. I am able to attach
> to the pop up utility, but I am not able to find the text_area. When we do
> a ie.show_all_objects we are returned this
>
> file name=file id= value=
> alt= src=
>
> The ruby code looks like this:
>
> ie2 = IE.attach(:title, "Upload Site Data")
>
> assert(ie2.contains_text('Import the site data file by
> navigating to it using the Browse dialog. When finished, click Import.'))
>
> ie2.show_all_objects
>
> sleep 5
> ie2.text_field(:name, "file").set(
> "c:\Functional_Test_site_data.csv")
>
> Here is a screen shot of the pop up. I can sent the html if needed.
>
> (Embedded image moved to file: pic29641.jpg)
>
>
> Here is the error message:
>
> 1) Error:
> test1(SCP_Account_Mgmt_2):
> NoMethodError: undefined method `text_file' for #
> C:/SBC10/sbc/test/Functional/scp_Account_Mgmn_2.rb:119:in `test1'
>
> How do I get Ruby to import this file?
>
> Thanks in advance for your assistance!
>
> Carl
>
> --
> "NOTICE: The information contained in this electronic mail transmission is
> intended by Convergys Corporation for the use of the named individual or
> entity to which it is directed and may contain information that is
> privileged or otherwise confidential. If you have received this electronic
> mail transmission in error, please delete it from your system without
> copying or forwarding it, and notify the sender of the error by reply
> email
> or by telephone (collect), so that the sender's address records can be
> corrected."
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
>
>
--
"Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
Jeff Wood
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051117/49704804/attachment.html
From carl.l.shaulis at convergys.com Fri Nov 18 07:23:25 2005
From: carl.l.shaulis at convergys.com (carl.l.shaulis at convergys.com)
Date: Fri, 18 Nov 2005 06:23:25 -0600
Subject: [Wtr-general] Importing a .cvs file
In-Reply-To: