[rb] fix using environment variables to set drivers - #17571
Conversation
Review Summary by QodoFix environment variables in driver path resolution
WalkthroughsDescription• Move environment variable check to DriverFinder for consistent resolution • Remove redundant env_path calls from Service initialization • Ensure environment variables apply in typical driver usage patterns • Refactor path resolution order: service path, env vars, then class path Diagramflowchart LR
A["Service.initialize"] -->|removed env_path| B["Service.launch"]
B -->|calls DriverFinder| C["DriverFinder.paths"]
C -->|checks in order| D["service.executable_path"]
D -->|or| E["env_path"]
E -->|or| F["class_path"]
F -->|returns| G["driver executable"]
File Changes1. rb/lib/selenium/webdriver/common/driver_finder.rb
|
Code Review by Qodo
1. Safari TP browserName not set
|
|
Persistent review updated to latest commit afac4b5 |
|
Code review by qodo was updated up to the latest commit dd06d23 |
|
Code review by qodo was updated up to the latest commit 4c61289 |
|
Code review by qodo was updated up to the latest commit 89f1169 |
|
Code review by qodo was updated up to the latest commit eed6f9a |



🔗 Related Issues
the current implementation doesn't apply to the typical use case
Unless a user is attempting to start the driver service before initializing the driver, the environment variable won't be used
💥 What does this PR do?
Builds on #17564 to put the environment variable check where the service class check is in the DriverFinder
🤖 AI assistance
💡 Additional Considerations
🔄 Types of changes