Created
February 8, 2013 05:05
-
-
Save DylanLacey/4736721 to your computer and use it in GitHub Desktop.
How to set the name of your tests for Selenium::WebDriver & Sauce Labs, in Ruby. Lots of other things can be set this way, check out https://saucelabs.com/docs/additional-config under the "Job Annotation" heading.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Where you create your WebDriver object, set a "name" key-value pair to name a test: | |
Capybara.register_driver :selenium do |app| | |
require 'selenium-webdriver' | |
capabilities = Selenium::WebDriver::Remote::Capabilities.firefox | |
capabilities[:name] = "Some Sort Of Test" | |
Capybara::Selenium::Driver.new(app, { | |
:url => "http://username:[email protected]:80/wd/hub", | |
:browser => :remote, | |
:desired_capabilities => capabilities | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Where you create your WebDriver Object | |
capabilities = Selenium::WebDriver::Remote::Capabilities.firefox | |
capabilities[:name] = "Some Sort Of Test" | |
driver = Selenium::WebDriver.for( | |
:browser => :remote, | |
:url => "http://username:[email protected]:80/wd/hub", | |
:desired_capabilities => capabilities | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment