From 1f9211c29695b67fd6301a60ad2c5c0bbbe4215d Mon Sep 17 00:00:00 2001 From: Yongqin Liu Date: Thu, 17 Nov 2016 13:06:25 +0800 Subject: glbenchmark-2.5.1: small improvement check the object before call touch Change-Id: I07350554baea309a106e4befff244163e63d38aa Signed-off-by: Yongqin Liu --- glbenchmark-2.5.1/glbenchmark_first_launch.py | 7 ++++--- glbenchmark-2.5.1/vc.py | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/glbenchmark-2.5.1/glbenchmark_first_launch.py b/glbenchmark-2.5.1/glbenchmark_first_launch.py index 1a153d2..67e920e 100755 --- a/glbenchmark-2.5.1/glbenchmark_first_launch.py +++ b/glbenchmark-2.5.1/glbenchmark_first_launch.py @@ -15,9 +15,10 @@ time.sleep(5) vc.dump(window='-1') target_app = vc.findViewWithText("GLBenchmark 2.5.1") -target_app.touch() -print "GLBenchmark 2.5.1 touched!" -time.sleep(15) +if target_app: + target_app.touch() + print "GLBenchmark 2.5.1 touched!" + time.sleep(15) device.press('KEYCODE_BACK') time.sleep(3) diff --git a/glbenchmark-2.5.1/vc.py b/glbenchmark-2.5.1/vc.py index e810b19..182d76c 100755 --- a/glbenchmark-2.5.1/vc.py +++ b/glbenchmark-2.5.1/vc.py @@ -52,8 +52,9 @@ time.sleep(2) vc.dump(window='-1') test_type = vc.findViewWithText("Performance Tests") -test_type.touch() -time.sleep(2) +if test_type: + test_type.touch() + time.sleep(2) # By some reason in order to select all test, a back step is required vc.dump(window='-1') -- cgit v1.2.3