marionette-1.0.0: Marionette protocol for Firefox
Safe HaskellTrustworthy
LanguageHaskell2010

Test.Marionette.Commands

Synopsis

Documentation

newtype ValueObject a Source #

Constructors

ValueObject 

Fields

Instances

Instances details
FromJSON a => FromJSON (ValueObject a) Source # 
Instance details

Defined in Test.Marionette.Commands

ToJSON a => ToJSON (ValueObject a) Source # 
Instance details

Defined in Test.Marionette.Commands

Generic (ValueObject a) Source # 
Instance details

Defined in Test.Marionette.Commands

Associated Types

type Rep (ValueObject a) 
Instance details

Defined in Test.Marionette.Commands

type Rep (ValueObject a) = D1 ('MetaData "ValueObject" "Test.Marionette.Commands" "marionette-1.0.0-2rXrb754J8I8DUtJcHv2xL" 'True) (C1 ('MetaCons "ValueObject" 'PrefixI 'True) (S1 ('MetaSel ('Just "value") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

Methods

from :: ValueObject a -> Rep (ValueObject a) x #

to :: Rep (ValueObject a) x -> ValueObject a #

type Rep (ValueObject a) Source # 
Instance details

Defined in Test.Marionette.Commands

type Rep (ValueObject a) = D1 ('MetaData "ValueObject" "Test.Marionette.Commands" "marionette-1.0.0-2rXrb754J8I8DUtJcHv2xL" 'True) (C1 ('MetaCons "ValueObject" 'PrefixI 'True) (S1 ('MetaSel ('Just "value") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

acceptConnections :: (HasCallStack, Marionette m) => Bool -> m () Source #

Enable or disable accepting new socket connections. This has no effect on existing connections.

getAccessibilityPropertiesForAccessibilityNode Source #

Arguments

:: (HasCallStack, Marionette m) 
=> Text

Node identifier nodeId

-> m AccessibilityProperties 

Look up accessibility properties of a node in the platform accessibility tree, rather than by a web element reference.

getAccessibilityPropertiesForElement :: (HasCallStack, Marionette m) => Element -> m AccessibilityProperties Source #

Look up the accessibility properties exposed to assistive technology (such as screen readers) for a given element.

getContext :: (HasCallStack, Marionette m) => m Context Source #

Return whether subsequent browsing-context-scoped commands (such as navigate or findElement) target privileged browser chrome or ordinary web content. New sessions start in the Content context; use setContext to switch, for example when driving browser UI rather than a web page.

getScreenOrientation :: (HasCallStack, Marionette m) => m Orientation Source #

Return the current orientation of the browser window.

getWindowType :: (HasCallStack, Marionette m) => m Text Source #

Return the chrome window's windowtype attribute, for example navigator:browser for a normal browser window.

quit :: (HasCallStack, Marionette m) => m () Source #

Shut the browser down: Marionette first stops accepting new connections, then ends the current session, and finally causes the application itself to quit.

registerChromeHandler :: (HasCallStack, Marionette m) => Text -> [RegistryEntry] -> m Text Source #

Register a chrome protocol handler for a directory containing XHTML or XUL files, allowing them to be loaded via the chrome:// protocol. Return the identifier for the registered handler which can be unregistered with unregisterChromeHandler.

setContext :: (HasCallStack, Marionette m) => Context -> m () Source #

Set the context of the subsequent commands. All subsequent requests to commands that in some way involve interaction with a browsing context will target the chosen context.

setScreenOrientation :: (HasCallStack, Marionette m) => Orientation -> m () Source #

Set the current browser orientation.

unregisterChromeHandler :: (HasCallStack, Marionette m) => Text -> m () Source #

Unregister a previously registered chrome protocol handler, given an identifier returned by registerChromeHandler.

acceptAlert :: (HasCallStack, Marionette m) => m () Source #

Accept a currently displayed dialog modal, or throw if no modal is displayed.

See https://w3c.github.io/webdriver/#accept-alert

addCookie :: (HasCallStack, Marionette m) => Cookie -> m () Source #

Add a single cookie to the cookie store associated with the active document's address.

See https://w3c.github.io/webdriver/#add-cookie

back :: (HasCallStack, Marionette m) => m () Source #

Cause the browser to traverse one step backward in the joint history of the current browsing context.

See https://w3c.github.io/webdriver/#back

closeChromeWindow :: (HasCallStack, Marionette m) => m () Source #

Close the currently selected chrome window. If it is the last window currently open, the chrome window is not closed, to prevent an application shutdown.

closeWindow :: (HasCallStack, Marionette m) => m () Source #

Close the currently selected tab or window. With multiple open tabs, only the selected tab is closed; if it is the last window currently open, the window is not closed, to prevent an application shutdown.

See https://w3c.github.io/webdriver/#close-window

deleteAllCookies :: (HasCallStack, Marionette m) => m () Source #

Delete all cookies that are visible to a document.

See https://w3c.github.io/webdriver/#delete-all-cookies

deleteSession :: (HasCallStack, Marionette m) => m () Source #

Delete the current WebDriver session.

See https://w3c.github.io/webdriver/#delete-session

dismissAlert :: (HasCallStack, Marionette m) => m () Source #

Dismiss a currently displayed modal dialog, or throw if no modal is displayed.

See https://w3c.github.io/webdriver/#dismiss-alert

elementSendKeys :: (HasCallStack, Marionette m) => Element -> Text -> m () Source #

Send key presses to an element after focusing on it.

See https://w3c.github.io/webdriver/#element-send-keys

executeAsyncScript :: (HasCallStack, Marionette m, Foldable f, FromJSON a) => Text -> f Value -> m (Maybe a) Source #

Execute a JavaScript function asynchronously in the context of the current browsing context, and return the value passed to the callback, which is always the last argument exposed to the script.

See https://w3c.github.io/webdriver/#execute-async-script

executeScript :: (HasCallStack, Marionette m, Foldable f, FromJSON a) => Text -> f Value -> m a Source #

Execute a JavaScript function synchronously in the context of the current browsing context, and return its return value.

See https://w3c.github.io/webdriver/#execute-script

findElement :: (HasCallStack, Marionette m) => Selector -> m Element Source #

Find an element using the given search strategy.

See https://w3c.github.io/webdriver/#find-element

findElementFrom :: (HasCallStack, Marionette m) => Element -> Selector -> m Element Source #

Find an element using the given search strategy, relative to the given element.

See https://w3c.github.io/webdriver/#find-element

findElementFromShadowRoot :: (HasCallStack, Marionette m) => Shadow -> Selector -> m Element Source #

Find an element within a shadow root using the given search strategy.

See https://w3c.github.io/webdriver/#find-element-from-shadow-root

findElements :: (HasCallStack, Marionette m) => Selector -> m [Element] Source #

Find elements using the given search strategy.

See https://w3c.github.io/webdriver/#find-elements

findElementsFrom :: (HasCallStack, Marionette m) => Element -> Selector -> m [Element] Source #

Find elements using the given search strategy, relative to the given element.

See https://w3c.github.io/webdriver/#find-elements

findElementsFromShadowRoot :: (HasCallStack, Marionette m) => Shadow -> Selector -> m [Element] Source #

Find elements within a shadow root using the given search strategy.

See https://w3c.github.io/webdriver/#find-elements-from-shadow-root

forward :: (HasCallStack, Marionette m) => m () Source #

Cause the browser to traverse one step forward in the joint history of the current browsing context.

See https://w3c.github.io/webdriver/#forward

fullscreenWindow :: (HasCallStack, Marionette m) => m () Source #

Set the window to full screen, as if the user had chosen View -> Enter Full Screen. Not supported on Android.

See https://w3c.github.io/webdriver/#fullscreen-window

getAlertText :: (HasCallStack, Marionette m) => m Text Source #

Return the message shown in a currently displayed modal, or throw if no modal is displayed.

See https://w3c.github.io/webdriver/#get-alert-text

getComputedLabel :: (HasCallStack, Marionette m) => Element -> m Text Source #

Determine the accessibility label for an element.

See https://w3c.github.io/webdriver/#get-computed-label

getComputedRole :: (HasCallStack, Marionette m) => Element -> m Text Source #

Determine the accessibility role for an element.

See https://w3c.github.io/webdriver/#get-computed-role

getCookies :: (HasCallStack, Marionette m) => m [Cookie] Source #

Get all the cookies for the current domain. Equivalent to calling document.cookie and parsing the result.

See https://w3c.github.io/webdriver/#get-all-cookies

getCurrentURL :: (HasCallStack, Marionette m) => m Text Source #

Get a string representing the current URL, equivalent to document.location.href. When in the chrome context, return the canonical URL of the current resource.

See https://w3c.github.io/webdriver/#get-current-url

getElementAttribute :: (HasCallStack, Marionette m) => Text -> Element -> m (Maybe Text) Source #

Get the value of the given attribute of an element.

See https://w3c.github.io/webdriver/#get-element-attribute

getElementCSSValue :: (HasCallStack, Marionette m) => Element -> Text -> m (Maybe Text) Source #

Get the given CSS property of the computed style of an element.

See https://w3c.github.io/webdriver/#get-element-css-value

getElementProperty :: (HasCallStack, Marionette m) => Element -> Text -> m (Maybe Text) Source #

Get the value of the given property of an element.

See https://w3c.github.io/webdriver/#get-element-property

getElementRect :: (HasCallStack, Marionette m) => Element -> m Rect Source #

Get the dimensions and coordinates of an element.

See https://w3c.github.io/webdriver/#get-element-rect

getElementText :: (HasCallStack, Marionette m) => Element -> m Text Source #

Get the rendered text of an element, including the text of all its child elements.

See https://w3c.github.io/webdriver/#get-element-text

getPageSource :: (HasCallStack, Marionette m) => m Text Source #

Get the page source of the content document, serialised as a string.

See https://w3c.github.io/webdriver/#get-page-source

getTimeouts :: (HasCallStack, Marionette m) => m Timeouts Source #

Get the timeouts for page loading, searching, and scripts.

See https://w3c.github.io/webdriver/#get-timeouts

getTitle :: (HasCallStack, Marionette m) => m Text Source #

Get the current title of the window.

See https://w3c.github.io/webdriver/#get-title

getWindowHandle :: (HasCallStack, Marionette m) => m WindowHandle Source #

Get the current window's handle: an opaque, server-assigned identifier that can be used to switch back to this window later with switchToWindow.

See https://w3c.github.io/webdriver/#get-window-handle

getWindowHandles :: (HasCallStack, Marionette m) => m [WindowHandle] Source #

Get the unordered list of window handles of every open top-level browsing context.

See https://w3c.github.io/webdriver/#get-window-handles

getWindowRect :: (HasCallStack, Marionette m) => m Rect Source #

Get the position and size of the browser window currently in focus. The width and height refer to the window's outerWidth and outerHeight, which include scroll bars, title bars, and so on.

See https://w3c.github.io/webdriver/#get-window-rect

maximizeWindow :: (HasCallStack, Marionette m) => m () Source #

Maximise the window, as if the user had pressed the maximise button. Not supported on Android.

See https://w3c.github.io/webdriver/#maximize-window

minimizeWindow :: (HasCallStack, Marionette m) => m () Source #

Minimise the window, as if the user had pressed the minimise button. Not supported on Android.

See https://w3c.github.io/webdriver/#minimize-window

navigate :: (HasCallStack, Marionette m) => Text -> m () Source #

Navigate to the given URL, waiting for the document to load or the session's page load timeout to elapse before returning.

See https://w3c.github.io/webdriver/#navigate-to

newSession :: (HasCallStack, Marionette m) => m () Source #

Create a new WebDriver session. Must be called before performing any other command.

See https://w3c.github.io/webdriver/#new-session

newWindow :: (HasCallStack, Marionette m) => m NewWindowResult Source #

Open a new top-level browsing context of type window.

See https://w3c.github.io/webdriver/#new-window

newTab :: (HasCallStack, Marionette m) => m NewWindowResult Source #

Open a new top-level browsing context of type tab.

See https://w3c.github.io/webdriver/#new-window

performActions :: (HasCallStack, Marionette m) => m () Source #

Perform a series of grouped input actions at the specified points in time.

See https://w3c.github.io/webdriver/#perform-actions

print :: (HasCallStack, Marionette m) => m () Source #

Print the current page, returning it as a base64-encoded PDF.

See https://w3c.github.io/webdriver/#print-page

refresh :: (HasCallStack, Marionette m) => m () Source #

Reload the page in the current top-level browsing context.

See https://w3c.github.io/webdriver/#refresh

releaseActions :: (HasCallStack, Marionette m) => m () Source #

Release all the keys and pointer buttons that are currently depressed.

See https://w3c.github.io/webdriver/#release-actions

sendAlertText :: (HasCallStack, Marionette m) => Text -> m () Source #

Send keys to the input field of a currently displayed modal, or throw if no modal is displayed, or the modal has no means for text input.

See https://w3c.github.io/webdriver/#send-alert-text

setPermission :: (HasCallStack, Marionette m) => m () Source #

Simulate user modification of a permission descriptor's permission state.

See https://www.w3.org/TR/permissions/#webdriver-command-set-permission

setTimeouts :: (HasCallStack, Marionette m) => Timeouts -> m () Source #

Set the timeouts for page loading, searching, and scripts.

See https://w3c.github.io/webdriver/#set-timeouts

setWindowRect :: (HasCallStack, Marionette m) => Rect -> m () Source #

Set the position and size of the window on the operating system's window manager. The width and height refer to the window's outerWidth and outerHeight, which include browser chrome and OS-level window borders.

See https://w3c.github.io/webdriver/#set-window-rect

switchToFrame :: (HasCallStack, Marionette m) => Frame -> m () Source #

Switch to the given frame within the current window.

See https://w3c.github.io/webdriver/#switch-to-frame

switchToParentFrame :: (HasCallStack, Marionette m) => m () Source #

Set the current browsing context for future commands to the parent of the current browsing context.

See https://w3c.github.io/webdriver/#switch-to-parent-frame

switchToWindow :: (HasCallStack, Marionette m) => WindowHandle -> m () Source #

Switch to the top-level browsing context identified by the given window handle.

See https://w3c.github.io/webdriver/#switch-to-window

takeScreenshot :: (HasCallStack, Marionette m) => m ByteString Source #

Take a screenshot of the current frame, returned as a lossless PNG image.

See https://w3c.github.io/webdriver/#take-screenshot