getElementByRelation method
Returns the NodeId of the matched element according to certain relations.
nodeId
Id of the node from which to query the relation.
relation
Type of relation to get.
Returns: NodeId of the element matching the queried relation.
Implementation
Future<NodeId> getElementByRelation(
NodeId nodeId, @Enum(['PopoverTarget']) String relation) async {
assert(const ['PopoverTarget'].contains(relation));
var result = await _client.send('DOM.getElementByRelation', {
'nodeId': nodeId,
'relation': relation,
});
return NodeId.fromJson(result['nodeId'] as int);
}