Test that the character set is UTF-8

i.e. test that this element is present:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" id="charset">

The Table

|Element Focus|charset|meta|
|Attribute|content|text/html; charset=utf-8|

Breaking this Down

  1. Set the classpath

  2. Load the HTMLFixture

  3. Load the URL for the page we're testing.

  4. Find the element whose ID is charset and assert that its name is meta.

  5. Assert that this element has an attribute with the name content whose value is "text/html; charset=utf-8"

  6. Assert that this element also has an attribute with the name http-equiv whose value is "content-type"

Previous | Next | Top | Cafe con Leche

Copyright 2006 Elliotte Rusty Harold
Last Modified September 12, 2006