Click here to Skip to main content
15,886,742 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
this code has worked fine but last two weeks it gets failed because of some security to stop autofill.
do you have any idea to make it again successful.
JavaScript
var passenger_detail_div = document.querySelectorAll('app-passenger')[0];
passenger_detail_div.querySelector('div.form-group:nth-of-type(1) input').dispatchEvent(new Event('blur'),{bubbles: true});
passenger_detail_div.querySelector('div.form-group:nth-of-type(1) input').value = 'Suraj kumar';
passenger_detail_div.querySelector('div.form-group:nth-of-type(1) input').dispatchEvent(new Event('input'),{bubbles: true});

passenger_detail_div.querySelector('div.form-group:nth-of-type(2) input').dispatchEvent(new Event('blur'),{bubbles: true});
passenger_detail_div.querySelector('div.form-group:nth-of-type(2) input').value = '26';
passenger_detail_div.querySelector('div.form-group:nth-of-type(2) input').dispatchEvent(new Event('change'),{bubbles: true});

passenger_detail_div.querySelector('div.form-group:nth-of-type(3) select').dispatchEvent(new Event('blur'),{bubbles: true});
passenger_detail_div.querySelector('div.form-group:nth-of-type(3) select').value = 'M';
passenger_detail_div.querySelector('div.form-group:nth-of-type(3) select').dispatchEvent(new Event('change'),{bubbles: true});

passenger_detail_div.querySelector('div.form-group:nth-of-type(4) select').dispatchEvent(new Event('blur'),{bubbles: true});
passenger_detail_div.querySelector('div.form-group:nth-of-type(4) select').value = 'SL';
passenger_detail_div.querySelector('div.form-group:nth-of-type(4) select').dispatchEvent(new Event('change'),{bubbles: true});


What I have tried:

if you want to make a try than you have go to website www.irctc.co.in
login than search a train then click on book tan try this code on passenger page by using developer tools.

if you have strong solution please help me because some poor people using my extension and feed their family
Posted
Updated 28-Aug-20 1:49am
v3

1 solution

Quote:
website www.irctc.co.in

they would have made changes in their website. Specifically to avoid very specific thing you are trying. to avoid ticket bookings via some code.

Irrespective, if it was working few days back and broken now, you would need to re-assess the webpage, figure the changes and then adjust your code to handle it.

Quote:
if you have strong solution please help me because some poor people using my extension and feed their family

Curious - Where is this extension available for poor for free?
 
Share this answer
 
Comments
IPL Kumar 29-Aug-20 1:15am    
my extension is not online. when i see a person struggle financially who suffer for bread and butter.i install my extension for a period. I am not fool. thanks for your suggestion if you have any idea please share

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900