Exemplo n.º 1
0
        public void TestAppCacheStatus()
        {
            driver.Url = html5Page;
            driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromMilliseconds(2000);
            IHasApplicationCache hasAppCacheDriver  = driver as IHasApplicationCache;

            if (hasAppCacheDriver == null || !hasAppCacheDriver.HasApplicationCache)
            {
                Assert.Ignore("Driver does not support app cache");
            }

            IApplicationCache appCache = hasAppCacheDriver.ApplicationCache;
            AppCacheStatus    status   = appCache.Status;

            while (status == AppCacheStatus.Downloading)
            {
                status = appCache.Status;
            }

            Assert.AreEqual(AppCacheStatus.Uncached, status);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Returns application cache status for current remote driver.
        /// </summary>
        /// <returns>Returns <see cref="AppCacheStatus">application cache status</see> for current remote driver.</returns>
        public AppCacheStatus GetStatus()
        {
            Response commandResponse = this.driver.InternalExecute(DriverCommand.GetAppCacheStatus, null);

            return(AppCacheStatus.GetStatus(commandResponse.Value.ToString()));
        }