1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2024-10-06 10:51:13 +01:00

FacebookWorkload: Fixed UI automation and speificed maximum vesrion.

Fixed the workload UI automation and specified the version of
facebook that the workload is designed to work with.
This commit is contained in:
Marc Bonnici 2016-12-12 18:12:34 +00:00
parent 694d51ffb6
commit 80a780dcfe
3 changed files with 3 additions and 5 deletions

View File

@ -44,6 +44,7 @@ class Facebook(AndroidUiAutoBenchmark):
"""
package = 'com.facebook.katana'
activity = '.LoginActivity'
max_apk_version = '3.4'
#'du' specify 'disable update'
du_activity = 'com.android.vending/.AssetBrowserActivity'

View File

@ -131,10 +131,8 @@ public class UiAutomation extends BaseUiAutomation {
//Search for the facebook account
UiObject clickBar = new UiObject(new UiSelector()
.className("android.view.View").index(0)
.childSelector(new UiSelector()
.className("android.widget.ImageButton").index(0)
.description("Main navigation menu")));
.description("Main navigation menu"));
clickBar.clickAndWaitForNewWindow(timeout);
UiObject clickSearch = new UiObject(new UiSelector()
@ -189,7 +187,6 @@ public class UiAutomation extends BaseUiAutomation {
.className("android.widget.RelativeLayout").index(3));
friends.click();
sleep(timeout);
getUiDevice().pressBack();
//Update the status
UiObject updateStatus = new UiObject(new UiSelector()
@ -197,7 +194,7 @@ public class UiAutomation extends BaseUiAutomation {
.childSelector(new UiSelector()
.className("android.widget.FrameLayout").index(1)
.childSelector(new UiSelector()
.className("android.widget.RelativeLayout").index(1)
.className("android.widget.RelativeLayout").index(0)
.childSelector(new UiSelector()
.className("android.widget.LinearLayout").index(0)
.childSelector(new UiSelector()