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
-2
votes
0answers
30 views

Cypress vs Selenium [closed]

Which one is better with Support & Performance
-1
votes
0answers
37 views

how to get list of files in a directory recursively in Cypress?

I wrote this code and it works fine, that is written in TypeScript. When I use the same code in the test file in Cypress I get error TypeError: fs.readdir is not a function import * as fs from 'fs' ...
3
votes
2answers
57 views

Do something as long as element is on page - cypress

I'm new to cypress and I just hit this problem I seem unable to solve. What I'm trying to do is this: on an eshop page, there's this "Show More Products" button (sorry for the language :)): If I ...
-1
votes
1answer
209 views

Reset state before each Cypress test - TypeError: cy.resetDb is not a function

I use Cypress with my local web app. I followed install and run instructions: https://github.com/gothinkster/react-mobx-realworld-example-app Tests work fine until I wanted to reset database state ...
4
votes
2answers
1k views

Testing React web application in Selenium(Java)

In my work I use Selenium(Java) to automated test. Now web application will be rewritten to React, and there's my question: Automating react application using Selenium under Java is good choice? Do ...
0
votes
3answers
2k views

Select files from system's local drive using cypress

How to select files from a local computer and upload to the website using cypress?
5
votes
2answers
8k views

How to check a button is disabled using Cypress

<button _ngcontent-c21="" color="primary" mat-button="" class="mat-button mat-primary" ng-reflect-disabled="true" ng-reflect-color="primary" disabled=""><span class="mat-button-wrapper"> ...
1
vote
1answer
685 views

Using Cypress tests how to select a feature on a map location

We have an app where we can display dataset features on an Open Layers map page. These dataset features are then selectable to allow further attributes of these datasets to be displayed. In my ...
2
votes
1answer
749 views

How to set an enviromental variable to indicate test environment in Cypress

I need to include in my test scenarios a way to determine which environment they are being executed in. We have BVT (build verification test) and a UAT (user Acceptance Test) environments. Within our ...
2
votes
1answer
2k views

Why isn't my 'if' statement working in my Cypress test

I'm trying to add an 'if' statement into my login test as there are two login pages that can be loaded. The test below is failing when it can't find the text 'Not your account?', when it should be ...
3
votes
1answer
3k views

Cypress if-then-else, while and foreach

In the context of my master’s thesis, I have been working on web application testing. My original goal was to have some form of automation on UI testing, such that easy end-to-end testing was possible....
6
votes
7answers
217 views

Test all elements in a single test or 18 separate tests

I have a test that is making sure that all elements are visible on a page, my question is should I have 18 separate test cases or just one? Example, which is better let baseURL = Cypress.env("...
7
votes
3answers
5k views

Cypress vs Protractor for end-to-end testing

I've recently stumbled upon a modern end-to-end testing framework called Cypress which is going to be released in public beta this year. It really looks awesome at the first glance - there are ...