 
         // Enter some text to start finding
         app.textFields[""].typeText("Book")
-        var i = 0
-        repeat {
-            i = i+1
-        } while (app.textFields["Book"].exists == false && i < 5)
+        waitforExistence(app.textFields["Book"], timeout: 15)
         XCTAssertEqual(app.staticTexts["FindInPage.matchCount"].label, "1/500+", "The book word count does match")
     }
 

        navigator.goto(PageOptionsMenu)
        navigator.goto(FindInPage)

        waitforExistence(app.buttons["FindInPage.find_next"])
        waitforExistence(app.buttons["FindInPage.find_previous"])
        XCTAssertTrue(app.textFields[""].exists)
    }



        // Enter some text to start finding
        app.textFields[""].typeText("The Book of")
        waitforExistence(app.textFields["The Book of"], timeout: 15)
        XCTAssertEqual(app.staticTexts["FindInPage.matchCount"].label, "1/500+", "The book word count does match")
    }

