Class: Applitools::Selenium::DesktopBrowserInfo
- Inherits:
-
IRenderBrowserInfo
- Object
- AbstractConfiguration
- IRenderBrowserInfo
- Applitools::Selenium::DesktopBrowserInfo
- Defined in:
- lib/applitools/selenium/visual_grid/desktop_browser_info.rb
Constant Summary collapse
- DEFAULT_CONFIG =
proc do { platform: 'linux', browser_type: BrowserType::CHROME, # size_mode: 'full-page', 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 = {}) ⇒ DesktopBrowserInfo
constructor
A new instance of DesktopBrowserInfo.
- #platform ⇒ Object
Methods inherited from IRenderBrowserInfo
Constructor Details
#initialize(options = {}) ⇒ DesktopBrowserInfo
Returns a new instance of DesktopBrowserInfo.
22 23 24 25 26 27 28 |
# File 'lib/applitools/selenium/visual_grid/desktop_browser_info.rb', line 22 def initialize( = {}) super if [:width] && [:height] self. = Applitools::RectangleSize.from_any_argument(width: [:width], height: [:height]) end self.browser_type = [:browser_type] if [:browser_type] end |
Class Method Details
.default_config ⇒ Object
17 18 19 |
# File 'lib/applitools/selenium/visual_grid/desktop_browser_info.rb', line 17 def default_config DEFAULT_CONFIG.call end |
Instance Method Details
#device_name ⇒ Object
39 40 41 |
# File 'lib/applitools/selenium/visual_grid/desktop_browser_info.rb', line 39 def device_name 'desktop' end |
#platform ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'lib/applitools/selenium/visual_grid/desktop_browser_info.rb', line 30 def platform case browser_type when BrowserType::EDGE_LEGACY, BrowserType::EDGE_CHROMIUM, BrowserType::EDGE_CHROMIUM_ONE_VERSION_BACK 'windows' else 'linux' end end |