The first matching element according to a depth-first pre-order traversal of the widget tree.
Throws a StateError if finder is empty.
- Use element if you only expect to match one element.
Source
Element/*=T*/ firstElement/*<T extends Element>*/(Finder finder) {
TestAsyncUtils.guardSync();
return finder.evaluate().first;
}