元素:
我如何识别:
cy.get("输入[占位符= What's this article about?
]").type("<3");
错误:
语法错误,无法识别的表达式:input[placeholder=这篇文章是关于什么的?]
最佳答案
尝试这个:
cy.get("input[placeholder=\"What's this article about?\"]").type("<3");
或者使用较少的转义字符:cy.get('input[placeholder="What\'s this article about?"]').type("<3");
关于javascript - Cypress 无法识别我试图通过占位符查找的元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69462391/