Here is a nifty trick: get from the document a form elements object and set multiple input values at once.
cy.document()
.its('forms.personal-info.elements')
.then(function (elements) {
elements['first-name'].value = 'Joe'
elements['last-name'].value = 'Smith'
elements.city.value = 'Boston'
})
For more, see the "Form recipes" at https://glebbahmutov.com/cypress-exam...
Watch video Set Multiple Input Fields Inside A Form At Once online without registration, duration hours minute second in high quality. This video was added by user gleb bahmutov 15 June 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 3,543 once and liked it 28 people.