J.      !"#$%&'()*+,-None #09;DR& 'Optional options that can be passed to . XAs soon as an example fails, skip all remaining tests in the session. Defaults to True.A webdriver example.The webdriver action of type   ()7 should interact with the webpage using commands from Test.WebDriver.Commands; (which is re-exported from this module) and then use the  #g:4 expectationsF in this module. It is possible to split up the spec of a single page into multiple examples where later examples start with the web browser state from the end of the previous example. This is helpful to keep each individual example small and allows the entire spec to be described at the beginning with pending examples.EThe way this works is that you combine examples into a session using  or . A webdriver session is then threaded through all examples in a session so that a later example in the session can rely on the webbrowser state as set up by the previous example. The type system enforces that every webdriver example must be located within a call to  or  . Indeed, a  produces a  ( multi)! which can only be converted to  using  or . The reason for the F constructor is so that a pending example can be specified with type  ( multi)5 so it can compose with the other webdriver examples. The type multil is used when testing multiple sessions at once (e.g. to test multiple interacting users), otherwise it is (). Values of this type are used to determine which browser session the example should be executed against. A new session is created every time a new value of type multig is seen. Note that the type system enforces that every example within the session has the same type multi.+Internal state for webdriver test sessions..3The state passed between examples inside the mvars./The already created sessions0)True if the previous example had an error1.True if the previous example was aborted with #2Create a new sessionA shorthand for constructing a  from a webdriver action when you are only testing a single browser session at once. See the XKCD example at the top of the page.3A version of runWD that accepts some custom optionsCreate a webdriver example, specifying which of the multiple sessions the example should be executed against. I suggest you create an enumeration for multi, for example: data TestUser = Gandolf | Bilbo | Legolas deriving (Show, Eq, Enum, Bounded) runUser :: TestUser -> WD () -> WDExample TestUser runUser = runWDWith spec :: Spec spec = session "tests some page" $ using [firefoxCaps] $ do it "does something with Gandolf" $ runUser Gandolf $ do openPage ... it "does something with Bilbo" $ runUser Bilbo $ do openPage ... it "goes back to the Gandolf session" $ runUser Gandolf $ do e <- findElem .... ...In the above code, two sessions are created and the examples will go back and forth between the two sessions. Note that a session for Legolas will only be created the first time he shows up in a call to runUser, which might be never. To share information between the sessions (e.g. some data that Gandolf creates that Bilbo should expect), the best way I have found is to use IORefs created with  (wrapped in a utility module).7A version of runWDWith that accepts some custom optionsA pending example.!A pending example with a message. A version of 3 which lifts an IO () to a webdriver example (so it can be composed with other webdriver examples). In the case of multiple sessions, it doesn't really matter which session the expectation is executed against, so a default value is used. In the case of single sessions, the type is  WdExample ().}Combine the examples nested inside this call into a webdriver session or multiple sessions. For each of the capabilities in the list, the examples are executed one at a time in depth-first order and so later examples can rely on the browser state created by earlier examples. These passes through the examples are independent for different capabilities. Note that when using , the examples within a single pass still execute serially. Different passes through the examples will be executed in parallel. The sessions are managed as follows:In the simplest case when multi is (), before the first example is executed a new webdriver session with the given capabilities is created. The examples are then executed in depth-first order, and the session is then closed when either an exception occurs or the examples complete. (The session can be left open with #).LMore generally, as the examples are executed, each time a new value of type multi is seen, a new webdriver session with the capabilities is automatically created. Later examples will continue with the session matching their value of multi.WThis function uses the default webdriver host (127.0.0.1), port (4444), and basepath (/wd/hub).A variation of ^ which allows you to specify the webdriver configuration. Note that the capabilities in the 4G will be ignored, instead the capabilities will come from the list of   passed to .In addition, each capability is paired with a descriptive string which is passed to hspec to describe the example. By default, , uses the browser name as the description.  supports a more detailed description so that in the hspec output you can distinguish between capabilities that share the same browser but differ in the details, for example capabilities with and without javascript.6A synonym for constructing pairs that allows the word using to be used with 8 so that the session description reads like a sentance. allBrowsers :: [Capabilities] allBrowsers = [firefoxCaps, chromeCaps, ieCaps] browsersExceptIE :: [Capabilities] browsersExceptIE = [firefoxCaps, chromeCaps] mobileBrowsers :: [Capabilities] mobileBrowsers = [iphoneCaps, ipadCaps, androidCaps] myspec :: Spec myspec = do session "for the home page" $ using allBrowsers $ do it "loads the page" $ runWD $ do ... it "scrolls the carosel" $ runWD $ do ... session "for the users page" $ using browsersExceptIE $ do ...=Default capabilities which can be used in the list passed to 6. I suggest creating a top-level definition such as  allBrowsers and browsersWithoutIEu such as in the XKCD example at the top of the page, so that you do not specify the browsers in the individual spec.=Default capabilities which can be used in the list passed to 6. I suggest creating a top-level definition such as  allBrowsers and browsersWithoutIEu such as in the XKCD example at the top of the page, so that you do not specify the browsers in the individual spec.=Default capabilities which can be used in the list passed to 6. I suggest creating a top-level definition such as  allBrowsers and browsersWithoutIEu such as in the XKCD example at the top of the page, so that you do not specify the browsers in the individual spec.=Default capabilities which can be used in the list passed to 6. I suggest creating a top-level definition such as  allBrowsers and browsersWithoutIEu such as in the XKCD example at the top of the page, so that you do not specify the browsers in the individual spec. =Default capabilities which can be used in the list passed to 6. I suggest creating a top-level definition such as  allBrowsers and browsersWithoutIEu such as in the XKCD example at the top of the page, so that you do not specify the browsers in the individual spec.!=Default capabilities which can be used in the list passed to 6. I suggest creating a top-level definition such as  allBrowsers and browsersWithoutIEu such as in the XKCD example at the top of the page, so that you do not specify the browsers in the individual spec."=Default capabilities which can be used in the list passed to 6. I suggest creating a top-level definition such as  allBrowsers and browsersWithoutIEu such as in the XKCD example at the top of the page, so that you do not specify the browsers in the individual spec.#.Abort the session without closing the session. Normally, L will automatically close the session either when the tests complete without error or when any of the tests within the session throws an error. When developing the test suite, this can be annoying since closing the session causes the browser window to close. Therefore, while developing the test suite, you can insert a call to #. This will immedietly halt the session (all later tests will fail) but will not close the session so that the browser window stays open.$5 lifted into the   monad.%5Asserts that the given element matches the given tag.&2Asserts that the given element has the given text.'9Asserts that the given elemnt has the attribute given by (attr name, value).(4Asserts that the action returns the expected result.),Asserts that the action throws an exception.6Create a WdTestSession.7TConvert a single test item to a generic item by providing it with the WdTestSession.8tConvert a spec tree of test items to a spec tree of generic items by creating a single session for the entire tree.9+Traverse a spec allowing the type to change:KProcess the items in a depth-first walk, passing in the item counter value.4;< =>?.@/012 !"#$%&'()6789A:B*+, CDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  !"#$%&'()* # !"$%&'() ';<  =>?.@/012 !"#$%&'()6789A:B*+,      !"#$%&'()*+,-./0123456789:;!<=>?-@ABCDEEFG7HIJKJLJMJNJOJPJQJRJSJTJUJVJWJXJYJZJ[J\J]J^J_J`JaJbJcJdJeJfJgJhJiJjJkJlJmJnJoJpJqJrJsJtJuJvJwJxJyJzJ{J|J}J~JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ+hspec-webdriver-1.2.0-6gr6yup7BxjXJLnZB9PwdTest.Hspec.WebDriver"hspec-2.3.2-HGoVxOwCFc442UWzK9LuUX Test.Hspecspecifycontext'hspec-core-2.3.2-AIQPeVYaGKe8C5yKiyvTP5Test.Hspec.Core.Spec.MonadSpecWithSpecrunIOTest.Hspec.Core.SpecdescribeitparallelTest.Hspec.Core.Runnerhspec&webdriver-0.8.4-GbvJ8NuwccEFlom0UW1ER9Test.WebDriver.MonadWDTest.WebDriver.Capabilities Capabilities WdOptionsskipRemainingTestsAfterFailure WdExample WdPending WdTestSessionrunWD runWDOptions runWDWithrunWDWithOptionspending pendingWithexamplesession sessionWithusing firefoxCaps chromeCapsieCaps operaCaps iphoneCapsipadCaps androidCapsinspectSessionshouldBe shouldBeTagshouldHaveTextshouldHaveAttr shouldReturn shouldThrow$fExampleWdExample$fExceptionAbortSession$fDefaultWdOptions$fShowAbortSession SessionState stSessionMapstPrevHadError stPrevAbortedstCreateSessionTest.WebDriver.ConfigWDConfig/hspec-expectations-0.8.2-CRpcqRDtagB3Xif3KUrN49Test.Hspec.ExpectationscreateTestSession procSpecItemprocTestSession traverseTreemapWithCounter AbortSession wdTestOpen wdTestClose traverseSpec countItemsTest.WebDriver.CommandsgetApplicationCacheStatus getLogTypesgetLogs serverStatus deleteKeysetKeygetKey deleteAllKeys getAllKeys storageSizeuploadZipEntry uploadRawFile uploadFile setLocation getLocationtouchFlickFrom touchFlicktouchLongClicktouchDoubleClicktouchScrollFrom touchScroll touchMovetouchUp touchDown touchClick doubleClickmouseUp mouseDown withMouseDown clickWith moveToFrom moveToCentermoveTo dismissAlert acceptAlert replyToAlert getAlertTextsetOrientationgetOrientation<==>elemSizeelemPoscssPropattr isDisplayed isEnabled isSelected clearInputtagName sendRawKeyssendKeysgetTextsubmitclickelemInfo findElemsFrom findElemFrom activeElem findElemsfindElemgetTitle getSourcedeleteVisibleCookiesdeleteCookieByName deleteCookie setCookiecookiesmkCookie setWindowPos getWindowPos setWindowSize getWindowSizemaximize closeWindow focusWindowwindowsgetCurrentWindow focusFrame deactivateIME activateIMEcheckIMEActiveactiveIMEEngineavailableIMEEnginesscreenshotBase64 screenshotsaveScreenshotasyncJS executeJSrefreshbackforwardopenPage getCurrentURLsetPageLoadTimeoutsetScriptTimeoutsetImplicitWait closeSession getActualCapssessions createSessionJSArg FrameSelector WithIndexWithName WithElement DefaultFrameCookiecookName cookValuecookPath cookDomain cookSecure cookExpirySelectorByIdByNameByClassByTag ByLinkTextByPartialLinkTextByCSSByXPath Orientation LandscapePortrait MouseButton LeftButton MiddleButton RightButtonWebStorageType LocalStorageSessionStorageLogEntrylogTimelogLevellogMsgLogTypeApplicationCacheStatusUncachedIdleChecking Downloading UpdateReadyObsoleteLogLevelLogOff LogSevere LogWarningLogInfo LogConfigLogFineLogFiner LogFinestLogAll Test.WebDriver.Commands.Internal currentWindowElement WindowHandle