diff options
Diffstat (limited to 'automated/android/apk-automation/scimark.py')
-rwxr-xr-x | automated/android/apk-automation/scimark.py | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/automated/android/apk-automation/scimark.py b/automated/android/apk-automation/scimark.py index bcc30d5..9fcc96f 100755 --- a/automated/android/apk-automation/scimark.py +++ b/automated/android/apk-automation/scimark.py @@ -12,10 +12,21 @@ class ApkRunnerImpl(ApkTestRunner): super(ApkRunnerImpl, self).__init__(self.config) def execute(self): - time.sleep(5) - self.dump_always() - btn_java_bench = self.vc.findViewWithTextOrRaise(u'Java bench') - btn_java_bench.touch() + find_start_btn = False + while not find_start_btn: + self.dump_always() + warn_msg = self.vc.findViewWithText(u'This app was built for an older version of Android and may not work properly. Try checking for updates, or contact the developer.') + continue_btn = self.vc.findViewWithText(u'CONTINUE') + if warn_msg: + self.logger.info("Older version warning popped up") + warning_ok_btn = self.vc.findViewWithTextOrRaise(u'OK') + warning_ok_btn.touch() + elif continue_btn: + continue_btn.touch() + else: + btn_java_bench = self.vc.findViewWithTextOrRaise(u'Java bench') + btn_java_bench.touch() + find_start_btn = True finished = False while not finished: |