mercredi 18 mars 2020

Cypress doesn't select the desired option from Select element in angular

In my automation testing project I need to select option from a select element. I'm doing this with cypress and it's Angular project

I'm new to cypress and I did exactly what the documentation states

Here's my select with cypress

cy.get("#myElement").select(myOptionValue)

Here's the html

enter image description here

it didn't work. is there any workaround or any way I can do it. I didn't found any solution online

side note: when I run the test it looks like it selects it and then it returns back to the default one. maybe this is an issue with the angular code?

Aucun commentaire:

Enregistrer un commentaire