Sha256: 0ee4e5509944ee55fc467e43225b6e601b02cc69e0b3b055187cd49287426c97
Contents?: true
Size: 501 Bytes
Versions: 5
Compression:
Stored size: 501 Bytes
Contents
module Polyblock module CapybaraHelpers def fill_in_polyblock(locator, params = {}) # Find out ckeditor id at runtime using its label locator = find('label', text: locator)[:for] if page.has_css?('label', text: locator) # Fill the editor content page.execute_script <<-SCRIPT var ckeditor = CKEDITOR.instances.#{locator} ckeditor.setData('#{params[:with]}') ckeditor.focus() ckeditor.updateElement() SCRIPT end end end
Version data entries
5 entries across 5 versions & 1 rubygems