How to get cookies from Browser
Posted: Mon Jan 07, 2019 8:36 pm
Our web application sets a cookie that I need to retrieve and decrypt in order to get some information needed to validate later in my test.
I have looked at Host.Current as well as the following to try and get the cookies with no luck...
I know with straight Selenium you can use something like:
Does anyone know how to get the browser's cookies?
I have looked at Host.Current as well as the following to try and get the cookies with no luck...
var cookies = Repository.OURSITE.Self.ExecuteScript("document.cookie");and
var cookies = Repository.OURSITE.Self.ExecuteScript("document.cookie.split(';');");both return "undefined".
I know with straight Selenium you can use something like:
var cookies = remoteWebDriver.Manage().Cookies;or
var cookies = driver.Manage().Cookies;However, I cannot find anything like this that is equivalent in Ranorex.
Does anyone know how to get the browser's cookies?