public static void EditEmployee()
        {
            #region ReachingEmployee
            IWebDriver wd = new ChromeDriver(Constants.Chrome_Driver_Path);
            wd.Manage().Window.Maximize();
            Debug.WriteLine("Driver initialized.");
            wd.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(3);

            wd.Navigate().GoToUrl(HumanityLoginPage.Humanity_Login_URL);
            HumanityLoginTests.FillOutLogin(wd, "*****@*****.**", "pandanagrani");
            HumanityLoginPage.ClickLoginButton(wd);
            wd.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);

            HumanityMenu.ClickStaff(wd);
            wd.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);
            #endregion

            #region EditingEmployee
            HumanityStaff.ClickEmployee1(wd);
            //Was reaching Employee page successful?
            #region Pass/Fail
            if (wd.Url.Contains(HumanityStaff.Employee1_URL))
            {
                Console.WriteLine("Pass");
            }
            else
            {
                Console.WriteLine("Fail");
            }
            #endregion
            wd.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);
            HumanityEditStaff.ClickEditDetails(wd);
            //Was reaching Edit Employee page successful?
            #region Pass/Fail
            if (wd.Url.Contains(HumanityEditStaff.Edit_Staff_URL))
            {
                Console.WriteLine("Pass");
            }
            else
            {
                Console.WriteLine("Fail");
            }
            #endregion
            wd.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);
            HumanityEditStaff.SendNickName(wd, "Safi");
            wd.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);
            Thread.Sleep(3000);
            HumanityEditStaff.SendUploadPicture(wd);
            wd.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);
            Thread.Sleep(3000);
            HumanityEditStaff.ClickSaveEmployee(wd);
            wd.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);
            Thread.Sleep(3000);
            wd.Quit();
            #endregion
        }
示例#2
0
        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();
        }
示例#3
0
        public static void TestUploadPicture()
        {
            IWebDriver wd = new ChromeDriver(Constants.WEBDRIVER_PATH);

            wd.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(3);
            wd.Manage().Window.Maximize();
            Debug.WriteLine("Drive Initialized!");
            Thread.Sleep(3000);

            HumanityHome.NavigateTo(wd);
            HumanityHome.ClickCookies(wd);
            HumanityHome.ClickLogIn(wd);

            TestLogin.FillForm(wd, "*****@*****.**", "Mikica345");
            HuamnityLogin.ClickButtonLogIn(wd);
            HumanityProfile.ClickProfileMenu(wd);
            HumanityProfile.ClickProfile(wd);
            HumanityEditStaff.ClickEditDetails(wd);

            HumanityEditStaff.ClickUploadPicture(wd);
            Thread.Sleep(5000);
            HumanityEditStaff.SendNickname(wd, "Maki");
            HumanityEditStaff.ClickSaveButton(wd);
        }