Cypress.mocha.getRunner().suite.ctx.currentTest.commands; Not Working

Viewed 15

CONTEXT: I use cypress 8.7.0. and on support/commands.js I have a function than get the commands foreach execution using Cypress.mocha.getRunner().suite.ctx.currentTest.commands;

| function in support/commands.js enter image description here

| Result: enter image description here

This work succesfull when execute the commands from "cypress open" and run test since UI of cypress. But failed when use commands "cyress run" return undefined.

I search understand why not working both ways.

0 Answers
Related