0
votes

Using Cypress, I want to automate clicking a "Yes" button in a confirmation dialogue box "Yes".

I want to:

  1. Check the button changes color when you hover over the mouse button;
  2. When you click the "Yes" button, check for another confirmation box.
1
Welcome to SO. Please add some of your code and as well some images that we see how far you are already.kwoxer
it('Verify login Succesffully', function() { cy.get('#inputEmail').type("[email protected]") cy.get('#inputPassword').type("test") cy.get('#kt_login_signin_submit').click() })Altaqaf

1 Answers

0
votes
  1. Cypress doesn't support the hover effect as of now https://docs.cypress.io/api/commands/hover.html#Workarounds
  2. You can perform a cy.contains('Yes').click() followed by a cy.contains('Confirmation message'); to first press on the yes button then check for a confirmation message.