13 Replies Last post: Jun 15, 2009 2:18 AM by Waqas  
manoj Beginner 11 posts since
Jan 25, 2007
Currently Being Moderated

Jan 29, 2007 11:52 PM

Can we clear cookies and cache

I am running all the scripts at a time is selenium test runner.There are around 20 scripts and it will run one by one.

So my requirement is to clear cookies and cache before running the any script. is it possible to do it?

I did tryed to use "Delete cookie" command but nothing has happened. May be the formate was not correct.

Beginner 67 posts since
Feb 9, 2007
Currently Being Moderated
1. Feb 12, 2007 7:22 AM in response to: manoj
Re: Can we clear cookies and cache

I use

deleteCookie | a | b

with

a=Name

b=Path

when looking at the cookie via the options menu in Firefox 2.0.0.1.

 

Regarding the cache I can't help you, sorry - but I'm interested in the answer, too.

dturkel Beginner 3 posts since
Feb 17, 2007
Currently Being Moderated
2. Feb 17, 2007 2:03 PM in response to: pheinrich
Re: Can we clear cookies and cache

I have the same problem, and use that same syntax, yet nothing happens... any further information or nuances that we should be aware of to solve this?

Beginner 2 posts since
Feb 7, 2007
Currently Being Moderated
3. Feb 21, 2007 4:31 AM in response to: dturkel
Re: Can we clear cookies and cache

One thing I have noticed is that to delete a cookie you should have opened a page of the same domain. Say like you wish to delete JSESSIONID of domainX you should be on the webpage of domainX so that page.document.cookie gives the cookies of this domainX

 

Secondly, I am not able to delete cookies whose domains are starting with . (like .google.co.in)

 

I hope that helps to some extent , I would also seek the answers for how to delete cookies of domain starting with .

and to delete all the cookies of all the domains.

dturkel Beginner 3 posts since
Feb 17, 2007
Currently Being Moderated
4. Feb 21, 2007 9:44 AM in response to: Lalit
Re: Can we clear cookies and cache

In fact, the cookies I am trying to delete are also prefixed by "."

Vishal Arya Beginner 1 posts since
Mar 19, 2007
Currently Being Moderated
5. Mar 19, 2007 8:13 AM in response to: dturkel
Re: Can we clear cookies and cache

same problem cookies starting with "."  how to get rid of them

marijke Beginner 31 posts since
Jan 5, 2007
Currently Being Moderated
6. Mar 28, 2007 6:05 AM in response to: manoj
Re: Can we clear cookies and cache

I also need to clear cache from selenium.

Thanks in advance

eric Beginner 1 posts since
Apr 9, 2007
Currently Being Moderated
7. Apr 9, 2007 6:57 PM in response to: manoj
Re: Can we clear cookies and cache

We just started trying to move from aspunit to selenium and are having the same issue. This one could be a show stopper for us. Does anyone know if there is a work around for this?

Patrick Lightbody Hero 916 posts since
Nov 3, 2005
Currently Being Moderated
8. Apr 9, 2007 7:35 PM in response to: eric
Re: Can we clear cookies and cache

Is there an open bug for this? If not, you should open one. A patch 

would get it fixed the fastest, of course. Right now, I don't have 

time to look in to it, but if you provided a patch I'd be willing to 

apply it in to the code in trunk.

 

Patrick Lightbody

Selenium Remote Control Creator

 

Check out the new HostedQA at http://www.hostedqa.com:

   

  • See screenshots and movies of your Selenium tests with RealityCheck.

   

  • Quickly verify your site design and performance with RealityView.

 

dturkel Beginner 3 posts since
Feb 17, 2007
Currently Being Moderated
9. Apr 10, 2007 8:34 AM in response to: manoj
Re: Can we clear cookies and cache

I just put this in the JIRA.  We'll see what happens.

Matt Scully Beginner 1 posts since
Oct 11, 2007
Currently Being Moderated
10. Oct 11, 2007 1:35 PM in response to: dturkel
Re: Can we clear cookies and cache

Just for reference, the bug for this is SEL-443.  If this is a problem for you, maybe consider voting for it (or fixing it, of course).

aaron perera Beginner 5 posts since
Jan 23, 2007
Currently Being Moderated
11. Oct 18, 2007 8:28 PM in response to: Matt Scully
Re: Can we clear cookies and cache

yes we can do clear cache in selenium but indirectly..

i used php code to do it..for my testing and use include function here

swami Beginner 12 posts since
Mar 23, 2009
Currently Being Moderated
12. Mar 31, 2009 12:21 AM in response to: aaron perera
Re: Can we clear cookies and cache

hi aaron,

 

i want to delete cache ..... if possible give an example how to do that

Waqas Beginner 44 posts since
Jan 30, 2009
Currently Being Moderated
13. Jun 15, 2009 2:18 AM in response to: aaron perera
Re: Can we clear cookies and cache

can you tell me please how you are deleting the cache indirectly.

 

actually i want to do this. if you know how can i do this.then really it will be helpfull for me.

I am using Selenium-ide for recording the testcase and running with the help of AES(auto exec server). I have one "script.bat" file which delete the cache of my web-application in filesystem. There is a way to run this "bat" files with selenium. I want to run this "bat" file before starting any testcase. Anybody have any idea how can i run this kind of script with selenium.

 

I will appreciate any kind of hlep.

 

thanks in advance.

More Like This

  • Retrieving data ...