Example #1
0
        private static void FillLogin(IWebDriver webDriver, TdsRemittanceDto tdsRemittanceDto)
        {
            var logintype = webDriver.FindElement(By.Id("tpao"));

            logintype.Click();

            WaitForReady(webDriver);

            var userId = webDriver.FindElement(By.Id("userId"));

            //userId.SendKeys("ADMPC7474M");
            userId.SendKeys(tdsRemittanceDto.CustomerPAN);
            userId.SendKeys(Keys.Tab);
            var pwd = webDriver.FindElement(By.Id("psw"));

            // pwd.SendKeys("Rana&123");
            pwd.SendKeys(tdsRemittanceDto.TracesPassword);

            MessageBoxResult result = MessageBox.Show("Please fill the captcha and press OK button.", "Confirmation",
                                                      MessageBoxButton.OK, MessageBoxImage.Asterisk,
                                                      MessageBoxResult.OK, MessageBoxOptions.DefaultDesktopOnly);

            WaitForReady(webDriver);
            webDriver.FindElement(By.Id("clickLogin")).Click();
            WaitForReady(webDriver);
            Thread.Sleep(1500);
            var confirmationChk = webDriver.FindElement(By.Id("Details"));

            confirmationChk.Click();
            WaitFor(webDriver, 2);
            var confirmationBtn = webDriver.FindElement(By.Id("btn"));

            confirmationBtn.Click();
            WaitForReady(webDriver);
        }
Example #2
0
 public Traces(TdsRemittanceDto model, string reqNo = "")
 {
     InitializeComponent();
     tdsRemittanceDto = model;
     challanAmt       = model.TdsAmount + model.TdsInterest + model.LateFee;
     requestNo        = reqNo;
     svc       = new service();
     unzipFile = new UnzipFile();
     formData  = null;
     LoadRemitance();
     TraceProgressbar.Visibility = Visibility.Hidden;
 }
Example #3
0
        public TdsRemittanceDto GetTdsRemitanceById(int clientPaymentTransactionID)
        {
            TdsRemittanceDto    remitance = null;
            HttpResponseMessage response  = new HttpResponseMessage();

            response = client.GetAsync("traces/" + clientPaymentTransactionID).Result;

            if (response.IsSuccessStatusCode)
            {
                remitance = response.Content.ReadAsAsync <TdsRemittanceDto>().Result;
            }
            return(remitance);
        }
Example #4
0
 public static string AutoFillForm16B(TdsRemittanceDto tdsRemittanceDto)
 {
     try {
         var driver = GetChromeDriver();
         driver.Navigate().GoToUrl("https://www.tdscpc.gov.in/app/login.xhtml");
         WaitForReady(driver);
         FillLogin(driver, tdsRemittanceDto);
         var reqNo = RquestForm16B(driver, tdsRemittanceDto);
         return(reqNo);
     }
     catch (Exception e) {
         MessageBox.Show("Request form16B Failed");
     }
     return("");
 }
Example #5
0
        private static string RquestForm16B(IWebDriver webDriver, TdsRemittanceDto tdsRemittanceDto)
        {
            webDriver.Navigate().GoToUrl("https://www.tdscpc.gov.in/app/tap/download16b.xhtml");
            WaitForReady(webDriver);

            var formType    = webDriver.FindElement(By.Id("formTyp"));
            var formTypeDDL = new SelectElement(formType);

            formTypeDDL.SelectByText("26QB");

            var assessmentYear    = webDriver.FindElement(By.Id("assmntYear"));
            var assessmentYearDDL = new SelectElement(assessmentYear);

            // assessmentYearDDL.SelectByText("2020-21");
            assessmentYearDDL.SelectByText(tdsRemittanceDto.AssessmentYear);

            var actkNo = webDriver.FindElement(By.Id("ackNo"));

            actkNo.SendKeys(tdsRemittanceDto.ChallanAckNo);

            var panOfSeller = webDriver.FindElement(By.Id("panOfSeller"));

            //panOfSeller.SendKeys("AJLPG4797J");
            panOfSeller.SendKeys(tdsRemittanceDto.SellerPAN);

            var process = webDriver.FindElement(By.Id("clickGo"));

            process.Click();
            WaitForReady(webDriver);
            var submitReq = webDriver.FindElement(By.Id("clickGo"));

            submitReq.Click();
            WaitForReady(webDriver);

            var requestTxt = webDriver.FindElement(By.Id("hidReqId")).GetAttribute("value");

            return(requestTxt);
        }
Example #6
0
 public static void AutoFillDownload(TdsRemittanceDto tdsRemittanceDto, string requestNo, DateTime dateOfBirth)
 {
     try
     {
         var driver = GetChromeDriver();
         driver.Navigate().GoToUrl("https://www.tdscpc.gov.in/app/login.xhtml");
         WaitForReady(driver);
         FillLogin(driver, tdsRemittanceDto);
         var fileName = DownloadForm(driver, requestNo, tdsRemittanceDto.CustomerPAN);
         if (fileName != "")
         {
             UnzipFile unzipFile = new UnzipFile();
             unzipFile.extractFile(fileName, dateOfBirth.ToString("ddMMyyyy"));
         }
         else
         {
             MessageBox.Show("Form is not yet generated");
         }
     }
     catch (Exception e)
     {
         MessageBox.Show("Download form Failed");
     }
 }