[🐛 Bug]: Second driver's discovery logging still misses a debug switch flipped mid-run
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
#17832、特にその Additional Considerations と Implementation Notes から始め、ChromeDriver/FirefoxDriver、DriverFinder、Selenium Manager、Debug.configureLogger() を経由する RemoteWebDriver の初期化を追跡します。一覧にあるアプローチを、実行中にデバッグスイッチが変わる 2 つ目の driver に対して評価します。そのケースの動作が修正されて検証されるか、受け入れられた制限として文書化されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Feature and motivation
Follow-up from #17832 (part of the umbrella tracker, see linked issue).
RemoteWebDriver's static initializer (JLS 12.4.2) is guaranteed to run once, before any subclass constructor body — including argument expressions passed to a subclass's own super(...) call, which is where ChromeDriver/FirefoxDriver perform DriverFinder/Selenium Manager discovery logging. #17832 uses that static initializer to make the first driver constructed in a JVM correctly pick up the debug switch for its own discovery logging.
That only covers the first driver. For a second (or later) driver, if the debug switch is flipped between the first and second construction, that second driver's own discovery logging still runs — via its super(...) argument evaluation — before Debug.configureLogger() is reached inside the instance constructor body. Its discovery logging is still missed.
This is not a regression: the gap has always existed on trunk. #17832 narrows it (first-driver case now works) but explicitly does not close it, and flags it as a maintainer call in its "Additional Considerations" section.
Options (not evaluated in depth yet — for whoever picks this up)
- Move (or duplicate) the
Debug.configureLogger()call earlier, intoDriverFinder/Selenium Manager's own discovery-logging call sites directly, so it no longer depends on being reached via any particular constructor's control flow. - Give
ChromeDriver/FirefoxDrivera static initializer of their own (JLS 12.4.2 runs a subclass's static initializer before any instance of it is constructed, but after the superclass's static initializer already ran) that callsDebug.configureLogger()— need to verify this actually resolves the second-driver case and not just duplicate the same first-instance limitation at a different class. - Accept the gap as a known limitation of static-initializer-timing and document it rather than fix it, if no clean fix exists that doesn't complicate driver subclass initialization further.
Related
#12892, #17832 (see its "Additional Considerations" and Implementation Notes items 1–2 for the original writeup of this gap).
- 主要言語
- Java
- スター
- 34.6k
- フォーク
- 8.7k
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 86
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
SeleniumHQ/selenium のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
SeleniumHQ/selenium#18323 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
SeleniumHQ/selenium#17843 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
[java] DriverFinderTest property fixture doesn't clear/restore selenium.webdriver.verbose再び着手できるかも @stefanpoia が 25 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
SeleniumHQ/selenium#17836 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
A-needs-triaging C-java D-chrome D-firefox I-defect OS-linux
難易度 4/5 1〜2日 初心者へのやさしさ 53/100
SeleniumHQ/selenium#18324 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: [py] Generated bidi.UserAgentClientHints is empty — inline CDDL params drop the command対応中かも @titusfortner が 3 日前に担当しました。 オープンC-py OS-mac
SeleniumHQ/selenium#18312 · 担当者 2 名 ·
メンテナーはふだん 1 日以内に返信
SeleniumHQ/selenium の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
btraceio/jafar#228 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
jenkinsci/git-client-plugin#1807 ·
-
area-templates triage:bot-seen triage:needs-human
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
microsoft/aspire#22356 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Coral-Hive] locate() is typed as STRING instead of INT, so view schemas report a string columnオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
apache/flink-agents#1395 ·
メンテナーはふだん 1 日以内に返信