Re: [Wtr-general] Controlling threads testing speed

2005-11-07 Thread Bill Agee
-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

Re: [Wtr-general] How to manipulate attaching files

2005-12-15 Thread Bill Agee
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")

Re: [Wtr-general] threads to close security - working unless it doesn'tcome up.

2006-01-17 Thread Bill Agee
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

Re: [Wtr-general] [(SPAM) - Tagged by Sybari Antispam] Re: close all IE windows

2006-01-24 Thread Bill Agee
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

Re: [Wtr-general] Apache User Authentication

2006-01-31 Thread Bill Agee
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

Re: [Wtr-general] Declarative Watir scripts?

2006-02-09 Thread Bill Agee
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

Re: [Wtr-general] Declarative Watir scripts?

2006-02-09 Thread Bill Agee
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

Re: [Wtr-general] Verify HTTP 200 OK response

2006-02-15 Thread Bill Agee
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

Re: [Wtr-general] Update on Clicking Windows File Download - Security Warning Dialog Box

2006-02-17 Thread Bill Agee
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

Re: [Wtr-general] Script hangs and does nothing

2006-02-23 Thread Bill Agee
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

Re: [Wtr-general] Unknown OLE server: `AutoItX3.Control' (WI2OLERuntimeError)! Why?

2006-03-02 Thread Bill Agee
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

Re: [Wtr-general] WindowLogonExample.rb - should it work for me?

2006-03-13 Thread Bill Agee
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

Re: [Wtr-general] Send results to console and text file

2006-03-23 Thread Bill Agee
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

Re: [Wtr-general] report failure question?

2006-09-21 Thread Bill Agee
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

Re: [Wtr-general] report failure question?

2006-09-23 Thread Bill Agee
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

Re: [Wtr-general] cell access

2006-09-23 Thread Bill Agee
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

Re: [Wtr-general] report failure question?

2006-09-23 Thread Bill Agee
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

Re: [Wtr-general] cell access

2006-09-23 Thread Bill Agee
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

Re: [Wtr-general] file download

2006-09-25 Thread Bill Agee
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

Re: [Wtr-general] WinClicker - too many callbacks are defined

2006-10-27 Thread Bill Agee
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:

Re: [Wtr-general] I want to use Watir to test Firefox and Safari

2006-11-30 Thread Bill Agee
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

Re: [Wtr-general] Attach problem when remotely running tests using telnet

2007-02-20 Thread Bill Agee
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

Re: [Wtr-general] How to clear the cache of the browser?

2007-03-06 Thread Bill Agee
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,

Re: [Wtr-general] watir execution from webserver

2007-03-26 Thread Bill Agee
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

Re: [Wtr-general] watir execution from webserver

2007-03-27 Thread Bill Agee
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

Re: [Wtr-general] watir execution from webserver

2007-03-28 Thread Bill Agee
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

Re: [Wtr-general] watir execution from webserver

2007-03-28 Thread Bill Agee
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

Re: [Wtr-general] watir execution from webserver

2007-03-30 Thread Bill Agee
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'

Re: [Wtr-general] How to clear cache from within watir script?

2007-05-23 Thread Bill Agee
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

Re: [Wtr-general] how to properly use the snippet function?

2007-06-13 Thread Bill Agee
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

Re: [Wtr-general] Redirection of standard output

2007-06-25 Thread Bill Agee
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

Re: [Wtr-general] Redirection of standard output

2007-06-25 Thread Bill Agee
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

Re: [Wtr-general] UnknownObject Exception when running test cases

2007-06-26 Thread Bill Agee
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

Re: [Wtr-general] Problems with Test::Unit in Eclipse

2007-06-26 Thread Bill Agee
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