I am reading an excel file and submitting some requests on the site
using IE driver.Each iteration i need to clear cookies.
But IE is not clearing cookies.Is there any specific way to achieve
this?
Here i what i tried -
stmt=openExcelFile(filePath).createStatement();
String sql = "select * from [Sheet1$]";
rs=stmt.executeQuery(sql);
while(rs.next()){
WebDriver driver1 = new InternetExplorerDriver();
driver1.navigate().to(url);
driver1.manage().deleteAllCookies();
driver1.close();
WebDriver driver = new InternetExplorerDriver();
//SeleniumSRHelper.methoddeletecookies(driver, url);
baseUrl = EH.getInstance().getamHomePageUrl();
driver.get(baseUrl + "/xxxxxxxxxxx."+rs.getInt("TID")
+".html");
zip=rs.getString("zipCode");
Re: issue deleting cookies with IE driver in a loop
Administrator
I am not quite sure how you decide that - "But IE is not clearing cookies"
Is there any specific data which you don't expect to see after deleting cookies but you do.
Re: issue deleting cookies with IE driver in a loop
when cookies are not deleted it lands on consumer page with the same link.Thats how i know that cookies are not cleared.However issue is resolved.I was deleting cookies for google.com and going to the domain.
But later understood that deleteallcookies () deletes cookies of the specified domain.Instead of clearing cookies on google i pointed it to my domain which resolved the issue.