Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nokogiri changes the charset attribute value #2

Open
jkotests opened this issue Aug 10, 2013 · 0 comments
Open

Nokogiri changes the charset attribute value #2

jkotests opened this issue Aug 10, 2013 · 0 comments

Comments

@jkotests
Copy link
Owner

See failing spec - https://github.com/jkotests/watir-nokogiri/blob/master/spec/watirspec/browser_spec.rb#L23-L46

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.

jkotests pushed a commit that referenced this issue Aug 10, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant