TSMDC District Selection And Radio Button Click And Also Delivery Address Fillinf
₹600-1500 INR
Posted almost 5 years ago
₹600-1500 INR
Paid on delivery
// ==UserScript==
// @name Order auto fill
// @namespace [login to view URL]
// @version 0.1
// @description try to take over the world!
// @author You
// @match [login to view URL]*
// @grant none
// ==/UserScript==
(function() {
'use strict';
var DISTRICT_ID ='27';
var RADIO_BUTTON_TEXT = "VILLASAGAR BLOCK 1";
var changeEvent = new Event('change');
var clickEvent = new Event('click');
function waitForTheElement(searchElement, callback) {
var element;
var intervalId = setInterval(function () {
element = searchElement();
if(element) {
clearInterval(intervalId);
callback(element);
}
},100);
}
function selectDistrict1(nextStep) {
waitForTheElement(function() {
return [login to view URL]("#ccMain_tblDistricts").querySelector("select");
}, function(elem) {
[login to view URL] = DISTRICT_ID;
[login to view URL](changeEvent);
nextStep();
});
}
function selectStockYard(nextStep){
waitForTheElement(function(){
var elem = null;
var trElements = [login to view URL]([login to view URL](".GridviewScrollTable")[0].querySelectorAll("tr"));
if(!trElements) {return null;}
[login to view URL](function (tr, index) {
if (index === 0) { return 0;}
if ([login to view URL]("td")[2].[login to view URL]().toLowerCase()== [login to view URL]().toLowerCase()) {
elem = [login to view URL]("input");
return true;
}
}
);
return elem;
},function(elem){
[login to view URL]();
nextStep();
});
}
function selectPurpose(nextStep){
waitForTheElement(function(){
return [login to view URL]("select[name='ctl00$ccMain$ddlsandpurpose']");
},function(elem){
[login to view URL] = "2";
//[login to view URL]('select[name="ctl00$ccMain$ddlVehicleType"]').value= "L";
[login to view URL]('input[name="ctl00$ccMain$txtVehzNo"]').value= "";
nextStep();
});
}
function selectDistrict2(nextStep) {
waitForTheElement(function(){
var district2 = [login to view URL]('select[onchange="PopulateDelMandals()"]');
[login to view URL]([login to view URL]("option").length);
return [login to view URL]("option").length > 1 ? district2 : false;
},function(elem){
[login to view URL] =16;
[login to view URL](changeEvent);
nextStep();
});
}
function selectMandal(nextStep) {
waitForTheElement(function(){
var mandal = [login to view URL]('select[onchange="PopulateDelVillages()"]');
[login to view URL]([login to view URL]("option").length);
return [login to view URL]("option").length > 1 ? mandal : false;
},function(elem){
[login to view URL] = 66;
[login to view URL](changeEvent);
nextStep();
});
}
function selectVillage() {
waitForTheElement(function(){
var village = [login to view URL]('select[name="ctl00$ccMain$ddldelvillage"]');
[login to view URL]([login to view URL]("option").length);
return [login to view URL]("option").length > 1 ? village : false;
},function(elem){
[login to view URL] = "102";
[login to view URL](changeEvent);
[login to view URL]("#ccMain_rbtPG_0").click();
});
}
selectDistrict1(function(){
selectStockYard(function(){
selectPurpose(function(){
selectDistrict2(function(){
selectMandal(selectVillage);
});
});
});
});
})();
Project ID: 19854017
About the project
Remote project
Active 5 yrs ago
Looking to make some money?
Benefits of bidding on Freelancer
Set your budget and timeframe
It's free to sign up and bid on jobs