describe "#html" do
bug "#html changes charset", :watir_nokogiri do
it "returns the DOM of the page as an HTML string" do
browser.goto(WatirSpec.url_for("right_click.html"))
html = browser.html.downcase # varies between browsers
html.should =~ /^<html/
html.should include('<meta ')
html.should include(' content="text/html; charset=utf-8"')
not_compliant_on :internet_explorer do
html.should include(' http-equiv="content-type"')
end
deviates_on :internet_explorer9, :internet_explorer10 do
html.should include(' http-equiv="content-type"')
end
not_compliant_on :internet_explorer9, :internet_explorer10 do
deviates_on :internet_explorer do
html.should include(' http-equiv=content-type')
end
end
end
end
end
This fails due to the "charset" value being changed by nokogiri.
See failing spec - https://github.com/jkotests/watir-nokogiri/blob/master/spec/watirspec/browser_spec.rb#L23-L46
This fails due to the "charset" value being changed by nokogiri.