class Calabash::Cucumber::Automator::Automator

@!visibility private

Public Class Methods

new(*args) click to toggle source

@!visibility private

# File lib/calabash-cucumber/automator/automator.rb, line 13
def initialize(*args)
  abstract_method!
end

Public Instance Methods

char_for_keyboard_action(action_key) click to toggle source

@!visibility private

Respond to keys like ‘Delete’ or ‘Return’.

# File lib/calabash-cucumber/automator/automator.rb, line 127
def char_for_keyboard_action(action_key)
  abstract_method!
end
client() click to toggle source

@!visibility private

# File lib/calabash-cucumber/automator/automator.rb, line 33
def client
  abstract_method!
end
device() click to toggle source

@!visibility private

This code is redundant. It would be easy to pass the Launcher device instance to the automator, but that would require an XTC patch.

This code is also duplicated in the EnvironmentHelpers.

We need the device screen size to support full-screen pan gestures.

Asking for the top-most view is not good enough and asking for the largest UIWindow is not specific enough (map apps have a huge window).

# File lib/calabash-cucumber/automator/automator.rb, line 48
def device
  @device ||= begin
    require "calabash-cucumber/http/http"
    require "calabash-cucumber/environment"
    require "calabash-cucumber/device"
    _, body = Calabash::Cucumber::HTTP.ensure_connectivity
    endpoint = Calabash::Cucumber::Environment.device_endpoint
    Calabash::Cucumber::Device.new(endpoint, body)
  end
end
dismiss_ipad_keyboard() click to toggle source

@!visibility private

Caller is responsible for limiting calls to iPads and waiting for the keyboard to disappear.

# File lib/calabash-cucumber/automator/automator.rb, line 162
def dismiss_ipad_keyboard
  abstract_method!
end
double_tap(options) click to toggle source

@!visibility private

# File lib/calabash-cucumber/automator/automator.rb, line 65
def double_tap(options)
  abstract_method!
end
enter_char_with_keyboard(char) click to toggle source

@!visibility private It is the caller’s responsibility to ensure the keyboard is visible.

# File lib/calabash-cucumber/automator/automator.rb, line 133
def enter_char_with_keyboard(char)
  abstract_method!
end
enter_text_with_keyboard(string, options={}) click to toggle source

@!visibility private

It is the caller’s responsibility to:

  1. expect the keyboard is visible

  2. escape the existing text

# File lib/calabash-cucumber/automator/automator.rb, line 120
def enter_text_with_keyboard(string, options={})
  abstract_method!
end
fast_enter_text(text) click to toggle source

@!visibility private

Legacy API - can we remove this method?

It is the caller’s responsibility to ensure the keyboard is visible.

# File lib/calabash-cucumber/automator/automator.rb, line 154
def fast_enter_text(text)
  abstract_method!
end
flick(options) click to toggle source

@!visibility private

# File lib/calabash-cucumber/automator/automator.rb, line 80
def flick(options)
  abstract_method!
end
name() click to toggle source

@!visibility private

# File lib/calabash-cucumber/automator/automator.rb, line 18
def name
  abstract_method!
end
pan(from_query, to_query, options={}) click to toggle source

@!visibility private

Callers must validate the options.

# File lib/calabash-cucumber/automator/automator.rb, line 92
def pan(from_query, to_query, options={})
  abstract_method!
end
pan_coordinates(from_point, to_point, options={}) click to toggle source

@!visibility private

Callers must validate the options.

# File lib/calabash-cucumber/automator/automator.rb, line 99
def pan_coordinates(from_point, to_point, options={})
  abstract_method!
end
pinch(in_or_out, options) click to toggle source

@!visibility private

Callers must validate the options.

# File lib/calabash-cucumber/automator/automator.rb, line 106
def pinch(in_or_out, options)
  abstract_method!
end
rotate(direction) click to toggle source

@!visibility private

Caller is responsible for providing a valid direction.

# File lib/calabash-cucumber/automator/automator.rb, line 169
def rotate(direction)
  abstract_method!
end
rotate_home_button_to(position) click to toggle source

@!visibility private

Caller is responsible for normalizing and validating the position.

# File lib/calabash-cucumber/automator/automator.rb, line 176
def rotate_home_button_to(position)
  abstract_method!
end
running?() click to toggle source

@!visibility private

# File lib/calabash-cucumber/automator/automator.rb, line 28
def running?
  abstract_method!
end
send_app_to_background(seconds) click to toggle source

@!visibility private

# File lib/calabash-cucumber/automator/automator.rb, line 111
def send_app_to_background(seconds)
  abstract_method!
end
stop() click to toggle source

@!visibility private

# File lib/calabash-cucumber/automator/automator.rb, line 23
def stop
  abstract_method!
end
swipe(direction, options={}) click to toggle source

@!visibility private

# File lib/calabash-cucumber/automator/automator.rb, line 85
def swipe(direction, options={})
  abstract_method!
end
tap_keyboard_action_key() click to toggle source

@!visibility private It is the caller’s responsibility to ensure the keyboard is visible.

# File lib/calabash-cucumber/automator/automator.rb, line 139
def tap_keyboard_action_key
  abstract_method!
end
tap_keyboard_delete_key() click to toggle source

@!visibility private It is the caller’s responsibility to ensure the keyboard is visible.

# File lib/calabash-cucumber/automator/automator.rb, line 145
def tap_keyboard_delete_key
  abstract_method!
end
touch(options) click to toggle source

@!visibility private

# File lib/calabash-cucumber/automator/automator.rb, line 60
def touch(options)
  abstract_method!
end
touch_hold(options) click to toggle source

@!visibility private

# File lib/calabash-cucumber/automator/automator.rb, line 75
def touch_hold(options)
  abstract_method!
end
two_finger_tap(options) click to toggle source

@!visibility private

# File lib/calabash-cucumber/automator/automator.rb, line 70
def two_finger_tap(options)
  abstract_method!
end