abramenal / cypress-shadow-dom

Extend Cypress commands with shadow DOM support
https://npm.im/cypress-shadow-dom
MIT License
49 stars 8 forks source link

shadowEq method enhancement #42

Closed mksjha closed 4 years ago

mksjha commented 4 years ago

Current behavior:

shadowEq returns the nth element from found shadow DOM collection

Desired behavior:

Could we please have option to pass text in shadoweq method so it will return the element having that text from collection? We are using this method to select data from dropdown, If some value is added or deleted from dropdown collection, test fails as it is unable to find that option in that position. If we can select value of dropdown by passing text, it will always find tat option and addition/deletion dropdown data will not cause test failure.

Versions

abramenal commented 4 years ago

Hi @mksjha Thanks for submitting the issue. You can use shadowContains for that.