Questions tagged [cypress]

Cypress, an all-in-one testing framework and assertion library, complete with automatic waits, request mocking, and request stubbing

0
votes
1answer
12 views

Compare datetime function cypress

I have a form in which a user is allowed to enter the date range and the output will have results form that particular date alone. I am able to input the date to the form using .type() function. ...
-1
votes
0answers
12 views

In Cypress how to found count a selection with same ID and get the length?

I have a such HTML code. <div id ='pages'> <div id='wrapper'>1 </div> <div id='wrapper'>2 </div> </div> I am want to find elements count with id wrapper. ...
0
votes
0answers
14 views

cy.visit crashes without meaningfull messages

I'm new to cypress and I want to create tests for a rather oldfashioned website which is unfortunatelly not available on the internet. When I perform a simple call to the website cypress crashes: cy....
-1
votes
1answer
16 views

Cypress task fails and complains that task event has not been registered in the plugins file

I am using the cypress cy.task() method/ function to copy a csv file from one directory to another directory. Below is my cy.task('copycsvFile') and relevant code written in support/index.js file. ...
0
votes
1answer
15 views

Cypress - XML response parsing of XHR request using JQuery

I have a Cypress test which fires an XHR request, which is returning XML response. My objective is to parse the XML response and validate few nodes. I used JQuery - parseXML(), which is working as ...
1
vote
1answer
24 views

How to get the auto generated radio button id in Cypress which matches some text?

I got a list of records on the page, where the id's of the radio buttons are auto-generated. How to get the autogenerated id of a radio button in a table row where the row also contains some name ...
0
votes
1answer
19 views

Configuring environment variable in Cypress

I am trying to set different environment for my test suite in Cypress. When I provide Cypress this dictionary as a JSON, Cypress throws error. Its unable to read the JSON (its unable to read users ...
1
vote
1answer
29 views

Configure screenshot folder in Cypress

I am using Cypress as my user interface test automation framework. Currently my folder structure for spec file (logical organization of test files) is: ~/myAccount/header/header.spec.js ~/...
2
votes
1answer
18 views

can i close a specific tab through cypress api?

I'm using cypress to test my chrome extension, when i'm loading the extension into the browser it's open a url automatically, can i close the tab through cypress api?
2
votes
1answer
30 views

Mock network requests in Cypress

I've been tearing my hair out over this for ages now - and I hope someone can help me :) I've been trying to stub a network request in Cypress for ages now. commands.js Cypress.Commands.add('login'...
0
votes
1answer
23 views

Is it okay to make API requests to set up tests in Cypress when testing serverless applications?

I'm writing a serverless React app using AWS Amplify. I do my E2E tests using Cypress. Before each test, I log the user in via the AWS Amplify CLI. Afterwards, I clear all data on the development ...
0
votes
1answer
16 views

Cypress TestRunner via “cypress.open” works locally but does not work on Windows Server 2008

I am using Cypress testing framework JS API and trying to host it on Windows Server 2008. When I execute a Javascript command "cypress.open" locally on Windows 10 laptop, the TestRunner window opens ...
1
vote
1answer
25 views

How do interact with a price-slider with 2 handle in Cypress?

now i can interact with price-slider but price filtration not impacted as attached - price-slider handle low - price-slider handle high , site : https://www.tajawal.ae/en/flights/DXB-RUH/2019-03-30/...
0
votes
2answers
22 views

Overriding window as function call context

I am writing test cases in cypress, and every line I write refers to the cy object. A sample of my test code looks something like this: it('does stuff', () => { cy.visit(startUrl); cy.get("...
0
votes
1answer
16 views

Cypress - addContext() is keeping previous failure count and adding it to each 'it' scenario in mochawesome report

In my mochawesome-report addContext() is keeping previous count and adding it to each 'it' scenario, in case of a test case failure, I'm adding 'someValue' as context to the test case. So if 2nd test ...
2
votes
3answers
43 views

Installing and using npm (Node.js) module on Windows 2008 server

Can someone please advise - how to resolve this? This setup works fine locally on Windows 7 laptop, but fails on Windows 2008 server. Here is the setup: 1. Using ASP.NET Core App and NodeServices ...
0
votes
1answer
15 views

cypress runner ignoring charset=“windows-1252” html tag

I'm testing a page which is windows-1252 encoded, it has the following meta tags in the html: <html> <head> <title>Meta-SSC</title> <meta http-equiv="Content-Type" ...
1
vote
0answers
44 views

within the context of Cypress: How to wait for a Apollo Client Graphql request

In my tests I execute graphql queries via a ApolloClient and mutations to set up my data. Using cypress how do I set this up so I can wait for those steps to executed before proceeding: right now I ...
1
vote
4answers
41 views

cypress: css selector to select an anchor by text

I'm starting to play with cypress and I need to select a link like this: <table cellSpacing="0" cellPadding="0" width="100%" border="0" class="ToolBarBkg"> <tbody> <tr> &...
0
votes
1answer
25 views

Unhandled rejection error: invalid config key requested when attempting to update Cypress via NPM

I am trying to update Cypress to the latest version using the following provided command: npm install --save-dev cypress@3.2.0 In previous versions this has worked fine with no errors. Now, when I ...
-1
votes
0answers
21 views

How to write E2E tests (Cypress) for serverless (AWS Amplify) apps? [closed]

I'm building a serverless web app with React powered by AWS Amplify. I'm writing my E2E tests using Cypress. Up until now I only wrote container components and mocked the state. I wrote tests to ...
0
votes
1answer
41 views

Click() is not working though there's no any error but element not opening up - (Cypress automation)

last one cy.get('[data-cy=impact-area-table]').contains(impactareas.name).should('be.visible').click({force: true}); is not working though there's no any error ,it shows that it's fine and test pass ...
0
votes
0answers
14 views

Chai-sorted throws assertion error for array of numbers

I am trying to validate the values in a column to be in descending order. All the values in the column are integers for percentage change. It works all the times except when there is 100 for the first ...
0
votes
0answers
21 views

Uncaught AssertionError: Env not set, aborting run cypress issue

Everytime i try to run my cypress test i am getting this error: Uncaught AssertionError: Env not set, aborting run This error originated from your test code, not from Cypress. When Cypress detects ...
0
votes
0answers
21 views

Can I execute a command and have it show up in the command log (time travel) after a timeout error has been thrown by a command or assertion?

I have been testing a chat application with Cypress. The application has internal state that is only accessible to me upon ending the session. I want to be able to ensure that internal state is ...
0
votes
1answer
30 views

Cypress save cookie value

I want to save a cookie value using Cypress, but unfortunately I always get undefined in the log console using this code let cookieValue; cy.getCookie('SOME_COOKIE') .should('have.property', '...
2
votes
1answer
26 views

Watch for file changes and run headlessly

When I run cypress open, the Cypress Test Runner will open + browser and tests are rerun on every file change. Is it possible to rerun test automatically but in headless mode?
3
votes
2answers
33 views

/// <reference types= “cypress” /> not enabling intellisense in VS code

First of all, thanks for taking the time to read this. I'll cut short to the chase, I'm having a ridiculous problem trying to get code completion for Cypress while I'm using JS. I've tried following ...
1
vote
1answer
22 views

Cypress - Getting error while executing 'cypress open'

I've a Testing framework with node, cypress, mocha, mochawesome and mochawesome-merge as below with this github repo: and in my package.json I have two scripts as `"scripts": { "cy": "./...
0
votes
0answers
36 views

Cypress test need to receive a valid token and then redirect to another website

I would need to access a MS website, enter the test email, then a pop up displays, select an account and enter password. Now at this stage, receives a valid token from the MS Website and then system ...
-4
votes
1answer
29 views

Why must I run automation test cases on windows?

I have been told that I must run my automation test cases on win10 platform and Chrome. Our project is based on Chorme Browser. I am confused ,because we write cases on MacOs,and we could have ran the ...
0
votes
0answers
32 views

Azure DevOps test -xml not found after running the Cypress tests

Added a Publish test results task in Azure DevOpsCI/CD pipeline, test were successfull, but after running the test it complaints about ##[warning]No test result files matching **/test-*.xml were found....
-1
votes
1answer
28 views

Getting error “EACCES: permission denied” when i install cypress

When i try to install cypress using this commnad: sudo npm install cypress or sudo npm install -g cypress It is giving me this error: Error: EACCES: permission denied, open '/Users/humac/...
2
votes
0answers
22 views

Why does the cypress recording take too much time?

I'm trying ton record my Test. There you can see below the whole test I'm trying to record. I only used once "It" because this is the only way i won't get kicked out of my session while testing, i ...
2
votes
1answer
87 views

Got TypeError: Cannot read property 'passes' of undefined using Cypress when generating mochawesome report

i got confusing error, actually i don't know to how to solve a library issue like this, i tried to generate my cypress test case to mochawesome report below are my package.json setup file { "...
0
votes
1answer
23 views

Cypress + Dom Testing Library: getByText does not find input's value

I'm using Cypress with Cypress Testing Library to test my React application. I have an input with a name ('Steve') as its value and I'm trying to find it with cypress like this: // In the component: ...
2
votes
1answer
22 views

How can I record my Cypress Test on windows?

I'm almost done with my bachelor thesis about e2e testing. I can test almost anything but i cant record. I did what everything what is documented on cypress.docs On the picture below you ca see i ...
0
votes
3answers
42 views

Cypress:Finding parent element

I got a tree of elements and each element got a toggle icon to expand it -My intention is to click on the toggle icon corresponding to the element have a text for ex "TIME PERIODS" Currently i write ...
0
votes
1answer
41 views

How to run cypress tests into Azure DevOps CI/CD pipeline using vsts-ci.yml

I would like to setup and run my Cypress tests into Azure DevOps CI/CD pipeline. Any idea where to add the following file vsts-ci.yml in my Azure DevOps pipeline. We are using Docker Images for ...
0
votes
1answer
32 views

Cypress:Is there any way to check invisibility of an element

In our application when user do some actions that require communicatiion with server -a loading bar will be displayed on top panel.Once the action completed-Loading bar will be disappeared.In tests we ...
0
votes
1answer
21 views

Cypress.io - Waiting Too Long for Pages to Finish Loading

I often experience the following sort of situation: cy.visit(loginUrl); cy.get('txtUsername'); cy.type('John Smith'); cy.get('btnLogin').click(); The page appears right away and displays the ...
2
votes
0answers
20 views

How can I get Cypress to simulate a Hammer tap?

I have Hammer listener on a div, listening for tap and press. I'm writing tests with Cypress and I'm having a deal of trouble to simulate the tap. I'm fiddling with trigger(). I've tried trigger('tap')...
0
votes
1answer
21 views

Cypress.io - sitemap.xml validation test

:) I chose for automated testing a tool Cypress.io. I need some tests for my sitemap.xml document and I dont know how to do that :( I have tried install an npm package libxmljs npm install ...
0
votes
1answer
27 views

How to delete all screenshots before a test run while doing a cypress visual regression

I was doing a visual regress where I am comparing two screenshot for the same URL but in different environment. I am taking the screenshot from production and comparing it with the snapshot taken from ...
3
votes
3answers
70 views

Should e2e tests persist data in real databases?

I've been reading a lot about e2e testing and one thing I cannot understand is how "real" should e2e tests be. Regardless of the tools I use for the e2e tests, I've seen that most of the time they ...
2
votes
1answer
33 views

Cypress hover over the menu option called “Automation”

I am trying to hover over the menu option(shots - it is under automation tab) by using this below command however it does not seem to work: cy.get('.menu.button.overlay_button.projects_popover')....
1
vote
2answers
41 views

Cannot set a variable's value inside cypress command cy.get() to use outside the command

I'm setting a pin variable, updating it in cy.get() and then trying to use it after the cy.get() - it doesn't allow me to do this. I've also read here that this is not possible: https://docs.cypress....
0
votes
1answer
30 views

Cypress:Can we set tolerance level for matchImageSnapshot

I am using cy.matchImageSnapshot for my image comparison testing. Sometimes it fails for slight differences. Is there any way to mention a tolerance level so that for Eg. up to 80% match i can still ...
0
votes
1answer
14 views

Cypress failed to start on MacOS

When I try to use cypress open or cypress run, I get the following error: ✖ Verifying Cypress can run /*/*/.cache/Cypress/3.1.5/Cypress → Cypress Version: 3.1.5 Cypress failed to start. This is ...
0
votes
1answer
30 views

Cypress: run only one test

I want to toggle only running one test, so I don't have to wait for my other tests to see the result of one test. Currently, I comment out my other tests, but this is really annoying. Is there a way ...

http://mssss.yulina-kosm.ru