Giter Site home page Giter Site logo

shivamguys / irctc-cypress-automation Goto Github PK

View Code? Open in Web Editor NEW
79.0 2.0 112.0 191.12 MB

Tatkal and Normal train Booking Automation in 1 Minute ✔️ Signing in with your username and password. ✔️ Auto Upgradation Enabled. ✔️ Filling Captchas and retrying untill success. ✔️ Support for Food Choices, Seats Preferences. ✔️ Payment Gateway Automation (Paying With UPI ID OR QR Code).

JavaScript 94.56% Python 5.44%
irctc irctc-hacks tatkal trains indian indianrail indianrailways railways train irctc-website-replica

irctc-cypress-automation's Introduction

Hi👋 Folks Great To See You Here.

profile views

Connect with me:

linkedin "Buy Me A Coffee"



About me:

Passionate About Entrepreneurship And ❤️ Solving Problems.

Professional development experience in the Fintech Industry, System Building, API Development, Backend Development, FrontEnd Development, PWA’s, Scalable Codes

Most used languages

status









My Life's Collection ❤️

status

Skills:

Cypress JavaScript Git PYTHON VUE FLASK AWS MYSQL LINUX

Badges

My GitHub Stats

abhishek3100's GitHub stats

"Buy Me A Coffee"

irctc-cypress-automation's People

Contributors

shivamguys avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

irctc-cypress-automation's Issues

not doing anything after this screen

The tool becomes unresponsive when the pop-up of the last transaction details appears on the screen, preventing it from performing operations effectively.
Screenshot 2024-05-21 034742

captcha_error

while running the code i get cy.request() failed trying to load: and Error: connect ECONNREFUSED 127.0.0.1:5000
As you said -- BASE_URL is the local python server which you will run is responsible for filling captchas for you.
can you guide me how to find BASE_URL

Failed to fill username and password

Describe the bug
The script failed to input the username and password , there was an ad showing near to the username and password textboxes. tried running it multiple times, got the same issue

branch : main
commit id : e80d3d4f4bf47db10b9d29e4ea237f4b41c94f6e

If you are encountering any error please run this
npx cypress open

Screenshots
image

Desktop (please complete the following information):

  • OS: iOS
  • Browser : Chrome
  • Version Version 124.0.6367.91 (Official Build) (arm64)

Additional context

Error While inputting the Passenger name

I 'm testing for with manaul captcha and Tatkal False,
Evrything is going fine, while on the Pasenger Details it stop there.

irctc error

Console Log:

Uncaught ReferenceError: irctc is not defined
    <anonymous> https://cdn.jsdelivr.net/gh/corover/assets@t60/askdisha-bucket/chatbot_IRCTC_V2.js?1705573011708:1781
    invokeTask https://www.irctc.co.in/nget/polyfills-es2015.a8f29f173d5f450a625f.js:1
    runTask https://www.irctc.co.in/nget/polyfills-es2015.a8f29f173d5f450a625f.js:1
    invokeTask https://www.irctc.co.in/nget/polyfills-es2015.a8f29f173d5f450a625f.js:1
    invoke https://www.irctc.co.in/nget/polyfills-es2015.a8f29f173d5f450a625f.js:1
    0 https://www.irctc.co.in/nget/polyfills-es2015.a8f29f173d5f450a625f.js:1
    o https://www.irctc.co.in/nget/train-search:3
    i https://www.irctc.co.in/nget/train-search:3
153 chatbot_IRCTC_V2.js:1781:9

[Issue] Passenger name Update page stopped

When I tried before the tatkal timing , the passenger name filling was good, During the tatkal time the name are not filled.
So I entered names manually when the payment was done with paytm , the page should show booked or not booked , but it was redirected previous page.

Kindly check the script again.

unable to run the script

Hi,
The terminal continue to show blank screen and the script does not look like doing anything when i run the script. Attaching the screenshot of terminal.
i have all the pre-requisites installed and added GOOGLE_APPLICATION_CREDENTIALS as well.
Any idea what might be wrong?

Screen Shot 2023-12-06 at 3 28 22 PM

Thanks
Praveen

Need more info about GOOGLE_APPLICATION_CREDENTIALS

It would be better if more specific information is given about the GOOGLE_APPLICATION_CREDENTIALS. The doubt that I have is.

  • When I try to generate key for a serviceaccount in gcp IAM. saw 2 key formats. json and p12. which one should I use
  • A brief step by step instruction to created the application credential would be really great
  • When I set the GOOGLE_APPLICATION_CREDENTIALS the path to the 2 formats . and run the test . I got error in app.py
 * Serving Flask app 'app'
 * Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on http://127.0.0.1:5000
Press CTRL+C to quit
[2023-12-19 23:36:06,961] ERROR in app: Exception on /getCaptchaToText [GET]
Traceback (most recent call last):
  File "/home/jabir/.local/lib/python3.10/site-packages/flask/app.py", line 1455, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/jabir/.local/lib/python3.10/site-packages/flask/app.py", line 869, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/jabir/.local/lib/python3.10/site-packages/flask/app.py", line 867, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/jabir/.local/lib/python3.10/site-packages/flask/app.py", line 852, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/home/jabir/JAB/irctc-cypress-automation/irctc-captcha-solve-server/app.py", line 13, in getCaptchaToText
    proc = subprocess.Popen(
  File "/usr/lib/python3.10/subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'python'
127.0.0.1 - - [19/Dec/2023 23:36:06] "GET /getCaptchaToText?base64_image=data:image/jpg;base64,iVBORw0KGgoAAAANSUhEUgAAAMsAAAAyCAYAAADyZi/iAAAGaUlEQVR42u1db2RdSRSviHhihYp4YsUSVRWxlqiKigqrnngiQlU+1KpH1Iq1aomqFVEl1qqqFdZ+WPsh8mVFRUWpqFpRS0SstSKsiIqqEhERTzzenuFczh5z7537L7l57/fjaOXOnDtz7/xmzjlz5r4LFwAAAAAAAAAAAAAAAAAAAAAAqNfrXSRjJN+TLJK8IdknqZKc8L97JL+T3CfpxlMDkgy4/+E8t90BNZInJAW8eQBkccM6SWfKbblC8g3JAskGyaFY4Y5I/uUVbobkOkYeyHJ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c+rVl26PtTkCVnZGG9OjfsnkOdSlaJlMIM+Uepv+9TdkyGmF1XioAd/CWfTVKz0n2ljgEYE+tmSF9+UXp+CinfbUtUBQPyQRZb1vFQQPkh5TCHOcErUQ5gcbLjquUYb4dP+VbVniGfcl2WiSEI34Vcfx/0nMR9S9r38js+wIRcy3IiAlmS6/Y9zyLK9PPfaiLR0YUs8kMPs5xPVZSRKx7IZd5pt6X/l0PaL/2HNyGz9luH3LSvbc9cTCZzESOHOunUBAbueh/L4MhiRZB5AWRJkSxxETDrbkVQs2M5KVnLoN1mxbjt8Gwuq3oTIeUnxHmWGhPEdp7FrAIHJkmSzanbUT94wXpuROjzBmcxgCx5JIsgzLLjGfwuS5uOU2x3jT+Q0Rvh+cwrs603Z+9vVH1Iw4aX3ooFsuSYLGoWXOAz7DWWdzx4S6Jcu7bhA3yQcd7AW2Sb/EDsP1TZtFnn+07G+TA4mzK7avXrztk77OZI2obwsw54lRs5LbMbOP0XX1bvcykHbbqqnH1D8it4W8BZD8x5RZaZHJk7dbUPMplQZwv/FMZyHJ8FaG6iXNZpHH7pHmfUvhFLVM2YPqMR9bRylGoryadkgcYjwHMXp5i/6bWrBuJaDvvzuU+Ez/uS/y3++Yk2Ucc7hHaX/atjS3TuHkYLyOJhmUOkveInIQo8Wz/Taf28wvTntE8F3tupphAbeV7HB8EBW/QlQoj31jnoW5GjcXsR+2cmgt/yZGIC55Msm37fysp5P69zxvQSh5ePeOWpchj3FQcvxlzPvgDNR5YeThT8lfO59tlGlwNplTNih/DEAAAAAAAAAAAAAAAAgFD8B9fBbwuncoOeAAAAAElFTkSuQmCC HTTP/1.1" 500 -

Error 403

type403 Your application is authenticating by using local Application Default Credentials. The vision.googleapis.com API requires a quota project, which is not set by default. To learn how to set your quota project, see https://cloud.google.com/docs/authentication/adc-troubleshooting/user-creds . [reason: "SERVICE_DISABLED"
domain: "googleapis.com"
metadata {
key: "service"
value: "vision.googleapis.com"
}
metadata {
key: "consumer"
value: "projects/764086051850"
}
]

Need to handle "Booking has not started" even after its talkal time

Sometimes the script fails to handle the case of "Booking has not started" message coming from IRCTC website after 10.00 am or 11.am in such cases we can sleep for some time or check whether the book button is active and click on it while it is active. right now it is not handled

Stuck at npm install

On windows process is stuck on reify:rxjs: timing reifyNode:node_modules/lodash Completed in 2284ms
It doesn't go beyond this. Latest npm is installed.
Any help?

Empty window is opened while running "npx cypress open"

Empty window is opened while running "npx cypress open"

I am using a debian 12 (bookworm) machine vm in vmware and everything is set up.
But after running the npx cypress open a window is opened. But it is completely blank.
Also in the running terminal there is no error.

2024-02-20 16_46_24-Debian 11 x 64-bit osbox - VMware Workstation

Cypress configuration error

I'm installed this in WIndows Machine.
I'm gettign an error

Error

cypress
irctc-cypress-automation-main
[v13.6.3](https://on.cypress.io/changelog#13-6-3)

Docs

Log in
Cypress configuration error
Try again
Error
Your configFile is invalid: C:\Users\Siddharth\Downloads\irctc-cypress-automation-main\cypress.config.js

It threw an error when required, check the stack trace below:

cypress.config.js:1:26
> 1 | const { defineConfig } = require("cypress");
    |                          ^
  2 | 
  3 | module.exports = defineConfig({
  4 |   defaultCommandTimeout: 120000,
  5 | 
[Stack trace](http://localhost:49783/__launchpad/index.html#)
Error: Cannot find module 'cypress'
Require stack:
- C:\Users\Siddharth\Downloads\irctc-cypress-automation-main\cypress.config.js
- C:\Users\Siddharth\AppData\Local\Cypress\Cache\13.6.3\Cypress\resources\app\node_modules\@packages\server\lib\plugins\child\run_require_async_child.js
- C:\Users\Siddharth\AppData\Local\Cypress\Cache\13.6.3\Cypress\resources\app\node_modules\@packages\server\lib\plugins\child\require_async_child.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1149:15)
    at Module._load (node:internal/modules/cjs/loader:990:27)
    at Module.require (node:internal/modules/cjs/loader:1237:19)
    at require (node:internal/modules/helpers:176:18)
    at Object. (C:\Users\Siddharth\Downloads\irctc-cypress-automation-main\cypress.config.js:1:26)
    at Module._compile (node:internal/modules/cjs/loader:1378:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1437:10)
    at Module.load (node:internal/modules/cjs/loader:1212:32)
    at Module._load (node:internal/modules/cjs/loader:1028:12)
    at Module.require (node:internal/modules/cjs/loader:1237:19)
    at require (node:internal/modules/helpers:176:18)
    at loadFile (C:\Users\Siddharth\AppData\Local\Cypress\Cache\13.6.3\Cypress\resources\app\node_modules\@packages\server\lib\plugins\child\run_require_async_child.js:89:14)
    at EventEmitter. (C:\Users\Siddharth\AppData\Local\Cypress\Cache\13.6.3\Cypress\resources\app\node_modules\@packages\server\lib\plugins\child\run_require_async_child.js:116:38)
    at EventEmitter.emit (node:events:519:28)
    at process. (C:\Users\Siddharth\AppData\Local\Cypress\Cache\13.6.3\Cypress\resources\app\node_modules\@packages\server\lib\plugins\util.js:33:22)
    at process.emit (node:events:519:28)
    ```

Workflow Issues [ECONNREFUSED] Sometimes | Weird Issues By Cypress

cy.visit() failed trying to load:

https://www.irctc.co.in/nget/train-search

We attempted to make an http request to this URL but the request failed without a response.

We received this error at the network level:

Error: connect ECONNREFUSED 103.252.142.18:443

Common situations why this would fail:

you don't have internet access
you forgot to run / boot your web server
your web server isn't accessible
you have weird network configuration settings on your computer

Auto fill Credentials

Describe the bug
A clear and concise description of what the bug is.

The username and password is not filling automatically, i tried several times but it's not working

Desktop (please complete the following information):

  • OS: MacOS
  • Browser Chrome
  • Version 123.0.6312.107

Received a error when captcha was sloved

Describe the bug
A clear and concise description of what the bug is.
Python install properly even python irctc-captcha-solver/app.py "" this comment was run successfully .
i got a error

Screenshots
Screenshot 2024-04-30 at 7 26 07 AM
Uploading Screenshot 2024-04-30 at 7.26.38 AM.png…

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
can you explain about this issue

Continued to refresh QR code after payment done

Payment was successful by QR code but still it was refreshing new QR code. Waited for a minute then I closed cypress. Ticket not booked it says.

(other)POST 200 https://securegw.paytm.in/theia/processTransaction?orderid=1000048842xxxxx
payment
(new url)https://securegw.paytm.in/theia/processTransaction?orderid=1000048842xxxxx
logObject{10}
(uncaught exception)TypeError: Cannot read properties of null (reading 'postMessage')

getting error ECONNRESET

DevTools listening on ws://127.0.0.1:56418/devtools/browser/27eb5ca5-29da-4b0f-b1ec-ea934c472377
read ECONNRESET
Error: read ECONNRESET
at TCP.onStreamRead (node:internal/stream_base_commons:217:20)
GET // 200 3.273 ms - -
GET /
/assets/polyfills-93a39af8.js 200 10.452 ms - -
GET //assets/index-90d5d7af.css 200 1.222 ms - -
GET /
/assets/index-78a2c835.js 200 0.781 ms - -
GET /cypress/runner/cypress_runner.css 200 1.008 ms - -
GET /
/assets/route-block-c0a8bdd8.js 200 3.012 ms - 45
GET //assets/Specs-d562a506.js 200 2.475 ms - 523
GET /
/assets/InlineCodeFragment-c3583692.css 200 1.317 ms - 315
GET //assets/Index-406849ca.js 200 1.841 ms - -
GET /
/assets/Index-401d105a.css 200 1.029 ms - -
GET //assets/TrackedBanner.vue_vue_type_script_setup_true_lang-641f8fc9.js 200 2.024 ms - -
GET /
/assets/box-open_x48-87a12f2c.js 200 1.273 ms - -
GET //assets/InlineCodeFragment.vue_vue_type_script_setup_true_lang-15b1a13a.js 200 1.744 ms - -
GET /
/assets/graphql-3e44b6e0.js 200 1.978 ms - 535
GET //assets/SpecPatterns.vue_vue_type_script_setup_true_lang-697049e1.js 200 2.093 ms - -
GET /
/assets/SpecNameDisplay.vue_vue_type_script_setup_true_lang-e93f37a8.js 200 1.795 ms - -
GET //assets/PromoHeader.vue_vue_type_script_setup_true_lang-abc0768d.js 200 3.417 ms - -
GET /
/assets/settings_x16-17324ee1.js 200 3.202 ms - -
GET //assets/cypress_s-29af549a.png 200 0.828 ms - 4425
GET /cypress/runner/cypress_runner.js 200 1.492 ms - -
GET //assets/electron-fb07f5cc.svg 200 1.904 ms - -
GET /
/assets/chrome-98045c79.svg 200 1.431 ms - -
GET /__/assets/edge-e54a3dc2.svg 200 1.283 ms - -

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.