https://cypress.io logo
Hello All! I have the dropdown list as below in t...
# e2e-testing
r
Hello All! I have the dropdown list as below in the image. To select the option from the list I have my code as below:
Copy code
cy.dataCy('billingAccount').find('p-dropdown').click().then(opt => {
    cy.wrap(opt).children().children().find('li').contains('BA969048 -  - Nauenstrasse  55,  4052  Basel,  Switzerland').click()
  })
cy.dataCy('billingAccount').find('span').should('contain', 'BA969048 -  - Nauenstrasse  55,  4052  Basel,  Switzerland')
My code works perfectly but the problem is the option is not getting patched after the
click()
event happens so my last line code failed. Your help is highly appreciated. Thank you