Questions tagged [cypress-custom-commands]
111 questions
0
votes
0 answers
There is any solution to generate the authorization token for the API testing globally?
There is any solution to generate the authorization token for the API testing globally in order to use it on different specs ?
There is any solution to generate the authorization token for the API testing globally in order to use it on different…

med
- 31
- 1
- 5
0
votes
1 answer
Cypress: Cannot create property 'errors' on string
I created a sample project and the URL I wish to navigate is https://www.nasa.gov/ but it fails with the error 'Cannot create property 'errors' on string ''... I was able to run this earlier but now all of a sudden, it is throwing this error..…

webghost
- 75
- 1
- 5
0
votes
2 answers
Is There any way to stop all the test cases (It's) in Nested describes if one of the test case is failing in Cypress
Is there any way to stop all nested describes in case one of the Iterations (Test case) is failing inside one of the nested describes
how to achieve this anyone have any idea
Example
Test
Describe 1
it() {}
Describe 1.1
It1()…

ksk
- 165
- 14
0
votes
0 answers
Execution error message is not getting populated in the cypress test runner while execution
I am new to cypress and was trying to execute a simple test case using cypress test runner in the electron browser. from the below code the last line(getSearchBox click) is not correct as I have provided the wrong xpath intentionally. But I am…

Apratim Chaudhuri
- 11
- 1
- 6
0
votes
1 answer
Cypress is throwing this error when i try to use custom command: TypeError cy.login is not a function, does someone know how to fix this?
I am working on typescript project, i am trying to write some tests with cypress
I am getting this error: TypeError
cy.login is not a function Because this error occurred during a before each hook we are skipping the remaining tests in the current…
0
votes
2 answers
How to avoid uncaught exception from cypress
uncaught exception
I found below answer is solving the problem but as you know we no longer have support/index.js file with Cypress version 10 and higher.
import './commands'
Cypress.on('uncaught:exception', (err, runnable) => {
// returning false…

Mehmet Şirin Tarhan
- 21
- 4
0
votes
0 answers
Using this.skip with cypress-json-failed results in: TypeError: Cannot read properties of undefined (reading 'message')
I am attempting to use a global beforeeach() algorithm defined in support/e2e to filter tests. This code works.
beforeEach(function () {
var testSuite = new Array();
testSuite = (Cypress.env('suites'));
if (!testSuite) {
return;
}
const…

K.A.
- 81
- 1
- 3
0
votes
0 answers
How do we use numpad keyboard shortcut in cypress?
Im trying to use cypress to move to the next table box , meaning hitting keyboard shortcut (numpad + 1 ) move to the next table cell and keep moving to the other and other (as displayed in the attached image) ,
but I cant find any information…

K Name
- 1
- 1
0
votes
0 answers
how can QR async function code on a custom command in cypress
hi somebody can help me to create a custom command on cypress to use this async function
var jimp = require("jimp");
var qrCode = require('qrcode-reader');
var fs = require('fs')
var path = require("path")
const readQRCode = async (fileName) => {
…

Javier Joasimar Palos Flores
- 319
- 1
- 2
- 7
0
votes
0 answers
How to Exclude few specs from running from Cypress run command but should be able to run via import command from other spec
How to exclude certain specs to be run in the folder when npx cypress run is executed
for example please see the image
I don't want to execute my spec which is in Marketing/Sales/sc1111.spec.ts but at the same time I want it to execute via the…

ksk
- 165
- 14
0
votes
0 answers
How Nested test execute in parallalization in Cypress
if I have nested describes
describe('Desc1', () => {
describe('Desc1.1', () => {
});
describe('Desc1.2', () => {
});
});
then when I run it in parallelization
is the Desc1, Desc 1.1, and Desc 1.2 will be distributed to machines or will…

ksk
- 165
- 14
0
votes
2 answers
How to Run List of random multiple test cases in Cypress and how to make command string shorten
Lets say i have 300 test cases and among them 100 are failing now i want to run those 100 test cases again (Note: i have even rerun the cypress test cases with appropriate option and it even run the test cases for finding flaky test cases)
Now i…

ksk
- 165
- 14
0
votes
1 answer
How to add before:spec hook in cypress cucumber framework
getListOfPlans() {
return new Cypress.Promise((resolve) => {
usersUtil.getCurrentCompany().then((company) => {
cy.request({
method: 'GET',
url:…

Laxmi
- 13
- 5
0
votes
2 answers
Using Cypress drop down I am trying to select any of the option . Is there any idea how can I do that?
I am trying to do it with a select method

Shahbaz Ali Khan
- 25
- 8
0
votes
1 answer
How to mock login on Cypress : Login : Disabled cookies error
Im trying to write a script to login on this web site https://www.decathlon.ca/en/
but after the login i have this error Disabled cookies (look to the image)
And this is my code :
import HomePage from…

FlutterLover
- 597
- 1
- 11
- 21