I recently upgraded to Protractor 5.1.1 and ran into some problems setting cookies through browser.manage (). addCookie ()
The API has changed between versions 2 and 3 of Selenium-webdriver to expect an object, not the previous arguments 2..6. When I make changes to my code to use this object, the typescript compiler complains that it expects 2..6 arguments.
old api:
browser.manage().addCookie('cookieName', 'cookieVal');
new api:
browser.manage().addCookie({name:'cookieName', value: 'cookieVal'});
I think this is because @ types / selenium-webdriver is in the package. json of protractor v5.1.1 points to version 2.53.39. The version of the actual selenium-webdriver is the same package.json reference 3.0.1.
Should it be the same value? Anyone else having problems with this?
source share