Method: Applitools::Selenium::Driver#landscape_orientation?

Defined in:
lib/applitools/selenium/driver.rb

#landscape_orientation?Boolean

Returns true if the driver orientation is landscape.

Returns:

  • (Boolean)


78
79
80
81
82
83
# File 'lib/applitools/selenium/driver.rb', line 78

def landscape_orientation?
  driver.orientation.to_s.upcase == LANDSCAPE
rescue NameError, Selenium::WebDriver::Error::WebDriverError, Selenium::WebDriver::Error::UnknownError
  Applitools::EyesLogger.debug 'driver has no "orientation" attribute. Assuming: portrait.'
  false
end