Sha256: 6091a21047ec42178dd2d4a549dca0b7e44c92456253c7ed5c40b5cde3195521
Contents?: true
Size: 974 Bytes
Versions: 64
Compression:
Stored size: 974 Bytes
Contents
module Selenium module WebDriver # # @api private # module DriverExtensions module Rotatable ORIENTATIONS = [:landscape, :portrait] # # Change the screen orientation # # @param [:landscape, :portrait] Orientation # # @api public # def rotation=(orientation) unless ORIENTATIONS.include?(orientation) raise ArgumentError, "expected #{ORIENTATIONS.inspect}, got #{orientation.inspect}" end bridge.setScreenOrientation(orientation.to_s.upcase) end alias_method :rotate, :rotation= # # Get the current screen orientation # # @return [:landscape, :portrait] orientation # # @api public # def orientation bridge.getScreenOrientation.to_sym.downcase end end # Rotatable end # DriverExtensions end # WebDriver end # Selenium
Version data entries
64 entries across 64 versions & 4 rubygems