Module: OnlyofficeWebdriverWrapper::WebdriverBrowserInfo

Included in:
WebDriver
Defined in:
lib/onlyoffice_webdriver_wrapper/webdriver/webdriver_browser_info_helper.rb

Overview

Module for working with browser metadata

Instance Method Summary collapse

Instance Method Details

#browser_metadataString

Returns info about platform.

Returns:

  • (String)

    info about platform



15
16
17
18
19
20
# File 'lib/onlyoffice_webdriver_wrapper/webdriver/webdriver_browser_info_helper.rb', line 15

def 
  caps = @driver.capabilities
  platform = caps[:platform_name] || caps[:platform]
  version = caps[:browser_version] || caps[:version]
  "Platform: #{platform}, Browser: #{caps[:browser_name]}, Version: #{version}"
end

#browser_sizeDimensions

Returns Size of browser window.

Returns:



7
8
9
10
11
12
# File 'lib/onlyoffice_webdriver_wrapper/webdriver/webdriver_browser_info_helper.rb', line 7

def browser_size
  size_struct = @driver.manage.window.size
  size = Dimensions.new(size_struct.width, size_struct.height)
  OnlyofficeLoggerHelper.log("browser_size: #{size}")
  size
end