It’s just data

Browsers and status codes

Jonno Downes: I was curious to see how IE handled all the different HTTP status codes, so I put together some ruby scripts to test them

I’ve tried this with Firefox, for which there, sadly, doesn’t appear to be any watir equivalent.  Instead, I made do with the following addition:

<p><a href='/#{@status.to_i+1}'>next</a></p>

it seems that with Firefox the output is always displayed for status codes above 200 with three exceptions:

204 No Content
205 Reset Content
304 Not Modified


Microsoft: these “friendly” error messages are only displayed if the response that is sent to the client is less than a specified threshold. For example, to see the exact text of an HTTP 500 response, the content length must be greater than or equal to 512 bytes.

Posted by Robert Sayre at

Some related links...

More tests, this time of XMLHttpRequest: [link]

Also there’s a “macro recorder” for Firefox: [link] - this doesn’t solve all the problem though - you still need a way to script a Firefox instance.

Presumably it must be possible to register a COM API for Firefox - don’t know if that’s been done though and I guess that’s Windows only. Perhaps another route in could be wxmozilla - [link] - there’s something semi-working there for wxPython but the project doesn’t seem to focused on building ready-to-use distributions or resolving dependancy issues yet.

Posted by Harry Fuecks at

If I understand correctly how Watir works, you can use Selenium IDE for automated testing in Firefox.

Posted by Michele at

Sorry, whats language using in sample there [link]...

Posted by Alexei A. Korolev at

Alexei: Ruby

Posted by Sam Ruby at

Thank you Sam. I checked [link] ... hm...yet another php for me :/

Posted by Alexei A. Korolev at

I’ve tried this with Firefox, for which there, sadly,
doesn’t appear to be any
watir equivalent.

As a matter of fact, there is now a WATiR equivalent for FireFox - in fact it’s an extension to WATiR that lets WATiR scripts drive FireFox instances just like they can drive IE. Most scripts should work with FireFox with very little change.

You’ll need to get the appropriate branch of Watir from svn.openqa.org; choose the firefox branch

Posted by Amit Garde at

Add your comment