Skip to content

Unable to connect to Browser stack if cookies are also sent in the test files #30

Open
@PriyankaSoni1210

Description

@PriyankaSoni1210

Hello,

Our project is using page objects and we are able to connect to browserstack automate using fixtures as in the sample.

However, for the tests that require cookies to be sent, we are not able to connect to browserstack and tests end up running locally on disk.

This appears mainly due to:

  1. for setting up cookies we need to pass: await browserContext.addCookies(cookies);
  2. Browserstack fixtures are overriding the default 'page' fixture - await use(vPage); we tried to customize a bit by just overriding the 'context' and using that to add cookies and create new page in test itself.

The above is not working for us. We would also like to use geolocation which again required browserContext.

Is there any recommended way to achiever the same?

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