From bret at pettichord.com Tue Dec 7 01:35:28 2004
From: bret at pettichord.com (Bret Pettichord)
Date: Tue, 07 Dec 2004 00:35:28 -0600
Subject: [Wtr-general] Popup box
In-Reply-To: <20041120002640.OHLU11826.priv-edtnes28.telusplanet.net@tin tin>
References: <20041120002237.GA2793@swieton.net>
Message-ID: <5.1.0.14.2.20041207003450.031e45d8@127.0.0.1>
Are we keeping track of requests like this? Maybe on the Wiki?
At 06:27 PM 11/19/2004, Jonathan Kohl wrote:
>Paul Rogers wrote a library for handling Win32 windows last year to deal
>with JavaScript popups. We would include this file with the IEController in
>our test script, and create a new thread that would wait for the JS popup
>and then deal with it when it appeared. Every time we had a JS popup that
>would occur in a test, we would create a thread and have the Win32 library
>handle it. I'm sure he would be looking at something similar to plug into
>WATIR, but I'll let him speak to that.
>
>-Jonathan
>
> > -----Original Message-----
> > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-
> > bounces at rubyforge.org] On Behalf Of Mike Swieton
> > Sent: November 19, 2004 5:23 PM
> > To: wtr-general at rubyforge.org
> > Subject: Re: [Wtr-general] Popup box
> >
> > I have the same problem. If someone even had any idea where to start on
> > that,
> > I'd probably go and do it.
> >
> > Thoughts? Or, is someone working on this now?
> >
> > On Fri, Nov 19, 2004 at 02:05:04PM -0800, jkohl at telusplanet.net wrote:
> > > That's a JavaScript popup right? WATIR doesn't support them yet, but I
> > hope it
> > > will soon. We just have to ask for it and hopefully Paul and Bret will
> > get it in
> > > soon. JS popups are tricky iirc, because they aren't technically part of
> > the IE
> > > Browser - I think they have Win32 window handles.
> > >
> > > -Jonathan
> > >
> > > > Hi again...
> > > > I have one of these:
> > > >
> > > > > > > tabindex="-1" onClick="return confirm('Continue with logout?');"
> > > >
> > > > Is there any way for WATIR to manipulate the resulting little
> > > > "confirm" box? I can't even get to the source of it to see what the
> > > > "name" of the button is...
> > > > -Chris
> > > >
> > > > _______________________________________________
> > > > 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
> > >
> >
> > Mike Swieton
> > __
> > If I need a screwdriver and I select a hammer, I probably won't get
> > anywhere
> > and will eventually realize my error. The problem with software is that we
> > are
> > able to turn a hammer into a screwdriver.
> > - Laurent Bossavit
> > _______________________________________________
> > Wtr-general mailing list
> > Wtr-general at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/wtr-general
>
>_______________________________________________
>Wtr-general mailing list
>Wtr-general at rubyforge.org
>http://rubyforge.org/mailman/listinfo/wtr-general
_____________________
Bret Pettichord
www.pettichord.com
From bret at pettichord.com Tue Dec 7 01:32:37 2004
From: bret at pettichord.com (Bret Pettichord)
Date: Tue, 07 Dec 2004 00:32:37 -0600
Subject: [Wtr-general] Writing pass/fail to file.
In-Reply-To: <1100902047.419e6e9fb840b@webmail.telus.net>
References:
Message-ID: <5.1.0.14.2.20041207002714.031c7d90@127.0.0.1>
See Below...
At 04:07 PM 11/19/2004, jkohl at telusplanet.net wrote:
>I haven't figured this out either. Perhaps Chris Morris, Paul or Bret will
>have
>an answer. I like to log results to an HTML file which I can then turn over to
>business testers who want procedural test scripts. Kills two birds with one
>stone that way. The last project I was on I did this without using test::unit;
>I'd like to know how to do it with test::unit as well.
>
>-Jonathan
>
> >
> > Hi...
> > I've been able to write all of my test data to a file, but can't
> > figure out how to capture the results of the "assert" statement in some
> > intelligible way.
> > I've tried this:
> >
> > $f.puts(assert($ie.pageContainsText("Step 1") ) )
> >
> > and this:
> >
> > result = assert($ie.pageContainsText("Step 1") )
> > if result
> > $f.puts('PASS')
> > else
> > $f.puts('FAIL')
> > end
This is probably what you want:
result = $ie.pageContainsText("Step 1")
if result
$f.puts('PASS')
else
$f.puts('FAIL')
end
assert(result)
Or perhaps put this in a function:
def assert_log (boolean)
if boolean
$f.puts('PASS')
else
$f.puts('FAIL')
end
assert(boolean)
end
and then do assert_log($ie.pageContainsText("Step 1")
> > But all I get in the $f file is "nil".
> > Sorry if this is a silly newbie question, but-- it is, and I am...
> > Thanks
> > -Chris
> >
> > _______________________________________________
> > Wtr-general mailing list
> > Wtr-general at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/wtr-general
> >
>
>
>
>
>_______________________________________________
>Wtr-general mailing list
>Wtr-general at rubyforge.org
>http://rubyforge.org/mailman/listinfo/wtr-general
_____________________
Bret Pettichord
www.pettichord.com
From bret at pettichord.com Tue Dec 7 01:36:45 2004
From: bret at pettichord.com (Bret Pettichord)
Date: Tue, 07 Dec 2004 00:36:45 -0600
Subject: [Wtr-general] ...and new instance of IE?
In-Reply-To: <1100906312.419e7f48d095a@webmail.telus.net>
References:
Message-ID: <5.1.0.14.2.20041207003546.031d7c00@127.0.0.1>
I don't know how to do this. Another item for our wish list.
In fact, i don't know how to bind WATIR to any IE window that it didn't
create.
Bret
At 05:18 PM 11/19/2004, jkohl at telusplanet.net wrote:
>That's another feature I want that WATIR doesn't currently support afaik. :-)
>
>It would be great to set focus to another window instance.
>$ie.setFocus(:title "window_title") or something along those lines would
>be very
>useful.
>
>-Jonathan
>
> >
> > OK, going for the trifecta...
> > I also have a button that starts up a new instance of IE. The
> > new instance has focus, but WATIR seems to only see the first instance
> > of IE.
> > Can I get WATIR to switch back and forth and manipulate two
> > different instances of IE?
> > -Chris
> >
> >
> > > -----Original Message-----
> > > From: McMahon, Chris
> > > Sent: Friday, November 19, 2004 3:02 PM
> > > To: 'wtr-general at rubyforge.org'
> > > Subject: Popup box
> > >
> > > Hi again...
> > > I have one of these:
> > >
> > > > > id="cmdLogout" tabindex="-1" onClick="return
> > > confirm('Continue with logout?');"
> > >
> > > Is there any way for WATIR to manipulate the resulting
> > > little "confirm" box? I can't even get to the source of it
> > > to see what the "name" of the button is...
> > > -Chris
> >
> > _______________________________________________
> > Wtr-general mailing list
> > Wtr-general at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/wtr-general
> >
>
>
>
>
>_______________________________________________
>Wtr-general mailing list
>Wtr-general at rubyforge.org
>http://rubyforge.org/mailman/listinfo/wtr-general
_____________________
Bret Pettichord
www.pettichord.com
From bret at pettichord.com Tue Dec 7 01:39:01 2004
From: bret at pettichord.com (Bret Pettichord)
Date: Tue, 07 Dec 2004 00:39:01 -0600
Subject: [Wtr-general] Popups, new windows, asserts with files, xp-sp2....
In-Reply-To: <006201c4cffd$9f1bc7d0$6400a8c0@NewDell>
Message-ID: <5.1.0.14.2.20041207003840.031d9c38@127.0.0.1>
Actually i think this is only a problem for the unit tests.
At 01:09 PM 11/21/2004, Paul Rogers wrote:
>XP Service Pack 2 - Is anyone using this? Bret and I spent a while
>making watir work with this. The problem is that IE now has a yellow
>thing at the top called the Information bar, which prevents access to
>lots of things. Watir unit tests is one of the things it prevents. This
>link show how to get rid of the problem - Jonathan - is this something
>we can get in the docs?
>
>http://www.winxptutor.com/lmzunlock.htm
_____________________
Bret Pettichord
www.pettichord.com
From bret at pettichord.com Tue Dec 7 01:39:01 2004
From: bret at pettichord.com (Bret Pettichord)
Date: Tue, 07 Dec 2004 00:39:01 -0600
Subject: [Wtr-general] Popups, new windows, asserts with files, xp-sp2....
In-Reply-To: <006201c4cffd$9f1bc7d0$6400a8c0@NewDell>
Message-ID: <5.1.0.14.2.20041207003840.031d9c38@127.0.0.1>
Actually i think this is only a problem for the unit tests.
At 01:09 PM 11/21/2004, Paul Rogers wrote:
>XP Service Pack 2 - Is anyone using this? Bret and I spent a while
>making watir work with this. The problem is that IE now has a yellow
>thing at the top called the Information bar, which prevents access to
>lots of things. Watir unit tests is one of the things it prevents. This
>link show how to get rid of the problem - Jonathan - is this something
>we can get in the docs?
>
>http://www.winxptutor.com/lmzunlock.htm
_____________________
Bret Pettichord
www.pettichord.com
From chris.mcmahon at verint.com Tue Dec 7 10:36:42 2004
From: chris.mcmahon at verint.com (McMahon, Chris)
Date: Tue, 7 Dec 2004 08:36:42 -0700
Subject: [Wtr-general] RE: Wtr-general Digest, Vol 13, Issue 1
Message-ID:
> I don't know how to do this. Another item for our wish list.
>
> In fact, i don't know how to bind WATIR to any IE window that
> it didn't create.
>
> Bret
I know it's possible, I just don't know the underlying Windows
magic. And it might be different for IE vs. normal GUI.
Perl has a module Win32::GUITest with a function FindWindowLike,
that works like this (generic MSPaint window example):
my @windows = FindWindowLike(0, "^untitled - Paint" );
-Chris
From paul.rogers at shaw.ca Tue Dec 7 12:16:39 2004
From: paul.rogers at shaw.ca (Paul Rogers)
Date: Tue, 07 Dec 2004 10:16:39 -0700
Subject: [Wtr-general] RE: Wtr-general Digest, Vol 13, Issue 1
Message-ID: <264ece262eb5.262eb5264ece@shaw.ca>
its fairly easy to do that, the code that cliscks javscript popups does exactly that. The problem is that I dont get an OLE reference to the new window.
Ive been looking at a few possibilities,
1. capturing new windows that are being opened, stopping them opening and then opening under a WATIR context.
2. Using windows mesages to get an ole reference to new windows
Ive tried a few things, but Im not happy with anything yet.
Paul
----- Original Message -----
From: "McMahon, Chris"
Date: Tuesday, December 7, 2004 8:36 am
Subject: [Wtr-general] RE: Wtr-general Digest, Vol 13, Issue 1
> > I don't know how to do this. Another item for our wish list.
> >
> > In fact, i don't know how to bind WATIR to any IE window that
> > it didn't create.
> >
> > Bret
>
>
> I know it's possible, I just don't know the underlying Windows
> magic. And it might be different for IE vs. normal GUI.
> Perl has a module Win32::GUITest with a function FindWindowLike,
> that works like this (generic MSPaint window example):
>
> my @windows = FindWindowLike(0, "^untitled - Paint" );
>
> -Chris
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
From bret at pettichord.com Wed Dec 8 12:05:51 2004
From: bret at pettichord.com (Bret Pettichord)
Date: Wed, 08 Dec 2004 11:05:51 -0600
Subject: [Wtr-general] getting IE windows
In-Reply-To: <264ece262eb5.262eb5264ece@shaw.ca>
Message-ID: <5.1.0.14.2.20041208110438.032b84c0@127.0.0.1>
I suggest posting your experiments to the ruby-talk mailing list. You may
get help there.
Bret
At 11:16 AM 12/7/2004, Paul Rogers wrote:
>its fairly easy to do that, the code that cliscks javscript popups does
>exactly that. The problem is that I dont get an OLE reference to the new
>window.
>
>Ive been looking at a few possibilities,
>1. capturing new windows that are being opened, stopping them opening and
>then opening under a WATIR context.
>
>2. Using windows mesages to get an ole reference to new windows
>
>Ive tried a few things, but Im not happy with anything yet.
>
>Paul
>
>
>----- Original Message -----
>From: "McMahon, Chris"
>Date: Tuesday, December 7, 2004 8:36 am
>Subject: [Wtr-general] RE: Wtr-general Digest, Vol 13, Issue 1
>
> > > I don't know how to do this. Another item for our wish list.
> > >
> > > In fact, i don't know how to bind WATIR to any IE window that
> > > it didn't create.
> > >
> > > Bret
> >
> >
> > I know it's possible, I just don't know the underlying Windows
> > magic. And it might be different for IE vs. normal GUI.
> > Perl has a module Win32::GUITest with a function FindWindowLike,
> > that works like this (generic MSPaint window example):
> >
> > my @windows = FindWindowLike(0, "^untitled - Paint" );
> >
> > -Chris
> >
> > _______________________________________________
> > Wtr-general mailing list
> > Wtr-general at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/wtr-general
> >
>
>_______________________________________________
>Wtr-general mailing list
>Wtr-general at rubyforge.org
>http://rubyforge.org/mailman/listinfo/wtr-general
_____________________
Bret Pettichord
www.pettichord.com
From faught at tejasconsulting.com Mon Dec 13 18:54:28 2004
From: faught at tejasconsulting.com (Danny R. Faught)
Date: Mon, 13 Dec 2004 17:54:28 -0600
Subject: [Wtr-general] another alternative tool
Message-ID: <41BE2BB4.2050105@tejasconsulting.com>
Howdy. I'm starting to play with WTR for a review I'm writing for Open
Testware Reviews.
On the http://www.clabs.org/wtr/index.cgi?page=/AlternativeTools page, I
suggest adding Pamie (http://pamie.sourceforge.net/), a Python port of
Samie.
--
Danny R. Faught
Tejas Software Consulting
http://tejasconsulting.com/
From faught at tejasconsulting.com Tue Dec 14 18:46:30 2004
From: faught at tejasconsulting.com (Danny R. Faught)
Date: Tue, 14 Dec 2004 17:46:30 -0600
Subject: [Wtr-general] stale link on Scripting101Class page
In-Reply-To: <41BE2BB4.2050105@tejasconsulting.com>
References: <41BE2BB4.2050105@tejasconsulting.com>
Message-ID: <41BF7B56.20708@tejasconsulting.com>
Jonathan encouraged me to send further feedback to the list. So here's
one...
The page at http://www.clabs.org/wtr/index.cgi?page=/Scripting101Class
links to http://www.testing.com/scripting-for-testers.html, which in
turn links to http://www.testing.com/Scripting-for-testers-installs.zip,
which doesn't exist. Brian Marick sez:
"There shouldn't have been a link to that page. It was the instruction
page for one session of the course, and went stale after the course was
taught."
Perhaps the Scripting101Class page should link to the downloads page on
RubyForge instead, where I did find the source.
--
Danny R. Faught
Tejas Software Consulting
http://tejasconsulting.com/
From faught at tejasconsulting.com Tue Dec 14 21:25:01 2004
From: faught at tejasconsulting.com (Danny R. Faught)
Date: Tue, 14 Dec 2004 20:25:01 -0600
Subject: [Wtr-general] how to install Ruby 1.8.1-11?
Message-ID: <41BFA07D.7070403@tejasconsulting.com>
I'm having problems running the unit tests for a recent snapshot of the
Watir sources. Before I investigate the failures, I want to make sure
I'm running a version of Ruby that is supported by Watir. What Ruby
versions are supported/known to work with Watir?
I have these two incarnations of Ruby installed on my XP machine
(according to ruby --version):
ruby 1.8.1 (2003-12-25) [i386-cygwin]
ruby 1.8.1 (2003-12-25) [i386-mswin32]
I presume this isn't the same as 1.8.1-11. Do I need to build Ruby from
source to get 1.8.1-11? Or maybe I do have this version and Ruby isn't
telling me enough detail about the version?
--
Danny R. Faught
Tejas Software Consulting
http://tejasconsulting.com/
From jkohl at telusplanet.net Tue Dec 14 22:02:17 2004
From: jkohl at telusplanet.net (Jonathan Kohl)
Date: Tue, 14 Dec 2004 20:02:17 -0700
Subject: [Wtr-general] how to install Ruby 1.8.1-11?
In-Reply-To: <41BFA07D.7070403@tejasconsulting.com>
Message-ID: <20041215030051.GASH16849.priv-edtnes28.telusplanet.net@tintin>
Does your XP machine have Service Pack 2?
-Jonathan
> -----Original Message-----
> From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-
> bounces at rubyforge.org] On Behalf Of Danny R. Faught
> Sent: December 14, 2004 7:25 PM
> To: wtr-general at rubyforge.org
> Subject: [Wtr-general] how to install Ruby 1.8.1-11?
>
> I'm having problems running the unit tests for a recent snapshot of the
> Watir sources. Before I investigate the failures, I want to make sure
> I'm running a version of Ruby that is supported by Watir. What Ruby
> versions are supported/known to work with Watir?
>
> I have these two incarnations of Ruby installed on my XP machine
> (according to ruby --version):
>
> ruby 1.8.1 (2003-12-25) [i386-cygwin]
> ruby 1.8.1 (2003-12-25) [i386-mswin32]
>
> I presume this isn't the same as 1.8.1-11. Do I need to build Ruby from
> source to get 1.8.1-11? Or maybe I do have this version and Ruby isn't
> telling me enough detail about the version?
> --
> Danny R. Faught
> Tejas Software Consulting
> http://tejasconsulting.com/
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
From jkohl at telusplanet.net Tue Dec 14 22:28:00 2004
From: jkohl at telusplanet.net (Jonathan Kohl)
Date: Tue, 14 Dec 2004 20:28:00 -0700
Subject: [Wtr-general] how to install Ruby 1.8.1-11?
In-Reply-To: <41BFA07D.7070403@tejasconsulting.com>
Message-ID: <20041215032634.LQST19111.priv-edtnes46.telusplanet.net@tintin>
> I'm having problems running the unit tests for a recent snapshot of the
> Watir sources. Before I investigate the failures, I want to make sure
> I'm running a version of Ruby that is supported by Watir. What Ruby
> versions are supported/known to work with Watir?
I've tested it with 1.8.0-10, and 1.8.1-12. I know others have tested it
with 1.8.1-11. There have been some reports of a WIN32OLE bug in 1.8.1-13.
> I have these two incarnations of Ruby installed on my XP machine
> (according to ruby --version):
> ruby 1.8.1 (2003-12-25) [i386-cygwin]
> ruby 1.8.1 (2003-12-25) [i386-mswin32]
That's the same date as my 1.8.1-12 install.
> I presume this isn't the same as 1.8.1-11. Do I need to build Ruby from
> source to get 1.8.1-11? Or maybe I do have this version and Ruby isn't
> telling me enough detail about the version?
If you open the ReleaseNotes.txt file in the root of your Ruby install, it
will have the version there. Check under the "Change Log" heading in that
file, and you should get the full version.
Thanks;
-Jonathan
> --
> Danny R. Faught
> Tejas Software Consulting
> http://tejasconsulting.com/
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
From faught at tejasconsulting.com Tue Dec 14 23:16:18 2004
From: faught at tejasconsulting.com (Danny R. Faught)
Date: Tue, 14 Dec 2004 22:16:18 -0600
Subject: [Wtr-general] unit test failures (was Re: how to install Ruby
1.8.1-11?)
In-Reply-To: <20041215032634.LQST19111.priv-edtnes46.telusplanet.net@tintin>
References: <20041215032634.LQST19111.priv-edtnes46.telusplanet.net@tintin>
Message-ID: <41BFBA92.8070108@tejasconsulting.com>
Jonathan Kohl wrote:
> Does your XP machine have Service Pack 2?
It has it, sitting there begging me to install it. But I'm still at SP1.
> If you open the ReleaseNotes.txt file in the root of your Ruby install, it
> will have the version there. Check under the "Change Log" heading in that
> file, and you should get the full version.
Thanks. I have 1.8.1-13.
I can't run the unit tests successfully under Cygwin. I get numerous
errors from IE like "Cannot find
'file:///use/src/wtr/watir/unittests/html/images1.html'....". It looks
like the tests are expecting IE to comprehend a Cygwin path. This comes
from setub.rb - "$myDir = File.expand_path(File.dirname(__FILE__))". I
don't know an easy solution without adding Cygwin-specific code somewhere.
Using a native Windows build of Ruby, I usually get a segfault when I
run one of the unit tests -
> c:\ruby\bin\ruby form_test.rb
Loaded suite form_test
Started
-----------Objects in page -------------
./../watir.rb:585: [BUG] Segmentation fault
ruby 1.8.1 (2003-12-25) [i386-mswin32]
This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.
----------------------------------------------
I have to kill ruby.exe forcefully. For links_test.rb and
radios_test.rb, it failed at "./../watir.rb:874". buttons_test.rb
failed at "./../watir.rb:798" once and
"c:/ruby/lib/ruby/1.8/test/unit/testresult.rb:53" another time, and then
it passed. selectbox_test.rb failed at "./../watir.rb:1287".
table_test.rb passed consistently.
Is anyone else seeing this?
--
Danny R. Faught
Tejas Software Consulting
http://tejasconsulting.com/
From jkohl at telusplanet.net Tue Dec 14 23:26:08 2004
From: jkohl at telusplanet.net (Jonathan Kohl)
Date: Tue, 14 Dec 2004 21:26:08 -0700
Subject: [Wtr-general] segfaults in tests and in examples from tarball
In-Reply-To: <5.1.0.14.2.20041114200334.02a0c5d0@127.0.0.1>
Message-ID: <20041215042442.XCCY24539.priv-edtnes51.telusplanet.net@tintin>
> > c:\ruby\bin\ruby form_test.rb
> Loaded suite form_test
> Started
> -----------Objects in page -------------
> ./../watir.rb:585: [BUG] Segmentation fault
> ruby 1.8.1 (2003-12-25) [i386-mswin32]
> This application has requested the Runtime to terminate it in an unusual
> way.
> Please contact the application's support team for more information.
> ----------------------------------------------
> I have to kill ruby.exe forcefully. For links_test.rb and
> radios_test.rb, it failed at "./../watir.rb:874". buttons_test.rb
> failed at "./../watir.rb:798" once and
> "c:/ruby/lib/ruby/1.8/test/unit/testresult.rb:53" another time, and then
> it passed. selectbox_test.rb failed at "./../watir.rb:1287".
> table_test.rb passed consistently.
> Is anyone else seeing this?
Sounds like this problem:
> -----Original Message-----
> From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-
> bounces at rubyforge.org] On Behalf Of Bret Pettichord
> Sent: November 14, 2004 7:05 PM
> To: wtr-general at rubyforge.org
> Subject: Re: [Wtr-general] segfaults in tests and in examples from tarball
>
> This looks like a bug with WIN32OLE that was in Ruby 1.8.1-13.
>
> WATIR has been tested extensively with 1.8.1-11 and 1.8.1-12.
>
> Bret
>
> At 09:32 AM 11/12/2004, McMahon, Chris wrote:
> >
> >With Ruby 1.8.1, on WinXPPro. Best example is probably buttons_test.rb.
> >I get some processing, then
> >**********************************************************
> >-------
> >PASS
> >---------
> >pageContainsText: Looking for: PASS (string) - found it ok
> >../../watir.rb:33: [BUG] Segmentation fault
> >ruby 1.8.1 (2003-12-25) [i386-mswin32]
> >
> >This application has requested the Runtime to terminate it in an unusual
> >way...
> >************************************************************************
> >*****
> >
> > I'm a pure newbie, any pointers to making the unittests and
> >examples run better would be helpful...
> >-Chris
> >
> >
> >
> >
> >_______________________________________________
> >Wtr-general mailing list
> >Wtr-general at rubyforge.org
> >http://rubyforge.org/mailman/listinfo/wtr-general
>
> _____________________
> Bret Pettichord
> www.pettichord.com
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
From chris.mcmahon at verint.com Wed Dec 15 09:59:19 2004
From: chris.mcmahon at verint.com (McMahon, Chris)
Date: Wed, 15 Dec 2004 07:59:19 -0700
Subject: [Wtr-general] segfaults
Message-ID:
> >
> > This looks like a bug with WIN32OLE that was in Ruby 1.8.1-13.
> >
Ruby 1.8.2 fixed all my segfaults.
-Chris
From chris.mcmahon at verint.com Wed Dec 15 10:04:09 2004
From: chris.mcmahon at verint.com (McMahon, Chris)
Date: Wed, 15 Dec 2004 08:04:09 -0700
Subject: [Wtr-general] new windows, etc.
Message-ID:
Paul said:
> >Ive been looking at a few possibilities, 1. capturing new
> windows that
> >are being opened, stopping them opening and then opening
> under a WATIR
> >context.
> >
> >2. Using windows mesages to get an ole reference to new windows
> >
> >Ive tried a few things, but Im not happy with anything yet.
I really appreciate your attention. As always, if there's
something useful I can do to help, please let me know. Windows people
seem to pop up new windows at the drop of a hat. Like they figure
everybody will always have a mouse. =)
-Chris
From chrismo at clabs.org Wed Dec 15 10:27:24 2004
From: chrismo at clabs.org (Chris Morris)
Date: Wed, 15 Dec 2004 09:27:24 -0600
Subject: [Wtr-general] another alternative tool
In-Reply-To: <41BE2BB4.2050105@tejasconsulting.com>
References: <41BE2BB4.2050105@tejasconsulting.com>
Message-ID: <41C057DC.3070300@clabs.org>
Danny R. Faught wrote:
> Howdy. I'm starting to play with WTR for a review I'm writing for
> Open Testware Reviews.
>
> On the http://www.clabs.org/wtr/index.cgi?page=/AlternativeTools page,
> I suggest adding Pamie (http://pamie.sourceforge.net/), a Python port
> of Samie.
Thx, Danny - just updated it.
Reminder, the link to the editable wiki is this, please keep this here
on the mailing list and we shouldn't have any spam problems:
http://www.clabs.org/wtr/clwiki.editor.cgi
--
Chris
http://clabs.org
From bret at pettichord.com Wed Dec 15 16:02:05 2004
From: bret at pettichord.com (Bret Pettichord)
Date: Wed, 15 Dec 2004 15:02:05 -0600
Subject: [Wtr-general] unit test failures (was Re: how to install
Ruby 1.8.1-11?)
In-Reply-To: <41BFBA92.8070108@tejasconsulting.com>
References: <20041215032634.LQST19111.priv-edtnes46.telusplanet.net@tintin>
<20041215032634.LQST19111.priv-edtnes46.telusplanet.net@tintin>
Message-ID: <5.1.0.14.2.20041215141603.030687d0@127.0.0.1>
At 10:16 PM 12/14/2004, Danny R. Faught wrote:
>I can't run the unit tests successfully under Cygwin. I get numerous
>errors from IE like "Cannot find
>'file:///use/src/wtr/watir/unittests/html/images1.html'....". It looks
>like the tests are expecting IE to comprehend a Cygwin path. This comes
>from setub.rb - "$myDir = File.expand_path(File.dirname(__FILE__))". I
>don't know an easy solution without adding Cygwin-specific code somewhere.
I've checked in this additional line, which fixes this problem on cygwin:
$myDir.sub!( %r{/cygdrive/(\w)/}, '\1:/' ) # convert from cygwin to dos
Bret
_____________________
Bret Pettichord
www.pettichord.com
From faught at tejasconsulting.com Wed Dec 15 18:40:52 2004
From: faught at tejasconsulting.com (Danny R. Faught)
Date: Wed, 15 Dec 2004 17:40:52 -0600
Subject: [Wtr-general] unit test failures
In-Reply-To: <5.1.0.14.2.20041215141603.030687d0@127.0.0.1>
References: <20041215032634.LQST19111.priv-edtnes46.telusplanet.net@tintin> <20041215032634.LQST19111.priv-edtnes46.telusplanet.net@tintin>
<5.1.0.14.2.20041215141603.030687d0@127.0.0.1>
Message-ID: <41C0CB84.9020105@tejasconsulting.com>
Bret Pettichord wrote:
> I've checked in this additional line, which fixes this problem on cygwin:
>
> $myDir.sub!( %r{/cygdrive/(\w)/}, '\1:/' ) # convert from cygwin to dos
Hmmm, that doesn't change the behavior for me. I'm starting with a path
like "/usr/src/wtr/watir/unittests/html/images1.html" that doesn't use
the cygdrive format.
This does work for me:
$myDir.insert( 0, "c:/cygwin" ) # convert from cygwin to dos
With this change, all unit tests are passing with the Cygwin build of
Ruby (which the Cygwin setup describes as version 1.8.1-1). But besides
breaking all other environments, this makes the unfortunate assumption
that Cygwin is installed under c:/cygwin. The cygpath program can do it
more portably:
$ cygpath -d '/usr/src/wtr/watir/unittests/html/images1.html'
C:\cygwin\usr\src\wtr\watir\UNITTE~1\html\IMAGES~1.HTM
You could call that if you can find a reliable way to detect a Cygwin
environment, perhaps by matching "cygwin" in the RUBY_PLATFORM variable
(it's "i386-cygwin" on my system).
PS. Duh, I just realized that I could cd into
/cygdrive/c/cygwin/usr/src/wtr/watir/unittests to add /cygdrive/c to the
path. Then your code works (and mine doesn't, though a cygpath solution
would work for both). I'd just have to remember to always do the cd trick.
--
Danny R. Faught
Tejas Software Consulting
http://tejasconsulting.com/
From faught at tejasconsulting.com Wed Dec 15 19:21:18 2004
From: faught at tejasconsulting.com (Danny R. Faught)
Date: Wed, 15 Dec 2004 18:21:18 -0600
Subject: [Wtr-general] missing require in checkbox_test.rb
In-Reply-To: <41C0CB84.9020105@tejasconsulting.com>
References: <20041215032634.LQST19111.priv-edtnes46.telusplanet.net@tintin> <20041215032634.LQST19111.priv-edtnes46.telusplanet.net@tintin> <5.1.0.14.2.20041215141603.030687d0@127.0.0.1>
<41C0CB84.9020105@tejasconsulting.com>
Message-ID: <41C0D4FE.4050306@tejasconsulting.com>
The checkbox_test.rb test is missing the require for setup.rb. I didn't
notice this until I ran the file by itself and all tests failed like this:
1) Error:
test_CheckBox_Enabled(TC_CheckBox):
NoMethodError: undefined method `+' for nil:NilClass
checkbox_test.rb:15:in `gotoCheckBoxPage'
checkbox_test.rb:33:in `test_CheckBox_Enabled'
Here's the patch:
-------------------------------------------------
diff -c -r1.7 checkbox_test.rb
*** checkbox_test.rb 23 Nov 2004 16:14:13 -0000 1.7
--- checkbox_test.rb 16 Dec 2004 00:16:57 -0000
***************
*** 6,11 ****
--- 6,12 ----
require 'test/unit'
require 'test/unit/ui/console/testrunner'
require 'testUnitAddons'
+ #require 'unittests/setup'
class TC_CheckBox < Test::Unit::TestCase
-------------------------------------------------
I'm not going to assume I can/should check in changes myself unless
someone says so.
BTW, running the native Windows build of ruby-1.8.2-14RC10, the unit
tests are now passing (as long as I don't run them individually :-).
--
Danny R. Faught
Tejas Software Consulting
http://tejasconsulting.com/
From jkohl at telusplanet.net Wed Dec 15 20:15:54 2004
From: jkohl at telusplanet.net (Jonathan Kohl)
Date: Wed, 15 Dec 2004 18:15:54 -0700
Subject: [Wtr-general] missing require in checkbox_test.rb
In-Reply-To: <41C0D4FE.4050306@tejasconsulting.com>
Message-ID: <20041216011416.UONG25858.priv-edtnes28.telusplanet.net@tintin>
Thanks for the catch. I updated the file, adding the missing require.
-Jonathan
> -----Original Message-----
> From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-
> bounces at rubyforge.org] On Behalf Of Danny R. Faught
> Sent: December 15, 2004 5:21 PM
> To: wtr-general at rubyforge.org
> Subject: [Wtr-general] missing require in checkbox_test.rb
>
> The checkbox_test.rb test is missing the require for setup.rb. I didn't
> notice this until I ran the file by itself and all tests failed like this:
>
> 1) Error:
> test_CheckBox_Enabled(TC_CheckBox):
> NoMethodError: undefined method `+' for nil:NilClass
> checkbox_test.rb:15:in `gotoCheckBoxPage'
> checkbox_test.rb:33:in `test_CheckBox_Enabled'
>
> Here's the patch:
>
> -------------------------------------------------
> diff -c -r1.7 checkbox_test.rb
> *** checkbox_test.rb 23 Nov 2004 16:14:13 -0000 1.7
> --- checkbox_test.rb 16 Dec 2004 00:16:57 -0000
> ***************
> *** 6,11 ****
> --- 6,12 ----
> require 'test/unit'
> require 'test/unit/ui/console/testrunner'
> require 'testUnitAddons'
> + #require 'unittests/setup'
>
> class TC_CheckBox < Test::Unit::TestCase
> -------------------------------------------------
>
> I'm not going to assume I can/should check in changes myself unless
> someone says so.
>
> BTW, running the native Windows build of ruby-1.8.2-14RC10, the unit
> tests are now passing (as long as I don't run them individually :-).
> --
> Danny R. Faught
> Tejas Software Consulting
> http://tejasconsulting.com/
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
From jkohl at telusplanet.net Wed Dec 15 23:23:38 2004
From: jkohl at telusplanet.net (Jonathan Kohl)
Date: Wed, 15 Dec 2004 21:23:38 -0700
Subject: [Wtr-general] IE Unit
Message-ID: <20041216042158.ZKUG19243.priv-edtnes27.telusplanet.net@tintin>
http://ieunit.sourceforge.net/
This looks interesting. Any other fellow Calgarians on the list that might
know James Li?
-Jonathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20041215/3f019139/attachment.html
From paul.rogers at shaw.ca Thu Dec 16 10:37:21 2004
From: paul.rogers at shaw.ca (Paul Rogers)
Date: Thu, 16 Dec 2004 08:37:21 -0700
Subject: [Wtr-general] IE Unit
Message-ID:
do you mean me? No, I dont know James.
Paul
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_000C_01C4E2EC.582119A0"
------=_NextPart_000_000C_01C4E2EC.582119A0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
http://ieunit.sourceforge.net/
This looks interesting. Any other fellow Calgarians on the list that might
know James Li?
-Jonathan
------=_NextPart_000_000C_01C4E2EC.582119A0
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
This looks interesting. Any other fellow Calgarians =
on the
list that might know James Li?
-Jonathan
------=_NextPart_000_000C_01C4E2EC.582119A0--
-------------- next part --------------
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
From jkohl at telusplanet.net Thu Dec 16 10:40:31 2004
From: jkohl at telusplanet.net (jkohl at telusplanet.net)
Date: Thu, 16 Dec 2004 07:40:31 -0800
Subject: [Wtr-general] IE Unit
In-Reply-To:
References:
Message-ID: <1103211631.41c1ac6f06812@webmail.telus.net>
I think there are a couple other Calgarians on the list. :-)
> do you mean me? No, I dont know James.
>
> Paul
> Content-Type: multipart/alternative;
> boundary="----=_NextPart_000_000C_01C4E2EC.582119A0"
>
>
> ------=_NextPart_000_000C_01C4E2EC.582119A0
> Content-Type: text/plain;
> charset="us-ascii"
> Content-Transfer-Encoding: 7bit
>
> http://ieunit.sourceforge.net/
>
>
>
> This looks interesting. Any other fellow Calgarians on the list that might
> know James Li?
>
>
>
> -Jonathan
>
>
> ------=_NextPart_000_000C_01C4E2EC.582119A0
> Content-Type: text/html;
> charset="us-ascii"
> Content-Transfer-Encoding: quoted-printable
>
>
>
>
> charset=3Dus-ascii">
>
>
>
>
>
>
>
>
>
>
>
>
>
> ------=_NextPart_000_000C_01C4E2EC.582119A0--
>
From bret at pettichord.com Thu Dec 16 12:04:01 2004
From: bret at pettichord.com (Bret Pettichord)
Date: Thu, 16 Dec 2004 11:04:01 -0600
Subject: [Wtr-general] Fwd: Help Regarding Ruby IEController
Message-ID: <5.1.0.14.2.20041216110213.02ff5150@pop.earthlink.net>
Here is an interesting list of requirements.
How much of this can we do?
Bret (cleaning out old mail that i should've replied to long ago)
>From: "Anand, Vaitheeswaran (IE10)"
>To: bpettichord at earthlink.net
>Subject: Help Regarding Ruby IEController
>Date: Mon, 8 Nov 2004 08:38:59 -0700
>
>Hi,
>
>We are automating testing of a Web Based Change Management system using
>Ruby ClIEC Controller.
>
>The requirements that are defined for this controller are :
>
>click on any widget on a web page including:
>- hyperlinks
>- images
>- buttons
>- check boxes
>* select items in:
>- drop-down boxes
>- radio lists
>* enter text in text fields
>* handle Java Script popup warning or error message boxes
>(eventually need to scrape the message content and verify that the correct
>message box pops up in a test)
>* handle pages that use frames
>* read and handle inline messages
>* verify that objects, widgets or text exists
>
>Currently we are able to do Data Entry to Text fields and clicking on Buttons.
>
>We would like to know from where do we get the complete list of commands
>in this controller that will enable us to perform the actions mentioned in
>the requirements.
>
>Thanks in a advance for your time.
>
>With Regards
>
>V Anand
>
_____________________
Bret Pettichord
www.pettichord.com
From paul.rogers at shaw.ca Thu Dec 16 12:53:16 2004
From: paul.rogers at shaw.ca (Paul Rogers)
Date: Thu, 16 Dec 2004 10:53:16 -0700
Subject: [Wtr-general] Fwd: Help Regarding Ruby IEController
Message-ID:
>- hyperlinks YES
>- images YES
>- buttons YES
>- check boxes YES
>* select items in:
>- drop-down boxes YES
>- radio lists YES
>* enter text in text fields YES
>* handle Java Script popup warning or error message boxes NO
>(eventually need to scrape the message content and verify that the correct
>message box pops up in a test) NO
>* handle pages that use frames YES
>* read and handle inline messages Not sure what this means
>* verify that objects, widgets or text exists YES
The javascript stuff I can try and do between now and the new year. Along with the full release of version 0.1 which Ive been promising for afew weeks ;-)
----- Original Message -----
From: Bret Pettichord
Date: Thursday, December 16, 2004 10:04 am
Subject: [Wtr-general] Fwd: Help Regarding Ruby IEController
> Here is an interesting list of requirements.
>
> How much of this can we do?
>
> Bret (cleaning out old mail that i should've replied to long ago)
>
>
> >From: "Anand, Vaitheeswaran (IE10)"
> >To: bpettichord at earthlink.net
> >Subject: Help Regarding Ruby IEController
> >Date: Mon, 8 Nov 2004 08:38:59 -0700
> >
> >Hi,
> >
> >We are automating testing of a Web Based Change Management system
> using
> >Ruby ClIEC Controller.
> >
> >The requirements that are defined for this controller are :
> >
> >click on any widget on a web page including:
> >- hyperlinks
> >- images
> >- buttons
> >- check boxes
> >* select items in:
> >- drop-down boxes
> >- radio lists
> >* enter text in text fields
> >* handle Java Script popup warning or error message boxes
> >(eventually need to scrape the message content and verify that
> the correct
> >message box pops up in a test)
> >* handle pages that use frames
> >* read and handle inline messages
> >* verify that objects, widgets or text exists
> >
> >Currently we are able to do Data Entry to Text fields and
> clicking on Buttons.
> >
> >We would like to know from where do we get the complete list of
> commands
> >in this controller that will enable us to perform the actions
> mentioned in
> >the requirements.
> >
> >Thanks in a advance for your time.
> >
> >With Regards
> >
> >V Anand
> >
>
> _____________________
> Bret Pettichord
> www.pettichord.com
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
From bret at pettichord.com Thu Dec 16 14:36:16 2004
From: bret at pettichord.com (Bret Pettichord)
Date: Thu, 16 Dec 2004 13:36:16 -0600
Subject: [Wtr-general] unit test failures
In-Reply-To: <41C0CB84.9020105@tejasconsulting.com>
References: <5.1.0.14.2.20041215141603.030687d0@127.0.0.1>
<20041215032634.LQST19111.priv-edtnes46.telusplanet.net@tintin>
<20041215032634.LQST19111.priv-edtnes46.telusplanet.net@tintin>
<5.1.0.14.2.20041215141603.030687d0@127.0.0.1>
Message-ID: <5.1.0.14.2.20041216133243.01108088@127.0.0.1>
At 05:40 PM 12/15/2004, Danny R. Faught wrote:
>This does work for me:
>
>$myDir.insert( 0, "c:/cygwin" ) # convert from cygwin to dos
>
>With this change, all unit tests are passing with the Cygwin build of Ruby
>(which the Cygwin setup describes as version 1.8.1-1). But besides
>breaking all other environments, this makes the unfortunate assumption
>that Cygwin is installed under c:/cygwin. The cygpath program can do it
>more portably:
>
>$ cygpath -d '/usr/src/wtr/watir/unittests/html/images1.html'
>C:\cygwin\usr\src\wtr\watir\UNITTE~1\html\IMAGES~1.HTM
>
>You could call that if you can find a reliable way to detect a Cygwin
>environment, perhaps by matching "cygwin" in the RUBY_PLATFORM variable
>(it's "i386-cygwin" on my system).
This sounds like a reliable strategy to me. If you send me some code using
it, i'll check it in.
Bret
_____________________
Bret Pettichord
www.pettichord.com
From bret at pettichord.com Thu Dec 16 15:41:36 2004
From: bret at pettichord.com (Bret Pettichord)
Date: Thu, 16 Dec 2004 14:41:36 -0600
Subject: [Wtr-general] stale link on Scripting101Class page
In-Reply-To: <41BF7B56.20708@tejasconsulting.com>
References: <41BE2BB4.2050105@tejasconsulting.com>
<41BE2BB4.2050105@tejasconsulting.com>
Message-ID: <5.1.0.14.2.20041216143828.030a3328@127.0.0.1>
I think the most current version of this page now resides at
http://www.pettichord.com/scripting_for_testers.html
I would like to move this information to a community site, perhaps our wiki.
Bret
At 05:46 PM 12/14/2004, Danny R. Faught wrote:
>Jonathan encouraged me to send further feedback to the list. So here's one...
>
>The page at http://www.clabs.org/wtr/index.cgi?page=/Scripting101Class
>links to http://www.testing.com/scripting-for-testers.html, which in turn
>links to http://www.testing.com/Scripting-for-testers-installs.zip, which
>doesn't exist. Brian Marick sez:
>
>"There shouldn't have been a link to that page. It was the instruction
>page for one session of the course, and went stale after the course was
>taught."
>
>Perhaps the Scripting101Class page should link to the downloads page on
>RubyForge instead, where I did find the source.
>--
>Danny R. Faught
>Tejas Software Consulting
>http://tejasconsulting.com/
>_______________________________________________
>Wtr-general mailing list
>Wtr-general at rubyforge.org
>http://rubyforge.org/mailman/listinfo/wtr-general
_____________________
Bret Pettichord
www.pettichord.com
From faught at tejasconsulting.com Thu Dec 16 22:20:58 2004
From: faught at tejasconsulting.com (Danny R. Faught)
Date: Thu, 16 Dec 2004 21:20:58 -0600
Subject: [Wtr-general] unit test failures
In-Reply-To: <5.1.0.14.2.20041216133243.01108088@127.0.0.1>
References: <5.1.0.14.2.20041215141603.030687d0@127.0.0.1> <20041215032634.LQST19111.priv-edtnes46.telusplanet.net@tintin> <20041215032634.LQST19111.priv-edtnes46.telusplanet.net@tintin> <5.1.0.14.2.20041215141603.030687d0@127.0.0.1>
<5.1.0.14.2.20041216133243.01108088@127.0.0.1>
Message-ID: <41C2509A.6060908@tejasconsulting.com>
Bret Pettichord wrote:
> This sounds like a reliable strategy to me. If you send me some code
> using it, i'll check it in.
A patch is attached. Tested it with Cygwin Ruby, and the native Ruby
under DOS and Cygwin.
--
Danny R. Faught
Tejas Software Consulting
http://tejasconsulting.com/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygwin-patch
Url: http://rubyforge.org/pipermail/wtr-general/attachments/20041216/51b0e874/attachment.pl
From faught at tejasconsulting.com Fri Dec 17 11:37:19 2004
From: faught at tejasconsulting.com (Danny R. Faught)
Date: Fri, 17 Dec 2004 10:37:19 -0600
Subject: [Wtr-general] identifying image button using alt text
Message-ID: <41C30B3F.7050000@tejasconsulting.com>
Is there a way to idenfity an image button using its alt text? E.g., if
I add this to unittests/html/buttons1.html, how can the test activate
the button without resorting to using an index?
This form button is an image with only alt text to identify it.
--
Danny R. Faught
Tejas Software Consulting
http://tejasconsulting.com/
From chris.mcmahon at verint.com Fri Dec 17 14:31:35 2004
From: chris.mcmahon at verint.com (McMahon, Chris)
Date: Fri, 17 Dec 2004 12:31:35 -0700
Subject: [Wtr-general] IEUnit!
Message-ID:
Jonathan said:
> http://ieunit.sourceforge.net/
>
>
>
> This looks interesting.
Wow, this is slick. Although there seems to be a lot of
overhead/goldplating/cruft, but maybe I'm just used to other languages.
Unfortunately, like many other subjects of interest to folks on this
list, I am stone ignorant of JavaScript. =/
Paul might be interested in the seekWindow() method, though, it
speaks to controlling multiple IE instances: "the method seekWindow()
allows a test script to attach to an existing browser window".
IEUnit seems to have a pretty simple/elegant way of addressing
frames, too.
(BTW, I did immediately find an IEUnit bug when something other
than IE is the default browser.)
Of course, no filesystem interface, no database interface, no IP
interface, etc. etc.
-Chris
From paul.rogers at shaw.ca Fri Dec 17 15:12:43 2004
From: paul.rogers at shaw.ca (Paul Rogers)
Date: Fri, 17 Dec 2004 13:12:43 -0700
Subject: [Wtr-general] identifying image button using alt text
Message-ID:
its simple to add. I'll do it before the next ( or first ) release
----- Original Message -----
From: "Danny R. Faught"
Date: Friday, December 17, 2004 9:37 am
Subject: [Wtr-general] identifying image button using alt text
> Is there a way to idenfity an image button using its alt text?
> E.g., if
> I add this to unittests/html/buttons1.html, how can the test
> activate
> the button without resorting to using an index?
>
>
>
>
>
This form button is an image with only alt text to identify it.
> --
> Danny R. Faught
> Tejas Software Consulting
> http://tejasconsulting.com/
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
From paul.rogers at shaw.ca Fri Dec 17 17:19:18 2004
From: paul.rogers at shaw.ca (Paul Rogers)
Date: Fri, 17 Dec 2004 15:19:18 -0700
Subject: [Wtr-general] identifying image button using alt text
In-Reply-To:
Message-ID: <000201c4e486$73301ca0$6400a8c0@NewDell>
Just added it.
Also a unit test and some new html to test it
Paul
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers
Sent: 17 December 2004 13:13
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] identifying image button using alt text
its simple to add. I'll do it before the next ( or first ) release
----- Original Message -----
From: "Danny R. Faught"
Date: Friday, December 17, 2004 9:37 am
Subject: [Wtr-general] identifying image button using alt text
> Is there a way to idenfity an image button using its alt text?
> E.g., if
> I add this to unittests/html/buttons1.html, how can the test
> activate
> the button without resorting to using an index?
>
>
>
>
>
This form button is an image with only alt text to identify it.
> --
> Danny R. Faught
> Tejas Software Consulting
> http://tejasconsulting.com/
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
From faught at tejasconsulting.com Fri Dec 17 18:11:09 2004
From: faught at tejasconsulting.com (Danny R. Faught)
Date: Fri, 17 Dec 2004 17:11:09 -0600
Subject: [Wtr-general] identifying image button using alt text
In-Reply-To: <000201c4e486$73301ca0$6400a8c0@NewDell>
References: <000201c4e486$73301ca0$6400a8c0@NewDell>
Message-ID: <41C3678D.6080705@tejasconsulting.com>
Paul Rogers wrote:
> Just added it.
Cool, thanks. It's not working for a real-world case I'm trying it on,
though. This is the object I'm trying to click -
I think I need to be using the button method for this, but it looks like
you added the alt property to the image method. Neither of them are
finding this object.
$ie.button(:alt, 'Buy Now').click
$ie.image(:alt, 'Buy Now').click
--
Danny R. Faught
Tejas Software Consulting
http://tejasconsulting.com/
From paul.rogers at shaw.ca Fri Dec 17 21:43:25 2004
From: paul.rogers at shaw.ca (Paul Rogers)
Date: Fri, 17 Dec 2004 19:43:25 -0700
Subject: [Wtr-general] identifying image button using alt text
In-Reply-To: <41C3678D.6080705@tejasconsulting.com>
Message-ID: <000401c4e4ab$593f7cd0$6400a8c0@NewDell>
Ok, NOW its checked in! see the forms3_test for examples
Sorry for the misunderstanding of what you wanted.
I also think there's a bug in getObjectWithValue which needs looking at
Paul
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Danny R. Faught
Sent: 17 December 2004 16:11
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] identifying image button using alt text
Paul Rogers wrote:
> Just added it.
Cool, thanks. It's not working for a real-world case I'm trying it on,
though. This is the object I'm trying to click -
I think I need to be using the button method for this, but it looks like
you added the alt property to the image method. Neither of them are
finding this object.
$ie.button(:alt, 'Buy Now').click
$ie.image(:alt, 'Buy Now').click
--
Danny R. Faught
Tejas Software Consulting
http://tejasconsulting.com/
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
From faught at tejasconsulting.com Fri Dec 17 22:41:08 2004
From: faught at tejasconsulting.com (Danny R. Faught)
Date: Fri, 17 Dec 2004 21:41:08 -0600
Subject: [Wtr-general] identifying image button using alt text
In-Reply-To: <000401c4e4ab$593f7cd0$6400a8c0@NewDell>
References: <000401c4e4ab$593f7cd0$6400a8c0@NewDell>
Message-ID: <41C3A6D4.6000007@tejasconsulting.com>
Paul Rogers wrote:
> Ok, NOW its checked in! see the forms3_test for examples
Great, I can click that button now. Thanks a bunch for the fast turnaround.
--
Danny R. Faught
Tejas Software Consulting
http://tejasconsulting.com/
From paul.rogers at shaw.ca Sun Dec 19 21:44:26 2004
From: paul.rogers at shaw.ca (Paul Rogers)
Date: Sun, 19 Dec 2004 19:44:26 -0700
Subject: [Wtr-general] popups
In-Reply-To: <41C3A6D4.6000007@tejasconsulting.com>
Message-ID: <000e01c4e63d$d23811e0$6400a8c0@NewDell>
Ive added some code to deal with javascript popups. Its not very nice
and needs some refactoring.
I'll add the code for file uploads in the next week or so
Paul
From paul.rogers at shaw.ca Mon Dec 20 12:36:20 2004
From: paul.rogers at shaw.ca (Paul Rogers)
Date: Mon, 20 Dec 2004 10:36:20 -0700
Subject: [Wtr-general] New WIndows
In-Reply-To: <000e01c4e63d$d23811e0$6400a8c0@NewDell>
Message-ID: <000301c4e6ba$6ac99d80$6400a8c0@NewDell>
Ive added the code for handling new windows.
I think you may see these problems:
1. Javascript linking the 2 windows may not work. Anybody want to write
a test for this?
2. Opened windows will have incorrect decoration - ie if you open a
window that has no address bar, no status bar and a size of 10x10, it
will probably all get ignored. Any offers to write some javascript for
this too?
Paul
From ati.ozgur at gmail.com Wed Dec 22 07:03:59 2004
From: ati.ozgur at gmail.com (Atilla Ozgur)
Date: Wed, 22 Dec 2004 14:03:59 +0200
Subject: [Wtr-general] Require problem and Google Regional Settings
Message-ID:
I apologize if I am asking something very well known. I started using
ruby a while ago.
If i try to execute examples from /watir/examples directory
>ruby googleSearch.rb
..\watir.rb:28:in `require': No such file to load -- winClicker (LoadError)
from ..\watir.rb:28
from googleSearch.rb:16:in `require'
from googleSearch.rb:16
>Exit code: 1
I get this error.
If I copy and paste this same file to a file. and change
require '../watir'
go
require 'watir'
it works sort of. Since I am in Turkey, my google button's captions
are in Turkish. Example can not find buttons. May be another site
which do not change its layout according to region would be better
example.
Thank you.
From jkohl at telusplanet.net Wed Dec 22 09:51:55 2004
From: jkohl at telusplanet.net (Jonathan Kohl)
Date: Wed, 22 Dec 2004 07:51:55 -0700
Subject: [Wtr-general] Require problem and Google Regional Settings
In-Reply-To:
Message-ID: <20041222145004.TLC3641.priv-edtnes28.telusplanet.net@tintin>
This looks like it was introduced with the JavaScript handling code that was
checked in Monday, Dec 22.
googleSearch shouldn't need winclicker, so there must be a dependency in
watir.rb that has been introduced. I'll check into it today and talk to Paul
about a fix.
Sorry about the confusion.
-Jonathan
> -----Original Message-----
> From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-
> bounces at rubyforge.org] On Behalf Of Atilla Ozgur
> Sent: December 22, 2004 5:04 AM
> To: wtr-general at rubyforge.org
> Subject: [Wtr-general] Require problem and Google Regional Settings
>
> I apologize if I am asking something very well known. I started using
> ruby a while ago.
>
> If i try to execute examples from /watir/examples directory
>
> >ruby googleSearch.rb
> ..\watir.rb:28:in `require': No such file to load -- winClicker
> (LoadError)
> from ..\watir.rb:28
> from googleSearch.rb:16:in `require'
> from googleSearch.rb:16
> >Exit code: 1
>
> I get this error.
>
> If I copy and paste this same file to a file. and change
> require '../watir'
>
> go
>
> require 'watir'
>
> it works sort of. Since I am in Turkey, my google button's captions
> are in Turkish. Example can not find buttons. May be another site
> which do not change its layout according to region would be better
> example.
>
> Thank you.
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
From paul.rogers at shaw.ca Wed Dec 22 10:17:13 2004
From: paul.rogers at shaw.ca (Paul Rogers)
Date: Wed, 22 Dec 2004 08:17:13 -0700
Subject: [Wtr-general] Require problem and Google Regional Settings
Message-ID: <22edbf22a464.22a46422edbf@shaw.ca>
This was a path problem I introduced when I added the winclickers.
It didnt affect the unit tests as they create their own paths
Its fixed now, but will be fixed 'properly' when I do an installer
Paul
----- Original Message -----
From: Jonathan Kohl
Date: Wednesday, December 22, 2004 7:51 am
Subject: RE: [Wtr-general] Require problem and Google Regional Settings
> This looks like it was introduced with the JavaScript handling
> code that was
> checked in Monday, Dec 22.
>
> googleSearch shouldn't need winclicker, so there must be a
> dependency in
> watir.rb that has been introduced. I'll check into it today and
> talk to Paul
> about a fix.
>
> Sorry about the confusion.
>
> -Jonathan
>
> > -----Original Message-----
> > From: wtr-general-bounces at rubyforge.org [wtr-general-
> > bounces at rubyforge.org] On Behalf Of Atilla Ozgur
> > Sent: December 22, 2004 5:04 AM
> > To: wtr-general at rubyforge.org
> > Subject: [Wtr-general] Require problem and Google Regional Settings
> >
> > I apologize if I am asking something very well known. I started
> using> ruby a while ago.
> >
> > If i try to execute examples from /watir/examples directory
> >
> > >ruby googleSearch.rb
> > ..\watir.rb:28:in `require': No such file to load -- winClicker
> > (LoadError)
> > from ..\watir.rb:28
> > from googleSearch.rb:16:in `require'
> > from googleSearch.rb:16
> > >Exit code: 1
> >
> > I get this error.
> >
> > If I copy and paste this same file to a file. and change
> > require '../watir'
> >
> > go
> >
> > require 'watir'
> >
> > it works sort of. Since I am in Turkey, my google button's captions
> > are in Turkish. Example can not find buttons. May be another site
> > which do not change its layout according to region would be better
> > example.
> >
> > Thank you.
> > _______________________________________________
> > Wtr-general mailing list
> > Wtr-general at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/wtr-general
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
From jkohl at telusplanet.net Wed Dec 22 10:47:42 2004
From: jkohl at telusplanet.net (jkohl at telusplanet.net)
Date: Wed, 22 Dec 2004 07:47:42 -0800
Subject: [Wtr-general] Require problem and Google Regional Settings
In-Reply-To: <22edbf22a464.22a46422edbf@shaw.ca>
References: <22edbf22a464.22a46422edbf@shaw.ca>
Message-ID: <1103730462.41c9971e78fda@webmail.telus.net>
Thanks!
So LOAD_PATH needed to be run before the require? Thanks for the fix. I ran the
unit tests as well and they ran perfectly, but when I tried the examples things
went awry.
Thanks for the quick fix.
-Jonathan
Quoting Paul Rogers :
> This was a path problem I introduced when I added the winclickers.
>
> It didnt affect the unit tests as they create their own paths
>
> Its fixed now, but will be fixed 'properly' when I do an installer
>
> Paul
>
> ----- Original Message -----
> From: Jonathan Kohl
> Date: Wednesday, December 22, 2004 7:51 am
> Subject: RE: [Wtr-general] Require problem and Google Regional Settings
>
> > This looks like it was introduced with the JavaScript handling
> > code that was
> > checked in Monday, Dec 22.
> >
> > googleSearch shouldn't need winclicker, so there must be a
> > dependency in
> > watir.rb that has been introduced. I'll check into it today and
> > talk to Paul
> > about a fix.
> >
> > Sorry about the confusion.
> >
> > -Jonathan
> >
> > > -----Original Message-----
> > > From: wtr-general-bounces at rubyforge.org [wtr-general-
> > > bounces at rubyforge.org] On Behalf Of Atilla Ozgur
> > > Sent: December 22, 2004 5:04 AM
> > > To: wtr-general at rubyforge.org
> > > Subject: [Wtr-general] Require problem and Google Regional Settings
> > >
> > > I apologize if I am asking something very well known. I started
> > using> ruby a while ago.
> > >
> > > If i try to execute examples from /watir/examples directory
> > >
> > > >ruby googleSearch.rb
> > > ..\watir.rb:28:in `require': No such file to load -- winClicker
> > > (LoadError)
> > > from ..\watir.rb:28
> > > from googleSearch.rb:16:in `require'
> > > from googleSearch.rb:16
> > > >Exit code: 1
> > >
> > > I get this error.
> > >
> > > If I copy and paste this same file to a file. and change
> > > require '../watir'
> > >
> > > go
> > >
> > > require 'watir'
> > >
> > > it works sort of. Since I am in Turkey, my google button's captions
> > > are in Turkish. Example can not find buttons. May be another site
> > > which do not change its layout according to region would be better
> > > example.
> > >
> > > Thank you.
> > > _______________________________________________
> > > 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 chris.mcmahon at verint.com Wed Dec 22 14:05:27 2004
From: chris.mcmahon at verint.com (McMahon, Chris)
Date: Wed, 22 Dec 2004 12:05:27 -0700
Subject: [Wtr-general] Neat feature, showAllObjects.
Message-ID:
Hi...
I was reading through the source in watir.rb and discovered the
"showAllObjects" method. Very cool. I have pages whose source is
fairly inscrutable, and this is a big help. What a great feature!
Thanks again.
-Chris
From paul.rogers at shaw.ca Wed Dec 22 15:38:33 2004
From: paul.rogers at shaw.ca (Paul Rogers)
Date: Wed, 22 Dec 2004 13:38:33 -0700
Subject: [Wtr-general] Neat feature, showAllObjects.
Message-ID: <29bf89298b76.298b7629bf89@shaw.ca>
You're welcome!
theres also
showForms
showImages
showFrames
showLinks
Do we also want showTables?
----- Original Message -----
From: "McMahon, Chris"
Date: Wednesday, December 22, 2004 12:05 pm
Subject: [Wtr-general] Neat feature, showAllObjects.
>
>
> Hi...
> I was reading through the source in watir.rb and discovered the
> "showAllObjects" method. Very cool. I have pages whose source is
> fairly inscrutable, and this is a big help. What a great feature!
> Thanks again.
> -Chris
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
From paul.rogers at shaw.ca Wed Dec 22 15:46:08 2004
From: paul.rogers at shaw.ca (Paul Rogers)
Date: Wed, 22 Dec 2004 13:46:08 -0700
Subject: [Wtr-general] Neat feature, showAllObjects.
Message-ID: <29b2dc29c99b.29c99b29b2dc@shaw.ca>
I should also add that this works best from irb
c:\watir> irb
irb(main):001:0> require 'watir'
=> true
irb(main):002:0> ie = IE.new
=> --stuff gets displayed --
irb(main):003:0> ie.goto('http://www.google.com')
=> 1
irb(main):004:0> ie.showAllObjects
-----------Objects in page -------------
.
.
submit name=btnG id= value=Google Search alt=
.
.
you can then use the flash method easily, to make sure what you think you got
irb(main):009:0> ie.button(:name , 'btnG').flash
I just found a bug here -
ie.button(:caption , /Lucky/).flash
doesnt work!
These techiques are useful when you are developing the script. It makes it easy to figure out what to click etc.
Paul
----- Original Message -----
From: "McMahon, Chris"
Date: Wednesday, December 22, 2004 12:05 pm
Subject: [Wtr-general] Neat feature, showAllObjects.
>
>
> Hi...
> I was reading through the source in watir.rb and discovered the
> "showAllObjects" method. Very cool. I have pages whose source is
> fairly inscrutable, and this is a big help. What a great feature!
> Thanks again.
> -Chris
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
From paul.rogers at shaw.ca Wed Dec 22 15:56:40 2004
From: paul.rogers at shaw.ca (Paul Rogers)
Date: Wed, 22 Dec 2004 13:56:40 -0700
Subject: [Wtr-general] Neat feature, showAllObjects.
Message-ID: <29e96f2a1de7.2a1de729e96f@shaw.ca>
Ive fixed the bug with captions and reg exp and checked it in along with an updated unit test
----- Original Message -----
From: Paul Rogers
Date: Wednesday, December 22, 2004 1:46 pm
Subject: Re: [Wtr-general] Neat feature, showAllObjects.
>
> I should also add that this works best from irb
>
>
> c:\watir> irb
>
> irb(main):001:0> require 'watir'
> => true
> irb(main):002:0> ie = IE.new
> => --stuff gets displayed --
>
> irb(main):003:0> ie.goto('http://www.google.com')
> => 1
> irb(main):004:0> ie.showAllObjects
> -----------Objects in page -------------
> .
> .
>
> submit name=btnG id=
> value=Google Search alt=
> .
> .
>
>
> you can then use the flash method easily, to make sure what you
> think you got
>
>
> irb(main):009:0> ie.button(:name , 'btnG').flash
>
> I just found a bug here -
> ie.button(:caption , /Lucky/).flash
> doesnt work!
>
>
> These techiques are useful when you are developing the script. It
> makes it easy to figure out what to click etc.
>
> Paul
>
>
>
>
>
>
> ----- Original Message -----
> From: "McMahon, Chris"
> Date: Wednesday, December 22, 2004 12:05 pm
> Subject: [Wtr-general] Neat feature, showAllObjects.
>
> >
> >
> > Hi...
> > I was reading through the source in watir.rb and discovered the
> > "showAllObjects" method. Very cool. I have pages whose source is
> > fairly inscrutable, and this is a big help. What a great feature!
> > Thanks again.
> > -Chris
> >
> > _______________________________________________
> > 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 chris.mcmahon at verint.com Wed Dec 22 16:36:52 2004
From: chris.mcmahon at verint.com (McMahon, Chris)
Date: Wed, 22 Dec 2004 14:36:52 -0700
Subject: [Wtr-general] path error in popups_test.rb
Message-ID:
Hi...
Something needed by popups_test.rb is in a "C:Documents and
Settings..." directory. The space in the directory name isn't being
handled properly. Ironically enough, I get a popup (unexpected) that
says "Windows cannot find 'C:\Documents'. Make sure you typed the name
correctly...".
I'm looking for a workaround, but thought I'd let y'all know...
-Chris
From chris.mcmahon at verint.com Wed Dec 22 16:44:57 2004
From: chris.mcmahon at verint.com (McMahon, Chris)
Date: Wed, 22 Dec 2004 14:44:57 -0700
Subject: [Wtr-general] error in "newWinwow_test.rb" (sic)
Message-ID:
Hi again...
I thought I could debug this one, but now I'm not so sure, so
I'm reporting it before I get in over my head:
Running "newWinwow_test.rb" from the latest WATIR tarball yields
the error
"newWinwow_test.rb:13: undefined method 'link' for nil:NilClass
(NoMethodError)"
I'm still looking, though, if I fix it I'll write back.
-Chris
From jkohl at telusplanet.net Wed Dec 22 16:53:59 2004
From: jkohl at telusplanet.net (jkohl at telusplanet.net)
Date: Wed, 22 Dec 2004 13:53:59 -0800
Subject: [Wtr-general] path error in popups_test.rb
In-Reply-To:
References:
Message-ID: <1103752439.41c9ecf775565@webmail.telus.net>
I've seen the same thing running that test. My Eclipse workspace directory has a
space in it, so when I run the test using RDT's plugin using test::unit in
Eclipse, I get the same error.
-Jonathan
Quoting "McMahon, Chris" :
>
> Hi...
> Something needed by popups_test.rb is in a "C:Documents and
> Settings..." directory. The space in the directory name isn't being
> handled properly. Ironically enough, I get a popup (unexpected) that
> says "Windows cannot find 'C:\Documents'. Make sure you typed the name
> correctly...".
> I'm looking for a workaround, but thought I'd let y'all know...
> -Chris
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
From chris.mcmahon at verint.com Wed Dec 22 16:56:59 2004
From: chris.mcmahon at verint.com (McMahon, Chris)
Date: Wed, 22 Dec 2004 14:56:59 -0700
Subject: Spam: Re: [Wtr-general] path error in popups_test.rb
Message-ID:
Do you know what WATIR wants in that directory? It doesn't seem
to affect other tests.
-Chris
> -----Original Message-----
> From: wtr-general-bounces at rubyforge.org
> [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of
> jkohl at telusplanet.net
> Sent: Wednesday, December 22, 2004 2:54 PM
> To: wtr-general at rubyforge.org
> Subject: Spam: Re: [Wtr-general] path error in popups_test.rb
>
> I've seen the same thing running that test. My Eclipse
> workspace directory has a space in it, so when I run the test
> using RDT's plugin using test::unit in Eclipse, I get the same error.
>
> -Jonathan
>
> Quoting "McMahon, Chris" :
>
> >
> > Hi...
> > Something needed by popups_test.rb is in a "C:Documents and
> > Settings..." directory. The space in the directory name
> isn't being
> > handled properly. Ironically enough, I get a popup
> (unexpected) that
> > says "Windows cannot find 'C:\Documents'. Make sure you typed the
> > name correctly...".
> > I'm looking for a workaround, but thought I'd let y'all know...
> > -Chris
> >
> >
> > _______________________________________________
> > Wtr-general mailing list
> > Wtr-general at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/wtr-general
> >
>
>
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
From paul.rogers at shaw.ca Wed Dec 22 17:14:13 2004
From: paul.rogers at shaw.ca (Paul Rogers)
Date: Wed, 22 Dec 2004 15:14:13 -0700
Subject: [Wtr-general] error in "newWinwow_test.rb" (sic)
Message-ID: <2bc2ca2bd338.2bd3382bc2ca@shaw.ca>
To capture the new window, I use the NewWindow3 event, which is only available only in Microsoft Windows XP Service Pack 2 (SP2) or later.
( http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/webbrowser/browser_control_node_entry.asp)
Of course, my pc at home is XP, service pack2, so all the tests work perfectly there.....
----- Original Message -----
From: "McMahon, Chris"
Date: Wednesday, December 22, 2004 2:44 pm
Subject: [Wtr-general] error in "newWinwow_test.rb" (sic)
>
> Hi again...
> I thought I could debug this one, but now I'm not so sure, so
> I'm reporting it before I get in over my head:
> Running "newWinwow_test.rb" from the latest WATIR tarball yields
> the error
> "newWinwow_test.rb:13: undefined method 'link' for nil:NilClass
> (NoMethodError)"
> I'm still looking, though, if I fix it I'll write back.
> -Chris
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
From paul.rogers at shaw.ca Wed Dec 22 17:17:57 2004
From: paul.rogers at shaw.ca (Paul Rogers)
Date: Wed, 22 Dec 2004 15:17:57 -0700
Subject: Spam: Re: [Wtr-general] path error in popups_test.rb
Message-ID: <2bb74d2b9037.2b90372bb74d@shaw.ca>
I think this is caused when you check out from cvs its sometimes read only
When I run the script I sometimes get an access denied message. To fix it I use cygwin and do a chmod 777 *.rb
Ive no idea why this is happening.
The file its looking for is clickJSDIalog.rg
Try running that on its own.
Paul
----- Original Message -----
From: "McMahon, Chris"
Date: Wednesday, December 22, 2004 2:56 pm
Subject: RE: Spam: Re: [Wtr-general] path error in popups_test.rb
>
> Do you know what WATIR wants in that directory? It doesn't seem
> to affect other tests.
> -Chris
>
> > -----Original Message-----
> > From: wtr-general-bounces at rubyforge.org
> > [wtr-general-bounces at rubyforge.org] On Behalf Of
> > jkohl at telusplanet.net
> > Sent: Wednesday, December 22, 2004 2:54 PM
> > To: wtr-general at rubyforge.org
> > Subject: Spam: Re: [Wtr-general] path error in popups_test.rb
> >
> > I've seen the same thing running that test. My Eclipse
> > workspace directory has a space in it, so when I run the test
> > using RDT's plugin using test::unit in Eclipse, I get the same
> error.>
> > -Jonathan
> >
> > Quoting "McMahon, Chris" :
> >
> > >
> > > Hi...
> > > Something needed by popups_test.rb is in a "C:Documents and
> > > Settings..." directory. The space in the directory name
> > isn't being
> > > handled properly. Ironically enough, I get a popup
> > (unexpected) that
> > > says "Windows cannot find 'C:\Documents'. Make sure you typed
> the
> > > name correctly...".
> > > I'm looking for a workaround, but thought I'd let y'all know...
> > > -Chris
> > >
> > >
> > > _______________________________________________
> > > Wtr-general mailing list
> > > Wtr-general at rubyforge.org
> > > http://rubyforge.org/mailman/listinfo/wtr-general
> > >
> >
> >
> >
> >
> > _______________________________________________
> > Wtr-general mailing list
> > Wtr-general at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/wtr-general
> >
> >
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
From jkohl at telusplanet.net Wed Dec 22 17:22:21 2004
From: jkohl at telusplanet.net (jkohl at telusplanet.net)
Date: Wed, 22 Dec 2004 14:22:21 -0800
Subject: Spam: Re: [Wtr-general] path error in popups_test.rb
In-Reply-To: <2bb74d2b9037.2b90372bb74d@shaw.ca>
References: <2bb74d2b9037.2b90372bb74d@shaw.ca>
Message-ID: <1103754141.41c9f39dc3594@webmail.telus.net>
> Do you know what WATIR wants in that directory? It doesn't seem
> to affect other tests.
It is trying to load "clickJSDialog.rb", so $LOAD_PATH finds the directory you
are in, and loads it. It just looks like the space in the file path is throwing
things off, so the path is getting truncated. Instead of
"c:\eclipse\workspace\watir dev\watir", it truncates to
"c:\eclipse\workspace\watir" and can't find the "clickJSDialog.rb".
-Jonathan
Quoting Paul Rogers :
>
>
>
> I think this is caused when you check out from cvs its sometimes read only
>
> When I run the script I sometimes get an access denied message. To fix it I
> use cygwin and do a chmod 777 *.rb
>
> Ive no idea why this is happening.
>
> The file its looking for is clickJSDIalog.rg
> Try running that on its own.
>
> Paul
>
>
> ----- Original Message -----
> From: "McMahon, Chris"
> Date: Wednesday, December 22, 2004 2:56 pm
> Subject: RE: Spam: Re: [Wtr-general] path error in popups_test.rb
>
> >
> > Do you know what WATIR wants in that directory? It doesn't seem
> > to affect other tests.
> > -Chris
> >
> > > -----Original Message-----
> > > From: wtr-general-bounces at rubyforge.org
> > > [wtr-general-bounces at rubyforge.org] On Behalf Of
> > > jkohl at telusplanet.net
> > > Sent: Wednesday, December 22, 2004 2:54 PM
> > > To: wtr-general at rubyforge.org
> > > Subject: Spam: Re: [Wtr-general] path error in popups_test.rb
> > >
> > > I've seen the same thing running that test. My Eclipse
> > > workspace directory has a space in it, so when I run the test
> > > using RDT's plugin using test::unit in Eclipse, I get the same
> > error.>
> > > -Jonathan
> > >
> > > Quoting "McMahon, Chris" :
> > >
> > > >
> > > > Hi...
> > > > Something needed by popups_test.rb is in a "C:Documents and
> > > > Settings..." directory. The space in the directory name
> > > isn't being
> > > > handled properly. Ironically enough, I get a popup
> > > (unexpected) that
> > > > says "Windows cannot find 'C:\Documents'. Make sure you typed
> > the
> > > > name correctly...".
> > > > I'm looking for a workaround, but thought I'd let y'all know...
> > > > -Chris
> > > >
> > > >
> > > > _______________________________________________
> > > > 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 chris.mcmahon at verint.com Wed Dec 22 17:29:43 2004
From: chris.mcmahon at verint.com (McMahon, Chris)
Date: Wed, 22 Dec 2004 15:29:43 -0700
Subject: Hah! Got it. RE: Spam: Re: RE: Spam: Re: [Wtr-general] path
error in popups_test.rb
Message-ID:
> > Do you know what WATIR wants in that directory? It
> doesn't seem to
> > affect other tests.
> It is trying to load "clickJSDialog.rb", so $LOAD_PATH finds
> the directory you are in, and loads it. It just looks like
> the space in the file path is throwing things off, so the
> path is getting truncated. Instead of
> "c:\eclipse\workspace\watir dev\watir", it truncates to
> "c:\eclipse\workspace\watir" and can't find the "clickJSDialog.rb".
>
>
> -Jonathan
Aha. Mine was on my desktop. Extracted to a folder on C: (no
spaces in directory names) and popups_test.rb runs fine. This is very
neat.
But I think a lot of folks are going to trip over this. Can we
find and escape arbitrary spaces in the pathname to necessary files?
-Chris
From chris.mcmahon at verint.com Wed Dec 22 18:50:08 2004
From: chris.mcmahon at verint.com (McMahon, Chris)
Date: Wed, 22 Dec 2004 16:50:08 -0700
Subject: Cookin' w/gas. RE: Spam: Re: [Wtr-general] error in
"newWinwow_test.rb" (sic)
Message-ID:
> To capture the new window, I use the NewWindow3 event, which
> is only available only in Microsoft Windows XP Service Pack 2
> (SP2) or later.
> (
> http://msdn.microsoft.com/library/default.asp?url=/workshop/br
owser/webbrowser/browser_control_node_entry.asp)
>
> Of course, my pc at home is XP, service pack2, so all the
> tests work perfectly there.....
SP2 made it work. Thanks again. Now to point it at my app...
-Chris
From paul.rogers at shaw.ca Wed Dec 22 19:09:48 2004
From: paul.rogers at shaw.ca (Paul Rogers)
Date: Wed, 22 Dec 2004 17:09:48 -0700
Subject: Hah! Got it. RE: Spam: Re: RE: Spam: Re: [Wtr-general] path
error in popups_test.rb
Message-ID: <2dde542dd8b0.2dd8b02dde54@shaw.ca>
ok. now works with dir with spaces in the name.
----- Original Message -----
From: "McMahon, Chris"
Date: Wednesday, December 22, 2004 3:29 pm
Subject: Hah! Got it. RE: Spam: Re: RE: Spam: Re: [Wtr-general] path error in popups_test.rb
>
> > > Do you know what WATIR wants in that directory? It
> > doesn't seem to
> > > affect other tests.
> > It is trying to load "clickJSDialog.rb", so $LOAD_PATH finds
> > the directory you are in, and loads it. It just looks like
> > the space in the file path is throwing things off, so the
> > path is getting truncated. Instead of
> > "c:\eclipse\workspace\watir dev\watir", it truncates to
> > "c:\eclipse\workspace\watir" and can't find the "clickJSDialog.rb".
> >
> >
> > -Jonathan
>
> Aha. Mine was on my desktop. Extracted to a folder on C: (no
> spaces in directory names) and popups_test.rb runs fine. This is very
> neat.
> But I think a lot of folks are going to trip over this. Can we
> find and escape arbitrary spaces in the pathname to necessary
> files?
> -Chris
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
From chris.mcmahon at verint.com Thu Dec 23 14:48:07 2004
From: chris.mcmahon at verint.com (McMahon, Chris)
Date: Thu, 23 Dec 2004 12:48:07 -0700
Subject: [Wtr-general] Help with popup script
Message-ID:
Hi again...
I changed my IE security settings to make the popups_test.rb
unittest pass.
I have a page that asks the user to confirm a logout by clicking
a confirm popup box, just exactly like in popups_test.rb.
My script clicks the "logout" button, the confirm popup box
appears-- but then my WATIR script hangs. It's probably a RubyNewbie
error, but if you can see why my script doesn't go on to process the
Confirm box, please drop me a line?
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..')
require 'watir'
require 'test/unit'
require 'test/unit/ui/console/testrunner'
require 'testUnitAddons'
require 'unittests/setup'
class TC_logout3 < Test::Unit::TestCase
def gotoPopUpPage()
$ie.goto("10.1.1.1")
#end
$ie.textField(:name, "txtSONum").set("username")
puts( ' Action: entered "username" in the order field ')
$ie.textField(:name, "txtPassword").set("password")
puts( ' Action: entered "password" in password ')
$ie.button(:name, "Button1").click
puts( ' Action: clicked the Login button. ')
puts( 'Expected Result: ')
puts( ' - a page with results should be shown. ')
assert($ie.pageContainsText("Step 1") )
$ie.button(:name, "cmdLogout").click
puts( ' Action: clicked LOGOUT')
end
#SCRIPT HANGS RIGHT HERE-- I WANT IT TO PROCEED AND CLICK THE POPUP
CONFIRM BOX
#CODE BELOW IS VERBATIM FROM THE UNITTEST
def test_confirm
gotoPopUpPage()
c = "start #{$ie.dir.gsub("/" , "\\" )}\\clickJSDialog.rb OK 3"
puts "Starting #{c}"
w = WinClicker.new
w.winsystem(c )
$ie.button("Confirm").click
assert( $ie.textField(:name ,
"confirmtext").verify_contains("OK") )
c = "start #{$ie.dir.gsub("/" , "\\" )}\\clickJSDialog.rb Cancel
3"
puts "Starting #{c}"
w = WinClicker.new
w.winsystem(c )
$ie.button("Confirm").click
assert( $ie.textField(:name ,
"confirmtext").verify_contains("Cancel") )
end
end
From paul.rogers at shaw.ca Thu Dec 23 15:12:00 2004
From: paul.rogers at shaw.ca (Paul Rogers)
Date: Thu, 23 Dec 2004 13:12:00 -0700
Subject: [Wtr-general] Help with popup script
Message-ID: <39eae939da5c.39da5c39eae9@shaw.ca>
It looks like you are not starting the pop up clicker at ht eright place:
puts( 'Expected Result: ')
puts( ' - a page with results should be shown. ')
assert($ie.pageContainsText("Step 1") )
# call the def that starts the clicker here
# I dont know what its called
startPopUpClicker()
$ie.button(:name, "cmdLogout").click
puts( ' Action: clicked LOGOUT')
.
.
.
.
def startPopUpCLicker()
c = "start #{$ie.dir.gsub("/" , "\\" )}\\clickJSDialog.rb Cancel 3"
puts "Starting #{c}"
w = WinClicker.new
w.winsystem(c )
end
----- Original Message -----
From: "McMahon, Chris"
Date: Thursday, December 23, 2004 12:48 pm
Subject: [Wtr-general] Help with popup script
>
> Hi again...
> I changed my IE security settings to make the popups_test.rb
> unittest pass.
> I have a page that asks the user to confirm a logout by clicking
> a confirm popup box, just exactly like in popups_test.rb.
> My script clicks the "logout" button, the confirm popup box
> appears-- but then my WATIR script hangs. It's probably a RubyNewbie
> error, but if you can see why my script doesn't go on to process the
> Confirm box, please drop me a line?
>
> $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..')
> require 'watir'
> require 'test/unit'
> require 'test/unit/ui/console/testrunner'
> require 'testUnitAddons'
> require 'unittests/setup'
>
> class TC_logout3 < Test::Unit::TestCase
>
> def gotoPopUpPage()
> $ie.goto("10.1.1.1")
> #end
>
> $ie.textField(:name, "txtSONum").set("username")
> puts( ' Action: entered "username" in the order field ')
>
> $ie.textField(:name, "txtPassword").set("password")
> puts( ' Action: entered "password" in password ')
>
> $ie.button(:name, "Button1").click
> puts( ' Action: clicked the Login button. ')
>
> puts( 'Expected Result: ')
> puts( ' - a page with results should be shown. ')
>
> assert($ie.pageContainsText("Step 1") )
>
> $ie.button(:name, "cmdLogout").click
> puts( ' Action: clicked LOGOUT')
> end
>
> #SCRIPT HANGS RIGHT HERE-- I WANT IT TO PROCEED AND CLICK THE POPUP
> CONFIRM BOX
> #CODE BELOW IS VERBATIM FROM THE UNITTEST
>
> def test_confirm
> gotoPopUpPage()
> c = "start #{$ie.dir.gsub("/" , "\\" )}\\clickJSDialog.rb
> OK 3"
> puts "Starting #{c}"
> w = WinClicker.new
> w.winsystem(c )
> $ie.button("Confirm").click
> assert( $ie.textField(:name ,
> "confirmtext").verify_contains("OK") )
>
> c = "start #{$ie.dir.gsub("/" , "\\" )}\\clickJSDialog.rb
> Cancel3"
> puts "Starting #{c}"
> w = WinClicker.new
> w.winsystem(c )
> $ie.button("Confirm").click
> assert( $ie.textField(:name ,
> "confirmtext").verify_contains("Cancel") )
>
> end
>
> end
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
From chris.mcmahon at verint.com Thu Dec 23 15:39:33 2004
From: chris.mcmahon at verint.com (McMahon, Chris)
Date: Thu, 23 Dec 2004 13:39:33 -0700
Subject: Spam: Re: [Wtr-general] Help with popup script
Message-ID:
Hmmm. I could be confused, but I think this isn't the thing. Clicking
the "cmdLogout" button actually creates the "OK/Cancel" popup dialog.
So I want to run the clicker *after* I hit the logout button, right?--
but I keep hanging.
However, I suspect I'm still missing a concept about either Ruby
or OO-- continuing to experiment...
-C
> -----Original Message-----
> From: wtr-general-bounces at rubyforge.org
> [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers
> Sent: Thursday, December 23, 2004 1:12 PM
> To: wtr-general at rubyforge.org
> Subject: Spam: Re: [Wtr-general] Help with popup script
>
>
>
> It looks like you are not starting the pop up clicker at ht
> eright place:
>
>
> puts( 'Expected Result: ')
> puts( ' - a page with results should be shown. ')
>
> assert($ie.pageContainsText("Step 1") )
>
> # call the def that starts the clicker here # I dont know
> what its called
> startPopUpClicker()
>
>
> $ie.button(:name, "cmdLogout").click
> puts( ' Action: clicked LOGOUT')
>
>
>
> .
> .
> .
> .
>
> def startPopUpCLicker()
> c = "start #{$ie.dir.gsub("/" , "\\" )}\\clickJSDialog.rb
> Cancel 3"
> puts "Starting #{c}"
> w = WinClicker.new
> w.winsystem(c )
>
> end
>
>
>
>
>
>
> ----- Original Message -----
> From: "McMahon, Chris"
> Date: Thursday, December 23, 2004 12:48 pm
> Subject: [Wtr-general] Help with popup script
>
> >
> > Hi again...
> > I changed my IE security settings to make the popups_test.rb
> > unittest pass.
> > I have a page that asks the user to confirm a logout by clicking
> > a confirm popup box, just exactly like in popups_test.rb.
> > My script clicks the "logout" button, the confirm popup box
> > appears-- but then my WATIR script hangs. It's probably a
> RubyNewbie
> > error, but if you can see why my script doesn't go on to
> process the
> > Confirm box, please drop me a line?
> >
> > $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') require
> > 'watir'
> > require 'test/unit'
> > require 'test/unit/ui/console/testrunner'
> > require 'testUnitAddons'
> > require 'unittests/setup'
> >
> > class TC_logout3 < Test::Unit::TestCase
> >
> > def gotoPopUpPage()
> > $ie.goto("10.1.1.1")
> > #end
> >
> > $ie.textField(:name, "txtSONum").set("username")
> > puts( ' Action: entered "username" in the order field ')
> >
> > $ie.textField(:name, "txtPassword").set("password")
> > puts( ' Action: entered "password" in password ')
> >
> > $ie.button(:name, "Button1").click
> > puts( ' Action: clicked the Login button. ')
> >
> > puts( 'Expected Result: ')
> > puts( ' - a page with results should be shown. ')
> >
> > assert($ie.pageContainsText("Step 1") )
> >
> > $ie.button(:name, "cmdLogout").click
> > puts( ' Action: clicked LOGOUT')
> > end
> >
> > #SCRIPT HANGS RIGHT HERE-- I WANT IT TO PROCEED AND CLICK THE POPUP
> > CONFIRM BOX #CODE BELOW IS VERBATIM FROM THE UNITTEST
> >
> > def test_confirm
> > gotoPopUpPage()
> > c = "start #{$ie.dir.gsub("/" , "\\"
> )}\\clickJSDialog.rb OK 3"
> > puts "Starting #{c}"
> > w = WinClicker.new
> > w.winsystem(c )
> > $ie.button("Confirm").click
> > assert( $ie.textField(:name ,
> > "confirmtext").verify_contains("OK") )
> >
> > c = "start #{$ie.dir.gsub("/" , "\\" )}\\clickJSDialog.rb
> > Cancel3"
> > puts "Starting #{c}"
> > w = WinClicker.new
> > w.winsystem(c )
> > $ie.button("Confirm").click
> > assert( $ie.textField(:name ,
> > "confirmtext").verify_contains("Cancel") )
> >
> > 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 jkohl at telusplanet.net Thu Dec 23 15:44:29 2004
From: jkohl at telusplanet.net (jkohl at telusplanet.net)
Date: Thu, 23 Dec 2004 12:44:29 -0800
Subject: Spam: Re: [Wtr-general] Help with popup script
In-Reply-To:
References:
Message-ID: <1103834669.41cb2e2db173b@webmail.telus.net>
JavaScript popups are weird. They are actually Windows apps, not part of
Internet Explorer. Since JavaScript is a plugin or a "helper app" which runs
within the browser, windows generated by it are not accessible via the DOM.
When a JS popup is created, it hangs Internet Explorer. IE waits until the
JavaScript App Window has been dealt with before doing anything else. So to deal
with JS popups requires thinking a bit backwards than the rest of Watir.
What to do is to have your code sort of anticipate what JS popup will occur, and
then do the action using Watir that creates it. The code to deal with the popup
has to be waiting for it before it occurs since IE is really waiting for the JS
to return with a message, so we can't do anything when that is happening.
Does that make sense? Paul can explain it better than I can.
-Jonathan
Quoting "McMahon, Chris" :
>
> Hmmm. I could be confused, but I think this isn't the thing. Clicking
> the "cmdLogout" button actually creates the "OK/Cancel" popup dialog.
> So I want to run the clicker *after* I hit the logout button, right?--
> but I keep hanging.
> However, I suspect I'm still missing a concept about either Ruby
> or OO-- continuing to experiment...
> -C
>
> > -----Original Message-----
> > From: wtr-general-bounces at rubyforge.org
> > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers
> > Sent: Thursday, December 23, 2004 1:12 PM
> > To: wtr-general at rubyforge.org
> > Subject: Spam: Re: [Wtr-general] Help with popup script
> >
> >
> >
> > It looks like you are not starting the pop up clicker at ht
> > eright place:
> >
> >
> > puts( 'Expected Result: ')
> > puts( ' - a page with results should be shown. ')
> >
> > assert($ie.pageContainsText("Step 1") )
> >
> > # call the def that starts the clicker here # I dont know
> > what its called
> > startPopUpClicker()
> >
> >
> > $ie.button(:name, "cmdLogout").click
> > puts( ' Action: clicked LOGOUT')
> >
> >
> >
> > .
> > .
> > .
> > .
> >
> > def startPopUpCLicker()
> > c = "start #{$ie.dir.gsub("/" , "\\" )}\\clickJSDialog.rb
> > Cancel 3"
> > puts "Starting #{c}"
> > w = WinClicker.new
> > w.winsystem(c )
> >
> > end
> >
> >
> >
> >
> >
> >
> > ----- Original Message -----
> > From: "McMahon, Chris"
> > Date: Thursday, December 23, 2004 12:48 pm
> > Subject: [Wtr-general] Help with popup script
> >
> > >
> > > Hi again...
> > > I changed my IE security settings to make the popups_test.rb
> > > unittest pass.
> > > I have a page that asks the user to confirm a logout by clicking
> > > a confirm popup box, just exactly like in popups_test.rb.
> > > My script clicks the "logout" button, the confirm popup box
> > > appears-- but then my WATIR script hangs. It's probably a
> > RubyNewbie
> > > error, but if you can see why my script doesn't go on to
> > process the
> > > Confirm box, please drop me a line?
> > >
> > > $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') require
> > > 'watir'
> > > require 'test/unit'
> > > require 'test/unit/ui/console/testrunner'
> > > require 'testUnitAddons'
> > > require 'unittests/setup'
> > >
> > > class TC_logout3 < Test::Unit::TestCase
> > >
> > > def gotoPopUpPage()
> > > $ie.goto("10.1.1.1")
> > > #end
> > >
> > > $ie.textField(:name, "txtSONum").set("username")
> > > puts( ' Action: entered "username" in the order field ')
> > >
> > > $ie.textField(:name, "txtPassword").set("password")
> > > puts( ' Action: entered "password" in password ')
> > >
> > > $ie.button(:name, "Button1").click
> > > puts( ' Action: clicked the Login button. ')
> > >
> > > puts( 'Expected Result: ')
> > > puts( ' - a page with results should be shown. ')
> > >
> > > assert($ie.pageContainsText("Step 1") )
> > >
> > > $ie.button(:name, "cmdLogout").click
> > > puts( ' Action: clicked LOGOUT')
> > > end
> > >
> > > #SCRIPT HANGS RIGHT HERE-- I WANT IT TO PROCEED AND CLICK THE POPUP
> > > CONFIRM BOX #CODE BELOW IS VERBATIM FROM THE UNITTEST
> > >
> > > def test_confirm
> > > gotoPopUpPage()
> > > c = "start #{$ie.dir.gsub("/" , "\\"
> > )}\\clickJSDialog.rb OK 3"
> > > puts "Starting #{c}"
> > > w = WinClicker.new
> > > w.winsystem(c )
> > > $ie.button("Confirm").click
> > > assert( $ie.textField(:name ,
> > > "confirmtext").verify_contains("OK") )
> > >
> > > c = "start #{$ie.dir.gsub("/" , "\\" )}\\clickJSDialog.rb
> > > Cancel3"
> > > puts "Starting #{c}"
> > > w = WinClicker.new
> > > w.winsystem(c )
> > > $ie.button("Confirm").click
> > > assert( $ie.textField(:name ,
> > > "confirmtext").verify_contains("Cancel") )
> > >
> > > 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
> >
> >
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
From chris.mcmahon at verint.com Thu Dec 23 15:46:58 2004
From: chris.mcmahon at verint.com (McMahon, Chris)
Date: Thu, 23 Dec 2004 13:46:58 -0700
Subject: [Wtr-general] Ah!
Message-ID:
Thanks Jonathan, that makes sense. Timing is everything, I guess...
> -----Original Message-----
> From: wtr-general-bounces at rubyforge.org
> [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of
> jkohl at telusplanet.net
> Sent: Thursday, December 23, 2004 1:44 PM
> To: wtr-general at rubyforge.org
> Subject: Spam: RE: Spam: Re: [Wtr-general] Help with popup script
>
> JavaScript popups are weird. They are actually Windows apps,
> not part of Internet Explorer. Since JavaScript is a plugin
> or a "helper app" which runs within the browser, windows
> generated by it are not accessible via the DOM.
>
> When a JS popup is created, it hangs Internet Explorer. IE
> waits until the JavaScript App Window has been dealt with
> before doing anything else. So to deal with JS popups
> requires thinking a bit backwards than the rest of Watir.
>
> What to do is to have your code sort of anticipate what JS
> popup will occur, and then do the action using Watir that
> creates it. The code to deal with the popup has to be waiting
> for it before it occurs since IE is really waiting for the JS
> to return with a message, so we can't do anything when that
> is happening.
>
> Does that make sense? Paul can explain it better than I can.
>
> -Jonathan
>
> Quoting "McMahon, Chris" :
>
> >
> > Hmmm. I could be confused, but I think this isn't the thing.
> > Clicking the "cmdLogout" button actually creates the
> "OK/Cancel" popup dialog.
> > So I want to run the clicker *after* I hit the logout
> button, right?--
> > but I keep hanging.
> > However, I suspect I'm still missing a concept about
> either Ruby or
> > OO-- continuing to experiment...
> > -C
From paul.rogers at shaw.ca Thu Dec 23 15:57:39 2004
From: paul.rogers at shaw.ca (Paul Rogers)
Date: Thu, 23 Dec 2004 13:57:39 -0700
Subject: [Wtr-general] Ah!
Message-ID: <3af77a3aac4e.3aac4e3af77a@shaw.ca>
The browser and ruby will wait and do nothing while a javascript alert is displayed.
To click them we start a second script BEFORE they are displayed. This second script will click the button and then the first script can continue
This code is really ugly and Id like to refactor it to something more user friendly.
maybe something like:
ie.startJSCLicker( 'ok' ) # this line starts a clicker
ie.button('Open JS Window') # this causes a js window to open
then the implementation will be simpler.
----- Original Message -----
From: "McMahon, Chris"
Date: Thursday, December 23, 2004 1:46 pm
Subject: [Wtr-general] Ah!
>
>
> Thanks Jonathan, that makes sense. Timing is everything, I guess...
>
>
> > -----Original Message-----
> > From: wtr-general-bounces at rubyforge.org
> > [wtr-general-bounces at rubyforge.org] On Behalf Of
> > jkohl at telusplanet.net
> > Sent: Thursday, December 23, 2004 1:44 PM
> > To: wtr-general at rubyforge.org
> > Subject: Spam: RE: Spam: Re: [Wtr-general] Help with popup script
> >
> > JavaScript popups are weird. They are actually Windows apps,
> > not part of Internet Explorer. Since JavaScript is a plugin
> > or a "helper app" which runs within the browser, windows
> > generated by it are not accessible via the DOM.
> >
> > When a JS popup is created, it hangs Internet Explorer. IE
> > waits until the JavaScript App Window has been dealt with
> > before doing anything else. So to deal with JS popups
> > requires thinking a bit backwards than the rest of Watir.
> >
> > What to do is to have your code sort of anticipate what JS
> > popup will occur, and then do the action using Watir that
> > creates it. The code to deal with the popup has to be waiting
> > for it before it occurs since IE is really waiting for the JS
> > to return with a message, so we can't do anything when that
> > is happening.
> >
> > Does that make sense? Paul can explain it better than I can.
> >
> > -Jonathan
> >
> > Quoting "McMahon, Chris" :
> >
> > >
> > > Hmmm. I could be confused, but I think this isn't the thing.
> > > Clicking the "cmdLogout" button actually creates the
> > "OK/Cancel" popup dialog.
> > > So I want to run the clicker *after* I hit the logout
> > button, right?--
> > > but I keep hanging.
> > > However, I suspect I'm still missing a concept about
> > either Ruby or
> > > OO-- continuing to experiment...
> > > -C
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
From chris.mcmahon at verint.com Thu Dec 23 16:08:36 2004
From: chris.mcmahon at verint.com (McMahon, Chris)
Date: Thu, 23 Dec 2004 14:08:36 -0700
Subject: [Wtr-general] Refactoring is good... =)
Message-ID:
I'm going to have to study on the unit test again. I still
think I'm missing a concept somewhere.
It still seems to me that I should be able to invoke the clicker
properly, but it's not happening. Short pseudocode is :
def gotoPopUpPage()
go to URL
end
def DoClicks
gotoPopUpPage()
log in
test_confirm() #starts clicker
click logout to produce popup
end
def test_confirm()
gotoPopUpPage
start clicker
end.
But the timing is just not working out. Either the script hangs and
never invokes the clicker; or the clicker starts way too early and I get
a script error before I ever generate the popup. If I can figure out a
file-only demonstration of the issue, I'll send it on.
-Chris
> -----Original Message-----
> From: wtr-general-bounces at rubyforge.org
> [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers
> Sent: Thursday, December 23, 2004 1:58 PM
> To: wtr-general at rubyforge.org
> Subject: Spam: Re: [Wtr-general] Ah!
>
> The browser and ruby will wait and do nothing while a
> javascript alert is displayed.
>
> To click them we start a second script BEFORE they are
> displayed. This second script will click the button and then
> the first script can continue
>
> This code is really ugly and Id like to refactor it to
> something more user friendly.
>
> maybe something like:
>
> ie.startJSCLicker( 'ok' ) # this line starts a clicker
> ie.button('Open JS Window') # this causes a js window to open
>
> then the implementation will be simpler.
>
>
>
>
> ----- Original Message -----
> From: "McMahon, Chris"
> Date: Thursday, December 23, 2004 1:46 pm
> Subject: [Wtr-general] Ah!
>
> >
> >
> > Thanks Jonathan, that makes sense. Timing is everything, I guess...
> >
> >
> > > -----Original Message-----
> > > From: wtr-general-bounces at rubyforge.org
> > > [wtr-general-bounces at rubyforge.org] On Behalf Of
> > > jkohl at telusplanet.net
> > > Sent: Thursday, December 23, 2004 1:44 PM
> > > To: wtr-general at rubyforge.org
> > > Subject: Spam: RE: Spam: Re: [Wtr-general] Help with popup script
> > >
> > > JavaScript popups are weird. They are actually Windows apps, not
> > > part of Internet Explorer. Since JavaScript is a plugin
> or a "helper
> > > app" which runs within the browser, windows generated by
> it are not
> > > accessible via the DOM.
> > >
> > > When a JS popup is created, it hangs Internet Explorer. IE waits
> > > until the JavaScript App Window has been dealt with before doing
> > > anything else. So to deal with JS popups requires thinking a bit
> > > backwards than the rest of Watir.
> > >
> > > What to do is to have your code sort of anticipate what JS popup
> > > will occur, and then do the action using Watir that
> creates it. The
> > > code to deal with the popup has to be waiting for it before it
> > > occurs since IE is really waiting for the JS to return with a
> > > message, so we can't do anything when that is happening.
> > >
> > > Does that make sense? Paul can explain it better than I can.
> > >
> > > -Jonathan
> > >
> > > Quoting "McMahon, Chris" :
> > >
> > > >
> > > > Hmmm. I could be confused, but I think this isn't the thing.
> > > > Clicking the "cmdLogout" button actually creates the
> > > "OK/Cancel" popup dialog.
> > > > So I want to run the clicker *after* I hit the logout
> > > button, right?--
> > > > but I keep hanging.
> > > > However, I suspect I'm still missing a concept about
> > > either Ruby or
> > > > OO-- continuing to experiment...
> > > > -C
> >
> >
> > _______________________________________________
> > 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 chris.mcmahon at verint.com Thu Dec 23 16:37:45 2004
From: chris.mcmahon at verint.com (McMahon, Chris)
Date: Thu, 23 Dec 2004 14:37:45 -0700
Subject: [Wtr-general] OK, simple example of my problem
Message-ID:
So I'm gonna look like a complete n00b =), but here's a simple setup
that shows my problem:
Assuming that we're running from the "unittests" directory in the
default WATIR distro:
Put this into a file called "pop.html":
"Type here first then click logout and process popup button.
Junk
:
Then run this script against pop.html:
##########################################
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..')
require 'watir'
require 'test/unit'
require 'test/unit/ui/console/testrunner'
require 'testUnitAddons'
require 'unittests/setup'
class TC_logout3 < Test::Unit::TestCase
def gotoPopUpPage()
$ie.goto("C:\\watir3\\watir\\unittests\\pop.html")
end
def doClicks
gotoPopUpPage()
$ie.textField(:name, "junk").set("12345")
puts( ' Action: entered "12345" in the junk field ')
test_confirm()
$ie.button(:name, "cmdLogout").click
end
def test_confirm()
#gotoPopUpPage()
#doClicks()
c = "start #{$ie.dir.gsub("/" , "\\" )}\\clickJSDialog.rb" # OK
3"
puts "Starting #{c}"
w = WinClicker.new
w.winsystem(c )
$ie.button("Confirm").click
assert( $ie.textField(:name ,
"confirmtext").verify_contains("OK") )
end
end
###################################################
Note that uncommenting the first call in test_confirm starts the clicker
without having loaded the page, while uncommenting doClicks results in
an endless loop that never calls the clicker.
From paul.rogers at shaw.ca Fri Dec 24 11:19:02 2004
From: paul.rogers at shaw.ca (Paul Rogers)
Date: Fri, 24 Dec 2004 09:19:02 -0700
Subject: [Wtr-general] OK, simple example of my problem
Message-ID: <43cae243704f.43704f43cae2@shaw.ca>
Here is your html and script.
Ive made a few changes, and, works for me!
Have a nice Christmas
Paul
----- Original Message -----
From: "McMahon, Chris"
Date: Thursday, December 23, 2004 2:37 pm
Subject: [Wtr-general] OK, simple example of my problem
>
> So I'm gonna look like a complete n00b =), but here's a simple setup
> that shows my problem:
> Assuming that we're running from the "unittests" directory in the
> default WATIR distro:
>
> Put this into a file called "pop.html":
>
> "Type here first then click logout and process popup
> button. style="font-family:Arial;font-
> size:Smaller;height:22px;width:80px;">Junk: name="junk" type="text" maxlength="12" id="junk"
>
id="cmdLogout" tabindex="-1" onClick="return confirm('Continue with
> logout?');" style="width:137px;" />
>
> Then run this script against pop.html:
>
> ##########################################
> $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..')
> require 'watir'
> require 'test/unit'
> require 'test/unit/ui/console/testrunner'
> require 'testUnitAddons'
> require 'unittests/setup'
>
> class TC_logout3 < Test::Unit::TestCase
>
> def gotoPopUpPage()
> $ie.goto("C:\\watir3\\watir\\unittests\\pop.html")
> end
>
> def doClicks
> gotoPopUpPage()
> $ie.textField(:name, "junk").set("12345")
> puts( ' Action: entered "12345" in the junk field ')
>
> test_confirm()
> $ie.button(:name, "cmdLogout").click
>
> end
>
> def test_confirm()
> #gotoPopUpPage()
> #doClicks()
> c = "start #{$ie.dir.gsub("/" , "\\" )}\\clickJSDialog.rb"
> # OK
> 3"
> puts "Starting #{c}"
> w = WinClicker.new
> w.winsystem(c )
> $ie.button("Confirm").click
> assert( $ie.textField(:name ,
> "confirmtext").verify_contains("OK") )
>
> end
> end
> ###################################################
>
> Note that uncommenting the first call in test_confirm starts the
> clickerwithout having loaded the page, while uncommenting doClicks
> results in
> an endless loop that never calls the clicker.
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
> h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: chris.rb
Type: application/octet-stream
Size: 835 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/wtr-general/attachments/20041224/2b795895/attachment.obj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20041224/2b795895/attachment.html
From ati.ozgur at gmail.com Sat Dec 25 05:07:10 2004
From: ati.ozgur at gmail.com (Atilla Ozgur)
Date: Sat, 25 Dec 2004 12:07:10 +0200
Subject: [Wtr-general] Segmentation Fault
Message-ID:
I am unable to run these unit tests.
What I do is as follows. I tried to run last test in the mailing list.
ruby chris.rb
../../watir.rb:475: [BUG] Segmentation fault
ruby 1.8.1 (2003-12-25) [i386-mswin32]
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
-------------------------------------------------
All of the unit-tests give me this error. I think I am doing
something wrong. Is this unit tests are supposed to run in some
program like junit? Or my ruby distro have some problems?
I am using Windows 2000 Pro, Turkish Language edition.
Thank you for your time.
From jkohl at telusplanet.net Sat Dec 25 11:46:53 2004
From: jkohl at telusplanet.net (jkohl at telusplanet.net)
Date: Sat, 25 Dec 2004 08:46:53 -0800
Subject: [Wtr-general] Segmentation Fault
In-Reply-To:
References:
Message-ID: <1103993213.41cd997dbf0e6@webmail.telus.net>
Sounds like the problem described below. There was a bug in Ruby 1.1.1-13. Try
upgrading to a new version of Ruby. Your Readme will tell you what version of
Ruby you have.
Thanks;
-Jonathan
> -----Original Message-----
> From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-
> bounces at rubyforge.org] On Behalf Of Bret Pettichord
> Sent: November 14, 2004 7:05 PM
> To: wtr-general at rubyforge.org
> Subject: Re: [Wtr-general] segfaults in tests and in examples from tarball
>
> This looks like a bug with WIN32OLE that was in Ruby 1.8.1-13.
>
> WATIR has been tested extensively with 1.8.1-11 and 1.8.1-12.
>
> Bret
>
> At 09:32 AM 11/12/2004, McMahon, Chris wrote:
> >
> >With Ruby 1.8.1, on WinXPPro. Best example is probably buttons_test.rb.
> >I get some processing, then
> >**********************************************************
> >-------
> >PASS
> >---------
> >pageContainsText: Looking for: PASS (string) - found it ok
> >../../watir.rb:33: [BUG] Segmentation fault
> >ruby 1.8.1 (2003-12-25) [i386-mswin32]
> >
> >This application has requested the Runtime to terminate it in an unusual
> >way...
> >************************************************************************
> >*****
> >
> > I'm a pure newbie, any pointers to making the unittests and
> >examples run better would be helpful...
> >-Chris
> >
> >
> >
> >
> >_______________________________________________
> >Wtr-general mailing list
> >Wtr-general at rubyforge.org
> >http://rubyforge.org/mailman/listinfo/wtr-general
>
> _____________________
> Bret Pettichord
> www.pettichord.com
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
Quoting Atilla Ozgur :
> I am unable to run these unit tests.
>
> What I do is as follows. I tried to run last test in the mailing list.
>
>
> ruby chris.rb
>
>
>
> ../../watir.rb:475: [BUG] Segmentation fault
> ruby 1.8.1 (2003-12-25) [i386-mswin32]
>
>
> This application has requested the Runtime to terminate it in an unusual
> way.
> Please contact the application's support team for more information.
> -------------------------------------------------
>
> All of the unit-tests give me this error. I think I am doing
> something wrong. Is this unit tests are supposed to run in some
> program like junit? Or my ruby distro have some problems?
>
> I am using Windows 2000 Pro, Turkish Language edition.
>
> Thank you for your time.
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
From chris.mcmahon at verint.com Wed Dec 29 14:58:04 2004
From: chris.mcmahon at verint.com (McMahon, Chris)
Date: Wed, 29 Dec 2004 12:58:04 -0700
Subject: [Wtr-general] Fixed it, but interesting issue.
Message-ID:
Hi...
I had (have?) a basic misunderstanding of how WinClicker works.
I had cargo-culted stuff from the unittest into my script that broke
what I was trying to do.
The following script does the Right Thing in my app. The
interesting part is that I have to invoke gotoPopUpPage again after
having clicked the JS popup thingie in order to get the script to do the
final assert statement correctly.
-Chris
#####################################################
class TC_PopUps < Test::Unit::TestCase
def gotoPopUpPage()
$ie.goto("http://10.1.2.3")
end
def test_simple
gotoPopUpPage()
$ie.textField(:name, "txtUser").set("username")
$ie.textField(:name, "txtPassword").set("password")
$ie.button(:name, "Button1").click
c = "start #{$ie.dir.gsub("/" , "\\" )}\\clickJSDialog.rb OK 3"
puts "Starting #{c}"
w = WinClicker.new
w.winsystem(c )
$ie.button(:name, "cmdLogout").click
gotoPopUpPage()
assert($ie.pageContainsText("Please enter") )
end
end
###########################################################
From chris.mcmahon at verint.com Wed Dec 29 15:54:30 2004
From: chris.mcmahon at verint.com (McMahon, Chris)
Date: Wed, 29 Dec 2004 13:54:30 -0700
Subject: [Wtr-general] Another feature request: address multiple windows by
title?
Message-ID:
Assume File.html and window2.html on the same directory like so:
##################################################################
Window 1 TitleWindow2
##################################################################
Window 222222 Title
This text.
#########################################################
It would be nifty to be able to something like
assert($ie.page "Window 222222 Title" ContainsText("This text") )
Just a thought...
-Chris
__________________________________________________________________________________________
This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries.
The information is intended to be for the use of the individual(s) or
entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. (1)
From jkohl at telusplanet.net Wed Dec 29 16:10:21 2004
From: jkohl at telusplanet.net (Jonathan Kohl)
Date: Wed, 29 Dec 2004 14:10:21 -0700
Subject: [Wtr-general] Another feature request: address multiple windows
bytitle?
In-Reply-To:
Message-ID: <20041229210857.IXGL15878.priv-edtnes27.telusplanet.net@tintin>
I would also like that feature.
-Jonathan
> -----Original Message-----
> From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-
> bounces at rubyforge.org] On Behalf Of McMahon, Chris
> Sent: December 29, 2004 1:55 PM
> To: wtr-general at rubyforge.org
> Subject: [Wtr-general] Another feature request: address multiple windows
> bytitle?
>
>
>
> Assume File.html and window2.html on the same directory like so:
>
> ##################################################################
>
>
> Window 1 Title
>
> Window2
> ##################################################################
>
>
> Window 222222 Title
>
> This text.
> #########################################################
>
> It would be nifty to be able to something like
>
> assert($ie.page "Window 222222 Title" ContainsText("This text") )
>
> Just a thought...
> -Chris
>
>
>
> __________________________________________________________________________
> ________________
> This electronic message may contain proprietary and confidential
> information of Verint Systems Inc., its affiliates and/or subsidiaries.
> The information is intended to be for the use of the individual(s) or
> entity(ies) named above. If you are not the intended recipient (or
> authorized to receive this e-mail for the intended recipient), you may not
> use, copy, disclose or distribute to anyone this message or any
> information contained in this message. If you have received this
> electronic message in error, please notify us by replying to this e-mail.
> (1)
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
From jkohl at telusplanet.net Thu Dec 30 12:39:46 2004
From: jkohl at telusplanet.net (Jonathan Kohl)
Date: Thu, 30 Dec 2004 10:39:46 -0700
Subject: FW: [Wtr-general] elements with the same name
Message-ID: <20041230173810.HZLA25352.priv-edtnes46.telusplanet.net@tintin>
Forwarding to the list...
-----Original Message-----
From: Jonathan Kohl [mailto:jonathan at kohl.ca]
Sent: December 30, 2004 8:02 AM
To: 'Mike at MichaelDKelly.com'
Subject: RE: [Wtr-general] User guide
Hi Michael;
It's probably because there are two Search images. Paul and I have both run
into this before (I once tried a demo on Amazon and had problems as well),
and he has talked about adding code to Watir to handle it. I'll have to
check with Paul to see if this is enabled yet. WTR handles it, so I know
it's possible.
Essentially we drill down according to the form, and then click the image.
That gets around having two elements that are the same on a page throwing
things off. On BookPool, this will be harder as both have an action
"/.x/7ashy539k4/ss" and there is no name element. However, we can get around
it by using an array index.
I'll ask Paul if this is enabled and how to do it in Watir. I haven't looked
at this for a couple of months.
-Jonathan
> -----Original Message-----
> From: Michael Kelly [mailto:Mike at MichaelDKelly.com]
> Sent: December 30, 2004 7:34 AM
> To: jonathan at kohl.ca
> Subject: Re: [Wtr-general] User guide
>
> Jonathan,
>
> I'm trying a test on BookPool.com. The following is my code
> to click the Search image:
>
> $ie.image
> (:src, "http://g.bookpool.com/hp/search_btn.gif").click
>
> it returns:
>
> Finding an image how: src What
> http://g.bookpool.com/hp/search_btn.gif
> Image on page: src = http://g.bookpool.com/hp/clear_dot.gif
> [...]
> Image on page: src = http://g.bookpool.com/hp/grey_dot.gif
> Bookpool_Search.rb:25: undefined method `submit' for
> # (NoMethodError)
> >Exit code: 1
>
> Can you tell me what I'm doing wrong? Is it because there
> are two search images? I looked in the user manual and I
> have been looking at the source code, but I'm not having any
> luck.
>
> Thanks,
> Mike
From jkohl at telusplanet.net Thu Dec 30 12:40:59 2004
From: jkohl at telusplanet.net (Jonathan Kohl)
Date: Thu, 30 Dec 2004 10:40:59 -0700
Subject: [Wtr-general] FW: no buttons to do a submit
Message-ID: <20041230173923.IALR25352.priv-edtnes46.telusplanet.net@tintin>
Forwarding to the list...
-----Original Message-----
From: Jonathan Kohl [mailto:jonathan at kohl.ca]
Sent: December 30, 2004 8:34 AM
To: 'Mike at MichaelDKelly.com'
Subject: RE: [Wtr-general] User guide
Michael;
What Watir does in this case is to just submit the form. I'll have to dig
out the code that can do this and add it to the User Guide.
On the BookPool page, the Forms don't have unique identifiers as tag
attributes, so it makes things harder. Still doable, but harder.
On amazon.com, the "Go" button after the Search input field is in two
different forms that are easily identifiable. The first one: