【发布时间】:2021-09-25 05:37:33
【问题描述】:
我正在使用 cypress 来自动化表单。我已经添加了所有输入,但是当我单击“预订”按钮或表单内的任何按钮时,某些输入字段会被清除。由于这个问题,我无法提交此表单。有什么解决办法吗?
cy.xpath("//div[contains(@class,'specific-translator')]/div[2]/input").first().type('hira@translator.dt',{force: true})
cy.xpath("//span[contains(text(),'Klicka')]").first().click()
cy.xpath("//div[contains(@class,'specific-translator')]/div[2]/input").first().should('have.value','hira@translator.dt')
cy.pause(10)
cy.xpath("//span[text()=' Boka ']").first().click()
【问题讨论】:
标签: javascript testing automation cypress