-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[javascript] Feat 14045/nodejs env var driver location #15930
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
base: trunk
Are you sure you want to change the base?
[javascript] Feat 14045/nodejs env var driver location #15930
Conversation
…ge, Firefox, IE, and Safari
…ge, Firefox, IE, and Safari
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @iampopovich.
There is a failing test, can you please check?
https://github.com/SeleniumHQ/selenium/actions/runs/15822768191/job/44595655636?pr=15930 So far, I've discovered two failing tests:
Both pass locally. I'm trying to determine whether this is a test issue or an environment problem. Here's an example of a test run and its console output:
|
User description
🔗 Related Issues
fixes #14045
💥 What does this PR do?
Here I made the same changes as in issue #15653
🔧 Implementation Notes
This pull request introduces support for environment variables to specify the paths of WebDriver executables for various browsers. It also includes corresponding test cases to validate this functionality. The changes ensure that an environment variable can be used to set the executable path, with explicit paths taking precedence, and fallback behavior when the environment variable is not set.
Environment Variable Support for WebDriver Executables:
ChromeDriver:
SE_CHROMEDRIVER
environment variable support to specify the ChromeDriver executable path. If not set, the builder falls back to locating the executable on the system PATH. (javascript/selenium-webdriver/chrome.js
, [1] [2]javascript/selenium-webdriver/test/chrome/service_test.js
, javascript/selenium-webdriver/test/chrome/service_test.jsR44-R88)EdgeDriver:
SE_EDGEDRIVER
environment variable support to specify the EdgeDriver executable path. Similar fallback behavior as ChromeDriver. (javascript/selenium-webdriver/edge.js
, [1] [2]javascript/selenium-webdriver/test/edge/service_test.js
, javascript/selenium-webdriver/test/edge/service_test.jsR42-R86)GeckoDriver (Firefox):
SE_GECKODRIVER
environment variable support for the GeckoDriver executable path. (javascript/selenium-webdriver/firefox.js
, [1] [2]javascript/selenium-webdriver/test/firefox/service_test.js
, javascript/selenium-webdriver/test/firefox/service_test.jsR1-R90)IEDriver:
SE_IEDRIVER
environment variable support for the IEDriver executable path. (javascript/selenium-webdriver/ie.js
, [1] [2]javascript/selenium-webdriver/test/ie/service_test.js
, javascript/selenium-webdriver/test/ie/service_test.jsR1-R93)SafariDriver:
SE_SAFARIDRIVER
environment variable support for the SafariDriver executable path. (javascript/selenium-webdriver/safari.js
, [1] [2]javascript/selenium-webdriver/test/safari_test.js
, javascript/selenium-webdriver/test/safari_test.jsR41-R85)💡 Additional Considerations
🔄 Types of changes
PR Type
Enhancement, Tests
Description
Add environment variable support for WebDriver executables
Support SE_CHROMEDRIVER, SE_EDGEDRIVER, SE_GECKODRIVER, SE_IEDRIVER, SE_SAFARIDRIVER
Explicit paths override environment variables
Comprehensive test coverage for all browsers
Changes walkthrough 📝
5 files
Add SE_CHROMEDRIVER environment variable support
Add SE_EDGEDRIVER environment variable support
Add SE_GECKODRIVER environment variable support
Add SE_IEDRIVER environment variable support
Add SE_SAFARIDRIVER environment variable support
5 files
Add environment variable tests for ChromeDriver
Add environment variable tests for EdgeDriver
Create new test file for GeckoDriver
Create new test file for IEDriver
Add environment variable tests for SafariDriver