1. get定位
- id定位
- class定位
- CSS selector定位
- 其他属性定位
// 以上方的图片中的button按钮为例
// 通过id定位
cy.get('#query-btn').should('contain', 'Button')
// 通过class定位
cy.get('.query-btn').should('contain', 'Button')
// 通过父元素的id、class加当前元素进行定位
cy.get('#querying .well>button:first').should('contain', 'Button')
// 通过其他属性定位
cy.get('[data-test-id="test-example"]').should('have.class', 'example')
// cy.get()生成一个jQuery对象,可以通过invoke获取其属性值
cy.get('[data-