Search code examples
watirwatir-webdriversaucelabs

Sauce Labs Session ID with Watir


There is an easy way to get the Sauce Labs job ID when using Selenium-Webdriver as outlined at the bottom of this page.

Is there a similar method for Watir-Webdriver?


Solution

  • The driver session ID is not directly exposed via the Watir API. However, you can just call the same method directly against the underlying driver object:

    Assuming browser is your Watir::Browser instance:

    browser.driver.session_id