I found out that this is really because the poltergeist runs blurin fill_in. All I had to do was fill in the typeahead field by running this script:
page.execute_script "$('input[typeahead]').unbind('blur')"
Thus, the UI Typeahead event is blurnot raised, and he believes that he has focus on the field, accordingly creating a proposal window.
If you are not using jQuery, this script works with AngularJS:
elements = document.getElementsByTagName('input');
for (var i = 0; i < elements.length; i++) {
if (elements[i].hasAttribute('typeahead')) {
angular.element(elements[i]).unbind('blur');
}
}
Diego source
share