$OrNull method
The method runs document.querySelector
within the page. If no element matches the selector, the return value resolves to null
.
Shortcut for Page.mainFrame.$(selector)
.
A selector
to query page for
Implementation
Future<ElementHandle?> $OrNull(String selector) {
return mainFrame.$OrNull(selector);
}