Skip to content

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

@Swapnil-Titar

Description

@Swapnil-Titar

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))},
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions