JSON Wire Protocol
status
Query the server's current status. The server should respond with a general "HTTP 200 OK" response if it is alive and accepting commands. The response body should be a JSON object describing the state of the server. All server implementations should return two basic objects describing the server's current platform and when the server was built. All fields are optional; if omitted, the client should assume the value is uknown. Furthermore, server implementations may include additional fields not listed here.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.status()
Returns
- <Object> status: An object describing the general status of the server.
newSession
Create a new session. The server should attempt to create a session that most closely matches the desired and required capabilities. Required capabilities have higher priority than desired capabilities and must be set for the session to be created.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.newSession(desiredCapabilities)
Parameters
Param | Type | Details |
---|---|---|
desiredCapabilities | object | An object describing the session's desired capabilities. |
Returns
- <Object> capabilities: An object describing the session's capabilities.
getSessions
Returns a list of the currently active sessions. Each session will be returned as a list of JSON objects.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.getSessions()
Returns
- <Object[]> capabilties: A list of the currently active sessions.
getSession
Retrieve the capabilities of the specified session.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.getSession()
Returns
- <Object> capabilties: An object describing the session's capabilities.
deleteSession
Delete the session.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.deleteSession()
setTimeout
Configure the amount of time that a particular type of operation can execute for before they are aborted and a |Timeout| error is returned to the client.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.setTimeout(type, ms)
Parameters
Param | Type | Details |
---|---|---|
type | string | The type of operation to set the timeout for. Valid values are: "script" for script timeouts, "implicit" for modifying the implicit wait timeout and "page load" for setting a page load timeout. |
ms | number | The amount of time, in milliseconds, that time-limited commands are permitted to run |
setAsyncTimeout
Set the amount of time, in milliseconds, that asynchronous scripts executed by /session/:sessionId/execute_async
are permitted to run before they are aborted and a Timeout
error is returned to the client.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.setAsyncTimeout(ms)
Parameters
Param | Type | Details |
---|---|---|
ms | number | The amount of time, in milliseconds, that time-limited commands are permitted to run |
setImplicitTimeout
Set the amount of time the driver should wait when searching for elements. When searching for a single element, the driver should poll the page until an element is found or the timeout expires, whichever occurs first. When searching for multiple elements, the driver should poll the page until at least one element is found or the timeout expires, at which point it should return an empty list. If this command is never sent, the driver should default to an implicit wait of 0ms.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.setImplicitTimeout(ms)
Parameters
Param | Type | Details |
---|---|---|
ms | number | The amount of time, in milliseconds, to wait on an element |
getCurrentUrl
Retrieve the URL of the current page.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.getCurrentUrl()
Returns
- <String> url: The current URL.
navigateTo
Navigate to a new URL.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.navigateTo(url)
Parameters
Param | Type | Details |
---|---|---|
url | string | The URL to navigate to. |
back
Navigate backwards in the browser history, if possible.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.back()
forward
Navigate forwards in the browser history, if possible.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.forward()
refresh
Refresh the current page.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.refresh()
getTitle
Get the current page title.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.getTitle()
Returns
- <String> title: The current page title.
getWindowHandle
Retrieve the current window handle.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.getWindowHandle()
Returns
- <String> windowHandle: The current window handle.
getWindowHandles
Retrieve the list of all window handles available to the session.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.getWindowHandles()
Returns
- <String[]> windowHandles: A list of window handles.
closeWindow
Close the current window.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.closeWindow()
switchToWindow
Change focus to another window. The window to change focus to may be specified by its server assigned window handle, or by the value of its name attribute.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.switchToWindow(name)
Parameters
Param | Type | Details |
---|---|---|
name | string | The window to change focus to |
switchToFrame
Change focus to another frame on the page. If the frame id is null, the server should switch to the page's default content.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.switchToFrame(id)
Parameters
Param | Type | Details | ||
---|---|---|---|---|
id | (string | number | object) | Identifier for the frame to change focus to |
switchToParentFrame
Change focus to the parent context. If the current context is the top level browsing context, the context remains unchanged.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.switchToParentFrame()
getWindowPosition
Get the position of the specified window. If the :windowHandle URL parameter is "current", the position of the currently active window will be returned.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.getWindowPosition()
Returns
- <Object> positon: The X and Y coordinates for the window, relative to the upper left corner of the screen.
setWindowPosition
Change the position of the specified window. If the :windowHandle URL parameter is "current", the currently active window will be moved.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.setWindowPosition(x, y)
Parameters
Param | Type | Details |
---|---|---|
x | number | The X coordinate to position the window at, relative to the upper left corner of the screen. |
y | number | The Y coordinate to position the window at, relative to the upper left corner of the screen. |
Returns
- <Object> positon: The X and Y coordinates for the window, relative to the upper left corner of the screen.
getWindowSize
Get the size of the current focused window.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.getWindowSize()
Returns
- <Object> size: The size of the window.
setWindowSize
Change the size of the current focused window.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.setWindowSize(width, height)
Parameters
Param | Type | Details |
---|---|---|
width | number | the new window width |
height | number | the new window height |
maximizeWindow
Maximize the current focused window if not already maximized.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.maximizeWindow()
findElement
Search for an element on the page, starting from the document root. The located element will be returned as a WebElement JSON object. The table below lists the locator strategies that each server should support. Each locator must return the first matching element located in the DOM.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.findElement(using, value)
Parameters
Param | Type | Details |
---|---|---|
using | string | the locator strategy to use |
value | string | the search target |
Returns
- <String> ELEMENT: A WebElement JSON object for the located element.
findElements
Search for multiple elements on the page, starting from the document root. The located elements will be returned as a WebElement JSON objects. The table below lists the locator strategies that each server should support. Elements should be returned in the order located in the DOM.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.findElements(using, value)
Parameters
Param | Type | Details |
---|---|---|
using | string | the locator strategy to use |
value | string | the search target |
Returns
- <String[]> ELEMENTS: A list of WebElement JSON objects for the located elements.
findElementFromElement
Search for an element on the page, starting from the identified element. The located element will be returned as a WebElement JSON object. The table below lists the locator strategies that each server should support. Each locator must return the first matching element located in the DOM.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.findElementFromElement(elementId, using, value)
Parameters
Param | Type | Details |
---|---|---|
elementId | String | ID of the element to route the command to |
using | string | the locator strategy to use |
value | string | the search target |
Returns
- <String> ELEMENT: A WebElement JSON object for the located element.
findElementsFromElement
Search for multiple elements on the page, starting from the identified element. The located elements will be returned as a WebElement JSON objects. The table below lists the locator strategies that each server should support. Elements should be returned in the order located in the DOM.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.findElementsFromElement(elementId, using, value)
Parameters
Param | Type | Details |
---|---|---|
elementId | String | ID of the element to route the command to |
using | string | the locator strategy to use |
value | string | the search target |
Returns
- <String[]> ELEMENTS: A list of WebElement JSON objects for the located elements.
getActiveElement
Get the element on the page that currently has focus. The element will be returned as a WebElement JSON object.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.getActiveElement()
Returns
- <String> ELEMENT: A WebElement JSON object for the active element.
isElementSelected
Determine if an OPTION
element, or an
INPUTelement of type
checkboxor
radiobutton` is currently selected.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.isElementSelected(elementId)
Parameters
Param | Type | Details |
---|---|---|
elementId | String | ID of the element to route the command to |
Returns
- <Boolean> isSelected: Whether the element is selected.
isElementDisplayed
Determine if an element is currently displayed.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.isElementDisplayed(elementId)
Parameters
Param | Type | Details |
---|---|---|
elementId | String | ID of the element to route the command to |
Returns
- <Boolean> isDisplayed: Whether the element is displayed.
getElementAttribute
Get the value of an element's attribute.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.getElementAttribute(elementId, name)
Parameters
Param | Type | Details |
---|---|---|
elementId | String | ID of the element to route the command to |
name | String | name of the attribute value to retrieve |
Returns
- <String|Null> attribute: The value of the attribute, or null if it is not set on the element.
getElementCSSValue
Query the value of an element's computed CSS property. The CSS property to query should be specified using the CSS property name, not the JavaScript property name (e.g. background-color
instead of backgroundColor
).
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.getElementCSSValue(elementId, propertyName)
Parameters
Param | Type | Details |
---|---|---|
elementId | String | ID of the element to route the command to |
propertyName | String | name of the CSS property to retrieve |
Returns
- <String> propertyName: The value of the specified CSS property.
getElementText
Returns the visible text for the element.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.getElementText(elementId)
Parameters
Param | Type | Details |
---|---|---|
elementId | String | ID of the element to route the command to |
Returns
- <String> text: The visible text of the element.
getElementTagName
Query for an element's tag name.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.getElementTagName(elementId)
Parameters
Param | Type | Details |
---|---|---|
elementId | String | ID of the element to route the command to |
Returns
- <String> tagName: The element's tag name, as a lowercase string.
getElementLocation
Determine an element's location on the page. The point (0, 0)
refers to the upper-left corner of the page. The element's coordinates are returned as a JSON object with x
and y
properties.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.getElementLocation(elementId)
Parameters
Param | Type | Details |
---|---|---|
elementId | String | ID of the element to route the command to |
Returns
- <Object> location: The X and Y coordinates for the element on the page.
getElementLocationInView
Determine an element's location on the screen once it has been scrolled into view.
Note: This is considered an internal command and should only be used to determine an element's location for correctly generating native events.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.getElementLocationInView(elementId)
Parameters
Param | Type | Details |
---|---|---|
elementId | String | ID of the element to route the command to |
Returns
- <Object> location: The X and Y coordinates for the element on the page.
getElementSize
Determine an element's size in pixels. The size will be returned as a JSON object with width
and height
properties.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.getElementSize(elementId)
Parameters
Param | Type | Details |
---|---|---|
elementId | String | ID of the element to route the command to |
Returns
- <Object> size: The width and height of the element, in pixels.
getElementEnabled
Determine if an element is currently enabled.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.getElementEnabled(elementId)
Parameters
Param | Type | Details |
---|---|---|
elementId | String | ID of the element to route the command to |
Returns
- <Boolean> isEnabled: Whether the element is enabled.
elementClick
Click any mouse button (at the coordinates set by the last moveto command). Note that calling this command after calling buttondown and before calling button up (or any out-of-order interactions sequence) will yield undefined behaviour).
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.elementClick(elementId)
Parameters
Param | Type | Details |
---|---|---|
elementId | String | ID of the element to route the command to |
elementSubmit
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.elementSubmit(elementId)
Parameters
Param | Type | Details |
---|---|---|
elementId | String | ID of the form element to be submitted |
elementClear
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.elementClear(elementId)
Parameters
Param | Type | Details |
---|---|---|
elementId | String | ID of the element to route the command to |
elementSendKeys
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.elementSendKeys(elementId, value)
Parameters
Param | Type | Details |
---|---|---|
elementId | String | ID of the element to route the command to |
value | string[] | The sequence of keys to type. An array must be provided. |
sendKeys
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.sendKeys(value)
Parameters
Param | Type | Details |
---|---|---|
value | string[] | The sequence of keys to type. An array must be provided. |
getPageSource
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.getPageSource()
executeScript
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.executeScript(script, args)
Parameters
Param | Type | Details | |||
---|---|---|---|---|---|
script | string | the script to execute | |||
args | (string | object | number | boolean)[] | the script arguments |
executeAsyncScript
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.executeAsyncScript(script, args)
Parameters
Param | Type | Details | |||
---|---|---|---|---|---|
script | string | the script to execute | |||
args | (string | object | number | boolean)[] | the script arguments |
getAllCookies
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.getAllCookies()
addCookie
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.addCookie(cookie)
Parameters
Param | Type | Details |
---|---|---|
cookie | object | A JSON object representing a cookie. It must have at least the name and value fields and could have more, including expiry-time and so on |
deleteAllCookies
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.deleteAllCookies()
deleteCookie
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.deleteCookie(name)
Parameters
Param | Type | Details |
---|---|---|
name | String | name of the cookie to retrieve |
dismissAlert
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.dismissAlert()
acceptAlert
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.acceptAlert()
getAlertText
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.getAlertText()
sendAlertText
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.sendAlertText(text)
Parameters
Param | Type | Details |
---|---|---|
text | string | keystrokes to send to the prompt() dialog |
takeScreenshot
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.takeScreenshot()
getAvailableEngines
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.getAvailableEngines()
getActiveEngine
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.getActiveEngine()
isIMEActivated
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.isIMEActivated()
deactivateIME
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.deactivateIME()
activateIME
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.activateIME(engine)
Parameters
Param | Type | Details |
---|---|---|
engine | string | name of the engine to activate |
getOrientation
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.getOrientation()
setOrientation
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.setOrientation(engine)
Parameters
Param | Type | Details |
---|---|---|
engine | string | name of the engine to activate |
moveToElement
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.moveToElement(element, xoffset, yoffset)
Parameters
Param | Type | Details |
---|---|---|
element optional | string | opaque ID assigned to the element to move to, as described in the WebElement JSON Object, if not specified or is null, the offset is relative to current position of the mouse |
xoffset optional | number | x offset to move to, relative to the top-left corner of the element, if not specified, the mouse will move to the middle of the element |
yoffset optional | number | y offset to move to, relative to the top-left corner of the element, if not specified, the mouse will move to the middle of the element |
buttonDown
Click and hold the left mouse button (at the coordinates set by the last moveto command). Note that the next mouse-related command that should follow is buttonup . Any other mouse command (such as click or another call to buttondown) will yield undefined behaviour.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.buttonDown(button)
Parameters
Param | Type | Details |
---|---|---|
button optional | number | which button, enum: LEFT = 0, MIDDLE = 1 , RIGHT = 2, defaults to the left mouse button if not specified |
buttonUp
Releases the mouse button previously held (where the mouse is currently at). Must be called once for every buttondown command issued. See the note in click and buttondown about implications of out-of-order commands.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.buttonUp(button)
Parameters
Param | Type | Details |
---|---|---|
button optional | number | which button, enum: LEFT = 0, MIDDLE = 1 , RIGHT = 2, defaults to the left mouse button if not specified |
positionDoubleClick
Double-clicks at the current mouse coordinates (set by moveto).
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.positionDoubleClick()
touchClick
Single tap on the touch enabled device.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.touchClick()
touchDown
Finger down on the screen.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.touchDown(x, y)
Parameters
Param | Type | Details |
---|---|---|
x optional | number | x coordinate on the screen |
y optional | number | y coordinate on the screen |
touchUp
Finger up on the screen.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.touchUp(x, y)
Parameters
Param | Type | Details |
---|---|---|
x optional | number | x coordinate on the screen |
y optional | number | y coordinate on the screen |
touchScroll
Finger move on the screen.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.touchScroll(xoffset, yoffset, element)
Parameters
Param | Type | Details |
---|---|---|
xoffset | number | the x offset in pixels to scroll by |
yoffset | number | the y offset in pixels to scroll by |
element optional | string | ID of the element where the scroll starts |
touchDoubleClick
Double tap on the touch screen using finger motion events.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.touchDoubleClick(element)
Parameters
Param | Type | Details |
---|---|---|
element | string | ID of the element to double tap on |
touchLongClick
Long press on the touch screen using finger motion events.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.touchLongClick(element)
Parameters
Param | Type | Details |
---|---|---|
element | string | ID of the element to long press on |
touchFlick
Flick on the touch screen using finger motion events. This flickcommand starts at a particulat screen location.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.touchFlick(xoffset, yoffset, element, speed)
Parameters
Param | Type | Details |
---|---|---|
xoffset | number | the x offset in pixels to flick by |
yoffset | number | the y offset in pixels to flick by |
element optional | string | ID of the element where the flick starts |
speed optional | number | the speed in pixels per seconds |
getGeoLocation
Get the current geo location.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.getGeoLocation()
Returns
- <Object> location: The current geo location.
setGeoLocation
Set the current geo location.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.setGeoLocation(location)
Parameters
Param | Type | Details |
---|---|---|
location | object | the new location ({latitude: number, longitude: number, altitude: number} ) |
getLocalStorage
Get all keys of the storage.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.getLocalStorage()
Returns
- <String[]> keys: The list of keys.
setLocalStorage
Set the storage item for the given key.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.setLocalStorage(key, value)
Parameters
Param | Type | Details |
---|---|---|
key | string | the key to set |
value | string | the value to set |
clearLocalStorage
Clear the storage.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.clearLocalStorage()
getLocalStorageItem
Get the storage item for the given key.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.getLocalStorageItem(key)
Parameters
Param | Type | Details |
---|---|---|
key | String | the key to get |
Returns
- <String> item: The storage item of given key.
deleteLocalStorageItem
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.deleteLocalStorageItem(key)
Parameters
Param | Type | Details |
---|---|---|
key | String | the key to remove |
getLocalStorageSize
Get the number of items in the storage.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.getLocalStorageSize()
Returns
- <Number> itemCnt: The number of items in the storage.
getSessionStorage
Get all keys of the storage.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.getSessionStorage()
Returns
- <String[]> keys: The list of keys.
setSessionStorage
Set the storage item for the given key.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.setSessionStorage(key, value)
Parameters
Param | Type | Details |
---|---|---|
key | string | the key to set |
value | string | the value to set |
clearSessionStorage
Clear the storage.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.clearSessionStorage()
getSessionStorageItem
Get the storage item for the given key.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.getSessionStorageItem(key)
Parameters
Param | Type | Details |
---|---|---|
key | String | the key to get |
Returns
- <String> item: The storage item of given key.
deleteSessionStorageItem
Remove the storage item for the given key.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.deleteSessionStorageItem(key)
Parameters
Param | Type | Details |
---|---|---|
key | String | the key to remove |
getSessionStorageSize
Get the number of items in the storage.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.getSessionStorageSize()
getLogs
Get the log for a given log type. Log buffer is reset after each request.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.getLogs(type)
Parameters
Param | Type | Details |
---|---|---|
type | string | the log type |
Returns
- <Object[]> logs: The list of log entries.
getLogTypes
Get available log types.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.getLogTypes()
Returns
- <String[]> logTypes: The list of available log types.
getApplicationCacheStatus
Get the status of the html5 application cache.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.getApplicationCacheStatus()
Returns
- <Number> statusCode: Status code for application cache:
{UNCACHED = 0, IDLE = 1, CHECKING = 2, DOWNLOADING = 3, UPDATE_READY = 4, OBSOLETE = 5}