小编khi*_*hiz的帖子

为什么 cypress 在 for 循环中只循环一次

为什么 cypress 在 for 循环中只循环一次?

测试代码是这样的:

cy.get('body').contains('Automation').each(($el, index) => {
  cy.get('body').contains('Automation').parents()
    .eq(1)
    .find('mfc-dropdown > div > mfc-button > button', { timeout: 6000 })
    .first()
    .click({ force: true });
  cy.get(this.DELETE_FILE_BUTTON).click();
  cy.get('.mfc-dialog-container')
    .find(this.CONFIRM_DELETE)
    .click({ force: true });
});
Run Code Online (Sandbox Code Playgroud)

automation typescript cypress cypress-each

1
推荐指数
1
解决办法
237
查看次数

标签 统计

automation ×1

cypress ×1

cypress-each ×1

typescript ×1