diff options
Diffstat (limited to 'automated/android/apk-automation/benchmarkpi.py')
-rwxr-xr-x | automated/android/apk-automation/benchmarkpi.py | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/automated/android/apk-automation/benchmarkpi.py b/automated/android/apk-automation/benchmarkpi.py index 94e198d..41a70ec 100755 --- a/automated/android/apk-automation/benchmarkpi.py +++ b/automated/android/apk-automation/benchmarkpi.py @@ -13,10 +13,19 @@ class ApkRunnerImpl(ApkTestRunner): super(ApkRunnerImpl, self).__init__(self.config) def execute(self): - time.sleep(2) - self.dump_always() - start_button = self.vc.findViewByIdOrRaise("gr.androiddev.BenchmarkPi:id/Button01") - start_button.touch() + find_start_btn = False + while not find_start_btn: + time.sleep(2) + 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.') + if warn_msg: + self.logger.info("Older version warning popped up") + warning_ok_btn = self.vc.findViewWithTextOrRaise(u'OK') + warning_ok_btn.touch() + else: + start_button = self.vc.findViewByIdOrRaise("gr.androiddev.BenchmarkPi:id/Button01") + start_button.touch() + find_start_btn = True finished = False while not finished: |