module Teber::Wait

Public Class Methods

wait_for_element(locator, timeout=$conf["implicit_wait"], focus_driver = $focus_driver) click to toggle source
# File lib/teber/wait.rb, line 7
def wait_for_element(locator, timeout=$conf["implicit_wait"], focus_driver = $focus_driver)
    index=0
    while locator.is_present?(focus_driver) == false
        sleep 1
        if index == timeout
            break
        end
        index+=1
    end
end
wait_for_element_hide(locator, timeout=$conf["implicit_wait"], focus_driver = $focus_driver) click to toggle source
# File lib/teber/wait.rb, line 18
def wait_for_element_hide(locator, timeout=$conf["implicit_wait"], focus_driver = $focus_driver)
    index=0
    while locator.is_present?(focus_driver) == true
        sleep 1
        if index == timeout
            break
        end
        index+=1
    end
end