Let’s stop our HTML escaping. We’ll use that old trick, using a carrot under a box, resting on a stick tied with a string. Except with Sauce Labs instead of the box. And the
capture-html desired capability instead of the string. And instead of a carrot, a torturous metaphor. You can ask your instance of WebDriver for the source at every test step sure, but it’s faster to get Sauce Labs to do it for you — There’s no transferring HTML across the internet every page fetch.
To do this using the Sauce gem, we just add the
capture-html capability in our config block:
[code lang=”ruby” gutter=”false”]
Sauce.config do |c|
All WebDrivers support this feature when used on Sauce Labs; the capability name is always the same, just set it to whatever your tool & language consider truthy.
Don’t let your HTML get away!