-Original Message-
Subject: [Wtr-general] Controlling threads testing speed
What tricks are available for timing threads and controlling
the speed of WATIR? How can we make sure a thread has ended?
The basic concern is that the WATIR script will work, then it
may not work, and
Title: Message
I think file fields are treated as a different type of object than text
fields.
But you should be able toset file fields using 'fileField'...here's
an example from the "filefield_test.rb" WATIR unit test:
$ie.fileField(:name,"file1").set($htmlRoot +
"fileupload.html")
Title: Message
I think that happens because the autoit WinWait callinsidethe
'push_security_alert_yes' method doesn't have a timeout
value.Soit waits forever,looking for the "Security
Alert" window. You can check out the details of how that popup is
dismissed bylookingin your localcopy of
On 1/24/06, Richard Lawrence [EMAIL PROTECTED] wrote:
...
Unfortunately, fixing the bug doesn't get rid of the orphan IE window
from the last run of the test suite. And because of the way my team
develops smoke tests for this app, this is a common pattern for a bug in
smoke tests; the smoke
On 1/30/06, Terry Peppers [EMAIL PROTECTED] wrote:
I was looking through the old Watir mailing lists for some information on
how I might be able to bypass the Apache user authentication on our staging
machine without using AutoIt. I didn't come up with much aside from use -
AutoIt. One of our
On 2/9/06, Brian Vallelunga [EMAIL PROTECTED] wrote:
As I was typing in line 261 of very basic and repetitive Watir code, I
that much of this scripting should be able to be done declaratively,
especially when using the scripts to simply input values and check
responses. Has anyone done
On 2/9/06, Hugh Sasse [EMAIL PROTECTED] wrote:
On Thu, 9 Feb 2006, Bill Agee wrote:
On the other hand, not using the XML config files will probably make
for a steeper learning curve. The tradeoffs are interesting.
Why is this, do you think? OK, XML syntax is pretty standard
On 2/15/06, Chris Schmechel [EMAIL PROTECTED] wrote:
Is there an equivalent method in Watir or something I can query in the DOM
to return the HTTP status after the ie.button().click method finishes? It
would be nice to have something similar to $mech-status in Perl. I'm only
aware of
On 2/17/06, Chris Schmechel [EMAIL PROTECTED] wrote:
I was able to write a Perl Win32::GuiTest to do the following:
@window = FindWindowLike(0,File Download,);
SetForegroundWindow($window[0]);
SendKeys({SPACE});
It seems pretty common for people to call a helper script like the one
On 2/23/06, saud aziz [EMAIL PROTECTED] wrote:
BTW, does it work for any of you?
For me it errors out on the image call at line 12. I didn't check the
page source to see if the image is missing/named something else/etc.
Also, at first the script would hang for me; then I tried running it
with
On 3/2/06, Paatsch, Bernd [EMAIL PROTECTED] wrote:
:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1311:in
`initialize': Unknown OLE server: `AutoItX3.Control' (WI2OLERuntimeError)
Maybe AutoItX.dll didn't get registered on his machine during the
Watir install? I've never had to
That particular unit test works fine for me on XP Pro SP2, however I
installed Watir using the win32 .exe installer. From the look of
things you installed with the .gem, I wager?
It could be the autoit DLL is not registered on your system. Perhaps
installing with the .gem doesn't handle that
On 3/23/06, Padhma N [EMAIL PROTECTED] wrote:
Hi,
I have 2 questions.
(1) I would like to send the results of my test suite to a .txt file and
also want the results to be seen on the console. How do I do that?
I know that I can use the following command in the command prompt-
function1.rb
Are you using Test::Unit::Reporter? It could be useful to put
together a small demo script that will demonstrate the problem.
So it sounds like you have a test that is expected to fail, and it's
not failing? (Or is it that the script is behaving properly, but the
report does not have the
Here are some other suggestions:
1) Perhaps try adding messages to your asserts. If you just want some
extra logging when failures occur, this may be all you need to do.
All the assert methods I've seen support this; just add the message as
the last arg you pass to the assert call.
The message
I don't think Watir (1.4.1, at least) has built-in support for the th tag.
But if you know the index of that span in the document, you can get
to it using $ie.span(:index, theIndex)
Otherwise, if you really need to interact with the TH itself, you may
need to use Watir 1.5.x and its new XPath
Whoops, my verify example was meant to be more like this:
test_testMethodFoo
result = $ie.link(:text, nameOfLink).exists?
verify(result)
puts Test is still executing...
if !result
do_some_extra_stuff()
end
end
___
Wtr-general mailing list
by zooming in on the target. Sometimes you have to step
back and take in the big picture too.
Paul C.
On 22/09/06, Bill Agee [EMAIL PROTECTED] wrote:
I don't think Watir (1.4.1, at least) has built-in support for the th
tag.
But if you know the index of that span in the document, you can
Here's a way to get a binary file and save it locally using net/http, built
from the example on this site:
http://www.rubynoob.com/articles/2006/08/21/how-to-download-files-with-a-ruby-script
# Save the google logo.gif to the current dir.
require
The version of DL that's currently in the Ruby standard library has a
hard-coded limit of 10 callbacks.
According to this post from last summer, some fixes in WinClicker
methods were contributed to Watir 1.5, to work around this problem:
As for trying out FireWatir, you can get a prebuilt copy of the JSSh
extension (as well as the most recent installation instructions and
code) at the google code site:
http://firewatir.googlecode.com/svn/trunk/Installation/
If you use that, you shouldn't need to rebuild firefox. I think you
can
I also ran into this problem a while back. After trying the same
options you listed, I wound up working around it by using Windows task
scheduler to run the scripts that needed the attach method. It was a
bummer to not be able to manually start the scripts from a remote
machine whenever I
Someone posted a Ruby snippet here which will clear the IE cache:
http://rubyforge.org/snippet/detail.php?type=snippetid=26
I've used it from time to time and it seems to work fine. It uses
functions from the MS WinINet API to walk the cache and delete each
item.
Thanks
Bill
On 3/5/07,
One bare-bones solution for this problem is to use the Ruby gserver library to
start your tests - see the code snippets in this post:
http://www.mail-archive.com/wtr-general@rubyforge.org/msg07247.html
The idea is to leave a little Ruby script listening on the test client, and
when someone
I posted my zipped rails app as an attachment on the Watir contributions page:
http://wiki.openqa.org/display/WTR/Rails+test+runner+example+app
In my haste to reply I lost track of the fact that you already had something
similar working, except for the issue with the goto method not working
The way I solved this back when I was using the rails app was:
- I put all my library files into a common dir
- I added a line of code to each test script that allows it to find and add the
lib dir to $LOAD_PATH
For this I use the same idiom from some of the Watir unit test files (in this
The version of the runner app I posted doesn't check to see if a script is
already running before it executes a new one. But that would definitely be
necessary if more than one person is likely to try to run a Watir script at the
same time.
Some solutions I considered were to use a lock
For a quick fix, try adding this to the top of your
c:/runner/data/suites/project/test.rb file (before any require statements):
$LOAD_PATH.unshift c:/runner/data/suites/ if $0 == __FILE__
That way when test.rb is executed, the suites dir will be added to $LOAD_PATH,
and require 'library'
Give the script from this page a try:
http://rubyforge.org/snippet/detail.php?type=snippetid=26
For a quick demo just copy/paste the whole thing into a file, name it
del_cache.rb, and run it. It always worked fine for me on XP SP2.
___
Wtr-general
When I needed to use that snippet, I just left the whole thing in a
separate file, and initiated the cache/cookie cleanup with
system('ruby del_cache.rb')
You could also probably paste the whole blob of code into a new method
and it should work.
It would be possible to do the same work in fewer
watir-check.rb 21 | tee watir-check.tmp
I am using Windows XP so this is run in cmd.exe, but it normally works
with this syntax. (tee.exe is from gnuwin32.)
This did not work, the .tmp file is created but is empty and I see
nothing in the console window.
Does running the command like
I think I understand what is happening now. It is buffering. I did not
notice, since I let the program ran for long time in a loop and
interrupted it later (with Control-C).
After some googling I inserted
STDOUT.flush
and this cured the problem.
Ah, good call. Another way to cure it
I noticed the line:
$ie.text_field(:name, Find Account).click
Is in both the end of the login method and the beginning of the
clickLinks method. Maybe that is throwing off the state that
clickLinks expects?
Also, maybe check to see if test_clickLinks is running before
test_login. If I recall
If you mean the __FILE__ variable, it is a pseudo variable that
contains the current source file name. So it will work even when used
as the first line of a script.
It's really useful in cases like this, where you need to dynamically
add dir names to the load path before you try to require other
34 matches
Mail list logo