[🐛 Bug]: Bindings change the user's options when Selenium Manager supplies a browser
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
調査の方向性
Read the listed Ruby, Python, Java, .NET, and JavaScript driver entry points to compare where each binding mutates options and constructs session capabilities. Start with the Ruby reproduction, then trace the equivalent option and capability flows in each binding. Done means all bindings preserve the user's options, omit the browser version only from that session's capabilities when a binary is set, and log that omission at debug level.
索引モデルが issue の本文から書いたものです。
説明
Description
When Selenium Manager supplies a browser, every binding writes the browser path into the user's options object and clears its browser version. The browser version has to be left out of the session request, because the binary now decides which browser runs. But changing the user's object means the change outlives that one session.
Reusing one options object for several sessions is common. Capybara passes the same options to every new browser it starts after a quit or reset, test fixtures share options across tests, and retry code tries again with the same object. After the first session:
- The user's version request is gone. Later sessions send Selenium Manager
--browser-path <cached browser>with no--browser-version. The browser is the same, but the logs now look as if the user had pinned a browser path. Nothing records that the path came from Selenium, or which version the user actually asked for. This made a failing Capybara run on GitHub Actions hard to diagnose: its first attempt asked Selenium Manager for 157, and the retries only showed a path to a cached browser. - Changing the version afterwards fails. If the user sets a different
browser_versionon the reused object, Selenium Manager gets both the new version and the old path, and errors out. See the logs below.
Expected:
- Leave the user's options unchanged. Apply the browser path, and leave out the browser version, only in the capabilities sent for that session.
- Log at debug when the browser version is left out because a browser binary is set, so each session's log shows what was requested and why it wasn't sent.
Where each binding changes the options:
- Ruby:
local_driver.rb - Python:
chromium/webdriver.py,firefox/webdriver.py - Java:
ChromeDriver.java,EdgeDriver.java,FirefoxDriver.java - .NET:
ChromiumDriver.cs,FirefoxDriver.cs - JavaScript (the capabilities passed to
createSession):chromium.js,firefox.js
Reproducible Code
require 'selenium-webdriver'
options = Selenium::WebDriver::Options.chrome(browser_version: '157', args: ['--headless'])
Selenium::WebDriver.for(:chrome, options: options).quit
p options.browser_version # => nil
p options.binary # => ".../.cache/selenium/chrome/mac-arm64/157.0.8103.78/.../Google Chrome for Testing"
options.browser_version = '156'
Selenium::WebDriver.for(:chrome, options: options) # => NoSuchDriverError: Unable to obtain chromedriver
Debugging Logs
ERROR Selenium [:selenium_manager] The browser at /Users/<user>/.cache/selenium/chrome/mac-arm64/157.0.8103.78/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing has version 157.0.8103.78 but chrome 156 was requested; remove --browser-path to allow a browser download
ERROR Selenium [:driver_finder] Exception occurred: Unsuccessful command executed: [".../selenium-manager", "--browser", "chrome", "--browser-version", "156", "--browser-path", "/Users/<user>/.cache/selenium/chrome/mac-arm64/157.0.8103.78/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing", "--language-binding", "ruby", "--output", "json"] - Code 65
- 主要言語
- Java
- スター
- 34.6k
- フォーク
- 8.7k
- 平均マージ
- 1日 16時間
- マージ済み PR(30日)
- 107
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
SeleniumHQ/selenium のほかの issue
-
C-py I-defect
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
SeleniumHQ/selenium#18438 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
SeleniumHQ/selenium#18323 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
B-build C-py I-enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
SeleniumHQ/selenium#18435 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[🐛 Bug]: [rust] Selenium Manager can return a browser from the cache before it finishes copying対応中かも @Liz-Lian が 2 日前に担当しました。 オープンC-rust I-defect
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
SeleniumHQ/selenium#18427 ·
メンテナーはふだん 1 日以内に返信
-
C-py D-chrome OS-windows
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
SeleniumHQ/selenium#18394 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
SeleniumHQ/selenium の issue をすべて見る
似ている issue
-
area-integrations
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
? - Needs Triage bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
NVIDIA/cudf-spark-jni#5598 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
oracle/graalvm-reachability-metadata#12264 ·
メンテナーはふだん 1 日以内に返信
-
[source-facebook-pages] post stream never returns attachments.media_type対応中かも @v-k-data が今日担当しました。 オープンarea/connectors needs-triage type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
[BUG] AppSync: GetIntrospectionSchema wraps the schema in JSON instead of returning the raw SDL bodyオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
floci-io/floci#10107 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信