nowk
7/15/2012 - 3:38 PM

Capybara + Selenium wysiwyg interaction

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