[Zope3-Users] Send User-Agent header with zope.testbrowser.browser.Browser

Benji York benji at zope.com
Fri May 9 14:45:38 EDT 2008


On Fri, May 9, 2008 at 2:27 PM, Jeff Kowalczyk <jtk at yahoo.com> wrote:

> Is there anything I need to do with the mech_browser attribute to send a
> custom User-Agent header with zope.testbrowser.browser.Browser?

There's no way to do a custom User-Agent with just testbrowser.  The
way to do it with mechanize is described in
http://wwwsearch.sourceforge.net/mechanize/doc.html, which should work
if used on the mech_browser attribute of a testbrowser instance.

Note that the mech_browser attribute is an undocumented implementation
detail and may disappear without warning.  Swim at your own risk, no
lifeguard on duty.
-- 
Benji York
Senior Software Engineer
Zope Corporation


More information about the Zope3-users mailing list