How to use Selenium, how can I check a web interface that returns XML instead of HTML?

I use Selenium for the unit test of my Perl cgi script and everything works fine except for one special test case when my cgi script returns XML content to a web browser instead of returning HTML content.

I am new to Selenium and just pasted a script in my sample to start, but I cannot find the Selenium command in any documentation that recognizes that my XML response was returned. Selenium commands seem to suggest that the HTML page always returns.

+4
source share
1 answer

The Selenium killer function runs tests as if it were a browser, and this primarily means testing Javascript. If your program just uses HTTP and XML, then Selenium is redundant. Go with WWW :: Mechanize and Test :: XML or Test :: XPath

+6
source

Source: https://habr.com/ru/post/1311221/


All Articles