Questions tagged [cypress]

Questions about using Cypress.io, an open source tool for testing anything that runs in a browser.

Filter by
Sorted by
Tagged with
0 votes
0 answers
13 views

Can't walk dependency graph: Cannot find module '

When I try to run cypress using Cucumber, I got This is the structure of the folders The file I am trying to run is purchaseOrderCheckScreen.feature Cypress package version: 9.7.0 Cypress binary ...
Ingridd Brito's user avatar
-1 votes
1 answer
52 views

Defining a global variable in Cypress that can be used in all test files without creating a new one every time

I am looking for a solution to define a global variable and access it in all my test files. This is my commands.js. Here I am generating a random mobile number using faker.js. I am doing API automated ...
Mariam Aslam's user avatar
0 votes
2 answers
138 views

Cypress.js : How to change default path for your e2e tests?

in v13.3.0, after you install Cypress.js into your repo, it creates these four default directories: /cypress/e2e /cypress/fixtures /cypress/support /cypress/downloads the first one is where it ...
secretAgent's user avatar
0 votes
2 answers
55 views

How many it() should I use in my test files?

I'm fairly new to Cypress and I'm using it with TypeScript. For each persona, I have a file like this: {desired-persona}.ts.cy In each of these files, I have 1 describe and one it that includes the ...
Keipro's user avatar
  • 71
0 votes
1 answer
137 views

Cypress says disabled attribute always has value "disabled"

I have an HTML element with a disabled attribute that is either true or `false, like: <div class="row" disabled="false"> or <div class="row" disabled="true&...
SuperCyper's user avatar
0 votes
0 answers
187 views

How to send a multipart/form-data request in cypress which having xml file

I'm having a POST request which have multipart/form-data content and data in xml like below userlist: " <user id="[email protected]" password="Password1" path="sysadm/...
Jagannatha Mv's user avatar
0 votes
3 answers
56 views

Login Integration Testing Good and Bad Password

I am writing Cypress Integration Test for UpdatePassword. One reason I wanted one whole test: We had a minor bug before, when the user enters a bad password, and then fixes it up, the Submit Button ...
mattsmith5's user avatar
0 votes
2 answers
692 views

How to read the last row of a table in Cypress?

I want to take the last row in the third column in my dynamic table.This cell has the last email randomly created and stored in the variable storedEmail. Those are what I tried: cy.fixture('email.json'...
Ingridd Brito's user avatar
0 votes
1 answer
249 views

Can't walk dependency graph: Cannot find module '../../support/pageObjects/TeamPage

It is the first time I am running a specific BDD cypress test and I got the following Error: Can't walk dependency graph: Cannot find module '../../support/pageObjects/TeamPage' from 'D:\Repos\vjtrck\...
Ingridd Brito's user avatar
0 votes
1 answer
21 views

Best way to plug in several sub flows as part of a single one in Cypress?

I am currently working on integrating Cypress e2e tests in our existing CI/CD pipeline (I'm not an automation engineer but a developer). Our application is a fintech app which involves the typical ...
Oscar Calderon's user avatar
0 votes
0 answers
143 views

Cannot find module 'is-ci' when running cypress test

I want to run cypress tests using cucumber. When I hit Open Cypress from the feature file, I got an error node:internal/modules/cjs/loader:936 throw err; ^ Error: Cannot find module 'is-ci' Require ...
Ingridd Brito's user avatar
0 votes
0 answers
607 views

Allure report not generated when one or more test cases at pending status, due to Cucumber tags

Error message; allure-results does not exist. When test cases pass failed only report generated with no issue. Project created by Cypress, Cucumber with typescript Run in Jenkins/Docket image Jenkins ...
Dev Perera's user avatar
1 vote
2 answers
359 views

Is it recommended to use Page object model for cypress E2E test? if not what is the suggested method to adopt

I am new for writing e2e UI test using cypress. But I am uncertain if it's good practice to use page object model, when I repeatedly need to use same elements in different test cases. Does "Aap ...
Maryum Khan's user avatar
0 votes
1 answer
69 views

How to Use Cypress with AngularJS application

Our legacy Application is developed with AngularJS(app folder in the picture) but now started with nx (Angular) for the new feature development (which is in web-apps within the app). My question is NX ...
Maryum Khan's user avatar
0 votes
0 answers
92 views

Not all key codes are working with cy.realPress() method - keyboard navigation is not working

I am trying to mimic the keyboard navigation in my Cypress test. I found a nice lib https://github.com/dmtrKovalenko/cypress-real-events#cyrealpress. The method realPress() is working partially: not ...
Viktor Ilienko's user avatar
0 votes
1 answer
42 views

How to delete cypress reports for both windows and linux before every run?

using below script for windows and linux but it is not working for linux
Surya Singh's user avatar
-1 votes
1 answer
918 views

Cypress API testing : How to login and then use the auth token in another test?

How can I access the token generated from 1st it block to 2nd it block. here is the code: 1st it block it('Login using new user', () => { cy.api({ method: "POST", ...
Jimmy's user avatar
  • 111
0 votes
2 answers
235 views

Can I use Cypress for API Testing?

I am new to Cypress and trying to find the best/good practices for doing api test. My goal is to create an automation API test using cypress but can't find structure/guidelines to follow. Can anyone ...
Jimmy's user avatar
  • 111
-1 votes
1 answer
1k views

How to connect with Mysql db using Cypress 12?

I want to connect to Mysql DB in the server to delete several records. I have tried using some of the tutorials and answers available. Since all of them are regarding older versions of Cypress, I can'...
Syrus's user avatar
  • 1,197
0 votes
1 answer
79 views

Will Selenium Webdriver become less popular in coming years? [closed]

Lot of Automation engineers have shifted to new Web automation tools like Cypress, WebDriverIO, Pupeeter, Playwritght, Katalon Studio, AI tools like Testium, Functionize etc and i am still working on ...
jimmy234's user avatar
0 votes
1 answer
114 views

Cypress Error on chaining Cypress-If / Cypress-Drag-Drop commands with Cypress-iFrame commands

The application, which I have to automate, is completely inside an iframe. To continue, I used cypress-iframe plugin. However, when I am trying to chain the commands of cypress-drag-drop or cypress-if ...
Anand's user avatar
  • 101
0 votes
0 answers
688 views

How to pass dynamically JSON test data file to json spec.js file to get data in Cypress + Cucumber?

I want to run same test for the same web page for different combinations. Therefore I'm planning to created different scenarios in same feature file or different files. I have already tried passing ...
Syrus's user avatar
  • 1,197
1 vote
5 answers
435 views

Is it possible to use Cypress for data validation?

I'm writing some end-to-end automated tests for a CRM-alike web application. One of the development team leaders is asking me to do something that I've never done before. The problem is that the data ...
Eduardo's user avatar
  • 11
1 vote
2 answers
1k views

What is the best cypress approach for waiting on data from an API?

Given the following Cypress v10.9.0 spec: it('can search the database', () => { cy.get('[data-cy=searchInput]').type('my search'); cy.get('[data-cy=searchOutput]').contains('Searching...')...
P.Brian.Mackey's user avatar
1 vote
1 answer
3k views

Verify read-only fields using cypress

I have a few text fields which when I login as a specific user (rights of a read only) , all the text fields are not allowed to be edited. I am trying to automate this page in Cypress. I tried using : ...
Sriharsha Karanth's user avatar
0 votes
2 answers
1k views

Conditional statement in cypress

I have a scenario that I'm having difficulty with - in 2 separate environments I have 2 expected outcomes due to multi factor authentication. In one environment I have a popup notification that needs ...
DEnumber50's user avatar
  • 1,190
0 votes
1 answer
64 views

How to assert whether the file has been uploaded or not?

<div class="form-fill-file"> <input data-val="true" data-val-requiredif="Please upload invoice file." id="Upload_File" name="Upload.File" ...
Aishwarya's user avatar
0 votes
1 answer
1k views

How to set cypress to automatically detect proxy for automated executions?

I have a cypress test and its not loading the website properly. When I manually open the website using chrome, the website is working ok. Also I can find that my chrome proxy setting is set as "...
Sandeep Chandra Sekhar's user avatar
0 votes
0 answers
554 views

Issue connecting Cypress to Postgres database

I'm running into an issue connecting to the database using cypress-postgres. The server has multiple databases along with multiple schemas. I tried multiple plugins, but can't find a solution that ...
Michael J Frazier's user avatar
0 votes
0 answers
2k views

Cypress - Identify when page is fully loaded

I am new to Cypress, but wanted to capture the time from visiting a page, up until the page is fully rendered and available to use. I understand I can use the Window: load event to identify when the ...
Mike's user avatar
  • 1
0 votes
1 answer
2k views

Cypress: cy.type() requires a valid time with the format with the format HH:mm, HH:mm:ss or HH:mm:ss.SSS

I am automating using cypress, there is a time input in the application. The html of it as follows: <label>Time</label> <input data-testid="time" type="time" name=&...
RenukaA's user avatar
  • 139
1 vote
1 answer
2k views

Testing Stripe payment integration using Cypress

We've recently implemented Stripe for customers to checkout. However, using Cypress to automate our regression tests was incredibly painful as the fields are inside an iframe (and, for some reason, ...
dvniel's user avatar
  • 2,508
2 votes
1 answer
3k views

Conditional testing on checkbox in Cypress

I have a checkbox which I want to check if it is not checked and want to uncheck it if it is checked in Cypress. How can I do that?
Rao Thota's user avatar
0 votes
1 answer
76 views

How can I create a test starter page for Cypress

I'm having a hard time finding any information on creating a basic HTML page from which I can start my Cypress tests. I want to create a simple page with a few options/buttons for running different ...
Catalin Ungureanu's user avatar
1 vote
1 answer
4k views

How to return a value from a then() block and use it in another then block in cypress

cy.get('div:nth-child(1) > div:nth-child(1) > div.MuiGrid-root.MuiGrid-item.MuiGrid-grid-xs-6 > div > span.MuiChip-label').then(($today) => { const today=$today.text() cy....
Rao Thota's user avatar
0 votes
2 answers
2k views

How to get list of disabled elements on page using Cypress

How to get a list of disabled elements on a page using Cypress? Thanks in advance.
Rao Thota's user avatar
2 votes
2 answers
178 views

Test Coverage Report in Cypress

I write my test cases in Confluence and then automate them in Cypress. I was wondering is there any way I can get the test coverage report. I already looked into Istanbul but it is for code coverage. ...
pop's user avatar
  • 31
2 votes
2 answers
1k views

Whats the best approach to select elements for automated testing?

I read following in cypress's best practices. Anti-Pattern: Using highly brittle selectors that are subject to change. Best Practice: Use data-* attributes to provide context to your selectors and ...
Rnj's user avatar
  • 121
4 votes
2 answers
1k views

End to end application tests when separate repo for the front-end and back-end tests

We have separate repos for the backend and the front end. The backend which is just microservices has its unit tests(jest), microservice integration tests(jest), and microservice end-to-end tests(jest)...
systemdebt's user avatar
1 vote
2 answers
155 views

Running Cypress with Git Hub Actions

I want to run Cypress tests on Git Hub action. The GH page is enabled and the workflow seems to be passed: But when I click Actions I should see the workflows, instead, it shows "There are no ...
Ingridd Brito's user avatar
-2 votes
1 answer
2k views

Return multiple variables from custom command in Cypress

What I am trying to do: I have a custom command, inside which i am declaring few variables(boolean). I am setting the values for the variables as per my code. I wanna use the variables to assert in ...
MeBhiAutomationTester's user avatar
-1 votes
1 answer
1k views

Cypress detects uncaught errors originated from application [closed]

My test was running successfully. I did not update anything, but suddenly my spec is failing. This is the error displayed: The funny thing is I don't see the a.focus on my cypress code and Cypress ...
Ingridd Brito's user avatar
0 votes
3 answers
2k views

How do I deal with duplicated testing steps in Cypress?

Writing test cases using Cypress and Cucumber. I have a few test cases written in Cucumber Syntax like following: @focus Scenario: All Accessibility tabs (Color scheme, Font size, Zoom) are visible ...
Yu Zhang's user avatar
  • 9,932
2 votes
1 answer
10k views

How to wait the loading spinner disappears in Cypress

When I run Cypress, the page of my application shows the loading spinner spinning indefinitely. While it is spinning the other components of the page are not displayed, so I need this spinner to ...
Ingridd Brito's user avatar
0 votes
1 answer
312 views

Handle web tables with Shadow DOM in Cypress

I am struggling to make Cypress see my web table that is in a Shadow DOM. My test Scenario is: After I type invalid data on the search bar, e.g 'oo', Cypress ensures that the table is empty, this ...
Ingridd Brito's user avatar
1 vote
2 answers
6k views

XHR requests are cancelled in Cypress

My test in Cypress does the following: Do the login On the next page clicks a button The button clicked in step 2, Cypress starts to load the correct URL but then the landing page (login screen from ...
Ingridd Brito's user avatar
15 votes
4 answers
32k views

How to simulate a simple keypress in Cypress

Working on webpage test automation with Cypress atm. Ran into a problem. I need to simulate a pressing of the ESCAPE key from a user. Cypress has its own type() method, but it is required to chain ...
Yu Zhang's user avatar
  • 9,932
0 votes
1 answer
2k views

How to handle menu bar in Cypress

I am trying to click the search bar either on the sidebar <im-sidebar class="hydrated"> or top menu <nav_class = "top-menu">. This is the code So I tried: cy.get('....
Ingridd Brito's user avatar
1 vote
3 answers
2k views

Breaking a loop after resolving a promise

I am writing a program to check the health endpoint of one of our APIs. So, before starting execution, I try to hit the health endpoint 5 times. If I get the desired response code during the 5 ...
Aalok's user avatar
  • 1,732
4 votes
1 answer
1k views

Shall I put my e2e tests and performance test frameworks on the same repository?

I am using Cypress for my e2e tests and k6 for my performance tests. They are both in Javascript and access the same config json files (I use this for my environment variables). The folder structure ...
ebanster's user avatar
  • 143