code: function confirm(type, props = {}, count = 1) {
    return wait(300).then(() => {
      const results = findAll(type, props).map(element => element.contentView || element);
      if (results.length !== count) {
        console.log(props, results);
        throw new Error(`Expected ${count} matching ${type.name}, found ${results.length}`);
      }
      for (let i = 0; i < results.length; i++) {
        if (results[i] instanceof Action || results[i] instanceof SearchAction) {
          continue; // TODO: Checking bounds of action causes exception
        }
        if (!results[i].bounds.width || !results[i].bounds.height) {
          console.log(props, results);
          throw new Error(`No size: ${type.name} ${i}`);
        }
        if (!results[i].visible) {
          console.log(props, results);
          throw new Error(`Not visible: ${type.name} ${i}`);
        }
      }
    });
  }
docs: #endregion #region test helpers