diff --git a/cypress/e2e/irctc.cy.js b/cypress/e2e/irctc.cy.js index f49ba6b..817b366 100644 --- a/cypress/e2e/irctc.cy.js +++ b/cypress/e2e/irctc.cy.js @@ -19,12 +19,12 @@ describe('IRCTC TATKAL BOOKING', () => { // from station - cy.get('.ui-autocomplete > .ng-tns-c57-8').should('be.visible').type(SOURCE_STATION) + cy.get('.ui-autocomplete > .ng-tns-c57-8').should('be.visible').type(SOURCE_STATION, { delay: 200 }) // cy.wait(600) cy.get('#p-highlighted-option').should('be.visible').click() // to station - cy.get('.ui-autocomplete > .ng-tns-c57-9').should('be.visible').type(DESTINATION_STATION) + cy.get('.ui-autocomplete > .ng-tns-c57-9').should('be.visible').type(DESTINATION_STATION, { delay: 200 }) // cy.wait(600) cy.get('#p-highlighted-option').should('be.visible').click() diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 664c752..1e77c19 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -144,6 +144,13 @@ function solveCaptcha() { }) } else { + if (el[0].innerText.includes('Payment Methods')) { + + cy.task("log", "CAPTCHA .... SOLVED") + solveCaptcha() + + } + // get captcha value base64 starts--------- cy.get('.captcha-img').invoke('attr', 'src').then((value) => { // api call to retrieve captcha value