Select <input> by its label · Issue #8213 · cypress-io/cypress

PHOTO EMBED

Wed Oct 06 2021 12:07:44 GMT+0000 (UTC)

Saved by @ndowkunda

cy
.get('form')
.contains('label', 'Name')
.parent()
.find('input')
.invoke('val', 'Some value')
content_copyCOPY

https://github.com/cypress-io/cypress/issues/8213