added wait after submit

This commit is contained in:
roy 2012-11-13 17:21:03 +01:00
parent a78dd2368a
commit 48e43667f5

View file

@ -28,6 +28,8 @@ class ExampleTest < Test::Unit::TestCase
element_password = browser.find_element :name => "password" element_password = browser.find_element :name => "password"
element_password.send_keys "123456" element_password.send_keys "123456"
element_password.submit element_password.submit
wait = Selenium::WebDriver::Wait.new(:timeout => 10) # seconds
wait.until { driver.find_element(:id => "app") }
assert_equal browser.current_url, "https://portal.znuny.com/#login" assert_equal browser.current_url, "https://portal.znuny.com/#login"
end end
@ -38,6 +40,8 @@ class ExampleTest < Test::Unit::TestCase
element_password = browser.find_element :name => "password" element_password = browser.find_element :name => "password"
element_password.send_keys "090504" element_password.send_keys "090504"
element_password.submit element_password.submit
wait = Selenium::WebDriver::Wait.new(:timeout => 10) # seconds
wait.until { driver.find_element(:id => "app") }
assert_equal browser.current_url, "https://portal.znuny.com/#ticket_view/my_tickets" assert_equal browser.current_url, "https://portal.znuny.com/#ticket_view/my_tickets"
end end
end end