Class: Appium::Core::Base::Bridge::MJSONWP

Inherits:
Selenium::WebDriver::Remote::OSS::Bridge
  • Object
show all
Includes:
Device::AppManagement, Device::AppState, Device::Context, Device::Device, Device::DeviceLock, Device::FileManagement, Device::ImageComparison, Device::ImeActions, Device::KeyEvent, Device::Keyboard, Device::ScreenRecord::Command, Device::Setting, Device::TouchActions, Device::Value
Defined in:
lib/appium_lib_core/common/base/bridge/mjsonwp.rb

Constant Summary

Constants included from Device::AppState

Device::AppState::STATUS

Constants included from Device::ImageComparison

Device::ImageComparison::GET_SIMILARITY, Device::ImageComparison::MATCH_FEATURES, Device::ImageComparison::MATCH_TEMPLATE, Device::ImageComparison::MODE

Instance Method Summary collapse

Methods included from Device::TouchActions

#multi_touch, #touch_actions

Methods included from Device::Device

#device_time, #shake

Methods included from Device::ScreenRecord::Command

#stop_and_save_recording_screen, #stop_recording_screen

Methods included from Device::AppState

#app_state

Methods included from Device::AppManagement

#activate_app, #app_installed?, #app_strings, #background_app, #close_app, #install_app, #launch_app, #remove_app, #reset, #terminate_app

Methods included from Device::ImageComparison

#compare_images, #find_image_occurrence, #get_images_similarity, #match_images_features

Methods included from Device::KeyEvent

#keyevent, #long_press_keycode, #press_keycode

Methods included from Device::FileManagement

#pull_file, #pull_folder, #push_file

Methods included from Device::Value

#replace_value, #set_immediate_value

Methods included from Device::Context

#available_contexts, #current_context, #set_context, #switch_to_default_context, #within_context

Methods included from Device::Setting

#get_settings, #update_settings

Methods included from Device::ImeActions

#ime_activate, #ime_activated, #ime_active_engine, #ime_available_engines, #ime_deactivate

Methods included from Device::Keyboard

#hide_keyboard, #is_keyboard_shown

Methods included from Device::DeviceLock

#device_locked?, #lock, #unlock

Instance Method Details

#commands(command) ⇒ Object


35
36
37
# File 'lib/appium_lib_core/common/base/bridge/mjsonwp.rb', line 35

def commands(command)
  ::Appium::Core::Commands::MJSONWP::COMMANDS[command]
end

#send_actions(_data) ⇒ Object


53
54
55
# File 'lib/appium_lib_core/common/base/bridge/mjsonwp.rb', line 53

def send_actions(_data)
  raise Error::UnsupportedOperationError, '#send_actions has not been supported in MJSONWP'
end

#sessionsObject

Returns all available sessions on the Appium server instance


40
41
42
# File 'lib/appium_lib_core/common/base/bridge/mjsonwp.rb', line 40

def sessions
  execute :get_all_sessions
end

#take_element_screenshot(element) ⇒ Object


44
45
46
# File 'lib/appium_lib_core/common/base/bridge/mjsonwp.rb', line 44

def take_element_screenshot(element)
  execute :take_element_screenshot, id: element.ref
end

#take_viewport_screenshotObject


48
49
50
51
# File 'lib/appium_lib_core/common/base/bridge/mjsonwp.rb', line 48

def take_viewport_screenshot
  # TODO: this hasn't been supported by Espresso driver
  execute_script('mobile: viewportScreenshot')
end