shivamguys / irctc-cypress-automation

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).
85 stars 121 forks source link

IRCTC Clock is 10 Seconds Ahead #48

Open ketankolte7 opened 2 months ago

ketankolte7 commented 2 months ago

Please verify the same. Can cause problem while booking Tatkal tickets. @shivamguys

shivamguys commented 2 months ago

i see what you are saying but the time you see in the website is the mixture of local clock and then clock from backend sync. Whenever you book something irctc checks the time in its backend to ensure nothing is manipulated.

See i changed my system time to 1 hour late but actual time is the time i am posting this message.

image

@ketankolte7

ketankolte7 commented 2 months ago

image

in the image you can see the difference. At the Tatkal time, it is clicking on refresh button 10 second earlier. thats why it igoes into loading state. And after it founds booking not started yet. Then it clicks again. After that it starts. But in that 1 minute is already getting lost.

Can you please verify that. As I have tried 2 times at tatkal time still same problem.

( If we calculate exact then it is a 7 sec difference ). Also you can verify in mobile as well.

shivamguys commented 2 months ago

Cool i will then fix it to use system time to check whether tatkal time has been crossed or not then it will click....

NoelJacob commented 2 months ago

Then is it possible to start booking 7 seconds in advance?

ketankolte7 commented 2 months ago

I tried with 8 seconds as tatkal starts at 10:00:00 so i kept the time as 10:00:08 in code and also added code for seconds so after clicking it is throwing error as booking is not started yet. So need to find the exact time at which we can click