module Capybara
def HTML(html) # rubocop:disable Naming/MethodName
-
(Nokogiri::HTML::Document)- HTML document
Parameters:
-
html(String) -- The raw html
def HTML(html) # rubocop:disable Naming/MethodName Nokogiri::HTML(html).tap do |document| document.xpath('//textarea').each do |textarea| textarea['_capybara_raw_value'] = textarea.content.sub(/\A\n/, '') end end end