Module: OnlyofficeWebdriverWrapper::RealDisplayTools
- Included in:
- HeadlessHelper
- Defined in:
- lib/onlyoffice_webdriver_wrapper/helpers/headless_helper/real_display_tools.rb
Overview
module for getting info about real display
Instance Method Summary collapse
-
#real_display_connected? ⇒ Boolean
Check if any real display connected to system.
-
#xrandr_result ⇒ String
Result of ‘xrandr` command output.
Instance Method Details
#real_display_connected? ⇒ Boolean
Check if any real display connected to system
15 16 17 18 19 20 21 22 |
# File 'lib/onlyoffice_webdriver_wrapper/helpers/headless_helper/real_display_tools.rb', line 15 def real_display_connected? return true if OSHelper.mac? result = xrandr_result exists = result.include?(' connected') && !result.include?('Failed') OnlyofficeLoggerHelper.log("Real Display Exists: #{exists}") exists end |
#xrandr_result ⇒ String
Returns result of ‘xrandr` command output.
7 8 9 10 11 |
# File 'lib/onlyoffice_webdriver_wrapper/helpers/headless_helper/real_display_tools.rb', line 7 def xrandr_result result = `xrandr 2>&1` OnlyofficeLoggerHelper.log("xrandr answer: #{result}".delete("\n")) result end |