如何比较赛普拉斯中两个元素列表的文本值?

问题描述

我有这样的代码:

let firstUserPrices

cy.get('.fw-price').each($value => {
    firstUserPrices = $value.text()
})

let secondUserPrices
cy.get('.fw-price').each($value => {
    secondUserPrices = $value.text()
    expect(firstUserPrices,'PRICES').to.equal(secondUserPrices)
})

cy.get('。fw-price')有10个元素,我想一一比较。但是我得到的是firstUserPrices(它是最后一个值形式列表)的10倍相同的值吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)