Malcolm Murray
Malcolm Murray

Reputation: 388

String representation of HTML element in HTTPUnit

Been trying to find a way of getting the String representation of an HTMLElement in HTTPUnit. I'm using HTTPUnit in some tests to get response HTML, and can get the text content of an element, however this does not include a text representation of its surrounding HTML, which I want to compare with a test value.

Any help appreciated.

Upvotes: 1

Views: 67

Answers (1)

Maurice Perry
Maurice Perry

Reputation: 32831

The is more than one way to represent an HTML element. For instance, the attributes of an HTML element can be in any order, so you could produce a string, but it is not guarantied to be identical to the original element.

Upvotes: 1

Related Questions