README.textile in gem_suit-0.1.1 vs README.textile in gem_suit-0.1.2

- old
+ new

@@ -332,25 +332,29 @@ def mark_content page.execute_script "$('div#rich_cms_dock a.mark').click()" end - def edit_content(key) - page.execute_script "$('.rcms_content.marked[data-store_key=" + key + "]').click()" + def edit_content(key, css_class = "rcms_content") + page.execute_script <<-JAVASCRIPT + $(".#{css_class}.marked[data-store_key=#{key}]").click(); + JAVASCRIPT assert find("#raccoon_tip").visible? end def fill_in_and_submit(selector, with, submit) within "#{selector} fieldset.inputs" do with.each do |key, value| begin fill_in key.to_s, :with => value rescue Selenium::WebDriver::Error::ElementNotDisplayedError - page.execute_script "var input = $('#{selector} [name=\"#{key}\"]');" + - "if (input.data('cleditor')) {" + - " input.val('#{value}');" + - " input.data('cleditor').updateFrame();" + - "}" + page.execute_script <<-JAVASCRIPT + var input = $("#{selector} [name='#{key}']"); + if (input.data("cleditor")) { + input.val("#{value}"); + input.data("cleditor").updateFrame(); + } + JAVASCRIPT end end end find(selector).find_button(submit).click sleep 2 \ No newline at end of file