Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/functional-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
- run: |
appium plugin install images
appium plugin install execute-driver
# Workaround to keep symlink to global appium
# Workaround to keep symlink to global appium with plugins
appium driver install xcuitest
nohup appium --use-plugins=images,execute-driver --relaxed-security --log-timestamp --log-no-colors 2>&1 > appium.log &

Expand Down Expand Up @@ -166,7 +166,7 @@ jobs:
- run: |
appium plugin install images
appium plugin install execute-driver
# Workaround to keep symlink to global appium
# Workaround to keep symlink to global appium with plugins
appium driver install xcuitest
nohup appium --use-plugins=images,execute-driver --relaxed-security --log-timestamp --log-no-colors 2>&1 > appium.log &

Expand Down
24 changes: 19 additions & 5 deletions test/functional/android/webdriver/device_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,34 @@ def test_page_source
end

def test_location
latitude = 100
longitude = 100
latitude = 80
longitude = -80
altitude = 75
@driver.set_location(latitude, longitude, altitude)

return if ci?

# Here has been improved in Appium 1.14.0, but it is still unstable on Emulator...
loc = @@core.wait { @driver.location } # check the location
assert_equal 100, loc.latitude
assert_equal 100, loc.longitude
assert_equal 80, loc.latitude
assert_equal(-80, loc.longitude)
assert_equal 75, loc.altitude
end

def test_location_with_mobile_ext
latitude = 80
longitude = -80
altitude = 75
@driver.execute_script(
'mobile: setGeolocation',
{ latitude: latitude, longitude: longitude, altitude: altitude }
)

loc = @@core.wait { @driver.execute_script 'mobile: getGeolocation' } # check the location
assert_equal 80, loc['latitude']
assert_equal(-80, loc['longitude'])
assert_equal 75, loc['altitude']
end

def test_accept_alert
@@core.wait { @driver.find_element :accessibility_id, 'App' }.click
@@core.wait { @driver.find_element :accessibility_id, 'Alert Dialogs' }.click
Expand Down
Loading