Skip to content

Get error on step npm run sample-test #2

Description

@KaushikChavda

Hello Support,

I’m following the steps and get error on Step 4:
https://www.browserstack.com/docs/automate/playwright/getting-started/nodejs#MacOS_or_Linux

  1. [playwright-webkit@latest:OSX Ventura] › sample_test.js:4:1 › BstackDemo Add to cart ==========

    browserType.launch: Browser has been closed

     at Object.playwrightFixtures.browser.scope [as fn] ([/Users/kaushikchavda/Projects/node-js-playwright-browserstack/node_modules/@playwright/test/lib/index.js:180:51](mailto:/Users/kaushikchavda/Projects/node-js-playwright-browserstack/node_modules/@playwright/test/lib/index.js:180:51))
     at [/Users/kaushikchavda/Projects/node-js-playwright-browserstack/node_modules/@playwright/test/lib/fixtures.js:95:81](mailto:/Users/kaushikchavda/Projects/node-js-playwright-browserstack/node_modules/@playwright/test/lib/fixtures.js:95:81)
    
  2. [chrome@latest:Windows 11] › sample_test.js:4:1 › BstackDemo Add to cart ======================

browserType.launch: Browser has been closed

    at Object.playwrightFixtures.browser.scope [as fn] ([/Users/kaushikchavda/Projects/node-js-playwright-browserstack/node_modules/@playwright/test/lib/index.js:180:51](mailto:/Users/kaushikchavda/Projects/node-js-playwright-browserstack/node_modules/@playwright/test/lib/index.js:180:51))
    at [/Users/kaushikchavda/Projects/node-js-playwright-browserstack/node_modules/@playwright/test/lib/fixtures.js:95:81](mailto:/Users/kaushikchavda/Projects/node-js-playwright-browserstack/node_modules/@playwright/test/lib/fixtures.js:95:81)
  1. [playwright-firefox:Windows 11] › sample_test.js:4:1 › BstackDemo Add to cart =================
browserType.launch: Browser has been closed

    at Object.playwrightFixtures.browser.scope [as fn] ([/Users/kaushikchavda/Projects/node-js-playwright-browserstack/node_modules/@playwright/test/lib/index.js:180:51](mailto:/Users/kaushikchavda/Projects/node-js-playwright-browserstack/node_modules/@playwright/test/lib/index.js:180:51))
    at [/Users/kaushikchavda/Projects/node-js-playwright-browserstack/node_modules/@playwright/test/lib/fixtures.js:95:81](mailto:/Users/kaushikchavda/Projects/node-js-playwright-browserstack/node_modules/@playwright/test/lib/fixtures.js:95:81)

3 failed
[chrome@latest:Windows 11] › sample_test.js:4:1 › BstackDemo Add to cart =======================
[playwright-webkit@latest:OSX Ventura] › sample_test.js:4:1 › BstackDemo Add to cart ===========
[playwright-firefox:Windows 11] › sample_test.js:4:1 › BstackDemo Add to cart ==================

Activity

  1. spencersablan commented on Jul 7, 2023

    @spencersablan

    Getting the same thing 🤔

  2. spencersablan commented on Jul 7, 2023

    @spencersablan

    Ahhh I think I got it. Two things:

    1. Make sure you've downloaded Browserstack local
    2. In exports.BS_LOCAL_ARGS, be sure to put your access key.
  3. iamdreo commented on Jan 31, 2024

    @iamdreo

    HI @spencersablan please i get kind of a similar error but i cant find where to add the exports.bs_local_Args based on the examples in the doc. please where do i add this?

  4. spencersablan commented on Feb 1, 2024

    @spencersablan

    HI @spencersablan please i get kind of a similar error but i cant find where to add the exports.bs_local_Args based on the examples in the doc. please where do i add this?

    Check out this doc! https://www.browserstack.com/docs/automate/playwright/playwright-capabilities

    You'll find it there 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions