module Selenium::WebDriver::DriverExtensions::Rotatable
Constants
- ORIENTATIONS
Public Instance Methods
orientation()
click to toggle source
Get the current screen orientation
@return [:landscape, :portrait] orientation
@api public
# File lib/selenium/webdriver/common/driver_extensions/rotatable.rb, line 38 def orientation bridge.getScreenOrientation.to_sym.downcase end
rotation=(orientation)
click to toggle source
Change the screen orientation
@param [:landscape, :portrait] Orientation
@api public
# File lib/selenium/webdriver/common/driver_extensions/rotatable.rb, line 21 def rotation=(orientation) unless ORIENTATIONS.include?(orientation) raise ArgumentError, "expected #{ORIENTATIONS.inspect}, got #{orientation.inspect}" end bridge.setScreenOrientation(orientation.to_s.upcase) end
Also aliased as: rotate