Sha256: 50b2260f08fde15512b48803597e628a94cbd8057917447c015576ca71967509
Contents?: true
Size: 763 Bytes
Versions: 5
Compression:
Stored size: 763 Bytes
Contents
module Calabash module Cucumber module StatusBarHelpers #=> Map def device_orientation(force_down=false) res = map(nil, :orientation, :device).first if ['face up', 'face down'].include?(res) if ENV['CALABASH_FULL_CONSOLE_OUTPUT'] == '1' if force_down puts "WARN found orientation '#{res}' - will rotate to force orientation to 'down'" end end return res if !force_down return rotate_home_button_to :down end return res if !res.eql?('unknown') return res if !force_down rotate_home_button_to(:down) end def status_bar_orientation map(nil, :orientation, :status_bar).first end end end end
Version data entries
5 entries across 5 versions & 1 rubygems