module.exports = {
  run(context) {
    console.log('In pretask!!!');
    return context.runWithDriver((driver) => {
      driver.get('https://www.sitespeed.io')
        .then(() => {
          return driver.getCurrentUrl();
        })
        .then((url) => {
          console.log('Loaded url: ' + url);
        });
    });
  }
};

module.exports = {
  run(context) {
    console.log('In pretask!!!');
    return context.runWithDriver((driver) => {
      return driver.get('https://www.sitespeed.io')
        .then(() => {
          return driver.getTitle();
        })
        .then((title) => {
          console.log('Loaded page with title: ' + title);
        });
    });
  }
};

Make sure to return promise created by pretask.
Make sure to return promise created by pretask.

Also update exemple to fetch page title instead of url.
