Skip to content

Commit

Permalink
test: fix test on selenium
Browse files Browse the repository at this point in the history
  • Loading branch information
mhanberg committed Jun 7, 2024
1 parent 4339b24 commit e6955b2
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions integration_test/selenium/selenium_capabilities_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,20 @@ defmodule Wallaby.Integration.SeleniumCapabilitiesTest do
}
}

metadata =
if System.get_env("WALLABY_DRIVER") == "chrome" &&
Version.compare(System.version(), "1.16.0") in [:eq, :gt] do
"g2gCdwJ2MXQAAAABbQAAAARzb21lbQAAAAhtZXRhZGF0YQ=="
else
"g2gCZAACdjF0AAAAAW0AAAAEc29tZW0AAAAIbWV0YWRhdGE="
end

expected_capabilities = %{
browserName: "firefox",
"moz:firefoxOptions": %{
args: ["-headless"],
prefs: %{
"general.useragent.override" =>
"#{user_agent}/BeamMetadata (g2gCZAACdjF0AAAAAW0AAAAEc29tZW0AAAAIbWV0YWRhdGE=)"
"general.useragent.override" => "#{user_agent}/BeamMetadata (#{metadata})"
}
}
}
Expand Down

0 comments on commit e6955b2

Please sign in to comment.