datasift/storyplayer — pull request #75 by stuartherbert (2013-10-15 09:51:13+00:00)
Title: New: deviceSetup() and deviceTeardown() support

This PR adds two new helper methods to stories and story templates: deviceSetup() and deviceTeardown().

* deviceSetup() is called immediately after we start a test device
* deviceTeardown() is called immediately before we stop a test device

Stories do not need to call these directly; they are automatically called by $st.

The main use is to set HTTP Basic Auth details after a browser has been started, but before any attempt is made by the story to load a URL. I'm sure other use cases will emerge in future.