Ejemplo n.º 1
0
 public EFiller(string ipFile, string opFile, string year)
 {
     this.year           = year;
     this.inputDataFile  = ipFile;
     this.outputDataFile = opFile;
     fillingStatus       = new List <EfillingDetails>();
     driver     = DriverFactory.getDriver();
     driver.Url = ReadSettings.GetuRL();
 }
Ejemplo n.º 2
0
        public void DoLogin()
        {
            IList <UserLogin> users         = IExcelReader.ReadExcelData(inputDataFile);
            LoginPage         UserLoginPage = new LoginPage(driver);
            string            listofmsg     = "";

            foreach (UserLogin user in users)
            {
                try {
                    var loginInfoText = UserLoginPage.SetLoginData(user.userName, user.passWord);
                    if (loginInfoText.Contains("User Does not Exists"))
                    {
                        fillingStatus.Add(new EfillingDetails(user, "INVALID LOGIN", ""));
                        continue;
                    }
                    else if (loginInfoText.ToLower().Contains("register your mobile"))
                    {
                        listofmsg = DoNavigationForMobileVerificationCust();
                    }
                    else
                    {
                        listofmsg = DoAllNavigationtoPrint();
                    }
                    if (listofmsg.Length > 0)
                    {
                        fillingStatus.Add(new EfillingDetails(user, "LOGIN SUCCESS", "Initiated", listofmsg));
                    }
                    else
                    {
                        fillingStatus.Add(new EfillingDetails(user, "LOGIN SUCCESS", "No Initiated", ""));
                    }
                }catch (Exception e) {
                    driver.Url = ReadSettings.GetuRL();
                    fillingStatus.Add(new EfillingDetails(user, "Error occured", "Error", "Error in processing" + e.Message));
                }
            }

            WriteToFile();
            KillChrome();
        }
 public void DoSignOutAndLogin()
 {
     signOut.Click();
     driver.Url = ReadSettings.GetuRL();
 }