You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
for setting up cookies we need to pass: await browserContext.addCookies(cookies);
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?
The text was updated successfully, but these errors were encountered:
PriyankaSoni1210
changed the title
Sending cookies in page object model
Unable to connect to Browser stack if cookies are also sent in the test files
Jul 6, 2022
Hey @PriyankaSoni1210
Have you tried overriding the "context" fixture and using the same?
You can reach out to [email protected] for faster resolutions.
Hello, Thanks for your response!! Yes the above approach worked, however, when just overriding the context in the fixtures, I am unable to take advantage of the below snippet in my fixtures to update the test run status, and execution are showing as unmarked in browserstack. Appreciate all suggestions on this :)
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:
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?
The text was updated successfully, but these errors were encountered: