Skip to content

Select an element with shared properties on same page #14176

Discussion options

You must be logged in to vote

You can try selecting the first select of the elements found

cy.get('select[name="WRQSperiod"]').first().select('YTD')
// or
cy.get('select[name="WRQSperiod"]').eq(0).select('YTD')

Or by specifying the css value

cy.get('select[name="WRQSperiod"][css="1"]').eq(0).select('YTD')

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@AutomationDevCypress
Comment options

Answer selected by AutomationDevCypress
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants