# File lib/selenium/webdriver/common/driver_extensions/has_location.rb, line 6 def location @bridge.getLocation end
# File lib/selenium/webdriver/common/driver_extensions/has_location.rb, line 10 def location=(loc) unless loc.kind_of?(Location) raise TypeError, "expected #{Location}, got #{loc.inspect}:#{loc.class}" end @bridge.setLocation loc.latitude, loc.longitude, loc.altitude end
# File lib/selenium/webdriver/common/driver_extensions/has_location.rb, line 18 def set_location(lat, lon, alt) self.location = Location.new(Float(lat), Float(lon), Float(alt)) end