Sha256: 19035585f69a3e3bdae9280ec0accf7695ec1651104f018aa75f452ec42fb6cb

Contents?: true

Size: 914 Bytes

Versions: 4

Compression:

Stored size: 914 Bytes

Contents

module Teber
    module Wait

        # avoid defining self in def self.some_method -> def some_method
        class << self

            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

            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
        end
    end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
teber-library-1.0.0 lib/teber/wait.rb
teber-library-0.1.3 lib/teber/wait.rb
teber-library-0.1.2 lib/teber/wait.rb
teber-library-0.1.1 lib/teber/wait.rb