【发布时间】:2019-07-21 13:50:40
【问题描述】:
下面是我需要“SIP”数据“37046654”的 Excel
enter image description here enter image description here
我尝试了下面的 cypress 代码,但它失败了,因为它需要 excel-sheet 中的所有数据
赛普拉斯代码:
describe('API Testing with Cypress', () => {
it('Validate the header', () => {
responsebodydata = cy.readFile('C:/Users/backNew.csv').should('eq','37046654')
cy.log (responsebodydata)
})
})
断言结果:通过以下输出超时失败:
预计 'SIP\tAsset Class\tSector\tObservations\tCDP Proximity\r\n37046789\tUP1G\tRetail\t1\t100\r\n37046654\tUG8G\tRetail\t1\t0' 等于 '37046ADD'
谁能告诉我如何获取/检查“37046654”是否存在于 excel 表中
【问题讨论】:
-
您应该将表格发布为文本。
-
能否请您提供一些代码示例作为示例,以帮助我理解。
-
文本格式的表格:SIP ASSERT CLASS Sector Observation CDP Proximity 37046789 UP1G Retails 1 100 37046654 UG8G Retail 1 1(表格也在问题的图片中添加)
-
嘿@SmrutiranjanaRay。对你有帮助吗?
-
@Yevhen,应用程序已关闭,我会检查并更新
标签: cypress