Created
June 9, 2016 18:35
-
-
Save jadell/8b9aeca9f1cc738843eca3b4af1e1d32 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setPlacesAutocomplete(selector, value) { | |
casper.then(function () { | |
casper.sendKeys(selector, value, { keepFocus: true }); | |
casper.page.sendEvent('keydown', 0); | |
casper.page.sendEvent('keyup', 0); | |
}); | |
casper.waitUntilVisible('.pac-container .pac-item', function () { | |
casper.page.sendEvent('keydown', casper.page.event.key.Down); | |
casper.page.sendEvent('keydown', casper.page.event.key.Enter); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment