Sha256: bce962171a3653a977ab0941db1591c1eb21f1257157a6dd72d324842258d8a1

Contents?: true

Size: 886 Bytes

Versions: 55

Compression:

Stored size: 886 Bytes

Contents

# encoding: utf-8
module Appium::Android
  # Tap the alert button identified by value.
  # @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 Appium::Android

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
appium_lib-0.24.1 lib/appium_lib/android/element/alert.rb
appium_lib-0.24.0 lib/appium_lib/android/element/alert.rb
appium_lib-0.23.0 lib/appium_lib/android/element/alert.rb
appium_lib-0.22.1 lib/appium_lib/android/element/alert.rb
appium_lib-0.22.0 lib/appium_lib/android/element/alert.rb
appium_lib-0.21.0 lib/appium_lib/android/element/alert.rb
appium_lib-0.19.1 lib/appium_lib/android/element/alert.rb
appium_lib-0.19.0 lib/appium_lib/android/element/alert.rb
appium_lib-0.18.2 lib/appium_lib/android/element/alert.rb
appium_lib-0.18.1 lib/appium_lib/android/element/alert.rb
appium_lib-0.18.0 lib/appium_lib/android/element/alert.rb
appium_lib-0.17.0 lib/appium_lib/android/element/alert.rb
appium_lib-0.16.0 lib/appium_lib/android/element/alert.rb
appium_lib-0.15.2 lib/appium_lib/android/element/alert.rb
appium_lib-0.15.1 lib/appium_lib/android/element/alert.rb
appium_lib-0.15.0 lib/appium_lib/android/element/alert.rb
appium_lib-0.14.0 lib/appium_lib/android/element/alert.rb
appium_lib-0.13.0 lib/appium_lib/android/element/alert.rb
appium_lib-0.12.0 lib/appium_lib/android/element/alert.rb
appium_lib-0.11.1 lib/appium_lib/android/element/alert.rb