【发布时间】:2021-10-27 22:34:34
【问题描述】:
我有一个十六进制的背景颜色。但是当我在 cypress 中测试时,它给了我一个错误。并在错误中显示其他颜色。但我提供了正确的颜色。 我的代码如下:
it('color', () => {
cy.get(':nth-child(5) > .example-button-row > :nth-child(1)')
.should('exist')
.should('have.css', 'background-color')
.and('eq', '#0da2ff');
});
【问题讨论】: