Module: Selenium::WebDriver::DriverExtensions::Rotatable Private
- Defined in:
- lib/selenium/webdriver/common/driver_extensions/rotatable.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Constant Summary collapse
- ORIENTATIONS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
[:landscape, :portrait]
Instance Method Summary collapse
- #orientation ⇒ Object private
- #rotate(orientation) ⇒ Object private
Instance Method Details
#orientation ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
21 22 23 |
# File 'lib/selenium/webdriver/common/driver_extensions/rotatable.rb', line 21 def orientation bridge.getScreenOrientation.to_sym.downcase end |
#rotate(orientation) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
13 14 15 16 17 18 19 |
# File 'lib/selenium/webdriver/common/driver_extensions/rotatable.rb', line 13 def rotate(orientation) unless ORIENTATIONS.include?(orientation) raise ArgumentError, "expected #{ORIENTATIONS.inspect}, got #{orientation.inspect}" end bridge.setScreenOrientation(orientation.to_s.upcase) end |