module RoboTest::Wait
Public Class Methods
wait_for_element(locator, timeout=$conf["implicit_wait"], focus_driver = $focus_driver)
click to toggle source
# File lib/robotest/wait.rb, line 7 def wait_for_element(locator, timeout=$conf["implicit_wait"], focus_driver = $focus_driver) index=0 case locator when RoboTest::Locator while locator.is_present?(focus_driver) == false sleep 1 if index == timeout break end index+=1 end when RoboTest::MultiLocator list = locator.is_present?(focus_driver) while list.include?(false) sleep 1 if index == timeout break end index+=1 end end end
wait_for_element!(locator, timeout=$conf["implicit_wait"], focus_driver = $focus_driver)
click to toggle source
# File lib/robotest/wait.rb, line 54 def wait_for_element!(locator, timeout=$conf["implicit_wait"], focus_driver = $focus_driver) wait_for_element(locator, timeout, focus_driver) case locator when RoboTest::Locator raise "Element is not found !!!" unless locator.is_present? when RoboTest::MultiLocator raise "No element is found !!!" unless locator.is_present?.include?(true) end end
wait_for_element_hide(locator, timeout=$conf["implicit_wait"], focus_driver = $focus_driver)
click to toggle source
# File lib/robotest/wait.rb, line 31 def wait_for_element_hide(locator, timeout=$conf["implicit_wait"], focus_driver = $focus_driver) index=0 case locator when RoboTest::Locator while locator.is_present?(focus_driver) == true sleep 1 if index == timeout break end index+=1 end when RoboTest::MultiLocator list = locator.is_present?(focus_driver) while list.include?(true) sleep 1 if index == timeout break end index+=1 end end end
wait_for_element_hide!(locator, timeout=$conf["implicit_wait"], focus_driver = $focus_driver)
click to toggle source
# File lib/robotest/wait.rb, line 64 def wait_for_element_hide!(locator, timeout=$conf["implicit_wait"], focus_driver = $focus_driver) wait_for_element_hide(locator, timeout, focus_driver) case locator when RoboTest::Locator raise "Element is not hidden !!!" if locator.is_present? when RoboTest::MultiLocator raise "No element is hidden !!!" if locator.is_present?.include?(true) end end