1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-20 20:09:11 +00:00

Facebook: Updated workload to work with server changes.

Fixed being unable to find the 'update status' box.
Now selects a 'do you know' notification rather than the latest,
as this is now a link on how to upgrade the app which opens in
external browser.
This commit is contained in:
Marc Bonnici 2017-03-03 16:36:48 +00:00
parent 35df2fff30
commit 4dc0aaa724
2 changed files with 4 additions and 16 deletions

View File

@ -117,11 +117,9 @@ public class UiAutomation extends BaseUiAutomation {
.className("android.widget.ImageButton").index(0)))));
clickNotificationsLogo.clickAndWaitForNewWindow(timeout);
//Click on latest notification
//Click on a 'do you know' notification.
UiObject clickNotify = new UiObject(new UiSelector()
.className("android.support.v4.view.ViewPager").index(0)
.childSelector(new UiSelector()
.className("android.widget.LinearLayout").index(1)));
.textContains("do you know"));
clickNotify.clickAndWaitForNewWindow(timeout);
sleep(timeout);
@ -189,18 +187,8 @@ public class UiAutomation extends BaseUiAutomation {
sleep(timeout);
//Update the status
UiObject updateStatus = new UiObject(new UiSelector()
.className("android.widget.FrameLayout").index(1)
.childSelector(new UiSelector()
.className("android.widget.FrameLayout").index(1)
.childSelector(new UiSelector()
.className("android.widget.RelativeLayout").index(0)
.childSelector(new UiSelector()
.className("android.widget.LinearLayout").index(0)
.childSelector(new UiSelector()
.className("android.widget.LinearLayout").index(0)
.childSelector(new UiSelector()
.className("android.widget.LinearLayout").index(0)))))));
UiObject updateStatus = new UiObject(new UiSelector().resourceId(
"com.facebook.katana:id/publisher_status"));
updateStatus.clickAndWaitForNewWindow(timeout);