Coder Social home page Coder Social logo

grandel-dsouza / playwright-cucumber-test-for-browserstack Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 5 KB

This is a sample code written by GrandEL for running playwright test with cucumber and javascript on Browserstack. All one needs to do is clone this repository and add their credentials in the config file and code and simply run the test.

JavaScript 92.21% Gherkin 7.79%
browserstack cucumber cucumber-js cucumberjs playwright playwright-cucumber playwright-javascript grandel

playwright-cucumber-test-for-browserstack's Introduction

playwright-cucumber-test-for-browserstack-with-javascript

#Setup #Clone the repo and run cd node-js-playwright-browserstack Set BROWSERSTACK_USERNAME and BROWSERSTACK_ACCESS_KEY as environment variables with your BrowserStack Username and Access Key or make changes in the single.conf.js file present in the conf floder and in the setup.js file present in features/steps Run npm install #Running your tests #To run a sample test, run npm run test

playwright-cucumber-test-for-browserstack's People

Contributors

grandel-dsouza avatar

Stargazers

 avatar  avatar

Watchers

 avatar

playwright-cucumber-test-for-browserstack's Issues

How to add multiple capabilities in the caps section and how we can pass these context and page to hooks before all

I using the similar way link browser stack with cucumber js, but after before scenario section, I wish to transfer control from world.ts to hook.ts and from that I am starting the actual test scenarios,
could you help me to use the context and page for hooks ?

and how to add multiple capabilities like
const caps = {
browser: 'chrome',
os: 'Windows',
os_version: '11',
}
const caps1 = ? is it ?

how to pass that to following section ??? or do we use array of caps ?

// Create page and browser globals to be used in the scenarios
global.vBrowser = await chromium.connect({
wsEndpoint:
wss://cdp.browserstack.com/playwright?caps= +
${encodeURIComponent(JSON.stringify(caps))},
});

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.