querySelector method
Alias to Element.querySelector or UIComponent.querySelector.
Implementation
UITestChainNode<U, Element?, T> querySelector(String? selectors,
{bool expected = false}) {
var e = element;
Element? elem;
if (e is UIComponent) {
elem = e.querySelector(selectors);
} else if (e is Element) {
elem = selectors != null ? e.querySelector(selectors) : null;
} else {
elem = uiRoot.querySelector(selectors);
}
if (expected) {
expect(elem, pkg_test.isNotNull,
reason: "Can't find selected element: $selectors");
}
return UITestChainNode(testChainRoot, elem, this as T);
}