async _collectLinks(baseUrl) {
    const links = [];
    await this._page.exposeFunction('pushToLinks', link => {
      const _link = resolveUrl(link, baseUrl);
      if (_link) links.push(_link);
    });
    await this._page.evaluate(() => {
      function findLinks(document) {
        document.querySelectorAll('a[href]')
          .forEach(link => {
            // @ts-ignore
            window.pushToLinks(link.href);
          });
        document.querySelectorAll('iframe,frame')
          .forEach(frame => {
            try {
              findLinks(frame.contentDocument);
            } catch (e) {
              console.warn(e.message);
              // @ts-ignore
              if (frame.src) window.pushToLinks(frame.src);
            }
          });
      }
      findLinks(window.document);
    });
    return uniq(links);
  }
@param {!string} baseUrl
@return {!Promise<!Array<!string>>}
@private