webdriver-precore
Safe HaskellNone
LanguageHaskell2010

WebDriverPreCore.HTTP.API

Synopsis

Root Methods

newSession :: FullCapabilities -> Command SessionResponse Source #

Return a spec to create a new session given FullCapabilities object.

newSession' can be used if FullCapabilities doesn't meet your requirements.

spec

POST 	/session 	New Session

status :: Command Status Source #

Return a spec to get the status of the driver.

spec

GET 	/status 	Status

Session Methods

deleteSession :: Session -> Command () Source #

Return a spec to delete a session given a Session.

spec

DELETE 	/session/{session id} 	Delete Session

getTimeouts :: Session -> Command Timeouts Source #

Return a spec to get the timeouts of a session given a Session.

spec

GET 	/session/{session id}/timeouts 	Get Timeouts

setTimeouts :: Session -> Timeouts -> Command () Source #

Return a spec to set the timeouts of a session given a Session and Timeouts.

spec

POST 	/session/{session id}/timeouts 	Set Timeouts

navigateTo :: Session -> URL -> Command () Source #

Return a spec to navigate to a URL given a Session and a Text URL.

spec

POST 	/session/{session id}/url 	Navigate To

getCurrentUrl :: Session -> Command URL Source #

Return a spec to get the current URL of a session given a Session.

spec

GET 	/session/{session id}/url 	Get Current URL

back :: Session -> Command () Source #

Return a spec to navigate back in the browser history given a Session.

spec

POST 	/session/{session id}/back 	Back

forward :: Session -> Command () Source #

Return a spec to navigate forward in the browser history given a Session.

spec

POST 	/session/{session id}/forward 	Forward

refresh :: Session -> Command () Source #

Return a spec to refresh the current page given a Session.

spec

POST 	/session/{session id}/refresh 	Refresh

getTitle :: Session -> Command Text Source #

Return a spec to get the title of the current page given a Session.

spec

GET 	/session/{session id}/title 	Get Title

getWindowHandle :: Session -> Command Handle Source #

Return a spec to get the current window handle given a Session.

spec

GET 	/session/{session id}/window 	Get Window Handle

newWindow :: Session -> Command WindowHandleSpec Source #

Return a spec to create a new window given a Session.

spec

POST 	/session/{session id}/window/new 	New Window

closeWindow :: Session -> Command [Handle] Source #

Return a spec to close the current window given a Session.

spec

DELETE 	/session/{session id}/window 	Close Window

switchToWindow :: Session -> Handle -> Command () Source #

Return a spec to switch to a different window given a Session and WindowHandle.

spec

POST 	/session/{session id}/window 	Switch To Window

switchToFrame :: Session -> FrameReference -> Command () Source #

Return a spec to switch to a different frame given a Session and FrameReference.

spec

POST 	/session/{session id}/frame 	Switch To Frame

getPageSource :: Session -> Command Text Source #

Return a spec to get the source of the current page given a Session.

spec

GET 	/session/{session id}/source 	Get Page Source

executeScript :: Session -> Script -> Command Value Source #

Return a spec to execute a script in the context of the current page given a Session, Text script, and a list of Value arguments.

spec

POST 	/session/{session id}/execute/sync 	Execute Script

executeScriptAsync :: Session -> Script -> Command Value Source #

Return a spec to execute an asynchronous script in the context of the current page given a Session, Text script, and a list of Value arguments.

spec

POST 	/session/{session id}/execute/async 	Execute Async Script

addCookie :: Session -> Cookie -> Command () Source #

Return a spec to add a cookie to the current page given a Session and Cookie.

spec

POST 	/session/{session id}/cookie 	Add Cookie

getAllCookies :: Session -> Command [Cookie] Source #

Return a spec to get all cookies of the current page given a Session.

spec

GET 	/session/{session id}/cookie 	Get All Cookies

getNamedCookie :: Session -> Text -> Command Cookie Source #

Return a spec to get a named cookie of the current page given a Session and cookie name.

spec

GET 	/session/{session id}/cookie/{name} 	Get Named Cookie

deleteCookie :: Session -> Text -> Command () Source #

Return a spec to delete a named cookie from the current page given a Session and cookie name.

spec

DELETE 	/session/{session id}/cookie/{name} 	Delete Cookie

deleteAllCookies :: Session -> Command () Source #

Return a spec to delete all cookies from the current page given a Session.

spec

DELETE 	/session/{session id}/cookie 	Delete All Cookies

performActions :: Session -> Actions -> Command () Source #

Return a spec to perform actions on the current page given a Session and Actions.

spec

POST 	/session/{session id}/actions 	Perform Actions

releaseActions :: Session -> Command () Source #

Return a spec to release actions on the current page given a Session.

spec

DELETE 	/session/{session id}/actions 	Release Actions

dismissAlert :: Session -> Command () Source #

Return a spec to dismiss an alert on the current page given a Session.

spec

POST 	/session/{session id}/alert/dismiss 	Dismiss Alert

acceptAlert :: Session -> Command () Source #

Return a spec to accept an alert on the current page given a Session.

spec

POST 	/session/{session id}/alert/accept 	Accept Alert

getAlertText :: Session -> Command Text Source #

Return a spec to get the text of an alert on the current page given a Session.

spec

GET 	/session/{session id}/alert/text 	Get Alert Text

sendAlertText :: Session -> Text -> Command () Source #

Return a spec to send text to an alert on the current page given a Session and Text.

spec

POST 	/session/{session id}/alert/text 	Send Alert Text

takeScreenshot :: Session -> Command Text Source #

Return a spec to take a screenshot of the current page given a Session.

spec

GET 	/session/{session id}/screenshot 	Take Screenshot

printPage :: Session -> Command Text Source #

Return a spec to print the current page given a Session.

spec

POST 	/session/{session id}/print 	Print Page

Window Methods

getWindowHandles :: Session -> Command [Handle] Source #

Return a spec to get all window handles of the current session given a Session.

spec

GET 	/session/{session id}/window/handles 	Get Window Handles

getWindowRect :: Session -> Command WindowRect Source #

Return a spec to get the window rect of the current window given a Session.

spec

GET 	/session/{session id}/window/rect 	Get Window Rect

setWindowRect :: Session -> WindowRect -> Command WindowRect Source #

Return a spec to set the window rect of the current window given a Session and WindowRect.

spec

POST 	/session/{session id}/window/rect 	Set Window Rect

maximizeWindow :: Session -> Command WindowRect Source #

Return a spec to maximize the current window given a Session.

spec

POST 	/session/{session id}/window/maximize 	Maximize Window

minimizeWindow :: Session -> Command WindowRect Source #

Return a spec to minimize the current window given a Session.

spec

POST 	/session/{session id}/window/minimize 	Minimize Window

fullScreenWindow :: Session -> Command WindowRect Source #

Return a spec to fullscreen the current window given a Session.

spec

POST 	/session/{session id}/window/fullscreen 	Fullscreen Window

Frame Methods

switchToParentFrame :: Session -> Command () Source #

Return a spec to switch to the parent frame given a Session.

spec

POST 	/session/{session id}/frame/parent 	Switch To Parent Frame

Element(s) Methods

getActiveElement :: Session -> Command ElementId Source #

Return a spec to get the active element of the current page given a Session.

spec

GET 	/session/{session id}/element/active 	Get Active Element

findElement :: Session -> Selector -> Command ElementId Source #

Return a spec to find an element on the current page given a Session and Selector.

spec

POST 	/session/{session id}/element 	Find Element

findElements :: Session -> Selector -> Command [ElementId] Source #

Return a spec to find elements on the current page given a Session and Selector.

spec

POST 	/session/{session id}/elements 	Find Elements

Element Instance Methods

findElementFromElement :: Session -> ElementId -> Selector -> Command ElementId Source #

Return a spec to find an element from another element given a Session, ElementId, and Selector.

spec

POST 	/session/{session id}/element/{element id}/element 	Find Element From Element

findElementsFromElement :: Session -> ElementId -> Selector -> Command [ElementId] Source #

Return a spec to find elements from another element given a Session, ElementId, and Selector.

spec

POST 	/session/{session id}/element/{element id}/elements 	Find Elements From Element

isElementSelected :: Session -> ElementId -> Command Bool Source #

Return a spec to check if an element is selected given a Session and ElementId.

spec

GET 	/session/{session id}/element/{element id}/selected 	Is Element Selected

getElementAttribute :: Session -> ElementId -> Text -> Command Text Source #

Return a spec to get an attribute of an element given a Session, ElementId, and attribute name.

spec

GET 	/session/{session id}/element/{element id}/attribute/{name} 	Get Element Attribute

getElementProperty :: Session -> ElementId -> Text -> Command Value Source #

Return a spec to get a property of an element given a Session, ElementId, and property name.

spec

GET 	/session/{session id}/element/{element id}/property/{name} 	Get Element Property

getElementCssValue :: Session -> ElementId -> Text -> Command Text Source #

Return a spec to get the CSS value of an element given a Session, ElementId, and CSS property name.

spec

GET 	/session/{session id}/element/{element id}/css/{property name} 	Get Element CSS Value

getElementShadowRoot :: Session -> ElementId -> Command ShadowRootElementId Source #

Return a spec to get the shadow root of an element given a Session and ElementId.

spec

GET 	/session/{session id}/element/{element id}/shadow 	Get Element Shadow Root

getElementText :: Session -> ElementId -> Command Text Source #

Return a spec to get the text of an element given a Session and ElementId.

spec

GET 	/session/{session id}/element/{element id}/text 	Get Element Text

getElementTagName :: Session -> ElementId -> Command Text Source #

Return a spec to get the tag name of an element given a Session and ElementId.

spec

GET 	/session/{session id}/element/{element id}/name 	Get Element Tag Name

getElementRect :: Session -> ElementId -> Command WindowRect Source #

Return a spec to get the rect of an element given a Session and ElementId.

spec

GET 	/session/{session id}/element/{element id}/rect 	Get Element Rect

isElementEnabled :: Session -> ElementId -> Command Bool Source #

Return a spec to check if an element is enabled given a Session and ElementId.

spec

GET 	/session/{session id}/element/{element id}/enabled 	Is Element Enabled

getElementComputedRole :: Session -> ElementId -> Command Text Source #

Return a spec to get the computed role of an element given a Session and ElementId.

spec

GET 	/session/{session id}/element/{element id}/computedrole 	Get Computed Role

getElementComputedLabel :: Session -> ElementId -> Command Text Source #

Return a spec to get the computed label of an element given a Session and ElementId.

spec

GET 	/session/{session id}/element/{element id}/computedlabel 	Get Computed Label

elementClick :: Session -> ElementId -> Command () Source #

Return a spec to click an element given a Session and ElementId.

spec

POST 	/session/{session id}/element/{element id}/click 	Element Click

elementClear :: Session -> ElementId -> Command () Source #

Return a spec to clear an element given a Session and ElementId.

spec

POST 	/session/{session id}/element/{element id}/clear 	Element Clear

elementSendKeys :: Session -> ElementId -> Text -> Command () Source #

Return a spec to send keys to an element given a Session, ElementId, and keys to send.

spec

POST 	/session/{session id}/element/{element id}/value 	Element Send Keys

takeElementScreenshot :: Session -> ElementId -> Command Text Source #

Return a spec to take a screenshot of an element given a Session and ElementId.

spec

GET 	/session/{session id}/element/{element id}/screenshot 	Take Element Screenshot

Shadow DOM Methods

findElementFromShadowRoot :: Session -> ShadowRootElementId -> Selector -> Command ElementId Source #

Return a spec to find an element from the shadow root given a Session, ElementId, and Selector.

spec

POST 	/session/{session id}/shadow/{shadow id}/element 	Find Element From Shadow Root

findElementsFromShadowRoot :: Session -> ShadowRootElementId -> Selector -> Command [ElementId] Source #

Return a spec to find elements from the shadow root given a Session, ElementId, and Selector.

spec

POST 	/session/{session id}/shadow/{shadow id}/elements 	Find Elements From Shadow Root