7 comments for “Testing CKEditor in Ruby on Rails with Cucumber/Capybara”

  1. Capybara roundup
     

    [...] Trice shows how to test CKEditor in your [...]

     
  2. Patty
     

    I’ll try to put this to good use immdieaetly.

     
  3. Michael
     

    worked a treat for me once I set Capybara to use :selenium driver rather than :webkit, thanks!

     
  4. Stanislaw
     

    Worked for me. Thanks!

     
  5. Marc-André Lafortune
     

    Most helpful, thanks.

    To be complete, it’s probably best to replace the ‘#{value}’ with #{value.to_json}, as this will escape quotes and thus avoid potential javascript errors.

    @Michael: Works perfectly for me with capybara-webkit

     
  6. Marc-André Lafortune
     

    Strangely enough, it didn’t work anymore with webkit, even though the script executed correctly and getData() returned the correct string. I came up with an extended solution, see http://stackoverflow.com/questions/10957869/how-to-fill-ckeditor-from-capybara-with-webkit-or-selenium-driver

     
  7. Adam
     

    browser.execute_script(“CKEDITOR.instances.SELECTOR.setData(‘test’)”)

     

Leave a comment