1

I am not able to delete cookies using selenium ide . I want to delete all my cookies before the test case execution i have tried

<tr>
    <td>deleteCookie</td>
    <td>ASP.NET_SessionId</td>
    <td>path=, domain=192.168.14.22:92, recurse=true</td>
</tr>

but its not working.

I also tried this

deleteallvisible cookies no luck.

Please suggest some idea to get override of this.

Dariusz
  • 21,561
  • 9
  • 74
  • 114
user2181194
  • 93
  • 1
  • 10
  • Here is the sort of kind of similar Question. [Link][1] [1]: http://stackoverflow.com/questions/7664488/selenium-ide-deleteallvisiblecookies-and-asp-net-sessionid-cookie-not-working/7892607#7892607 – MangeshBiradar Apr 19 '13 at 06:34

2 Answers2

4

It isn't possible to delete the ASP.NET_SessionId cookie because it is marked HttpOnly.

Set-Cookie:ASP.NET_SessionId=zecwj145rv2wkt45ekwangyq; path=/; HttpOnly

According to this post there isn't anyway to delete or modify the cookie other than HTTP. There also isn't a way to turn off HttpOnly for this cookie.

Community
  • 1
  • 1
MangeshBiradar
  • 3,820
  • 1
  • 23
  • 41
3

use this code to delete cookies through selenium ide, it work for and here is image
Set base url is https://www.google.co.in

 <tr>
    <td>open</td>
    <td>/</td>
    <td></td>
 </tr>
 <tr>
    <td>deleteAllVisibleCookies</td>
     <td>PREF</td>
     <td>domain=.google.co.in, recurse=true</td>
 </tr>
 <tr>
    <td>deleteAllVisibleCookies</td>
    <td>NID</td>
    <td>domain=.google.co.in, recurse=true</td>
 </tr>
Ankit jain
  • 4,198
  • 4
  • 19
  • 24
  • 1
    Ya its working with google but its not working with the HttpOnly cookies, this commands fails to delete the cookies which are HttpOnly. – user2181194 Apr 24 '13 at 07:03
  • Can you give cookie name and Domain name or give me code I will check and let you know. – Ankit jain Apr 25 '13 at 08:07
  • it's not working for local domain: local.snpts.org. I tried both `local.snpts.org` and `.local.snpts.org` as domain but still doesn't work. – Damodar Bashyal Apr 05 '16 at 07:12