safari browser cache

4 posts, 0 answers
  1. Rad
    Rad avatar
    8 posts
    Member since:
    Feb 2013

    Posted 13 Feb 2013 Link to this post

    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.
  2. Boyan Boev
    Admin
    Boyan Boev avatar
    1039 posts

    Posted 14 Feb 2013 Link to this post

    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
  3. Abhilash
    Abhilash avatar
    3 posts
    Member since:
    Jan 2012

    Posted 26 Jul 2013 Link to this post

    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.
  4. Boyan Boev
    Admin
    Boyan Boev avatar
    1039 posts

    Posted 29 Jul 2013 Link to this post

    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
Back to Top