Bug 994284 - Intermittient testSystemPages | Exception caught - junit.framework.AssertionFailedError: LayerView is not found! r=gbrown
authorChenxia Liu <liuche@mozilla.com>
Wed, 23 Apr 2014 15:01:23 -0700
changeset 180284 980272b33c24cb02c35257fb5de35974994b4c36
parent 180283 feb85b7e78f503a969952f40c97c1ac8c92613e4
child 180285 6892fe04273f001025a74e423601ac6dfc06dbf1
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewersgbrown
bugs994284
milestone31.0a1
Bug 994284 - Intermittient testSystemPages | Exception caught - junit.framework.AssertionFailedError: LayerView is not found! r=gbrown
mobile/android/base/tests/BaseTest.java
--- a/mobile/android/base/tests/BaseTest.java
+++ b/mobile/android/base/tests/BaseTest.java
@@ -433,19 +433,18 @@ abstract class BaseTest extends BaseRobo
     public void selectMenuItemByPath(String[] listItems) {
         int listLength = listItems.length;
         if (listLength > 0) {
             selectMenuItem(listItems[0]);
         }
         if (listLength > 1) {
             for (int i = 1; i < listLength; i++) {
                 String itemName = "^" + listItems[i] + "$";
-                if (!waitForPreferencesText(itemName)) {
-                    mSolo.scrollDown();
-                }
+                mAsserter.ok(waitForPreferencesText(itemName), "Waiting for and scrolling once to find item " + itemName, itemName + " found");
+                mAsserter.ok(waitForEnabledText(itemName), "Waiting for enabled text " + itemName, itemName + " option is present and enabled");
                 mSolo.clickOnText(itemName);
             }
         }
     }
 
     public final void selectMenuItem(String menuItemName) {
         // build the item name ready to be used
         String itemName = "^" + menuItemName + "$";