diff --git a/lib/datadog/ci/contrib/cuprite/driver.rb b/lib/datadog/ci/contrib/cuprite/driver.rb index d812e115..63220d0e 100644 --- a/lib/datadog/ci/contrib/cuprite/driver.rb +++ b/lib/datadog/ci/contrib/cuprite/driver.rb @@ -44,8 +44,8 @@ def visit(url) # set the tags specific to the browser test active_test.set_tag(CI::Ext::Test::TAG_BROWSER_DRIVER, "cuprite") active_test.set_tag(CI::Ext::Test::TAG_BROWSER_DRIVER_VERSION, datadog_integration.version) - active_test.set_tag(CI::Ext::Test::TAG_BROWSER_NAME, browser.options.browser_name) - active_test.set_tag(CI::Ext::Test::TAG_BROWSER_VERSION, browser.version) + active_test.set_tag(CI::Ext::Test::TAG_BROWSER_NAME, browser.options.browser_name || "chrome") + active_test.set_tag(CI::Ext::Test::TAG_BROWSER_VERSION, browser.version.product) result end diff --git a/vendor/rbs/cuprite/0/driver.rbs b/vendor/rbs/cuprite/0/driver.rbs index 2e1279cb..5c1f3a69 100644 --- a/vendor/rbs/cuprite/0/driver.rbs +++ b/vendor/rbs/cuprite/0/driver.rbs @@ -8,7 +8,7 @@ module Ferrum end class Ferrum::Browser - def version: () -> String + def version: () -> Ferrum::Browser::VersionInfo def options: () -> Ferrum::Browser::Options end @@ -17,6 +17,10 @@ class Ferrum::Browser::Options def browser_name: () -> String end +class Ferrum::Browser::VersionInfo + def product: () -> String +end + module Capybara::Cuprite::Driver def visit: (String url) -> untyped