Sha256: 0734a26274a0277949a378cf45cfa94b6e40740d7639b0aecf982558800b1200

Contents?: true

Size: 972 Bytes

Versions: 70

Compression:

Stored size: 972 Bytes

Contents

module Appium
  module Android
    # Click the first alert button that contains value or by index.
    # @param value [Integer, String] either an integer index of the button or the button's name
    # @return [void]
    def alert_click(value)
      button(value).click
    end

    # Accept the alert.
    # The last button is considered "accept."
    # @return [void]
    def alert_accept
      last_button.click
    end

    # Get the text of the alert's accept button.
    # The last button is considered "accept."
    # @return [String]
    def alert_accept_text
      last_button.text
    end

    # Dismiss the alert.
    # The first button is considered "dismiss."
    # @return [void]
    def alert_dismiss
      first_button.click
    end

    # Get the text of the alert's dismiss button.
    # The first button is considered "dismiss."
    # @return [String]
    def alert_dismiss_text
      first_button.text
    end
  end # module Android
end # module Appium

Version data entries

70 entries across 70 versions & 1 rubygems

Version Path
appium_lib-10.2.0 lib/appium_lib/android/element/alert.rb
appium_lib-10.1.0 lib/appium_lib/android/element/alert.rb
appium_lib-10.0.0 lib/appium_lib/android/element/alert.rb
appium_lib-9.18.0 lib/appium_lib/android/element/alert.rb
appium_lib-9.17.0 lib/appium_lib/android/element/alert.rb
appium_lib-9.16.1 lib/appium_lib/android/element/alert.rb
appium_lib-9.16.0 lib/appium_lib/android/element/alert.rb
appium_lib-9.15.2 lib/appium_lib/android/element/alert.rb
appium_lib-9.15.1 lib/appium_lib/android/element/alert.rb
appium_lib-9.15.0 lib/appium_lib/android/element/alert.rb
appium_lib-9.14.3 lib/appium_lib/android/element/alert.rb
appium_lib-9.14.2 lib/appium_lib/android/element/alert.rb
appium_lib-9.14.1 lib/appium_lib/android/element/alert.rb
appium_lib-9.14.0 lib/appium_lib/android/element/alert.rb
appium_lib-9.13.0 lib/appium_lib/android/element/alert.rb
appium_lib-9.12.1 lib/appium_lib/android/element/alert.rb
appium_lib-9.12.0 lib/appium_lib/android/element/alert.rb
appium_lib-9.11.1 lib/appium_lib/android/element/alert.rb
appium_lib-9.11.0 lib/appium_lib/android/element/alert.rb
appium_lib-9.10.0 lib/appium_lib/android/element/alert.rb