start method

Future<void> start({
  1. bool debugLogging = false,
})

Implementation

Future<void> start({bool debugLogging = false}) async {
  try {
    const chromedriverExe = 'chromedriver';
    const chromedriverArgs = ['--port=4444'];
    if (debugLogging) {
      print('starting the chromedriver process');
      print('> $chromedriverExe ${chromedriverArgs.join(' ')}');
    }
    final process = _process = await Process.start(
      chromedriverExe,
      chromedriverArgs,
    );
    listenToProcessOutput(process, printTag: 'ChromeDriver');
  } catch (e) {
    // ignore: avoid-throw-in-catch-block, by design
    throw Exception('Error starting chromedriver: $e');
  }
}