如果我有 HTML:
<select name="subject" data-testid="contact-us-subject-field">
<option value="What is this regarding?">What is this regarding?</option>
<option value="Partnerships">Partnerships</option>
<option value="Careers">Careers</option>
<option value="Press">Press</option>
<option value="Other">Other</option>
</select>
选择一个具有已知价值的选项,比如“职业”,就像下面这样简单:
cy.get('[data-testid="contact-us-subject-field"]').select('Careers');
如何选择该字段中的第 n 个选项,即它的值的 无论如何?