The test is running on a windows network that requires proxy (squid) authentication to access external websites, say www.google.com for sake of example.
Some background things to note
These sites cannot be added to the proxy white list.
Same WatiN test passes in IE
I have tried tweaking about:config ntlm settings to allow automatic passing of saved credentials
www.google.com has been added to Local Intranet sites
WatiN cannot use LogonDialogHandler to deal with this, like IE can
The title of the dialog is Authentication Required
and reads The proxy myproxy:8080 is requesting a user name and password. The site says ""
, with a text field for User Name
: and Password
:
Has anyone got any ideas of how to get around this?
I'm hoping there is something FireFox specific that will allow me to automatically pass through the credentials. An idea I might try is starting the browser with network credentials.
Maybe one of the settings here will help:
https://developer.mozilla.org/En/Integrated_Authentication
EDIT:
This will be fixed in Firefox 4:
https://bugzilla.mozilla.org/show_bug.cgi?id=521467
Here are some references that might offer other solutions to get around the logon dialog.
In this post they solved it using WindowsAutomation:
WatiN LogonDialogHandlers not working correctly in Windows 7
This solution passes the credentials in the url:
how to impersonate a windows domain user for automated web testing?
And this solution uses impersonation:
Watin Windows Authentication
You could also use FiddlerCore to manipulate the response to the server:
How to simulate http request using WatiN with specific HTTP referrer and query string?
HTH, Jeroen