All -
I have been looking through the examples to try to find a way to use
Watir to get me past the windows style login for the web application I'm
testing. I found the WindowLogonExample.rb in the unittests directory.
I modified WindowLogonExtra.rb and WindowHelper.rb to login to my
application (instead of clio.lyris.com) and it worked - yeah!!
However, I'm not sure exactly how this works or what to do from there.
I read the rdoc page for Test/Unit and at least now I understand that
Test/Unit automagically runs the method(?) that begins with "test_".
However, once the threads are merged, how do I do something with the
resultant page? As below, I tried to address the running browser as
"a", but that didn't work. Do I have to attach to the ie instance that
is left after the join?
Also, is it possible to leave the browser open after TC_Logon_Test
finishes?
My code is below.
Thanks in advance!
Alan
***************************************************************
require 'unittests/setup'
require 'watir/WBWindowHelper'
class TC_Logon_Test < Test::Unit::TestCase
include Watir
def goto_windows_login_page
$ie.goto('http://my.url.com/')
end
def test_window_logon
a = Thread.new {
system('ruby WB-script-myfirst-loginthread.rb')
}
b = Thread.new {
goto_windows_login_page
}
a.join
b.join
a.div(:id, "topnavlinks").link(:text, "Client Management").click()
sleep(30)
end
end
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general