📜  cypress 命令将值返回到变量中 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:13.461000             🧑  作者: Mango

代码示例2
// Adding the command
function foo() {
  return cy.wrap('foo');
}
Cypress.Commands.add('foo', foo);

//Using the command
cy.foo().then(value => console.log(value)); // foo