This is a migrated thread and some comments may be shown as answers.

safari browser cache

3 Answers 58 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rad
Top achievements
Rank 1
Rad asked on 13 Feb 2013, 09:35 PM
When I use the following statement to clear up the cache and cookies
ActiveBrowser.ClearCache(ArtOfTest.WebAii.Core.BrowserCacheType.History);
I get the following exception "Clearing the browser cache is not yet supported for Safari" How do i prevent Safari from saving cookies and not to get this error.

3 Answers, 1 is accepted

Sort by
0
Boyan Boev
Telerik team
answered on 14 Feb 2013, 03:22 PM
Hello Rad,

I am sorry to report there is no solution to this problem. The Safari API does not include a "clear cookies" function (and it doesn't look like there ever will be in the Windows version since it appears they have stopped development of Safari for Windows). Since there's no API in Safari for Windows we can use, we cannot offer support for it. In this instance we are blocked by what Safari currently offers.

All the best,

Boyan Boev
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Abhilash
Top achievements
Rank 1
answered on 26 Jul 2013, 10:12 AM
We use the below code to not get this error:

            if (ActiveBrowser.BrowserType != BrowserType.Safari)
            {
                ActiveBrowser.ClearCache(ArtOfTest.WebAii.Core.BrowserCacheType.Cookies);
            }

But, of course this doesn't clear Safari cookies. So, if clearing cookies is required on Safari, then it wouldn't really make sense to run the test on Safari.
0
Boyan Boev
Telerik team
answered on 29 Jul 2013, 11:21 AM
Hi Abhilash,

Thank you for your input and helping others. 

Regards,
Boyan Boev
Telerik
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Rad
Top achievements
Rank 1
Answers by
Boyan Boev
Telerik team
Abhilash
Top achievements
Rank 1
Share this question
or