add waitForKeyboardHide to fix intermittent failures on Travis.