views:

60

answers:

1

I'm using Selenium to unit test my Perl cgi script and all works fine except in one special test case where my cgi script returns XML content to the web browser instead of returning HTML content.

I'm new to Selenium and only pasted in their sample script to get started, but I can't seem to find a Selenium command in any of the documentation that will recognize that my XML response has been returned. The Selenium commands seem to assume that an HTML page is always being returned.

+6  A: 

Selenium's strong suit is running tests as if it were the browser and this primarily means testing Javascript. If you're program is just using HTTP and XML then Selenium is overkill. Go with WWW::Mechanize and Test::XML or Test::XPath

mpeters
Mechanize did the trick! Thanks!
Kurt W. Leucht