Module: Appium::Core::Ios::Xcuitest::Device
- Extended by:
- Forwardable
- Defined in:
- lib/appium_lib_core/ios/xcuitest/device.rb,
lib/appium_lib_core/ios/xcuitest/device/screen.rb,
lib/appium_lib_core/ios/xcuitest/device/battery.rb,
lib/appium_lib_core/ios/xcuitest/device/performance.rb
Defined Under Namespace
Modules: Battery, Performance, Screen
Class Method Summary collapse
Instance Method Summary collapse
-
#background_app(duration = 0) ⇒ Object
deprecated
Deprecated.
Use ‘mobile: backgroundApp’ extension instead.
-
#battery_info ⇒ Hash
Get battery information.
-
#get_performance_record(save_file_path: './performance', profile_name: 'Activity Monitor', remote_path: nil, user: nil, pass: nil, method: 'PUT') ⇒ Object
This is a blocking application.
-
#hide_keyboard(close_key = nil, strategy = nil) ⇒ Object
deprecated
Deprecated.
Use ‘mobile: hideKeyboard’ extension instead.
-
#start_performance_record(timeout: 300000, profile_name: 'Activity Monitor', pid: nil) ⇒ Object
This is a blocking application.
-
#start_recording_screen(remote_path: nil, user: nil, pass: nil, method: 'PUT', file_field_name: nil, form_fields: nil, headers: nil, force_restart: nil, video_type: 'mjpeg', video_fps: nil, time_limit: '180', video_quality: nil, video_scale: nil, video_filters: nil, pixel_format: nil) ⇒ String
Record the display of devices running iOS Simulator since Xcode 9 or real devices since iOS 11 (ffmpeg utility is required: ‘brew install ffmpeg’).
Class Method Details
.extended(_mod) ⇒ Object
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/appium_lib_core/ios/xcuitest/device.rb', line 183 def extended(_mod) # Xcuitest, Override included method in bridge ::Appium::Core::Device.add_endpoint_method(:hide_keyboard) do def hide_keyboard(close_key = nil, strategy = nil) option = {} option[:key] = close_key if close_key option[:strategy] = strategy if strategy execute :hide_keyboard, {}, option end end # Xcuitest, Override included method in bridge ::Appium::Core::Device.add_endpoint_method(:background_app) do def background_app(duration = 0) # https://github.com/appium/ruby_lib/issues/500, https://github.com/appium/appium/issues/7741 # 'execute :background_app, {}, seconds: { timeout: duration_milli_sec }' works over Appium 1.6.4 duration_milli_sec = duration.nil? ? nil : duration * 1000 execute :background_app, {}, seconds: { timeout: duration_milli_sec } end end Performance.add_methods Screen.add_methods Battery.add_methods end |
Instance Method Details
#background_app(duration = 0) ⇒ Object
Use ‘mobile: backgroundApp’ extension instead.
Backgrounds the app for a set number of seconds. This is a blocking application.
|
# File 'lib/appium_lib_core/ios/xcuitest/device.rb', line 42
|
#battery_info ⇒ Hash
Get battery information.
|
# File 'lib/appium_lib_core/ios/xcuitest/device.rb', line 159
|
#get_performance_record(save_file_path: './performance', profile_name: 'Activity Monitor', remote_path: nil, user: nil, pass: nil, method: 'PUT') ⇒ Object
This is a blocking application.
|
# File 'lib/appium_lib_core/ios/xcuitest/device.rb', line 135
|
#hide_keyboard(close_key = nil, strategy = nil) ⇒ Object
Use ‘mobile: hideKeyboard’ extension instead.
Hide the onscreen keyboard
|
# File 'lib/appium_lib_core/ios/xcuitest/device.rb', line 28
|
#start_performance_record(timeout: 300000, profile_name: 'Activity Monitor', pid: nil) ⇒ Object
This is a blocking application. Read help.apple.com/instruments/mac/current/ to understand the profiler.
|
# File 'lib/appium_lib_core/ios/xcuitest/device.rb', line 111
|
#start_recording_screen(remote_path: nil, user: nil, pass: nil, method: 'PUT', file_field_name: nil, form_fields: nil, headers: nil, force_restart: nil, video_type: 'mjpeg', video_fps: nil, time_limit: '180', video_quality: nil, video_scale: nil, video_filters: nil, pixel_format: nil) ⇒ String
Record the display of devices running iOS Simulator since Xcode 9 or real devices since iOS 11 (ffmpeg utility is required: ‘brew install ffmpeg’). We would recommend to play the video by VLC or Mplayer if you can not play the video with other video players.
|
# File 'lib/appium_lib_core/ios/xcuitest/device.rb', line 55
|