Class: Applitools::Selenium::AndroidDeviceTarget

Inherits:
Object
  • Object
show all
Defined in:
lib/applitools/selenium/visual_grid/android_device_target.rb

Overview

Represents an Android device target for mobile app testing Used in conjunction with the Visual Grid to render mobile app screenshots on specific Android device configurations

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(device_name, options = {}) ⇒ AndroidDeviceTarget

Initialize a new Android device target

Parameters:

  • device_name (String)

    The name of the Android device from AndroidMultiDeviceTargetGenerated

  • options (Hash) (defaults to: {})

    Additional configuration options

Options Hash (options):

  • :screen_orientation (String) — default: 'portrait' or 'landscape'
  • :orientation (String)

    Alias for screen_orientation

  • :android_version (String)

    The Android OS version to use

  • :version (String)

    Alias for android_version



18
19
20
21
22
# File 'lib/applitools/selenium/visual_grid/android_device_target.rb', line 18

def initialize(device_name, options = {})
  @device_name = device_name
  @screen_orientation = options[:screen_orientation] || options[:orientation]
  @version = options[:android_version] || options[:version]
end

Instance Attribute Details

#device_nameObject (readonly)

Returns the value of attribute device_name.



9
10
11
# File 'lib/applitools/selenium/visual_grid/android_device_target.rb', line 9

def device_name
  @device_name
end

#screen_orientationObject (readonly)

Returns the value of attribute screen_orientation.



9
10
11
# File 'lib/applitools/selenium/visual_grid/android_device_target.rb', line 9

def screen_orientation
  @screen_orientation
end

#versionObject (readonly)

Returns the value of attribute version.



9
10
11
# File 'lib/applitools/selenium/visual_grid/android_device_target.rb', line 9

def version
  @version
end