Portability | Uses mtl, Generalised Newtype Deriving, CPP |
---|---|
Stability | provisional |
Maintainer | Aaron Tomb <[email protected]> |
Safe Haskell | None |
Test.Selenium.Server
Description
A Haskell binding the HTTP protocol spoken by the Selenium Remote Control server. The Selenium server allows remote clients to control a web browser, acting as automated users.
- data Browser
- data SCommand
- = SClick
- | SDoubleClick
- | SClickAt
- | SDoubleClickAt
- | SFireEvent
- | SKeyPress
- | SShiftKeyDown
- | SShiftKeyUp
- | SMetaKeyDown
- | SMetaKeyUp
- | SAltKeyDown
- | SAltKeyUp
- | SControlKeyDown
- | SControlKeyUp
- | SKeyDown
- | SKeyUp
- | SMouseOver
- | SMouseOut
- | SMouseDown
- | SMouseDownAt
- | SMouseUp
- | SMouseUpAt
- | SMouseMove
- | SMouseMoveAt
- | SType
- | STypeKeys
- | SSetSpeed
- | SGetSpeed
- | SCheck
- | SUncheck
- | SSelect
- | SAddSelection
- | SRemoveSelection
- | SRemoveAllSelections
- | SSubmit
- | SOpen
- | SOpenWindow
- | SSelectWindow
- | SSelectFrame
- | SFrameMatchesExpression
- | SWindowMatchesExpression
- | SWaitForPopup
- | SCancelNextPrompt
- | SAnswerNextPrompt
- | SGoBack
- | SRefresh
- | SClose
- | SIsAlertPresent
- | SIsPromptPresent
- | SIsConfirmationPresent
- | SGetAlert
- | SGetConfirmation
- | SGetPrompt
- | SGetLocation
- | SGetTitle
- | SGetBodyText
- | SGetValue
- | SGetText
- | SHighlight
- | SEval
- | SIsChecked
- | SGetTable
- | SGetSelectedLabels
- | SGetSelectedLabel
- | SGetSelectedValues
- | SGetSelectedValue
- | SGetSelectedIndexes
- | SGetSelectedIndex
- | SGetSelectedIds
- | SGetSelectedId
- | SIsSomethingSelected
- | SGetSelectOptions
- | SGetAttribute
- | SIsTextPresent
- | SIsElementPresent
- | SIsVisible
- | SIsEditable
- | SGetAllButtons
- | SGetAllLinks
- | SGetAllFields
- | SGetAttrFromAllWindows
- | SSetMouseSpeed
- | SGetMouseSpeed
- | SDragAndDrop
- | SDragAndDropToObject
- | SWindowFocus
- | SWindowMaximize
- | SGetAllWindowIds
- | SGetAllWindowNames
- | SGetAllWindowTitles
- | SGetHTMLSource
- | SSetCursorPosition
- | SGetElementIndex
- | SIsOrdered
- | SGetElementPositionLeft
- | SGetElementPositionTop
- | SGetElementWidth
- | SGetElementHeight
- | SGetCursorPosition
- | SSetContext
- | SGetExpression
- | SWaitForCondition
- | SGetXPathCount
- | SAddLocationStrategy
- | SSetTimeout
- | SWaitForPage
- | SGetCookie
- | SCreateCookie
- | SDeleteCookie
- | STestComplete
- | SNewSession
- data SeleniumRCSession = SeleniumRCSession {
- selHost :: HostName
- selPort :: Int
- selBrowser :: Browser
- selURL :: URI
- selSessionID :: Maybe String
- selUseBrowse :: Bool
- data Selenium a
- mkSeleniumRCSession :: HostName -> Browser -> URI -> SeleniumRCSession
- startSelenium :: Selenium SeleniumRCSession
- stopSelenium :: Selenium ()
- withSelenium :: SeleniumRCSession -> Selenium a -> IO (Either String a)
- runSelenium :: SeleniumRCSession -> Selenium a -> IO (Either String a)
- runSeleniumReader :: SeleniumRCSession -> Selenium a -> ErrorT String IO a
- doCommand :: SCommand -> [String] -> Selenium String
- doCommandList :: [(SCommand, [String])] -> Selenium [String]
- mkURI :: SeleniumRCSession -> SCommand -> [String] -> Maybe URI
- open :: String -> Selenium String
- check, click, uncheck :: Locator -> Selenium String
- clickAndWait :: Locator -> Selenium String
- typeText, keyPress :: Locator -> String -> Selenium String
- isTextPresent :: String -> Selenium Bool
- isElementPresent :: Locator -> Selenium Bool
- isChecked :: Locator -> Selenium Bool
- waitForPage :: Integer -> Selenium String
- waitForCondition :: String -> Integer -> Selenium String
- submit :: Locator -> Selenium String
- selectFrame :: String -> Selenium String
- mouseDown, mouseUp, mouseMove :: Locator -> Selenium String
- dragAndDrop :: Locator -> String -> Selenium String
- dragAndDropToObject :: Locator -> Locator -> Selenium String
- getAttribute :: Locator -> Selenium String
- getBodyText :: Selenium String
- getAllLinks :: Selenium [String]
- evalJS :: String -> Selenium String
- getSelectedIndex :: Locator -> Selenium Integer
Types
Browser types
An SCommand: an action or accessor
Constructors
data SeleniumRCSession Source
Constructors
SeleniumRCSession | |
Fields
|
The Selenium Monad, an error-handling read-only state
Basic functions
mkSeleniumRCSession :: HostName -> Browser -> URI -> SeleniumRCSessionSource
Create an unconnected Selenium session.
startSelenium :: Selenium SeleniumRCSessionSource
Connect to the server, and tell it to start a web browser.
stopSelenium :: Selenium ()Source
Tell the server that a session is finished.
withSelenium :: SeleniumRCSession -> Selenium a -> IO (Either String a)Source
Start a session, execute some code with the resulting handle, and then stop the session.
runSelenium :: SeleniumRCSession -> Selenium a -> IO (Either String a)Source
Run a Selenium action inside IO. This is the top-level function
you'll usually use to run a Selenium command when not using
withSelenium
.
runSeleniumReader :: SeleniumRCSession -> Selenium a -> ErrorT String IO aSource
Run a Selenium action within the ErrorT monad. Useful for chaining together several actions without writing intermediate error handling.
doCommand :: SCommand -> [String] -> Selenium StringSource
Send a Selenium command to the server with a list of arguments.
doCommandList :: [(SCommand, [String])] -> Selenium [String]Source
Execute a list of Selenium commands paired with arguments, and return | a list of results.