Created
July 15, 2012 15:38
-
-
Save nowk/3117482 to your computer and use it in GitHub Desktop.
Capybara + Selenium wysiwyg interaction
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
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