I use Selenium and Sauce Labs for testing.
Is there a Selenium property to add a custom header or append a string to the user agent (like “using Sauce Labs”)?
I want to selectively not load some content for Selenium, because it is causing the units tests to be too finicky. I have some widgets on the page, and sometimes the page doesn’t complete loading… so I want to selectively not display them for Selenium.
I’m not familiar with Sauce Labs, but you can certainly do this on some Selenium setups, by changing the
general.useragent.override, as follows (which may be adaptable):Using the FirefoxDriver you can:
with Cabybara you can: