1 # Script to automate the following sequence:
5 # - Open the same article in Chrome
7 # - Back to Feely (should still be in memory)
11 # Currently works on volantis only (verticle orientation)
14 CMDDIR=$(dirname $0 2>/dev/null)
21 feedlyArticle="500 700"
22 feedlyOptions="1480 100"
23 feedlyBrowserSelect="1350 650"
24 feedlyArticleSwipeUp="700 700 700 50 50"
25 feedlyArticleSwipeDown="700 200 700 700 50"
26 chromeSwipe="700 700 700 50 50"
30 feedlyArticle="676 500"
31 feedlyOptions="1327 207"
32 feedlyBrowserSelect="1278 1191"
33 feedlyArticleSwipeUp="700 1847 700 400 50"
34 feedlyArticleSwipeDown="700 400 700 1847 50"
35 chromeSwipe="700 1847 700 400 50"
38 echo "Error: No feedly screen geometry information available for $DEVICE"
42 feedlySwitchToTime=600
44 # start feedly, if not installed, error out
45 t=$(forceStartActivity feedly)
46 checkIsRunning feedly "initial start of feedly"
47 echo Feedly start time = ${t}ms
49 # start chrome, if not installed, error out
50 t=$(forceStartActivity chrome)
51 checkIsRunning chrome "initial start of chrome"
52 echo Chrome start time = ${t}ms
58 while [ $cur -le $iterations ]
60 echo =======================================
61 echo Iteration $cur of $iterations
62 echo =======================================
64 t=$(startActivity feedly)
65 if [ $(checkStartTime "$t" $feedlySwitchToTime) != true ]; then
66 handleError Feedly took too long to start: $t v $feedlySwitchToTime: $?
71 ((feedlyStartTimes=feedlyStartTimes+t))
72 echo feedly started in ${t}ms
73 checkIsRunning chrome "switch back to feedly"
74 checkIsRunning googlequicksearchbox "switch back to feedly"
76 # click on first article
80 # scroll through article
81 doSwipe $feedlyArticleSwipeUp
83 checkIsRunning chrome "feedly swipe"
84 checkIsRunning googlequicksearchbox "feedly swipe"
87 doSwipe $feedlyArticleSwipeDown
91 # 1. click on menu bar
95 doTap $feedlyBrowserSelect
98 checkIsRunning feedly "switch to chrome"
99 checkIsRunning googlequicksearchbox "switch to chrome"
101 # Now we're back in chrome, swipe to bottom of article
104 checkIsRunning feedly "swiped chrome"
108 ((feedlyAve=feedlyStartTimes/iterations))
109 echo Avg start times: feedly: ${feedlyAve}ms