Skip to content

Commit f063589

Browse files
committed
fix: simulator app location
Current logic for finding simulators is not correct. Refactor to allow detection of Xcode10 Simulators.
1 parent 47d1e05 commit f063589

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

core/device/simulator.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,8 @@
1414
class Simulator(object):
1515
@staticmethod
1616
def __get_sim_location():
17-
output = run(command='xcrun --show-sdk-path', log_level=CommandLogLevel.SILENT).strip()
18-
xcode_location = ''
19-
for paths in output.split('/'):
20-
xcode_location = xcode_location + paths + '/'
21-
if "Xcode" in paths:
22-
break
23-
sim_location = xcode_location + 'Contents/Developer/Applications/Simulator.app'
17+
xcode_location = run(command='xcode-select -p', log_level=CommandLogLevel.SILENT).strip()
18+
sim_location = xcode_location + '/Applications/Simulator.app/Contents/MacOS/Simulator'
2419
print "Simulator Application: " + sim_location
2520
return sim_location
2621

Loading

tests/templates/starter_kit_templates_tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def test_200_run_android_bundle(self, demo):
260260
# Verify application looks correct
261261
Tns.wait_for_log(log_file=log, string_list=Helpers.wp_sync, not_existing_string_list=Helpers.wp_errors,
262262
check_interval=5, timeout=120)
263-
Helpers.android_screen_match(image=demo + '_sync')
263+
Helpers.android_screen_match(image=demo + '_bundle_sync')
264264

265265
# Revert changes
266266
StarterKitsTests.revert_changes(self=self, demo=demo, platform=Platform.ANDROID, device_id=EMULATOR_ID)
@@ -287,7 +287,7 @@ def test_200_run_ios_bundle(self, demo):
287287
# Verify application looks correct
288288
Tns.wait_for_log(log_file=log, string_list=Helpers.wp_sync, not_existing_string_list=Helpers.wp_errors,
289289
check_interval=5, timeout=120)
290-
Helpers.ios_screen_match(sim_id=self.SIMULATOR_ID, image=demo + '_sync')
290+
Helpers.ios_screen_match(sim_id=self.SIMULATOR_ID, image=demo + '_bundle_sync')
291291

292292
# Revert changes
293293
StarterKitsTests.revert_changes(self=self, demo=demo, platform=Platform.IOS,

0 commit comments

Comments
 (0)