selenium-0.2.5: Test web applications through a browser.

PortabilityUses mtl, Generalised Newtype Deriving, CPP
Stabilityprovisional
MaintainerAaron Tomb <atomb@galois.com>
Safe HaskellNone

Test.Selenium.Server

Contents

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

Types

data Browser Source

Browser types

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 

Instances

data SeleniumRCSession Source

Constructors

SeleniumRCSession 

Fields

selHost :: HostName

The HostName of the Selenium server to connect to

selPort :: Int

The port of the Selenium server to connect to

selBrowser :: Browser

The type of browser to start and use to run the tests

selURL :: URI

The base URL of the site to be tested

selSessionID :: Maybe String

A session ID filled in by startSelenium

selUseBrowse :: Bool

Use Network.Browser instead of Network.HTTP if true

data Selenium a Source

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.

Selenium command wrappers