Skip to content

Instantly share code, notes, and snippets.

@LBRapid
Created September 21, 2012 18:03
Show Gist options
  • Save LBRapid/3762980 to your computer and use it in GitHub Desktop.
Save LBRapid/3762980 to your computer and use it in GitHub Desktop.
Simulate keyup event in a request spec with capybara/poltergeist
keypress_script = "var e = $.Event('keyup', { keyCode: 13 }); $('#main-search-input').trigger(e);"
page.driver.execute_script(keypress_script)
@originalhat
Copy link

Hotsaucez.

@HansHauge
Copy link

👍

@rebelweb
Copy link

Helped me out. Thank You 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment