selectExpected<E extends UIElement> method

E selectExpected<E extends UIElement>(
  1. String? selectors
)

Implementation

E selectExpected<E extends UIElement>(String? selectors) {
  var self = this;
  var e = selectors != null && selectors.isNotEmpty
      ? self?.querySelector<E>(selectors)
      : null;
  if (e == null) {
    throw TestFailure("Can't find element: `$selectors`");
  }
  return e;
}