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
-
#browser_metadata ⇒ String
Info about platform.
-
#browser_size ⇒ Dimensions
Size of browser window.
Instance Method Details
#browser_metadata ⇒ String
Returns 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_size ⇒ Dimensions
Returns Size of browser window.
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 |