Skip to content

Instantly share code, notes, and snippets.

@dharmesh-hemaram
Last active May 19, 2024 14:30
Show Gist options
  • Save dharmesh-hemaram/85bcebba0addc375c4c02c55bc10af21 to your computer and use it in GitHub Desktop.
Save dharmesh-hemaram/85bcebba0addc375c4c02c55bc10af21 to your computer and use it in GitHub Desktop.
Irctc

Irctc

This configuration is created to help filling irctc form faster and its tested during normal hours only and not during peak hours of which is between morning 9:00 am ~ 11:00 am.

You can simly download below json file and import into our extension which can be downloaded from below links.

Simple refresh the irctc page and it will start your process. You can comment down any query you have with this configuration.

Settings

Enable Name and init wait from https://getautoclicker.com/docs/3.x/action/columns-filter/

Things Higlightes can be changed accordingly

Important

  • Below configuration is changes to manual mode. Hotkey is set as "Ctrl + Shift + X"

Origin

  • //p-autocomplete[@id="origin"]//input - Pune
  • //ul[@role="listbox"]/li/span[contains(text(),"PUNE")]

Destination

  • //p-autocomplete[@id="destination"]//input - Mumbai
    • //ul[@role="listbox"]/li/span[contains(text(),"CSMT")]

Date

  • //table[contains(@class,"ui-datepicker-calendar")]//a[text()="9"]

Quota

  • //ul[@role="listbox"]//li/span[text()="TATKAL"]

Train Select

  • //strong[contains(text(),"12128")]/../../..//strong[contains(text(),"3A")]
  • //strong[contains(text(),"12128")]/../../..//strong[contains(text(),"Sat, 30 Dec")]
  • //strong[contains(text(),"12128")]/../../..//strong[contains(text(),"AVAILABLE")]

You need to login with your credentials here and fill captcha

Passenger ( Below Passenger are auto selected from master list )

  • (//p-autocomplete[@formcontrolname="passengerName"]//input)[1] - Dharmesh
  • (//input[@formcontrolname="passengerAge"])[1] - 22
  • (//select[@formcontrolname="passengerGender"])[1] - M
  • (//select[@formcontrolname="passengerBerthChoice"])[1] - WS

Add Another Passenger

  • //a/span[contains(text(),"+ Add Passenger")]
  • Repeat Passenger step

Passenger ( Below Passenger are auto selected from master list )

  • (//p-autocomplete[@formcontrolname="passengerName"]//input)[2] - Arjun
  • (//input[@formcontrolname="passengerAge"])[2] - 22
  • (//select[@formcontrolname="passengerGender"])[2] - M
  • (//select[@formcontrolname="passengerBerthChoice"])[2] - WS

Consider for auto upgrade

  • //label[contains(text(),"Consider for Auto Upgradation.")]

Payment

If you dont want payment to be made through UPI remove below action

  • //label[contains(text(),"Pay through BHIM/UPI")]//div[@role="radio"]

How to use

  • Download configuration.json below
  • Import into below extension
  • Refresh Page

Auto Clicker Auto Fill Extension


tags

#irctc #tatkal #Premium tatkal #train #train booking #autobuy #autopurchase #purchase #ixigo train

{
"actions": [
{
"addon": { "condition": "", "elementFinder": "", "recheck": 0, "recheckInterval": 0, "recheckOption": "stop", "value": "", "valueExtractor": "" },
"elementFinder": "//p-autocomplete[@id=\"origin\"]//input",
"id": "99ad0ae2-6a79-4fcf-a544-5a9331789042",
"initWait": 0,
"name": "search origin",
"repeat": 0,
"repeatInterval": 0,
"value": "Pune"
},
{
"addon": { "condition": "", "elementFinder": "", "recheck": 0, "recheckInterval": 0, "recheckOption": "stop", "value": "", "valueExtractor": "" },
"elementFinder": "//ul[@role=\"listbox\"]/li/span[contains(text(),\"PUNE\")]",
"focus": true,
"id": "b762a11d-634f-42ad-b796-fc9c0f1fc8b1",
"initWait": 0.25,
"name": "select origin",
"repeat": 0,
"repeatInterval": 0,
"value": ""
},
{
"addon": { "condition": "", "elementFinder": "", "recheck": 0, "recheckInterval": 0, "recheckOption": "stop", "value": "", "valueExtractor": "" },
"elementFinder": "//p-autocomplete[@id=\"destination\"]//input",
"focus": true,
"id": "97bed6b2-8673-41c6-81f4-cb8175b630d8",
"initWait": 0.25,
"name": "search destination",
"repeat": 0,
"repeatInterval": 0,
"value": "Mumbai"
},
{
"addon": { "condition": "", "elementFinder": "", "recheck": 0, "recheckInterval": 0, "recheckOption": "stop", "value": "", "valueExtractor": "" },
"elementFinder": "//ul[@role=\"listbox\"]/li/span[contains(text(),\"CSMT\")]",
"focus": true,
"id": "260632c3-0cec-4207-8274-968d0993d014",
"initWait": 0.25,
"name": "select destination",
"repeat": 0,
"repeatInterval": 0,
"value": ""
},
{
"addon": { "condition": "", "elementFinder": "", "recheck": 0, "recheckInterval": 0, "recheckOption": "stop", "value": "", "valueExtractor": "" },
"elementFinder": "//p-calendar//input",
"focus": true,
"id": "b85a2ac3-72ae-4258-a6c4-4b1b600cc88d",
"initWait": 0.25,
"name": "select calendar",
"repeat": 0,
"repeatInterval": 0,
"value": ""
},
{
"addon": { "condition": "", "elementFinder": "", "recheck": 0, "recheckInterval": 0, "recheckOption": "stop", "value": "", "valueExtractor": "" },
"elementFinder": "//table[contains(@class,\"ui-datepicker-calendar\")]//a[text()=\"31\"]",
"focus": true,
"id": "7f339cf0-a6ce-4e7a-9072-9fa5afbd271d",
"initWait": 0.25,
"name": "select date",
"repeat": 0,
"repeatInterval": 0,
"value": ""
},
{
"addon": { "condition": "", "elementFinder": "", "recheck": 0, "recheckInterval": 0, "recheckOption": "stop", "value": "", "valueExtractor": "" },
"elementFinder": "//p-dropdown[@id=\"journeyQuota\"]/div",
"focus": true,
"id": "5c1dff94-f682-4f5b-a201-110654224bb8",
"initWait": 0.25,
"name": "select quota",
"repeat": 0,
"repeatInterval": 0,
"value": ""
},
{
"addon": { "condition": "", "elementFinder": "", "recheck": 0, "recheckInterval": 0, "recheckOption": "stop", "value": "", "valueExtractor": "" },
"elementFinder": "//ul[@role=\"listbox\"]//li/span[text()=\"GENERAL\"]",
"focus": true,
"id": "cc53c57f-3154-488c-928a-e5d48a3d3bab",
"initWait": 0.25,
"name": "select tatkal",
"repeat": 0,
"repeatInterval": 0,
"value": ""
},
{
"addon": { "condition": "", "elementFinder": "", "recheck": 0, "recheckInterval": 0, "recheckOption": "stop", "value": "", "valueExtractor": "" },
"elementFinder": "//button[@type=\"submit\"]",
"focus": true,
"id": "55fb4496-4459-43dc-9740-2a29549b9693",
"initWait": 0.25,
"name": "submit",
"repeat": 0,
"repeatInterval": 0,
"value": ""
},
{ "elementFinder": "//strong[contains(text(),\"22106\")]/../../..//strong[contains(text(),\"2S\")]", "error": [], "id": "2d9d6974-4558-4b8e-bb2a-260e3c0d7c9c", "initWait": 1, "name": "Select Train 12128 / AC" },
{ "elementFinder": "//strong[contains(text(),\"22106\")]/../../..//strong[contains(text(),\"AVAILABLE\")]", "error": [], "id": "1737fb94-bef2-4a49-911e-f30c4a095da5", "name": "Select Available" },
{ "elementFinder": "//button[contains(text(),\"Book Now\") and not(contains(@class,\"disable\"))]", "error": [], "id": "2ae4850d-7b2e-40fa-981b-cb7a2cc6f5b2", "initWait": 0, "name": "Select Book ", "value": "" },
{ "elementFinder": "//p-confirmdialog//button/span[contains(text(),\"Yes\")]", "error": [], "id": "93b9e0fb-797b-4610-b33e-7f20e52c3db2", "initWait": 0, "name": "Confirm Stations", "settings": { "retry": 2, "retryInterval": 0.5, "retryOption": "skip" } },
{ "elementFinder": "(//p-autocomplete[@formcontrolname=\"passengerName\"]//input)[1]", "error": [], "id": "6e1ae5b3-d635-4c8d-8237-d9ffbbcfbe54", "initWait": 1, "name": "Search Passenger", "settings": { "retry": -2, "retryInterval": 0.5, "retryOption": "stop" }, "value": "Ashok" },
{ "id": "f789e435-a080-4ca9-aef5-d829f9bff064", "elementFinder": "(//input[@formcontrolname=\"passengerAge\"])[1]", "error": [], "value": "22" },
{ "id": "cdcb21af-3064-4aef-957d-29a60a7a6e83", "elementFinder": "(//select[@formcontrolname=\"passengerGender\"])[1]", "error": [], "value": "M" },
{ "id": "7e6299b8-3c61-4690-94c2-836be49c554f", "elementFinder": "(//select[@formcontrolname=\"passengerBerthChoice\"])[1]", "error": [], "value": "WS", "settings": { "retryOption": "skip", "retry": 0, "retryInterval": 0 } },
{ "elementFinder": "//a/span[contains(text(),\"+ Add Passenger\")]", "error": [], "id": "7e84dc19-5a4d-45c8-9c06-02b6c95c14aa", "initWait": 0.25, "name": "Add Passenger", "value": "" },
{ "elementFinder": "(//p-autocomplete[@formcontrolname=\"passengerName\"]//input)[2]", "error": [], "id": "79ef9bff-2571-49ba-8970-911c52a82f0e", "initWait": 0.25, "name": "Search Passenger", "value": "Damodar" },
{ "id": "a3beebfe-af37-482d-95ee-4e65d1324e3d", "elementFinder": "(//input[@formcontrolname=\"passengerAge\"])[2]", "error": [], "value": "22" },
{ "id": "a37a0dd4-770d-40c7-a169-397711fc9d0d", "elementFinder": "(//select[@formcontrolname=\"passengerGender\"])[2]", "error": [], "value": "M" },
{ "id": "209aea77-975e-4a53-9ff0-308672a6f48b", "elementFinder": "(//select[@formcontrolname=\"passengerBerthChoice\"])[2]", "error": [], "value": "WS" },
{ "elementFinder": "//label[contains(text(),\"Consider for Auto Upgradation.\")]", "error": [], "id": "055ea5bd-4268-493d-90d7-84b991e62605", "initWait": 0.25, "name": "Auto Upgradation" },
{ "elementFinder": "//label[contains(text(),\"Pay through BHIM/UPI\")]//div[@role=\"radio\"]", "error": [], "id": "e91c52cf-8122-4834-961a-9295c5818f40", "name": "Pay UPI" },
{ "elementFinder": "//button[contains(text(),\"Continue\") and contains(@class,\"train_Search\")]", "error": [], "id": "3ebbcec5-bfab-4da0-a30f-252dbd978bd4", "name": "Click Continue" }
],
"batch": { "refresh": false, "repeat": 0, "repeatInterval": 0 },
"enable": true,
"hotkey": "Ctrl + Shift + X",
"id": "11fea354-bc6d-443a-91ea-9659afca9253",
"initWait": 0,
"loadType": "window",
"name": "IRCTC",
"startTime": "",
"startType": "auto",
"url": "https://www.irctc.co.in/nget/train-search"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment