selectFirstWhere<O extends Element> method
Alias to querySelectorAll + firstWhereOrNull
.
Implementation
UITestChainNode<U, O?, T> selectFirstWhere<O extends Element>(
String? selectors, bool Function(Element element) test,
{bool expected = false}) {
var sel = querySelectorAll<O>(selectors);
var elem = sel.element.whereType<O>().firstWhereOrNull(test);
if (expected) {
expect(elem, pkg_test.isNotNull,
reason: "Can't find selected element: $selectors");
}
return UITestChainNode(testChainRoot, elem, this as T);
}