-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
select('value') cannot contain round bracket ( ) as value #16045
Comments
Can you give us a reproducible example? I tested with the code below, but it works without fail. <select>
<option value="456">apples</option>
<option value="457 (x)">oranges</option>
<option value="458">bananas</option>
<option value="Lorem (Ipsum)">Lorem</option>
</select> it('x', () => {
cy.visit('index.html')
cy.get('select').select('Lorem (Ipsum)')
}) |
Code snippet below <select name="valueDropDown">
<option value="111 Lorem (Ipsum)">111 Lorem (Ipsum)</option>
</select> Coding using Page object pattern getDropDown() { return cy.get('select#valueDropDown'); }
selectDropDownValue(value) {
this.getDropDown().select(value);
} Test Case Code pageCode.selectDropDownValue('111 Lorem (Ipsum)'); |
Confirmed that it doesn't work. <select>
<option value="456">apples</option>
<option value="457 (x)">oranges</option>
<option value="458">bananas</option>
<option value="111 Lorem (Ipsum)">111 Lorem (Ipsum)</option>
</select> it('x', () => {
cy.visit('index.html')
cy.get('select').select('111 Lorem (Ipsum)')
}) |
It can be solved by changing cy.get('select').select('111\u00a0Lorem (Ipsum)') |
The code for this is done in cypress-io/cypress#16196, but has yet to be released. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior
select() are not able to find and select value with round bracket ( ). Example value: lorem (lorem)
Desired behavior
select() should be able to find and select value with any special characters
Test code to reproduce
cy.get('select#dropdownelement').select('Lorem (ipsum)');
Versions
7.1.0
Note
Had tested it with no round bracket ( ) and is able to select the desired value
The text was updated successfully, but these errors were encountered: