Exemple #1
0
        private void BrowserStorageJavaScriptFindFirstOnSessionTest()
        {
            var bs = new JavaScriptBrowserStorage(_driver, StorageType.Session);

            bs.Clear();
            bs.SetItem("key1", "value1");
            Assert.AreEqual("value1", bs.GetItem("key1"), @"JSFFS GetValue");
            Assert.AreEqual("key1", bs.FindFirstKeyLike("key*"), @"JSFFS FindFirst before clear");
            bs.RemoveItem("key1");
            Assert.IsNull(bs.FindFirstKeyLike("key*"), @"JSFFS FindFirst after clear");
        }
Exemple #2
0
        private void BrowserStorageJavaScriptFindFirstOnLocalTest()
        {
            var bs = new JavaScriptBrowserStorage(_driver, StorageType.Local);

            bs.Clear();
            bs.SetItem("key1", "value1");
            Assert.AreEqual("value1", bs["key1"], @"JSFFL GetValue via this[]");
            Assert.AreEqual("key1", bs.FindFirstKeyLike("key*"), @"JSFFL FindFirst before clear");
            bs.RemoveItem("key1");
            Assert.IsNull(bs.FindFirstKeyLike("key*"), @"JSFFL FindFirst after clear");
        }