are there any webkit equivalents to selenium's send_keys and dialog handling?
551 views
Skip to first unread message
David Morton
unread,
Jun 27, 2012, 1:33:55 AM6/27/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to capybar...@googlegroups.com
Using selenium, I can send keystroke input to the page with:
native.send_keys(:return)
and hit ok on dialogs with:
page.driver.browser.switch_to.alert.accept
Are there any webkit alternatives?
Joe Ferris
unread,
Jun 28, 2012, 8:47:21 AM6/28/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to capybar...@googlegroups.com
Hey David,
There currently isn't a quick way to send specific keys. However, you can use createEvent (https://developer.mozilla.org/en/DOM/document.createEvent) to simulate a lot of behavior together with Capybara's standard execute_script method.
Currently, capybara-webkit automatically accepts all alert/confirm dialogs.
-Joe
Jesse Cooke
unread,
Jun 28, 2012, 10:35:20 AM6/28/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message