Example #1
0
        public BankAccountDetailsDto GetBankLoginDetails()
        {
            BankAccountDetailsDto bankDetail = null;
            HttpResponseMessage   response   = new HttpResponseMessage();

            response = client.GetAsync("AutoFill/UserDetail").Result;

            if (response.IsSuccessStatusCode)
            {
                bankDetail = response.Content.ReadAsAsync <BankAccountDetailsDto>().Result;
            }
            return(bankDetail);
        }
Example #2
0
        public static void AutoFillForm26QB(AutoFillDto autoFillDto, string tds, BankAccountDetailsDto bankLogin)
        {
            try
            {
                _bankLogin = bankLogin;
                var driver = GetChromeDriver();
                // var driver = new ChromeDriver(AppDomain.CurrentDomain.BaseDirectory, options);
                //var driver = new ChromeDriver(options);
                //driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://onlineservices.tin.egov-nsdl.com/etaxnew/tdsnontds.jsp");
                WaitForReady(driver);
                // var proceedBtn = driver.FindElement(By.XPath("//a[@href='javascript:sendRequest(\'PropertyTaxForm\');']"));
                driver.FindElement(By.XPath("//*[@id='selectform']/div[3]/div[1]/section/div/div/a")).Click(); //todo improve xpath

                //  MessageBoxResult result = MessageBox.Show("PLease fill the capcha and press ok button", "Confirmation", MessageBoxButton.YesNo);

                WaitForReady(driver);
                FillTaxPayerInfo(driver, autoFillDto.tab1);

                WaitForReady(driver);
                FillAddress(driver, autoFillDto.tab2);

                WaitForReady(driver);
                FillPropertyinfo(driver, autoFillDto.tab3);

                WaitForReady(driver);
                FillPaymentinfo(driver, autoFillDto.tab4);

                WaitForReady(driver);
                ProcessToBank(driver, tds);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                MessageBox.Show("Processing Form26QB Failed");
                // throw;
            }
        }