Class: Applitools::Selenium::AndroidDeviceInfo
- Inherits:
-
IRenderBrowserInfo
- Object
- AbstractConfiguration
- IRenderBrowserInfo
- Applitools::Selenium::AndroidDeviceInfo
- Defined in:
- lib/applitools/selenium/visual_grid/android_device_info.rb
Defined Under Namespace
Classes: EmulationInfo
Constant Summary collapse
- DEFAULT_CONFIG =
proc do { viewport_size: Applitools::RectangleSize.from_any_argument(width: 0, height: 0) } end
Class Method Summary collapse
Instance Method Summary collapse
- #device_name ⇒ Object
-
#initialize(options = {}) ⇒ AndroidDeviceInfo
constructor
A new instance of AndroidDeviceInfo.
- #to_hash ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ AndroidDeviceInfo
Returns a new instance of AndroidDeviceInfo.
21 22 23 24 25 26 27 |
# File 'lib/applitools/selenium/visual_grid/android_device_info.rb', line 21 def initialize( = {}) super self.android_device_info = EmulationInfo.new.tap do |ei| ei.device_name = [:device_name] ei.screen_orientation = [:screen_orientation] || [:orientation] || Orientation::PORTRAIT end end |
Class Method Details
.default_config ⇒ Object
16 17 18 |
# File 'lib/applitools/selenium/visual_grid/android_device_info.rb', line 16 def default_config DEFAULT_CONFIG.call end |
Instance Method Details
#device_name ⇒ Object
33 34 35 |
# File 'lib/applitools/selenium/visual_grid/android_device_info.rb', line 33 def device_name android_device_info.device_name end |
#to_hash ⇒ Object
37 38 39 |
# File 'lib/applitools/selenium/visual_grid/android_device_info.rb', line 37 def to_hash {androidDeviceInfo: android_device_info.to_hash} end |
#to_s ⇒ Object
29 30 31 |
# File 'lib/applitools/selenium/visual_grid/android_device_info.rb', line 29 def to_s "#{android_device_info.device_name} - #{android_device_info.screen_orientation}" end |