question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Protractor 5.1.1 selenium-webdriver @types version inconsitency

See original GitHub issue

Bug report

  • Node Version: 6.9.4
  • Protractor Version: 5.1.1
  • Angular Version: 2.4.8
  • Browser(s): n/a
  • Operating System and Version Windows 7

I’ve recently upgraded to Protractor 5.1.1 and am facing some issues when setting cookies via browser.manage().addCookie()

The API has changed between versions 2 and 3 of Selenium-webdriver to expect an object rather than the previous 2…6 arguments. When I make the changes to my code to use the object, the typescript compiler complains saying 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 the @types/selenium-webdriver in the package.json of protractor v5.1.1 is pointing at version 2.53.39. The version of the actual selenium-webdriver the same package.json is referencing is 3.0.1.

I think they should both be version 3.*

related stack overflow question

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:8
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

11reactions
soad666pcommented, Sep 29, 2017

any update on this, as i still see a problem with adding the cookie and get cookie

7reactions
NickTomlincommented, Mar 14, 2017

Thanks for raising this! This is something that we will need to take care of internally.

The current workaround in Craig’s SO answer:

(browser.manage() as any).addCookie({name:'cookieName', value: 'cookieVal'});

I can pick this up later in the week unless someone has time to work on it before then.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Protractor 5.1.1 selenium-webdriver version inconsitency
I found by right-clicking on the addCookie function in Visual Studio Code and selecting Go to Type Definition, I'm taken to the @types/selenium- ......
Read more >
protractor | Yarn - Package Manager
Webdriver E2E test wrapper for Angular. ... Protractor is an end-to-end test framework for Angular and AngularJS applications. Protractor is a Node.js ...
Read more >
CHANGELOG.md
Example `webdriver-manager update --versions.chrome 2.20`. As of this release the latest versions are: - gecko v0.14.0 - selenium-standalone 3.0.1 is the ...
Read more >
protractor-selenium-types-fix - npm
Protractor is an end-to-end test framework for Angular and AngularJS applications. Protractor is a Node.js program built on top of WebDriverJS.
Read more >
[Code example]-HTML Date / Time Input Format 'yyyy-MM-dd ...
Protractor 5.1.1 selenium -webdriver version inconsitency ... Chrome / Selenium appears to have a different format for some input types between locales.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found