I’m working on creating a UI test script for my company’s website, which our merchants use for deposit, withdraw, and transfer operations between customers. I’m using Cypress for testing, but I’m running into some issues with my current script. The amount I am using to enter via type command , cypress runner is no accepting.
For example If I am passing value 5678, Runner is entering random value like 7856 in amount field
screenshot is attached. Compare the values between code and UI
enter image description here
// For transfer cy.get('#wallet-transfer-transfer-funds-input-to-wallet').should('be.visible', {timeout: 4000}).click({force: true});
cy.get('#wallet-transfer-transfer-funds-input-to-wallet_13').click({force: true}); cy.get('#wallet-transfer-transfer-funds-input-from-bank-merchant').should('be.visible', {timeout: 4000}).click({force: true});
cy.get('#wallet-transfer-transfer-funds-input-from-bank-merchant_12').click({force: true});
# cy.get('#wallet-transfer-transfer-funds-input-amount').type('5678');
cy.get('#wallet-transfer-transfer-funds-input-description').type('cypressautomation').click({force: true});
cy.get('#wallet-transfer-transfer-funds-button-complete').click({force: true});
cy.get('button[type="button"]').contains('OK').click({force: true});
// cy.get('#wallet-transfer-transfer-funds-button-cancel').click({force: true});
The type command is working as expected to the other web pages when testing the amount field.
Pooja Patel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.