From 4595dab1212f16d501fc24828c5002c854a1281f Mon Sep 17 00:00:00 2001 From: Shivam Pandey Date: Sun, 21 Apr 2024 11:54:18 +0530 Subject: [PATCH] case for Unable to process current transaction added --- cypress/support/commands.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/cypress/support/commands.js b/cypress/support/commands.js index a05244d..1f08df9 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -114,7 +114,7 @@ function performLogin(LOGGED_IN) { } -let MAX_ATTEMPT = 100 +let MAX_ATTEMPT = 120 // function to solveCaptcha after logging in @@ -127,6 +127,15 @@ function solveCaptcha() { cy.wait(500) cy.get('body').should('be.visible').then((el) => { + + if (el[0].innerText.includes('Unable to process current transaction') && el[0].innerText.includes('Payment Mode')) { + + cy.task("log", "Unable to process current transaction...") + cy.get('.train_Search').click() + cy.wait(1000) + + } + if (el[0].innerText.includes('Payment Methods')) { cy.task("log", "CAPTCHA .... SOLVED")