Hi friend,
I will tell u my code first
Code:
class TC_myTest < Test::Unit::TestCase
include Watir
def setup()
@ie=Watir::IE.new
@ie.goto("http://192.168.1.12/~lawson/collaboration/src")
# assert_match /Welcome Guest/, browser.div(:id, "banner").text
end
def test_search
assert(@ie.text_field(:name, "textfield").exists?)
@ie.text_field(:name, "textfield").set("Watir World")
@ie.button(:value, "Search").click
if @ie.contains_text("Watir world")
puts"Observed result"
puts "Test Passed. Found the test string: 'Watir world'.
actual Results match Expected Results."
else
puts" "
puts"Observed result"
puts " Test Failed! Could not find: 'Watir world'"
end
end
def test_login
assert([EMAIL PROTECTED](:text, "Login")})
@ie.link(:text,"Login").click
assert(@ie.text_field(:name, "user_name").exists?)
@ie.text_field(:name,"user_name").set("lawson")
assert(@ie.text_field(:name, "password").exists?)
@ie.text_field(:name,"password").set("lawson123")
@ie.button(:value,"login").click
end
*. Hey here it opens two Explorer in which two tests are running
seperately. Here
test_login runs first,
test_search next.. but I have mentioned teset_search at first...
*.For test_loin it opens a window explorer after completing that
test_search it opens another..
How to avoid opening 2 Explorer at a time..
reply me,
M.Dhamodharan
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5658&messageID=15802#15802
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general