From 48e43667f54cae45764eb31ed9ad4d032ab23488 Mon Sep 17 00:00:00 2001 From: roy Date: Tue, 13 Nov 2012 17:21:03 +0100 Subject: [PATCH] added wait after submit --- test/ui_test.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/ui_test.rb b/test/ui_test.rb index e0c1151d1..42d44a209 100644 --- a/test/ui_test.rb +++ b/test/ui_test.rb @@ -28,6 +28,8 @@ class ExampleTest < Test::Unit::TestCase element_password = browser.find_element :name => "password" element_password.send_keys "123456" 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" end @@ -38,6 +40,8 @@ class ExampleTest < Test::Unit::TestCase element_password = browser.find_element :name => "password" element_password.send_keys "090504" 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" end end