We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐞 Describe the question:
Hello! Hope you are doing well! I've been stuck with the API authentication exercise. I'm using the demoqa.com site so I might be ignoring something.
This is what I have:
import { test as setup, type Page, chromium } from '@playwright/test'; const authFile = '.auth/api-admin.json'; setup('authenticate', async ({ request }) => { // Send authentication request. Replace with your own. await request.post('https://demoqa.com/Account/v1/GenerateToken', { form: { "email":"tau-admin", "password":"TestingWithR3n@t@"} }); await request.storageState({ path: authFile }); });
This will pass and I get a 200 response, but for some reason, there's no cookies info in the json file. This is the resulting json file
{ "cookies": [], "origins": [] }
Checking the tracing I don't see any cookies in the response.
I already tried with the different APIs that are available in the Swagger doc, but I'm getting the same result. The APIs I tried are: https://demoqa.com/Account/v1/Authorized https://demoqa.com/Account/v1/GenerateToken https://demoqa.com/Account/v1/Login
My guess is that I have to use the generated token, but not sure how to accomplish this or if this is the right approach.
Hope that you can help 😅 and thanks in advance!
🎡 A picture of your pet or a toy or something really cool:
The text was updated successfully, but these errors were encountered:
raptatinha
No branches or pull requests
🐞 Describe the question:
Hello! Hope you are doing well! I've been stuck with the API authentication exercise. I'm using the demoqa.com site so I might be ignoring something.
This is what I have:
This will pass and I get a 200 response, but for some reason, there's no cookies info in the json file. This is the resulting json file
{ "cookies": [], "origins": [] }
Checking the tracing I don't see any cookies in the response.
I already tried with the different APIs that are available in the Swagger doc, but I'm getting the same result. The APIs I tried are:
https://demoqa.com/Account/v1/Authorized
https://demoqa.com/Account/v1/GenerateToken
https://demoqa.com/Account/v1/Login
My guess is that I have to use the generated token, but not sure how to accomplish this or if this is the right approach.
Hope that you can help 😅 and thanks in advance!
🎡 A picture of your pet or a toy or something really cool:
The text was updated successfully, but these errors were encountered: