Originally published at
Sara Trice. You can comment here or
there.
I have a textarea with the id of “request_details”, made into a CKEditor instance by jQuery: $(‘#request_details’).ckeditor();
(Check
this page if you need some help getting CKEditor to work with jQuery, it’s dead simple)
Feature looks like this: And I fill in "Here are some details" in the CKEditor instance "request_details"
Step looks like this:
When /^I fill in "([^"]*)" in the CKEditor instance "([^"]*)"$/ do |value, input_id|
browser = page.driver.browser
browser.execute_script("CKEDITOR.instances['#{input_id}'].setData('#{value}');")
end