如果想从头学起Cypress,可以看下面的系列文章哦
https://www.cnblogs.com/poloyy/category/1768839.html
返回测试文件的属性
Cypress.spec
包含了五个属性
这个命令感觉有点奇怪,为啥这样说呢,如果我代码实现这样的话会循环执行很多次,我也不知道为啥,有大佬知道吗
cy.wrap(Cypress.spec).should((obj) => {
console.log(obj)
expect(obj).to.have.property('name', 'chrome')
expect(obj).to.have.property('absolute', "C:/Users/user/Desktop/py/MyCypress/cypress/integration/22_CypressAPI/8_Cypress.spec.js")
expect(obj).to.have.property('relative', "cypress\\integration\\22_CypressAPI\\8_Cypress.spec.js")
expect(obj).to.have.property('specType', "integration")
})
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有