I asked a real foolish question a couple of weeks ago with regard to how you can get Watir to enter in username and password credentials into a user auth dialog - that I should apologize for. I figured the silence was really a nod to RTFM so I did more digging in the 'unitTests' directory and found the ' WindowLogonExample.rb' and 'WindowLogonExtra.rb' files that apparently were named too well for me to notice the first time around.

So I'm @ a bit of a stumbling block.

In the 'WindowLogonExtra.rb' - which is the script called by one of the threads in the ' WindowLogonExample.rb' - the code is short and sweet.

<begin_code>
require 'watir/WindowHelper'

helper = WindowHelper.new
helper.logon('Connect to clio.lyris.com ')
<end_code>


I modified the code so it reads the following:

<begin_code>
require 'watir/WindowHelper'

r = Regexp.new("Connect to stage.*")

helper = WindowHelper.new
helper.logon("#{r}", name="foo", password="bar")
<end_code>

We have multiple staging sites, and I'd like not to clutter up the code with a huge if/else or case statement that accounts for all of the different domains. I basically want to login to any auth window that matches the Regex. Unfortunately, it looks like the script just hangs since the WindowHelper can't seem to find the window.

Does anyone know if I'm doing something wrong? Can the 'logon' method not accept a Regular _expression_ for the 'title' parameter? Is this a AutoIt deficiency?
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to