How to use the browsertime.SeleniumRunner function in browsertime

To help you get started, we’ve selected a few browsertime examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sitespeedio / coach / test / help / browsertimeRunner.js View on Github external
createTestRunner(browser, category, useHttp2) {
    function run(url, script) {
      return Promise.resolve(script).then(script =>
        runner
          .loadAndWait(url, 'return window.performance.timing.loadEventEnd>0')
          .then(() => runner.runScript(script))
      );
    }

    const runner = new browsertime.SeleniumRunner({
      browser: browser,
      timeouts: {
        browserStart: 60000
      }
    });

    let baseUrl;

    return {
      start() {
        return webserver
          .startServer(useHttp2)
          .then(address => {
            baseUrl = urlParser.format({
              protocol: useHttp2 ? 'https' : 'http',
              hostname: address.address,
github sitespeedio / coach / test / help / browsertime.js View on Github external
start: function(browser) {
    bt.logging.configure({});
    runner = new bt.SeleniumRunner({
      browser: browser,
      'timeouts': {
        'browserStart': 20000
      }
    });
    return runner.start();
  },
  stop: function() {
github sitespeedio / coach / test / help / browsertimeSingleScript.js View on Github external
start: function(browser) {
    bt.logging.configure({});
    runner = new bt.SeleniumRunner({
      browser: browser,
      'timeouts': {
        'browserStart': 20000
      }
    });
    return runner.start();
  },
  stop: function() {

browsertime

Get performance metrics from your web page using Browsertime.

Apache-2.0
Latest version published 2 days ago

Package Health Score

81 / 100
Full package analysis

Similar packages