How to use the nightwatch.client function in nightwatch

To help you get started, we’ve selected a few nightwatch 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 mucsi96 / nightwatch-api / packages / nightwatch-api / src / client.ts View on Github external
export async function createSession(options: IOptions): Promise {
  if (options) {
    deleteRunner();
  }

  const runner = createRunner(options);
  const settings = runner.test_settings;
  client =
    runnerOptions && runnerOptions.silent
      ? createClient(settings)
      : createClient(settings, new reporter());
  log(`Creating session for ${runner.testEnv} environment on port ${settings.webdriver.port}`);
  await client.startSession();
  log(`Session created for ${runner.testEnv} environment`);
  return client.api;
}
github mucsi96 / nightwatch-api / packages / nightwatch-api / src / client.ts View on Github external
export async function createSession(options: IOptions): Promise {
  if (options) {
    deleteRunner();
  }

  const runner = createRunner(options);
  const settings = runner.test_settings;
  client =
    runnerOptions && runnerOptions.silent
      ? createClient(settings)
      : createClient(settings, new reporter());
  log(`Creating session for ${runner.testEnv} environment on port ${settings.webdriver.port}`);
  await client.startSession();
  log(`Session created for ${runner.testEnv} environment`);
  return client.api;
}

nightwatch

Easy to use Node.js based end-to-end testing solution for web applications using the W3C WebDriver API.

MIT
Latest version published 21 hours ago

Package Health Score

92 / 100
Full package analysis