pd!      None!PA session example, which contains an expectation and also transforms the state.  SessionExample*s must be located as a child to a call to " and the type s must match between  the example and the call to "<. Sessions cannot be nested, so if there is no parent call  to " or the types s& do not match, the example will fail. #LProcess the items in a depth-first walk, passing in the item counter value. "_This function causes all child examples (sessions cannot be nested) to be executed serially in - depth-first order, tracking a state of type s2 throughout the examples as they are processed in  order. Examples which are !#s (which are essentially functions  s -> IO s ) can view  and modify the state.  If an example is not a !8, the example is executed and there is no change in the  state.  If an example is a !; but throws an exception, there is no change in the state.  If an example is a !9 and completes successfully, the state returned from the # example is used as the new state. aJust before the first example is run, the create action is executed to obtain the initial state. 8 If the create action throws an error, all of the child ! will report this error. ` Once the final example is run, the cleanup action is executed with the current state (which is a the intial state passed through all successful examples). An exception in the cleanup function  is ignored.  If you use G, the child examples in the session will still be executed serially in c depth-first order so that the state is processed through properly. But multiple sessions will be  executed in parallel. $Create an example to pass to > which accesses and modifies the state using the state monad.  For example, &it "checks the state" $ runState $ do  s <- get ) liftIO $ s `shouldBe` "Hello, World" %Create an example to pass to < which only reads the state. This is useful for bracketing ) tests with some resource. For example, openDb :: IO DbConnection  openDb = ...  !closeDb :: DbConnection -> IO () closeDb = ...  )dbSessionWhich :: String -> Spec -> Spec ;dbSessionWhich msg = session openDb closeDb . describe msg   spec :: Spec spec =  ... % dbSessionWhich "checks users" $ do * it "adds a user" $ with $ \db -> do $ ... something with db ...  - it "loads the user" $ with $ \db -> do $ ... something with db ... &'()*+!,-./0#12"create the state cleanup the state spec tree to process $%345!,"$%&'()*+!,-./0#12"$%345None !An example that can be passed to 9 containing a webdriver action. It must be created with   . 64Used to signal that a previous example had an error 7State passed between examples 8the webdriver session 9Jhas an error occured in an earlier example? We rely on the serialization ; of examples to ensure that at most one thread is reading/ writing this  ioref. KA typeclass of things which can be converted to a list of capabilities. It's primary purpose  is to allow the word using to be used with , so that the session description reads like  a sentance. 1session "for the home page" $ using Firefox $ do % it "loads the page" $ runWD $ do  ... * it "scrolls the carosel" $ runWD $ do  ... <session "for the users page" $ using [Firefox, Chrome] $ do  ... `Provides information about the browser capabilities used for testing. If you want more control $ over capabilities, you should hide ) and then make an enumeration of all the @ webdriver capabilities you will be testing with. For example,  data TestCaps = Firefox ) | FirefoxWithoutJavascript  | Chrome  | IE8  | IE9 & deriving (Show, Eq, Bounded, Enum) TestCaps" must then be made an instance of TestCapabilities. Also, instances of Using  should be created. The capabilities to pass to :. 3Webdriver expectations consist of a set of browser ; to use and the actual test as  a  Z monad. The browser capabilities are specified by an enumeration which is an instance of  . The BrowserDefaults> enumeration provides items that represent the default set of $ capabilities for each browser (see <). ^To obtain more control over the capabilities (e.g. to test multiple versions of IE or to test * Firefrox without javascript), you should 4import Test.Hspec.WebDriver hiding (BrowserDefaults) > and then create your own enumeration which is an instance of  and  . _Combine the examples nested inside this call into a webdriver session. For each capability in ^ the list, before the first example is executed, a new webdriver session is created using the a capabilities. The examples are then executed in depth-first order using this webdriver session ` (so later examples can rely on the browser state created by earlier examples). Once the final 7 example has executed, the session is closed. If some   fails (throws an exception), < all remaining examples in the session will become pending. Note that when using :, the examples within a single session will still execute Y serially. Different sessions (including the multiple sessions created if more than one  capability is passed to  ) will be executed in parallel. LThis function uses the default webdriver host (127.0.0.1), port (4444), and  basepath (/wd/hub). A variation of E which allows you to specify the webdriver host, port, and basepath. = lifted into the   monad. 6Asserts that the given element matches the given tag. 3Asserts that the given element has the given text. 9Asserts that the given elemnt has the attribute given by (attr name, value). 5Asserts that the action returns the expected result. -Asserts that the action throws an exception. >^The initial session is used only for its host, port, and basepath. A new session is created. ?The  WDSession6 passed in is used for its host, port, and base path. Create an example from a   action. This must be nested inside a call to  or  . % @6A7B89 host port  base path message >C? DEFG HIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~:  !   @6A7B89  >C? DEFG        !"#$%&'()*+,#-./001234,556789:;<=>?@ABCDCEFG%HIJ=>KLMNOPQPQPRPRASATAUAVAWAXAYAZA[A\A]A^A_A`AaAbAcAdAeAfAgAhAiAjAjAkAkAlAmAnAoApAqArAsAtAuAvAwAwAxAyAzA{A|A}A~CCCCCCCCCCPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAhspec-webdriver-0.2.0Test.Hspec.WebDriverTest.Hspec.WebDriver.Internaltransformers-0.3.0.0Control.Monad.IO.ClassliftIO hspec-1.8.1.1Test.Hspec.Core.TypeSpecTest.Hspec.Runnerhspec pendingWithpending Test.Hspecparallelitdescribecontextwebdriver-0.5.3.1Test.WebDriver.MonadWD WDExampleUsing UsingListusingTestCapabilitiesnewCapsBrowserDefaultsAndroidIPadIPhoneOperaIEChromeFirefoxsession sessionOnshouldBe shouldBeTagshouldHaveTextshouldHaveAttr shouldReturn shouldThrowrunWDSessionExamplemapWithCounterrunStatewithSession sessionCount sessionMVars sessionCreate sessionClose SessionTest traverseTree traverseSpec countItems sessionItem$fExampleSessionExample$fExceptionSessionTest$fShowSessionTest PrevHasErrorWdState stSessionstErrorTest.WebDriver.Commands createSessionTest.WebDriver.Capabilities Capabilities defaultCapshspec-expectations-0.5.0.1Test.Hspec.ExpectationscreateSt hSessionWd WdExamplecloseSt$fExceptionPrevHasError $fUsing[]$fUsingBrowserDefaults!$fTestCapabilitiesBrowserDefaults Test.WebDriver.Commands.Internal WindowHandleElementSessionStorage LocalStorageWebStorageTypeByXPathByTagByPartialLinkTextByName ByLinkTextByIdByClassByCSSSelectorPortrait Landscape Orientation RightButton MiddleButton LeftButton MouseButtonLogTypelogTimelogMsglogLevelLogEntryJSArgWithName WithIndex WithElement DefaultFrame FrameSelector cookValue cookSecurecookPathcookName cookExpiry cookDomainCookie UpdateReadyUncachedObsoleteIdle DownloadingCheckingApplicationCacheStatus LogWarning LogSevereLogOffLogInfo LogFinestLogFinerLogFine LogConfigLogAllLogLevel currentWindow withMouseDownwindowsuploadZipEntry uploadRawFile uploadFiletouchUptouchScrollFrom touchScroll touchMovetouchLongClicktouchFlickFrom touchFlick touchDowntouchDoubleClick touchClicktagNamesubmit storageSize setWindowSize setWindowPossetScriptTimeoutsetPageLoadTimeoutsetOrientation setLocationsetKeysetImplicitWait setCookiesessions serverStatus sendRawKeyssendKeysscreenshotBase64 screenshot replyToAlertrefreshopenPage moveToFrom moveToCentermoveTomouseUp mouseDownmkCookiemaximize isSelected isEnabled isDisplayed getWindowSize getWindowPosgetTitlegetText getSourcegetOrientationgetLogs getLogTypes getLocationgetKeygetCurrentWindow getCurrentURLgetCapsgetApplicationCacheStatus getAllKeys getAlertTextforward focusWindow focusFrame findElemsFrom findElems findElemFromfindElem executeJSelemSizeelemPoselemInfo doubleClick dismissAlertdeleteVisibleCookies deleteKeydeleteCookieByName deleteCookie deleteAllKeys deactivateIMEcssPropcookies closeWindow closeSession clickWithclick clearInputcheckIMEActivebackavailableIMEEnginesattrasyncJSactiveIMEEngine activeElem activateIME acceptAlert<==>