Skip to content

Instantly share code, notes, and snippets.

@nowk
Created July 15, 2012 15:38
Show Gist options
  • Save nowk/3117482 to your computer and use it in GitHub Desktop.
Save nowk/3117482 to your computer and use it in GitHub Desktop.
Capybara + Selenium wysiwyg interaction
def is_js?
Capybara::Selenium::Driver == page.driver.class
end
page.execute_script('$("#selector").tinymce().setContent("Test goes here")')
# this does not work (or does not work anymore)
# it asks to switch the to the frame
within_frame("#{name}_ifr") do
editor = page.find_by_id('tinymce')
editor.native.send_keys(args[:with])
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment