Class: Calabash::IBase

Inherits:
Object
  • Object
show all
Includes:
Cucumber::Operations
Defined in:
lib/calabash-cucumber/ibase.rb

Constant Summary

Constants included from Cucumber::Core

Cucumber::Core::CAL_HTTP_RETRY_COUNT, Cucumber::Core::DATA_PATH, Cucumber::Core::RETRYABLE_ERRORS

Constants included from Cucumber::KeyboardHelpers

Cucumber::KeyboardHelpers::KEYPLANE_NAMES

Constants included from Cucumber::WaitHelpers

Cucumber::WaitHelpers::CALABASH_CONDITIONS

Instance Method Summary collapse

Methods included from Cucumber::Operations

#assert_home_direction, #await_page, #escape_quotes, #home_direction, #html, #label, #set_text, #set_user_pref, #simple_touch, #tap, #user_pref

Methods included from Cucumber::Location

#location_for_place, #set_location

Methods included from Cucumber::Core

#backdoor, #background, #calabash_exit, #cell_swipe, #client_version, #current_rotation, #http, #init_request, #interpolate, #load_playback_data, #load_recording, #macro, #make_http_request, #map, #move_wheel, #perform, #picker, #pinch, #playback, #prepare_dialog_action, #query, #query_all, #record_begin, #record_end, #recording_name_for, #rotate, #scroll, #scroll_to_cell, #scroll_to_row, #send_uia_command, #server_version, #start_app_in_background, #stop_background_app, #swipe, #touch, #url_for

Methods included from Cucumber::KeyboardHelpers

#_do_keyplane, #await_keyboard, #current_keyplane, #done, #keyboard_enter_char, #keyboard_enter_text, #search_keyplanes_and_enter_char

Methods included from Cucumber::TestsHelpers

#check_element_does_not_exist, #check_element_exists, #check_view_with_mark_exists, #classes, #each_cell, #each_cell_and_back, #element_does_not_exist, #element_exists, #fail, #navigation_path, #query_map, #screenshot, #screenshot_and_raise, #screenshot_embed, #view_with_mark_exists

Methods included from Cucumber::WaitHelpers

#handle_error_with_options, #touch_transition, #wait_for, #wait_for_condition, #wait_for_elements_do_not_exist, #wait_for_elements_exist, #wait_for_none_animating, #wait_for_transition, #wait_poll

Constructor Details

#initialize(world) ⇒ IBase

Returns a new instance of IBase.



7
8
9
# File 'lib/calabash-cucumber/ibase.rb', line 7

def initialize(world)
  @world = world
end

Instance Method Details

#await(opts = {}) ⇒ Object



35
36
37
38
# File 'lib/calabash-cucumber/ibase.rb', line 35

def await(opts={})
  wait_for_elements_exist([trait], opts)
  self
end

#await_screenshot(wait_opts = {}, screenshot_opts = {}) ⇒ Object



40
41
42
43
# File 'lib/calabash-cucumber/ibase.rb', line 40

def await_screenshot(wait_opts={},screenshot_opts={})
  await(wait_opts)
  screenshot_embed(screenshot_opts)
end

#embed(*args) ⇒ Object



11
12
13
# File 'lib/calabash-cucumber/ibase.rb', line 11

def embed(*args)
  @world.send(:embed,*args)
end

#page(clz, *args) ⇒ Object



23
24
25
# File 'lib/calabash-cucumber/ibase.rb', line 23

def page(clz,*args)
  clz.new(@world,*args)
end

#puts(*args) ⇒ Object



15
16
17
# File 'lib/calabash-cucumber/ibase.rb', line 15

def puts(*args)
  @world.send(:puts, *args)
end

#step(s) ⇒ Object



27
28
29
# File 'lib/calabash-cucumber/ibase.rb', line 27

def step(s)

end

#steps(ss) ⇒ Object



31
32
33
# File 'lib/calabash-cucumber/ibase.rb', line 31

def steps(ss)

end

#traitObject



19
20
21
# File 'lib/calabash-cucumber/ibase.rb', line 19

def trait
  "navigationItemView marked:'#{self.title}'"
end