@@ -21,27 +21,27 @@ class Base
21
21
module HasLocation
22
22
# Get the location of the device.
23
23
#
24
- # @return [::Selenium::WebDriver ::Location]
24
+ # @return [::Appium ::Location]
25
25
#
26
26
# @example
27
27
#
28
- # driver.location #=> ::Selenium::WebDriver ::Location.new(10, 10, 10)
28
+ # driver.location #=> ::Appium ::Location.new(10, 10, 10)
29
29
#
30
30
def location
31
31
@bridge . location
32
32
end
33
33
34
34
# Set the location of the device.
35
35
#
36
- # @param [::Selenium::WebDriver ::Location] location Set the location.
36
+ # @param [::Appium ::Location] location Set the location.
37
37
#
38
38
# @example
39
39
#
40
- # driver.location = ::Selenium::WebDriver ::Location.new(10, 10, 10)
40
+ # driver.location = ::Appium ::Location.new(10, 10, 10)
41
41
#
42
42
def location = ( location )
43
- unless location . is_a? ( ::Selenium :: WebDriver ::Location )
44
- raise TypeError , "expected #{ ::Selenium :: WebDriver ::Location } , got #{ location . inspect } :#{ location . class } "
43
+ unless location . is_a? ( ::Appium ::Location )
44
+ raise TypeError , "expected #{ ::Appium ::Location } , got #{ location . inspect } :#{ location . class } "
45
45
end
46
46
47
47
@bridge . set_location location . latitude , location . longitude , location . altitude
@@ -56,17 +56,17 @@ def location=(location)
56
56
# in meters/second @since Appium 1.21.0 and in knots for emulators @since Appium 1.22.0.
57
57
# @param [String, Number] satellites Sets the count of geo satellites being tracked in range 1..12 @since Appium 1.22.0.
58
58
# This number is respected on Emulators.
59
- # @param [::Selenium::WebDriver ::Location]
59
+ # @param [::Appium ::Location]
60
60
#
61
61
# @example
62
62
#
63
- # driver.location = ::Selenium::WebDriver ::Location.new(10, 10, 10)
63
+ # driver.location = ::Appium ::Location.new(10, 10, 10)
64
64
#
65
65
def set_location ( latitude , longitude , altitude , speed : nil , satellites : nil )
66
66
if speed . nil? && satellites . nil?
67
- self . location = ::Selenium :: WebDriver ::Location . new ( Float ( latitude ) , Float ( longitude ) , Float ( altitude ) )
67
+ self . location = ::Appium ::Location . new ( Float ( latitude ) , Float ( longitude ) , Float ( altitude ) )
68
68
else
69
- loc = ::Selenium :: WebDriver ::Location . new ( Float ( latitude ) , Float ( longitude ) , Float ( altitude ) )
69
+ loc = ::Appium ::Location . new ( Float ( latitude ) , Float ( longitude ) , Float ( altitude ) )
70
70
71
71
speed = Float ( speed ) unless speed . nil?
72
72
satellites = Integer ( satellites ) unless satellites . nil?
0 commit comments