Sha256: e49497c7f2c77f9e5f3b5a7d8718b641cdc561f1ec939fe0e942649540a92de9
Contents?: true
Size: 452 Bytes
Versions: 24
Compression:
Stored size: 452 Bytes
Contents
module Waterpig module CKEditorTools def fill_in_ckeditor(id, options = {}) raise "Must pass a hash containing 'with'" if not options.is_a?(Hash) or not options.has_key?(:with) raise "CKEeditor fill-in only works with Selenium driver" unless page.driver.class == Capybara::Selenium::Driver browser = page.driver.browser browser.execute_script("CKEDITOR.instances['#{id}'].setData('#{options[:with]}');") end end end
Version data entries
24 entries across 24 versions & 1 rubygems