Of course, Simon objects so it’s not actually in the core API, and it’s only back for Sauce Labs operation, via a hack :)

See a Sauce Labs job that shows it off in use for a BDD/JBehave script.

To use, just do something like this:

JavascriptExecutor js = (JavascriptExecutor) webDriver;
js.executeScript("sauce:context=the sentence you would like to appear in Sauce Labs' job log");

Sauce Labs (and others) can possibly use executeScript() as a generalized control API for their remote cloud instances.



Published

September 30th, 2011
Reads: 1,183

Tags

Categories

Comments formerly in Disqus, but exported and mounted statically ...


Tue, 16 Apr 2013Leslie Chong

Hi! Should this still be working? I can't seem to get my tests to display any messages to the Sauce Labs job log.

Tue, 16 Apr 2013paul_hammant

I don't know that was 18 months ago ... what do saucelabs support say ?

Tue, 16 Apr 2013Leslie Chong

Sauce labs forum linked here back in 2/2012 and I don't see any updates on supporting this in the rest api. I'll post to Sauce labs' forum to ask them.

Tue, 16 Apr 2013Alex Glowaski

Updated! Thanks for checking in. (http://support.saucelabs.co...