$ method
The method runs element.querySelector
within the page. If no element
matches the selector, an exception is thrown.
Implementation
Future<ElementHandle> $(String selector) async {
return $OrNull(selector).then((e) {
if (e == null) {
throw Exception(
'Error: failed to find element matching selector "$selector"');
}
return e;
});
}