Created
September 21, 2012 18:03
-
-
Save LBRapid/3762980 to your computer and use it in GitHub Desktop.
Simulate keyup event in a request spec with capybara/poltergeist
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
keypress_script = "var e = $.Event('keyup', { keyCode: 13 }); $('#main-search-input').trigger(e);" | |
page.driver.execute_script(keypress_script) |
๐
Helped me out. Thank You ๐
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hotsaucez.