元素定位
元素定位方式 | ||
通过id定位 | cy.get('#user_login') | |
通过class定位 | cy.get('.user_login') |
|
通过父元素的id、class加当前元素进行定位 | cy.get('#querying .well>button:first') |
|
通过其他元素定位 | cy.get('input[name=commit]') | |
cy.get()生成一个jQuery对象,可以通过invoke获取其属性值 |
cy.get('[data-test-id="test-example"]') cy.get('[data-test-id="test-example&# |