         // Visit MDN to add a custom search engine
         loadWebPage("https://developer.mozilla.org/en-US/search", waitForLoadToFinish: true)
         
-        app.webViews.searchFields.element(boundBy: 0).tap()
+        if iPad() {
+            let searchTheDocsSearchField = app.webViews.searchFields["Search the docs"]
+            searchTheDocsSearchField.tap()
+            app.keyboards.buttons["Search"].tap()
+            searchTheDocsSearchField.tap()
+        } else {
+            app.webViews.searchFields.element(boundBy: 0).tap()
+        }
         app.buttons["AddSearch"].tap()
         app.alerts["Add Search Provider?"].buttons["OK"].tap()
         XCTAssertFalse(app.buttons["AddSearch"].isEnabled)

    }
    
    fileprivate func dismissKeyboardAssistant(forApp app: XCUIApplication) {
        if app.buttons["Done"].exists {
            // iPhone
            app.buttons["Done"].tap()
        } else {
            // iPad
            app.buttons["Dismiss"].tap()
        }
    }
    

        // Visit MDN to add a custom search engine
        loadWebPage("https://developer.mozilla.org/en-US/search", waitForLoadToFinish: true)
        
        if iPad() {
            let searchTheDocsSearchField = app.webViews.searchFields["Search the docs"]
            searchTheDocsSearchField.tap()
            app.keyboards.buttons["Search"].tap()
            searchTheDocsSearchField.tap()
        } else {
            app.webViews.searchFields.element(boundBy: 0).tap()
        }
        app.buttons["AddSearch"].tap()
        app.alerts["Add Search Provider?"].buttons["OK"].tap()
        XCTAssertFalse(app.buttons["AddSearch"].isEnabled)
