Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nightwatch browserstack plugin does not get initiated when using programatic api. #3849

Closed
swrdfish opened this issue Aug 1, 2023 · 0 comments

Comments

@swrdfish
Copy link
Member

swrdfish commented Aug 1, 2023

Description of the bug/issue

When @nightwatch/browserstack plugin does not get initiated when nightwatch is invoked using the programatic api.

Steps to reproduce

  1. Add @nightwatch/browserstack plugin to nightwatch:
  2. Add in the relevant configuration in nightwatch.conf.js
...
  plugins: ['@nightwatch/browserstack'],

  '@nightwatch/browserstack': {
    test_observability: {
      enabled: true,
      user: process.env.BROWSERSTACK_USERNAME,
      key: process.env.BROWSERSTACK_ACCESS_KEY,
      projectName: "My Project",
      buildName: "My Project build",
      buildTag: ["foo","bar"]
    }
  }
...
  1. Invoke nightwatch using the programatic api
const client = Nightwatch.createClient( environment );
await client.runGlobalBeforeHook()
const browser = await this.browser.launchBrowser();

await browser.navigateTo('https://www.google.com');
await browser.end();

await client.runGlobalAfterHook();
  1. Check Browserstack Automate dashboard to check if projectName, buildName etc are not getting updated.

Nightwatch.js Version

3.1.1

Node Version

18.16.1

Browser

Chrome

Operating System

MacOS

swrdfish added a commit to swrdfish/nightwatch that referenced this issue Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant