public static void AddNewEmployeeTest() { IWebDriver wd = new ChromeDriver(Constants.ChromeDriver); wd.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(9); wd.Manage().Window.Maximize(); Debug.WriteLine("Driver inicijalizovan HA!"); HumanityLogin.Login(wd, Constants.UserName, Constants.Password); System.Threading.Thread.Sleep(6000); HumanityMenu.ClickStaff(wd); System.Threading.Thread.Sleep(3000); HumanityStaff.ClickAddEmployees(wd); ExcelUtility.OpenFile(Constants.XLPath); ExcelUtility.LoadWorkSheet(0); for (int i = 1; i <= 3; i++) { HumanityStaff.SendFirstName(wd, ExcelUtility.GetDataAt(i, 0), i); HumanityStaff.SendLastName(wd, ExcelUtility.GetDataAt(i, 1), i); HumanityStaff.SendEmail(wd, ExcelUtility.GetDataAt(i, 3), i); } HumanityStaff.ClickSaveEmployees(wd); Assert.AreNotEqual(wd.Url, "https://zemicka.humanity.com/app/staff/add/"); Console.WriteLine("Zaposleni Uspesno dodati!"); wd.Quit(); }
public static void LoginFailTestUsername() { IWebDriver wd = new ChromeDriver(Constants.ChromeDriver); wd.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(9); wd.Manage().Window.Maximize(); Debug.WriteLine("Driver inicijalizovan HA!"); HumanityLogin.Login(wd, "123rty", Constants.Password); System.Threading.Thread.Sleep(3000); Assert.AreNotEqual(Constants.Company + "app/dashboard/", wd.Url); Console.WriteLine("Login wrong Username Success"); wd.Quit(); }
public static void UploadImageTests() { IWebDriver wd = new ChromeDriver(Constants.ChromeDriver); wd.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(9); wd.Manage().Window.Maximize(); Debug.WriteLine("Driver inicijalizovan HA!"); HumanityLogin.Login(wd, Constants.UserName, Constants.Password); System.Threading.Thread.Sleep(6000); Console.WriteLine("Verzija je {0}", HumanityProfile.GetVersion(wd)); System.Threading.Thread.Sleep(3000); wd.Navigate().GoToUrl("https://zemicka.humanity.com/app/staff/detail/5353116/"); System.Threading.Thread.Sleep(3000); HumanityEditStaff.ClickEditDetails(wd); HumanityEditStaff.SendUploadPicture(wd, Constants.ProfilePicture); HumanityEditStaff.ClickSaveEmployee(wd); wd.Quit(); }