I am trying to perform an auth using rest-api for UI tests to save sometime. I noticed the below configure working fine
* driver 'about:blank'
* cookie(mycookie)
* driver url
But the same script if I want to use for chromedriver I am not able to pass the cookies to driver. Here my cookie is an array of key-value json, instead of key-value json.
I tried creating a custom method to inject the cookies but it is also failing to inject the cookies.
public void setCookieToDriver(WebDriver driver, List<Map<String, Object>> cookies){
driver.setCookies(cookies);
}