[NUnitAsp-devl] How do I test a site that requires authentication
Brought to you by:
jlittle82
From: <yan...@ab...> - 2005-05-05 01:51:55
|
Hi, Thanks for helping in developping this cool tool. I managed to find out how to get pass the integrated authentication problem, which was much simpler that i thought. You jest need to add this line below before getting the page, which seems to work fine for me. Browser.Credentials=System.Net.CredentialCache.DefaultCredentials; Regards Yannick Arekion [Test] public void CheckLogon() { string page= "http://localhost/MyMaths/WebForm1.aspx"; Console.WriteLine("Getting Page : "+page); Browser.Credentials=System.Net.CredentialCache.DefaultCredentials; Browser.GetPage(page); TextBoxTester user = new TextBoxTester("txtUser",CurrentWebForm); Console.WriteLine(user.Text); } ----------------------------------------------- ABS Web Site: www.abs.gov.au |