0% found this document useful (0 votes)
140 views1 page

Ticket Reservation with Trans Password

This document contains code for automatically filling out and submitting an online form. It gets references to all the form fields and sets their values programmatically. It finds fields like name, age, gender, stations, date and sets example values. It also clicks on buttons like submit or continues. The purpose is to automate form filling and submission through scripting.

Uploaded by

seyedm1983
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
140 views1 page

Ticket Reservation with Trans Password

This document contains code for automatically filling out and submitting an online form. It gets references to all the form fields and sets their values programmatically. It finds fields like name, age, gender, stations, date and sets example values. It also clicks on buttons like submit or continues. The purpose is to automate form filling and submission through scripting.

Uploaded by

seyedm1983
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

javascript:function E() {userId = document.

getElementById("userId");pwd =
[Link]("pwd");fromStation =
[Link]("[placeholder='From*']")[0];toStation =
[Link]("[placeholder='To*']")[0];journeydate =
[Link]("[placeholder='Journey Date(dd-mm-yyyy)*']")[1];flexiDate
= [Link]("dateSpecific");fpsgname =
[Link]("[id='psgn-name']");fpsgage =
[Link]("[formcontrolname='passengerAge']");fpsggender =
[Link]("[formcontrolname='passengerGender']");fpsgberthchoice =
[Link]("[formcontrolname='passengerBerthChoice']");passFoodChoic
e = [Link]("[formcontrolname='passengerFoodChoice']");fsrctzn =
[Link]("[id='srctzn-option']");childBerthFlag =
[Link]("[formcontrolname='childBerthFlag']");childName =
[Link]("[id='infant-name']");childAge =
[Link]("[formcontrolname='age']");childGender =
[Link]("[formcontrolname='gender']");mobileNumber =
[Link]("mobileNumber");gstnumber = [Link]("gstin-
number");autoUpgradation = [Link]("autoUpgradation");confirmberths
= [Link]("confirmberths");nginvalid =
[Link](".ng-invalid");transPassword =
[Link]("[formcontrolname='txnPassword']");reservationChoice =
[Link]("[formcontrolname='reservationChoice']");for (var i = 0;
i < [Link]; i++) {nginvalid[i].[Link]('ng-
invalid');nginvalid[i].[Link]('ng-valid');}function F1(el, val) {if
([Link](el) && val != '') [Link](el).value = val;
}if ([Link]['loginFormId']) {};if(fromStation){ [Link] =
'TIRUNELVELI - TEN'; [Link](new Event('keydown'));
[Link](new Event('input')); }if(toStation){ [Link] =
'DADAR - DDR'; [Link](new Event('keydown'));
[Link](new Event('input')); [Link](); }if(journeydate)
{ [Link] = '23-11-2018'; [Link](new
Event('keydown')); [Link](new Event('input')); }if(fpsgname[0]){
fpsgname[0].value = 'SEYED MOHAMED'; fpsgname[0].dispatchEvent(new
Event('input'));}if(fpsgage[0]) { fpsgage[0].value = '36';
fpsgage[0].dispatchEvent(new Event('input'));}if(fpsggender[0])
{ fpsggender[0].value = 'M'; fpsggender[0].dispatchEvent(new Event('change')); }
if(fpsgberthchoice[0]) { fpsgberthchoice[0].value = 'SL';
fpsgberthchoice[0].dispatchEvent(new Event('change'));}if (mobileNumber)
{ [Link] = '9042180155'; [Link](new
Event('change')); } if([Link]('r4'))
{ [Link]('r4').checked = true; }
if([Link]('travelInsuranceOptedYes'))
{ eval([Link]('travelInsuranceOptedYes').click()); }try
{ if([Link]('ui-tabpanel-7-
label'))eval([Link]('ui-tabpanel-7-label').click());} catch (err)
{}try
{ if([Link]('credit_39'))[Link]('credit_39').clic
k();} catch (err) {}transPassword[0].value = 'mosaMd1983';
transPassword[0].dispatchEvent(new Event('input'));}E()

You might also like