MapSelectorResponse
Response returned from a Map Selector
type MapSelectorResponse {
innerHTML: String
innerText: String
id: String
class: [String]
attribute(
name: String
): Attribute
mapSelector(
selector: String!
timeout: Float
wait: Boolean = true
): [MapSelectorResponse]
}
Fields
MapSelectorResponse.innerHTML ● String scalar
The innerHTML of the selected DOM Node
MapSelectorResponse.innerText ● String scalar
The innerText of the selected DOM Node, eg, the raw textual content
MapSelectorResponse.id ● String scalar
The ID attribute's value, if any, of the node
MapSelectorResponse.class ● [String] list scalar
The class attribute's value, if any, of the node represented as an array of strings
MapSelectorResponse.attribute ● Attribute object
Retrieve an attribute by the name of the attribute itself, eg, "data-test-id"
MapSelectorResponse.attribute.name ● String scalar
MapSelectorResponse.mapSelector ● [MapSelectorResponse] list object
You can further map nested DOM nodes as well. For instance, given a parent ".product" node, you can map further nodes like ".price" or ".shipping" as examples. This will give you items appropriately nested by their parent node for better hierarchical representation of data
MapSelectorResponse.mapSelector.selector ● String! non-null scalar
A query-selector-al compatible string, or JavaScript code that returns an DOM NodeList. Examples include:
-
All
<button />Elements:selector: "button" -
A JavaScript snippet that returns a button element
selector: "document.querySelectorAll('button')"
MapSelectorResponse.mapSelector.timeout ● Float scalar
How long to wait for the element to appear before timing out, overriding any defaults. Default timeout is 30 seconds, or 30000.
MapSelectorResponse.mapSelector.wait ● Boolean scalar
Whether or not to wait for the selectors to present in the DOM
Returned By
mapSelector mutation
Member Of
MapSelectorResponse object