Testing Rails - Cucumber vs CKEditor
How do you get a feature to set the value of a ckeditor field so that it can run under any driver (javascript or not)?
#value = "Thing to set body to..."
begin
page.evaluate_script("CKEDITOR.instances.discussion_body_editor.setData('<p>#{value.gsub("'","\\\\'")}</p>');")
rescue Capybara::NotSupportedByDriverError
And %{I fill in "discussion_body_editor" with "#{value}"}
end
Copyright © 2011, Aaron Blondeau
Drupal theme by Kiwi Themes.