Skip to content

[rb] Add guard for beta firefox #16153

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

Merged
merged 16 commits into from
Aug 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rb/spec/integration/selenium/webdriver/network_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

module Selenium
module WebDriver
describe Network, exclude: {version: GlobalTestEnv.beta_chrome_version},
describe Network, exclude: {version: 'beta'},
exclusive: {bidi: true, reason: 'only executed when bidi is enabled'},
only: {browser: %i[chrome edge firefox]} do
let(:username) { SpecSupport::RackServer::TestApp::BASIC_AUTH_CREDENTIALS.first }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def browser
end

def browser_version
driver_instance.capabilities.browser_version
ENV.fetch('WD_BROWSER_VERSION', 'stable')
end

def driver_instance(...)
Expand Down Expand Up @@ -193,18 +193,6 @@ def create_driver!(listener: nil, **, &block)
raise e
end

def beta_chrome_version
chrome_beta_url = 'https://chromereleases.googleblog.com/search/label/Beta%20updates'

uri = URI.parse(chrome_beta_url)

response = Net::HTTP.get_response(uri)

return "Failed to fetch Chrome Beta page: #{response&.code}" unless response.is_a?(Net::HTTPSuccess)

response.body.match(/\d+\.\d+\.\d+\.\d+/).to_s
end

private

def build_options(**)
Expand Down
1 change: 1 addition & 0 deletions rb/spec/tests.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ BROWSERS = {
"env": {
"WD_REMOTE_BROWSER": "firefox",
"WD_SPEC_DRIVER": "firefox",
"WD_BROWSER_VERSION": "beta",
} | select({
"@selenium//common:use_pinned_linux_firefox": {
"FIREFOX_BINARY": "$(location @linux_beta_firefox//:firefox/firefox)",
Expand Down
Loading