Skip to content

(@wdio/utils): support setup of Firefox browser through @puppeteer/browser#10995

Merged
christian-bromann merged 9 commits intomainfrom
cb-firefox-setup
Aug 27, 2023
Merged

(@wdio/utils): support setup of Firefox browser through @puppeteer/browser#10995
christian-bromann merged 9 commits intomainfrom
cb-firefox-setup

Conversation

@christian-bromann
Copy link
Member

Proposed changes

This patch enables downloading and setting up Firefox Nightly if browserVersion is set to latest.

Types of changes

  • Polish (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)
  • Documentation update

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)
  • I have added proper type definitions for new commands (if appropriate)

Further comments

n/a

Reviewers: @webdriverio/project-committers

@christian-bromann christian-bromann added the PR: Polish 💅 PRs that contain improvements on existing features label Aug 22, 2023
{ binary: executablePath },
caps['moz:firefoxOptions'] || {}
)
delete caps.browserVersion
Copy link
Member

Choose a reason for hiding this comment

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

I understand geckodriver is very specific with the versions passsed to session creation requests, but won't we loose valuable information for all kinds of reporters and services by deleting the browserVersion?

FYI I worked around this by getting semver info and modifying the version like so:

Suggested change
delete caps.browserVersion
// Set proper version in capabilities
// Geckodriver does not like 0-based patch versions
caps.browserVersion = `${major}.${minor}${patch ? `.${patch}` : ''}`

Copy link
Member Author

@christian-bromann christian-bromann Aug 22, 2023

Choose a reason for hiding this comment

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

Good point, yeah would prefer to keep the version. I will look get this added. Thanks!

Copy link
Member Author

@christian-bromann christian-bromann Aug 26, 2023

Choose a reason for hiding this comment

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

I actually looked into where we pass information through and it seems all reporter get the browserVersion from the capabilities object returned by the driver. Deleting them doesn't harm that.

See this spec reporter after running npm run test:e2e:webdriver: https://gist.github.com/christian-bromann/4b321b0dc79752e28895037ed3962528

@christian-bromann christian-bromann merged commit 35a0608 into main Aug 27, 2023
@christian-bromann christian-bromann deleted the cb-firefox-setup branch August 27, 2023 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Polish 💅 PRs that contain improvements on existing features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants