<div class="MuiFormControl-root MuiTextField-root MuiFormControl-fullWidth" data-testid="timezone-input"> <div class="MuiInputBase-root MuiInput-root MuiInputBase-fullWidth MuiInput-fullWidth MuiInputBase-formControl MuiInput-formControl"> <div class="MuiSelect-root MuiSelect-select MuiSelect-selectMenu MuiInputBase-input MuiInput-input MuiInputBase-inputSelect" tabindex="0" role="button" aria-haspopup="listbox">Europe/London</div> <input type="hidden" value="Europe/London"> <svg class="MuiSvgIcon-root MuiSelect-icon" focusable="false" viewBox="0 0 24 24" aria-hidden="true" role="presentation"><path d="M7 10l5 5 5-5z"></path></svg></div></div> How do I extract the value from the listbox using cypress? I used the following code
cy.get('[data-testid="timezone-input"] div div').invoke("val").should("eq", "Europe/London"); but i get CypressError: Timed out retrying: expected '' to equal 'Europe/London