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
Backgrounds the app for a set number of seconds.
-
#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
Hide the onscreen keyboard.
-
#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: nil, force_restart: nil, video_type: 'mjpeg', video_fps: nil, time_limit: '180', video_quality: 'medium', video_scale: '320:240') ⇒ Object
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
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 |
# File 'lib/appium_lib_core/ios/xcuitest/device.rb', line 165 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
Backgrounds the app for a set number of seconds. This is a blocking application.
|
# File 'lib/appium_lib_core/ios/xcuitest/device.rb', line 41
|
#battery_info ⇒ Hash
Get battery information.
|
# File 'lib/appium_lib_core/ios/xcuitest/device.rb', line 141
|
#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 117
|
#hide_keyboard(close_key = nil, strategy = nil) ⇒ Object
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 93
|
#start_recording_screen(remote_path: nil, user: nil, pass: nil, method: nil, force_restart: nil, video_type: 'mjpeg', video_fps: nil, time_limit: '180', video_quality: 'medium', video_scale: '320:240') ⇒ Object
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 53
|