// GET: Cookie public ActionResult Index() { Database contextDb = Context.Database; Item cookieDislaimerItem = contextDb.GetItem(CookieDisclaimerID); CookieDisclaimer cookie = new CookieDisclaimer( cookieDislaimerItem[CookieDisclaimerFields.Message], cookieDislaimerItem[CookieDisclaimerFields.ButtonText], cookieDislaimerItem[CookieDisclaimerFields.PopUpBackgroundColor], cookieDislaimerItem[CookieDisclaimerFields.TextColor], cookieDislaimerItem[CookieDisclaimerFields.ButtonBackgroundColor] ); //string cookievalue; //if (Request.Cookies["isCookieAccepted"] != null) //{ // cookievalue = Request.Cookies["isCookieAccepted"].ToString(); //} //else //{ // Response.Cookies["isCookieAccepted"].Value = "cookie value"; // Response.Cookies["cookie"].Expires = DateTime.Now.AddMinutes(1); // add expiry time //} return(View(cookie)); }
public Page(IWebDriver driver) { _driver = driver; Component = driver.FindElement(By.XPath("//body")); Title = driver.Title; Disclaimer = new CookieDisclaimer(Component); SearchBar = new SearchBar(Component); }