Sha256: 97289e5a955363ed36e44f491740ca78efa1b44b75964e13c0f25cde5371dd53

Contents?: true

Size: 1.04 KB

Versions: 1

Compression:

Stored size: 1.04 KB

Contents

module Calabash
  module Android
    # @!visibility private
    module Interactions
      # Go back.
      def go_back
        dismiss_keyboard
        press_back_button
      end

      # Go to the home screen.
      def go_home
        Device.default.go_home

        true
      end

      # Get the name of the currently focused activity
      #
      # @example
      #  puts focused_activity
      #  # => com.example.MainActivity
      #
      # @return [String] The name of the currently focused activity.
      def focused_activity
        Device.default.current_focus[:activity]
      end

      # Get the name of the currently focused package
      #
      # @example
      #  puts focused_package
      #  # => com.example
      #
      # @return [String] The name of the currently focused package
      def focused_package
        Device.default.current_focus[:package]
      end

      # @!visibility private
      def _evaluate_javascript_in(query, javascript)
        Device.default.evaluate_javascript_in(query, javascript)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
calabash-1.9.9.pre3 lib/calabash/android/interactions.rb