selenium-0.2.2: Test web applications through a browser.ContentsIndex
Selenium.Server
PortabilityUses mtl
Stabilityprovisional
MaintainerAaron Tomb <atomb@galois.com>
Contents
Types
Basic functions
Selenium command wrappers
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.
Synopsis
data Browser
= InternetExplorer
| Firefox
| Konqueror
| Opera
| Safari
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 Integer
}
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
click :: Locator -> Selenium String
clickAndWait :: Locator -> Selenium String
check :: Locator -> Selenium String
uncheck :: Locator -> Selenium String
typeText :: 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
keyPress :: Locator -> String -> Selenium String
submit :: Locator -> Selenium String
selectFrame :: String -> Selenium String
mouseDown :: Locator -> Selenium String
mouseMove :: Locator -> Selenium String
mouseUp :: 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
Types
data Browser
Browser types
Constructors
InternetExplorer
Firefox
Konqueror
Opera
Safari
show/hide Instances
data SCommand
An SCommand: an action or accessor
Constructors
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
show/hide Instances
data SeleniumRCSession
Constructors
SeleniumRCSession
selHost :: HostNameThe HostName of the Selenium server to connect to
selPort :: IntThe port of the Selenium server to connect to
selBrowser :: BrowserThe type of browser to start and use to run the tests
selURL :: URIThe base URL of the site to be tested
selSessionID :: Maybe IntegerA session ID filled in by startSelenium
show/hide Instances
data Selenium a
The Selenium Monad, an error-handling read-only state
show/hide Instances
Basic functions
mkSeleniumRCSession :: HostName -> Browser -> URI -> SeleniumRCSession
Create an unconnected Selenium session.
startSelenium :: Selenium SeleniumRCSession
Connect to the server, and tell it to start a web browser.
stopSelenium :: Selenium ()
Tell the server that a session is finished.
withSelenium :: SeleniumRCSession -> Selenium a -> IO (Either String a)
Start a session, execute some code with the resulting handle, and then stop the session.
runSelenium :: SeleniumRCSession -> Selenium a -> IO (Either String a)
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 a
Run a Selenium action within the ErrorT monad. Useful for chaining together several actions without writing intermediate error handling.
doCommand :: SCommand -> [String] -> Selenium String
Send a Selenium command to the server with a list of arguments.
doCommandList :: [(SCommand, [String])] -> Selenium [String]
Execute a list of Selenium commands paired with arguments, and return | a list of results.
mkURI :: SeleniumRCSession -> SCommand -> [String] -> Maybe URI
Selenium command wrappers
open :: String -> Selenium String
click :: Locator -> Selenium String
clickAndWait :: Locator -> Selenium String
check :: Locator -> Selenium String
uncheck :: Locator -> Selenium String
typeText :: 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
keyPress :: Locator -> String -> Selenium String
submit :: Locator -> Selenium String
selectFrame :: String -> Selenium String
mouseDown :: Locator -> Selenium String
mouseMove :: Locator -> Selenium String
mouseUp :: 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
Produced by Haddock version 2.1.0