Git Product home page Git Product logo

irctc-filling-script's Introduction

IRCTC-Filling-Script

Add multiple bookmarks to ease your flow with specific clicks

To Add multiple passenger list just add new array element

To click add passenger

change travelling_passenger as per your need

travelling_passenger = 2;
while (travelling_passenger > 1) {
    document.getElementsByClassName('prenext')[1].click()
    // This will create new array values for more passenger example a[1] will exist now
    travelling_passenger--;
}
var a, b, c, d;
a = document.querySelectorAll("input[placeholder*='Name']"), b = document.querySelectorAll("input[placeholder*='Age']"), c = document.querySelectorAll("select[formcontrolname*='passengerGender']"), d = document.querySelectorAll("select[formcontrolname*='passengerBerthChoice']"), d1 = document.querySelectorAll("select[formcontrolname*='passengerFoodChoice']");
a[0] && (a[0].value = 'Shivam Pandey', a[0].dispatchEvent(new Event('input')));
b[0] && (b[0].value = '22', b[0].dispatchEvent(new Event('input')));
c[0] && (c[0].value = 'M', c[0].dispatchEvent(new Event('change')));

Eligible values

LB (Lower Birth)

MB (Middle Birth)

UB (Upper Birth)

SL (Side Lower)

SU (Side Upper)

d[0] && (d[0].value = 'UB', d[0].dispatchEvent(new Event('change')));


a[1] && (a[1].value = 'Rahul Pandey', a[1].dispatchEvent(new Event('input')));
b[1] && (b[1].value = '22', b[1].dispatchEvent(new Event('input')));
c[1] && (c[1].value = 'M', c[1].dispatchEvent(new Event('change')));
d[1] && (d[1].value = 'SL', d[1].dispatchEvent(new Event('change')));

Example to make payment through upi add this as bookmark value

javascript:
 document.getElementById('2').click();document.querySelectorAll("button[type='submit']")[1].click();

For Review Check @contributed by shivam_pandey

document.getElementById('credit_117').click();
document.getElementsByClassName('btn_continue ng-star-inserted')[0].click();

For final paytm booking @contributed by shivam_pandey

javascript:
document.getElementById('upi').value='8604949532@paytm';
document.querySelectorAll("button")[2].click();

From

document.querySelectorAll("input[placeholder='From*']")[0].value="GHAZIPUR CITY - GCT";
document.querySelectorAll("input[placeholder='From*']")[0].dispatchEvent(new Event('keydown'));
document.querySelectorAll("input[placeholder='From*']")[0].dispatchEvent(new Event('input'));

To

document.querySelectorAll("input[placeholder='To*']")[0].value="JALANDHAR CANT - JRC";
document.querySelectorAll("input[placeholder='To*']")[0].dispatchEvent(new Event('keydown'));
document.querySelectorAll("input[placeholder='To*']")[0].dispatchEvent(new Event('input'));

date

document.querySelectorAll("input[placeholder='Journey Date(dd-mm-yyyy)*']")[0].value="03-04-2020";
document.querySelectorAll("input[placeholder='Journey Date(dd-mm-yyyy)*']")[0].dispatchEvent(new Event('keydown'));
document.querySelectorAll("input[placeholder='Journey Date(dd-mm-yyyy)*']")[0].dispatchEvent(new Event('input'));

Find Train

document.querySelectorAll("button[type='submit']")[1].click();

irctc-filling-script's People

Contributors

shivamguys avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

sagarantony

irctc-filling-script's Issues

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.