querySelector method

Future<NodeId> querySelector(
  1. NodeId nodeId,
  2. String selector
)

Executes querySelector on a given node. nodeId Id of the node to query upon. selector Selector string. Returns: Query selector result.

Implementation

Future<NodeId> querySelector(NodeId nodeId, String selector) async {
  var result = await _client.send('DOM.querySelector', {
    'nodeId': nodeId,
    'selector': selector,
  });
  return NodeId.fromJson(result['nodeId'] as int);
}