diff --git a/cypress/fixtures/passenger_data.json b/cypress/fixtures/passenger_data.json index 47045a0..4d75419 100644 --- a/cypress/fixtures/passenger_data.json +++ b/cypress/fixtures/passenger_data.json @@ -1,12 +1,12 @@ { "TRAIN_NO": "12559", "TRAIN_COACH": "SL", - "TRAVEL_DATE": "18/04/2024", + "TRAVEL_DATE": "18/05/2024", "SOURCE_STATION": "BSBS", "BOARDING_STATION": null, "DESTINATION_STATION": "NDLS", "TATKAL": false, - "PREMIUM_TATKAL": true, + "PREMIUM_TATKAL": false, "UPI_ID_CONFIG": "", "PASSENGER_DETAILS": [ { @@ -15,6 +15,13 @@ "GENDER": "Male", "SEAT": "No Preference", "FOOD": "No Food" + }, + { + "NAME": "Random name", + "AGE": 26, + "GENDER": "Female", + "SEAT": "No Preference", + "FOOD": "No Food" } ], "__valid_coaches__": "SL | 2A | 3A | 3E | 1A | CC | EC | 2S", diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 65ff415..a05244d 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -61,7 +61,7 @@ function performLogin(LOGGED_IN) { cy.get('.captcha-img').invoke('attr', 'src').then((value) => { // api call to retrieve captcha value - cy.exec(`python3 irctc-captcha-solver/app.py "${value}"`).then((result) => { + cy.exec(`python irctc-captcha-solver/app.py "${value}"`).then((result) => { cy.get('#captcha').clear().type(result.stdout).type('{enter}'); // cy.contains('SIGN IN').click() @@ -155,7 +155,7 @@ function solveCaptcha() { // get captcha value base64 starts--------- cy.get('.captcha-img').invoke('attr', 'src').then((value) => { // api call to retrieve captcha value - cy.exec(`python3 irctc-captcha-solver/app.py "${value}"`).then((result) => { + cy.exec(`python irctc-captcha-solver/app.py "${value}"`).then((result) => { cy.get('#captcha').clear().type(result.stdout).type('{enter}') cy.get('body').then((el) => { diff --git a/readme.md b/readme.md index 12bd6d5..7c827ba 100644 --- a/readme.md +++ b/readme.md @@ -34,9 +34,10 @@ ## Features it has right now? -- ✓ Can book **Tatkal** and **Normal Tickets** as well. +- ✓ Can book **Tatkal**, **Premium Tatkal** and **Normal Tickets** as well. - ✓ Can book tickets for you if you open even **2-3 minutes** before tatkal time. - ✓ Signing in with your **username** and **password**. +- ✓ **Auto Upgradation Enabled**. - ✓ Filling Captchas and retrying untill success. - ✓ Support for **Food Choices**, **Seats Preferences**. - ✓ Will Book only if confirm berths are alloted. @@ -57,6 +58,10 @@ +> [!NOTE] +> ``` +> At a time either Tatkal Or Premium Tatkal can be -> true <- not both. +> ``` ``` { "TRAIN_NO": "12318", @@ -66,6 +71,7 @@ "BOARDING_STATION": null, <-- Change to full station name if required, else leave null "DESTINATION_STATION": "BSB", "TATKAL": true, + "PREMIUM_TATKAL": false, "UPI_ID_CONFIG": "", "PASSENGER_DETAILS": [ { @@ -103,6 +109,7 @@ "BOARDING_STATION": null, <-- Change to full station name if required, else leave null "DESTINATION_STATION": "BSB", "TATKAL": true, + "PREMIUM_TATKAL": false, "UPI_ID_CONFIG": "", "PASSENGER_DETAILS": [ { @@ -171,15 +178,15 @@ npm -v # should print `10.5.0` ``` -### After NodeJs and Npm Installation, its time for you to install python and pip3 on your system. +### After NodeJs and Npm Installation, its time for you to install python and pip on your system. ### After Python Installation Follow Below Steps....... -##### In Case You Want To Install Pip3 here's the command to install in Linux +##### In Case You Want To Install Pip here's the command to install in Linux ```sudo apt-get install python3-pip -y``` -#### After Pip3 Installation you can install all requirements by pasting below command. +#### After Pip Installation you can install all requirements by pasting below command. ``` -pip3 install -r irctc-captcha-solver/requirements.txt # <---- Make Sure You Run This Command From Code Folder. +pip install -r irctc-captcha-solver/requirements.txt # <---- Make Sure You Run This Command From Code Folder. ``` #### Check If Everything Works Fine....