Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webdriver: add prefs to ChromeOptions typings #4247

Merged
merged 1 commit into from Jul 24, 2019

Conversation

klamping
Copy link
Contributor

@klamping klamping commented Jul 24, 2019

Proposed changes

Adds typing for ChromeOptions prefs.

This code:

const downloadDir = browser.options.capabilities['goog:chromeOptions'].prefs['download.default_directory'];

throws a TypeScript compilation error:

utils/fileDownloadUtilities.ts:79:80 - error TS2339: Property 'prefs' does not exist on type 'ChromeOptions'.

79         const downloadDir = browser.options.capabilities['goog:chromeOptions'].prefs['download.default_directory'];
                                                                                  ~~~~~

The fix adds the prefs option, which alleviates the TS issue.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

Reviewers: @webdriverio/technical-committee

@codecov
Copy link

codecov bot commented Jul 24, 2019

Codecov Report

Merging #4247 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4247   +/-   ##
=======================================
  Coverage   99.35%   99.35%           
=======================================
  Files         175      175           
  Lines        4323     4323           
  Branches      926      926           
=======================================
  Hits         4295     4295           
  Misses         25       25           
  Partials        3        3

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aab4e5b...764c04b. Read the comment docs.

@christian-bromann christian-bromann added the PR: Docs 📝 PRs that contain changes to the documentation label Jul 24, 2019
Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Docs 📝 PRs that contain changes to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants