Hello!
I have a simple case, but i've spent 1,5 hours trying to resolve it - no success!
The case is: login in gmail.com several times under different users.
After first login need to clear cookies, but the ActiveBrowser.Cookies.DeleteCookie - doesn't work in IE.
I found a lot of topics, but no one helps.
http://www.artoftest.com/community/forums/webaii--web-automation-infrastructure/forum-general-questions/cannot-delete-cookies.aspx
http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/telerik-testing-framework/intermediate-topics/cookie-support.aspx
My browsers are: IE8.0, Chrome12, Firefox4.0, Safari 5.0.5
The code is:
This work in chrome, safari,firefox, but not works in IE8.0
I have a simple case, but i've spent 1,5 hours trying to resolve it - no success!
The case is: login in gmail.com several times under different users.
After first login need to clear cookies, but the ActiveBrowser.Cookies.DeleteCookie - doesn't work in IE.
I found a lot of topics, but no one helps.
http://www.artoftest.com/community/forums/webaii--web-automation-infrastructure/forum-general-questions/cannot-delete-cookies.aspx
http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/telerik-testing-framework/intermediate-topics/cookie-support.aspx
My browsers are: IE8.0, Chrome12, Firefox4.0, Safari 5.0.5
The code is:
Manager.LaunchNewBrowser();
System.Net.CookieCollection gCookie1 = ActiveBrowser.Cookies.GetCookies("http://google.com");
System.Net.CookieCollection gCookie2 = ActiveBrowser.Cookies.GetCookies("http://www.google.com");
System.Net.CookieCollection gCookie3 = ActiveBrowser.Cookies.GetCookies("http://www.accounts.google.com");
foreach (System.Net.Cookie cookie in appCookie)
{
ActiveBrowser.Cookies.DeleteCookie(cookie);
}
foreach (System.Net.Cookie cookie in gCookie1)
{
ActiveBrowser.Cookies.DeleteCookie(cookie);
}
foreach (System.Net.Cookie cookie in gCookie2)
{
ActiveBrowser.Cookies.DeleteCookie(cookie);
}
foreach (System.Net.Cookie cookie in gCookie3)
{
ActiveBrowser.Cookies.DeleteCookie(cookie);
}
ActiveBrowser.NavigateTo("https://www.google.com/accounts/ServiceLogin");
This work in chrome, safari,firefox, but not works in IE8.0