diff options
Diffstat (limited to 'quadrantpro/vc.py')
-rwxr-xr-x | quadrantpro/vc.py | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/quadrantpro/vc.py b/quadrantpro/vc.py index a55e8e5..57b5699 100755 --- a/quadrantpro/vc.py +++ b/quadrantpro/vc.py @@ -15,21 +15,34 @@ kwargs2 = {'startviewserver': True, 'forceviewserveruse': False, 'autodump': Fal vc = ViewClient(device, serialno, **kwargs2) -vc.dump() +def dump_always(): + success = False + while not success: + try: + vc.dump() + success = True + except RuntimeError: + print("Got RuntimeError when call vc.dump()") + time.sleep(5) + except ValueError: + print("Got ValueError when call vc.dump()") + time.sleep(5) + + +dump_always() view_license_btn = vc.findViewWithText("View license") if view_license_btn: ok_button = vc.findViewWithTextOrRaise("OK") ok_button.touch() -vc.dump() +dump_always() run_full_item=vc.findViewWithTextOrRaise(u'Run full benchmark') run_full_item.touch() finished = False while(not finished): try: - time.sleep(5) - vc.dump() + dump_always() vc.findViewByIdOrRaise("com.aurorasoftworks.quadrant.ui.professional:id/chart") finished = True print "Benchmark finished" |