Skip to main content

All Questions

1 vote
2 answers
87 views

How to store specific data set from JSON response body?

I am trying to learn cypress then come across a topic in validating json response body but did not discuss on how to store it in a variable. I would like to know how to store specific data set in a ...
JC Basilio's user avatar
4 votes
2 answers
1k views

Cypress TypeError : Cannot read properties of undefined (reading 'then')

I have this function below :- checkStatusCode I check if a response is OK then I try to return a value and based on that I try to visit the URL (ex:- if response status is 200) checkStatusCode(href) ...
Dilhan Nakandala's user avatar
0 votes
1 answer
2k views

How to change baseURL during tests in cypress-io/github-actions [closed]

I'm trying to run my Cypress tests using Github Actions. I have everything set up but I have a problem with baseURL variable which is set during GitubActions process and then passed to Cypress. In my ...
RadekB's user avatar
  • 9
0 votes
1 answer
452 views

Unable to get object value from response body in cypress [closed]

I am a beginner to Cypress and I am trying to get hands-on in API Testing for Cypress. I am trying a very basic GET response from the following URL: https://automationexercise.com/api/productsList I ...
qatesterbecomingprogrammer's user avatar
1 vote
2 answers
334 views

How to verify that one of the api calls has been made in Cypress?

I think the answer must be pretty simple but i can't find it... How to verify that one of the calls has been made? cy.intercept('GET', '/api/v1/url1').as('call1'); cy.intercept('PUT', '/api/v1/url2')....
Juri's user avatar
  • 1,771
-2 votes
2 answers
658 views

Cypress: Is there any way we can substitute fixture fields with data generated in test case in order to generate dynamic payload (Tried existing sol) [duplicate]

I am a newbie in Cypress. I want to know if there is any way to generate a dynamic payload by substituting values of JSON file with the values generated programmatically in cypress test. Something we ...
nikhil udgirkar's user avatar
1 vote
1 answer
730 views

Handle DELETE request in Cypress API Test

I have some confusion about API automation testing in Cypress. If we use a real database to handle the DELETE request without mocking data, How to test with the same data set to run the tests again or ...
Kevin's user avatar
  • 15
0 votes
1 answer
146 views

JavaScript API Response - if clause for 'null' response

Can someone assist, please, in following case: Have a .json response with person's data where, that person can or can not be assigned to some project. Below is part of response where person is not ...
Zoran's user avatar
  • 491
0 votes
1 answer
64 views

Install Cypress for API Automation Testing [closed]

I am new to Cypress and trying to use it for API testing. Currently, I am using Cypress for UI automation and installed it in the client directory. Now I have a confusion, If I am going to use Cypress ...
Kevin's user avatar
  • 15
0 votes
2 answers
543 views

Cypress: How to get elements from a variable with HTML?

I'm currently working on API testing. The API that I'm testing is returning an HTML body. How do I get an element from the response body? If I visit the link, it returns an iframe and I cannot access ...
Faith Berroya's user avatar
1 vote
1 answer
477 views

I can't access response body Cypress Api Testing

I want to automate the api using Cypress, but I can't access the response body. Use this path cy.log(JSON.stringify(response.body.payload[0] Api Response Code context('GET /Auth', () => { ...
Onurcan's user avatar
  • 41
1 vote
0 answers
173 views

Firebase authentication with Cypress

I'm having issues with creating a custom command in Cypress that will allow my user to log in programatically rather than through the UI. I have pulled a lot of this from a tutorial and perhaps it is ...
cduff's user avatar
  • 143
1 vote
0 answers
324 views

Avoid 406 error when using GET method in API testing with Cypress

I would like to test the api of an application, I've got a token from the developer, but I'm getting an error 'cy.request() failed on: https://****************************** The response we received ...
Mohamed Khlifi's user avatar
3 votes
2 answers
111 views

Global variable is not updated

My test is querying a JSON and put value to 'text' variable, but when trying to use the variable I'm getting an error: cy.type() cannot accept an empty string. You need to actually type something ...
Ariel's user avatar
  • 305
0 votes
1 answer
916 views

Get data from array in JSON API object in Cypress [closed]

Relative newbie to Cypress and JSON data. I have an api online that I can access. The api has data similar to this: {"record":[{"account":"acount_1","team":&...
Barry Hammer's user avatar

15 30 50 per page