selenium-0.2.2: Test web applications through a browser.Source codeContentsIndex
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 Source
Browser types
Constructors
InternetExplorer
Firefox
Konqueror
Opera
Safari
show/hide Instances
data SCommand Source
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 Source
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 Source
The Selenium Monad, an error-handling read-only state
show/hide Instances
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.
mkURI :: SeleniumRCSession -> SCommand -> [String] -> Maybe URISource
Selenium command wrappers
open :: String -> Selenium StringSource
click :: Locator -> Selenium StringSource
clickAndWait :: Locator -> Selenium StringSource
check :: Locator -> Selenium StringSource
uncheck :: Locator -> Selenium StringSource
typeText :: Locator -> String -> Selenium StringSource
isTextPresent :: String -> Selenium BoolSource
isElementPresent :: Locator -> Selenium BoolSource
isChecked :: Locator -> Selenium BoolSource
waitForPage :: Integer -> Selenium StringSource
waitForCondition :: String -> Integer -> Selenium StringSource
keyPress :: Locator -> String -> Selenium StringSource
submit :: Locator -> Selenium StringSource
selectFrame :: String -> Selenium StringSource
mouseDown :: Locator -> Selenium StringSource
mouseMove :: Locator -> Selenium StringSource
mouseUp :: Locator -> Selenium StringSource
dragAndDrop :: Locator -> String -> Selenium StringSource
dragAndDropToObject :: Locator -> Locator -> Selenium StringSource
getAttribute :: Locator -> Selenium StringSource
getBodyText :: Selenium StringSource
getAllLinks :: Selenium [String]Source
evalJS :: String -> Selenium StringSource
Produced by Haddock version 2.4.2