Sha256: 52725b5cd2f284136162e203d726ef60357a26281455260b1fe257bc5b181ded

Contents?: true

Size: 521 Bytes

Versions: 13

Compression:

Stored size: 521 Bytes

Contents

module TestCentricity
  class AppAlert < AppUIElement
    def initialize(name, parent, locator, context)
      super
      @type = :alert
    end

    def await(seconds)
      timeout = seconds.nil? ? Environ.default_max_wait_time : seconds
      wait = Selenium::WebDriver::Wait.new(timeout: timeout)
      wait.until { exists? }
      true
    rescue
      false
    end

    def accept
      alert_accept
      wait_until_gone(5)
    end

    def dismiss
      alert_dismiss
      wait_until_gone(5)
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
testcentricity-3.0.2 lib/testcentricity/app_elements/alert.rb
testcentricity-3.0.1 lib/testcentricity/app_elements/alert.rb
testcentricity-3.0.0 lib/testcentricity/app_elements/alert.rb
testcentricity-2.4.3 lib/testcentricity/app_elements/alert.rb
testcentricity-2.4.2 lib/testcentricity/app_elements/alert.rb
testcentricity-2.4.1 lib/testcentricity/app_elements/alert.rb
testcentricity-2.4.0 lib/testcentricity/app_elements/alert.rb
testcentricity-2.3.19 lib/testcentricity/app_elements/alert.rb
testcentricity-2.3.18 lib/testcentricity/app_elements/alert.rb
testcentricity-2.3.17 lib/testcentricity/app_elements/alert.rb
testcentricity-2.3.16.1 lib/testcentricity/app_elements/alert.rb
testcentricity-2.3.16 lib/testcentricity/app_elements/alert.rb
testcentricity-2.3.14 lib/testcentricity/app_elements/alert.rb