Beispiel #1
0
 public void NoCareerTest()
 {
     HeaderMenu.Select(CAREERS);
     CareerPage.CheckOpened();
     CareerPage.JobFilter.Keywords.NewInput("C#");
     CareerPage.AutocompleteSuggestList.ClickCenter();
     CareerPage.JobFilter.Category.Select("HR & Talent Acquisition");
     CareerPage.JobSearchButton.Click();
     JobListingPage.CheckOpened();
     JobListingPage.JobsList.WaitText("Sorry, your search returned no results. Please try another query.");
 }
Beispiel #2
0
        public void CareerTest()
        {
            var attendee = new Attendee();

            HeaderMenu.Select(CAREERS);
            CareerPage.CheckOpened();
            CareerPage.JobFilter.Search(attendee.Filter);
            JobListingPage.CheckOpened();
            //new Check("Table is not empty").isFalse(jobListingPage.jobsList::isEmpty);
            JobListingPage.GetJobRowByName("Senior QA Automation Engineer");
            JobDescriptionPage.AddCvForm.Submit(attendee);
            //new Check("Captcha").Contains(()->jobDescriptionPage.captcha.getAttribute("class"), "form-field-error");
        }
Beispiel #3
0
        public void CareerTest()
        {
            var attendee = new Attendee();

            HomePage.IsOpened();
            HeaderMenu2D.HoverAndClick("SOLUTIONS>Product Development");
            ProductDevelopmentPage.CheckOpened();
            HeaderMenu.Select(Headers.CAREERS);
            CareerPage.CheckOpened();
            CareerPage.JobFilter.Search(attendee.Filter);
            JobListingPage.CheckOpened();
            //new Check("Table is not empty").isFalse(jobListingPage.jobsList::isEmpty);
            //new Timer().Wait(() => !JobListingPage.JobsList.Empty);
            JobListingPage.GetJobRowByName("Test Automation Engineer (back-end)");
            JobDescriptionPage.AddCvForm.Submit(attendee);
            //new Check("Captcha").Contains(() -> jobDescriptionPage.captcha.getAttribute("class"), "form-field-error");
        }
Beispiel #4
0
        public ActionResult CareerPage()
        {
            var         currentUser = LoginHelper.GetCurrentLoginUser();
            ATSEntities db          = new ATSEntities();

            using (db)
            {
                var careerPageObj = db.CareerPages.FirstOrDefault(x => x.RecId == currentUser.Id);
                if (careerPageObj == null)
                {
                    careerPageObj       = new CareerPage();
                    careerPageObj.RecId = currentUser.Id;
                }
                careerPageObj.CreatedDate = DateTime.Now;
                return(View(careerPageObj));
            }
        }
//This test checks numbers of jobs for specified country and language
        public void JobsCountTest(string country, string language, int expectedResult)
        {
            driverGC = new ChromeDriver();
            String siteUrl      = "https://careers.veeam.com";
            int    actualResult = 0;

            driverGC.Navigate().GoToUrl(siteUrl);
            driverGC.Manage().Window.Maximize();
            CareerPage careerPage = new CareerPage(driverGC);

            careerPage.FindByXpathAndClick("//a [contains (text(),'GLOBAL')]");
            careerPage.FindByXpathAndClick($"//a [contains(text(),'{country}')]");
            careerPage.FindByXpathAndClick("//select [@name='language']");
            careerPage.FindByXpathAndClick($"//option [contains(text(),'{language}')]");
            careerPage.FindByXpathAndOpenNewPage("//a[(@name='SubmitForm')]");
            actualResult = careerPage.FindByXpathAndCountElements("//div[contains(@class,'vacancies-blocks-item-description-more mt10-md-up')]");
            Assert.Equal(expectedResult, actualResult);
            driverGC.Quit();
        }
Beispiel #6
0
        public void VerifyJobPostingAtCareerPage()
        {
            #region Test Data
            string jobPosition          = "Senior QA Test Automation Developer / Engineer";
            string jobLocation1         = "Durham, North Carolina";
            string jobLocation2         = "Durham, NC";
            string jobId                = "20-85412";
            string jobPostedDate        = "12/10/2020";
            string expectedDescription  = "The right candidate for this role will participate in the test automation technology development and best practice models.";
            string expectedBulletPoint  = "Prepare test plans, budgets, and schedules.";
            string expectedRequirement1 = "5+ years of experience in QA automation development and scripting.";
            string expectedRequirement2 = "Selenium";
            #endregion

            // Step1: LaunchUrl
            Driver.Navigate().GoToUrl(LabCorpHomeUrl);
            WaitForPageLoad();
            Assert.AreEqual(LabCorpHomeUrl, Driver.Url, "Failed to navigate to Labcorp home Url");

            // Step2: Find and click Careers link"
            CareerPage.CareerLink().Click();
            Assert.AreEqual(2, Driver.WindowHandles.Count, "Failed to find new browser tab");
            Driver.SwitchTo().Window(Driver.WindowHandles.Last());  // Switch Driver focus to new tab
            WaitForPageLoad();
            Assert.AreEqual(LabCorpCareerUrl, Driver.Url, "Failed to navigate to Labcorp career Url");

            // Step3: Search for QA Test Automation Developer"
            CareerPage.SearchKeyword().SendKeys("QA Test Automation Developer");
            CareerPage.SearchLocation().Clear();
            CareerPage.SearchSubmit().Click();

            // Step4: Select Senior QA Test Automation Developer/Engineer – Durham, North Carolina – (posted on) 12/10/2020"
            IWebElement jobElement = CareerPage.FindJobElmentById("3090755200");
            // Assert Job posting
            Assert.AreEqual(jobPosition, CareerPage.JobPosition(jobElement).Text, "Position name does not match");
            Assert.AreEqual(jobLocation1, CareerPage.JobLocation(jobElement).Text, "Position location does not match");
            Assert.AreEqual(jobPostedDate, CareerPage.JobDatePosted(jobElement).Text, "Position date posted does not match");
            // Click Position
            jobElement.Click();

            // Step5: Confirm job title, job location, and job id (#20-85412)"
            Assert.AreEqual(jobPosition, JobDescriptionPage.JobTitle().Text.Trim(), "Position name does not match");
            Assert.IsTrue(JobDescriptionPage.JobLocation().Text.Contains(jobLocation1), "Position location does not match");
            Assert.IsTrue(JobDescriptionPage.JobId().Text.Contains(jobId), "Position Job Id does not match");

            // Step6: Confirm first sentence of third paragraph under Description/Introduction"
            string actualDescription = JobDescriptionPage.GetJobDescriptionByParagraphNum(3).Text;   // Get the Thrid paragraph
            Assert.IsTrue(actualDescription.Contains(expectedDescription));

            // Step7: Confirm second bullet point under Management Support as Prepare test plans, budgets, and schedules."
            string actualBulletPoint = JobDescriptionPage.GetJobDescriptionBulletPoint("Management Support", 2).Text;
            Assert.IsTrue(actualBulletPoint.Contains(expectedBulletPoint));

            // Step8: 5+ years of experience in QA automation development and scripting."
            string actualRequirement1 = JobDescriptionPage.GetJobDescriptionRequirement(1, 3).Text;   //First section - 3rd line
            Assert.IsTrue(actualRequirement1.Contains(expectedRequirement1));

            // Step9: Confirm first suggested automation tool to be familiar with contains Selenium"
            string actualRequirement2 = JobDescriptionPage.GetJobDescriptionRequirement(2, 1).Text;   //Second section - 1st line
            Assert.IsTrue(actualRequirement2.Contains(expectedRequirement2));

            // Step10: Click Apply Now and confirm points 5 and 6 in the proceeding page."
            JobDescriptionPage.ApplyNowButton().Click();
            string expectedTitle = "Career Site - Self Service";
            WaitForPageLoad();
            WaitUntilTitleContains(expectedTitle);
            Assert.AreEqual(expectedTitle, Driver.Title, "Failed to match page title");

            JobDetailsPage.ClosePopOverContent().Click();
            Assert.AreEqual(jobPosition, JobDetailsPage.JobTitle().Text, "Position name does not match");
            Assert.IsTrue(JobDetailsPage.JobLocation().Text.Contains(jobLocation2), "Position location does not match");
            Assert.IsTrue(JobDetailsPage.JobId().Text.Contains(jobId), "Position Job Id does not match");

            string actualDescription1   = JobDetailsPage.GetJobDescriptionByParagraphNum(3).Text; // Get the Thrid paragraph
            string expectedDescription1 = "The right candidate for this role will participate in the test automation technology development and best practice models.";
            Assert.IsTrue(actualDescription1.Contains(expectedDescription1));

            // Step11: Click to Return to Job Search
            JobDetailsPage.ReturnToJobSearch().Click();
            WaitForPageLoad();
            WaitUntilTitleContains(expectedTitle);
            Assert.AreEqual(expectedTitle, Driver.Title, "Failed to match page title");
            Assert.IsNotNull(JobDetailsPage.SearchForJobs(), "Failed to find search for jobs button");
        }
Beispiel #7
0
        public void Test1()
        {
            try
            {
                LogFile.WriteLine("INFO: Career page initialization");
                CareerPage career = new CareerPage(driver);

                LogFile.WriteLine("INFO: Position page initialization");
                PositionPage position = new PositionPage(driver);

                LogFile.WriteLine("INFO: Expeted values definition");
                List <Dictionary <string, string> > expectedResults = new List <Dictionary <string, string> >();
                List <string> expectedResultsPositionDescription    = new List <string>();
                Dictionary <string, string> expectedResult1         = new Dictionary <string, string>();
                Dictionary <string, string> expectedResult2         = new Dictionary <string, string>();

                expectedResult1.Add("Name", "Ciencialová Barbora");
                expectedResult1.Add("Description", "HR a Alza mě baví! A právě proto se vedle studia psychologie a managementu věnuji náboru pro naši IT větev. Volný čas ráda trávím aktivně, miluji pohyb všeho druhu, ale nejčastěji mně najdete běhat podél Vltavy nebo zašitou v posilovně se sluchátky na uších.");
                expectedResult1.Add("Picture", @"~..\..\..\..\..\src\pic1.jpg");
                expectedResults.Add(expectedResult1);

                expectedResult2.Add("Name", "Tomusko Ján");
                expectedResult2.Add("Description", "Celou moji profesní kariéru se věnuji problematice testování SW a HW a v šíření výhod včasné detekce chyb v produktu. Ve svém volném čase se věnuji turistice a lyžování.");
                expectedResult2.Add("Picture", @"~..\..\..\..\..\src\pic2.jpg");
                expectedResults.Add(expectedResult2);

                expectedResultsPositionDescription.Add("Už se v QA nějaký ten pátek pohybuješ a do toho máš za sebou i zkušenost manažerskou? Tak to jsi tady správně - hledáme nového teamleadera, který povede náš tým testerů starající se o náš web a mobilní aplikace. U náš v Alze se stále ještě setkáš s manuálním testováním, ale i automatizace si u náš získává stále více a více prostoru. Pokud Ti pojmy jako Selenium, Jira, Confluence nejsou neznámou, orientuješ se v C# a zaujali jsme Tě, pak pokračuj dále ve čtení!");
                expectedResultsPositionDescription.Add("Pokud se v QA už nějaký ten pátek pohybuješ a vzděláváš, určitě Ti neuniklo, že automatizované testování je velmi aktuálním tématem a Alza není žádnou výjimkou. Do našeho týmu hledáme další chytré hlavy, které ví, jak na to. Pokud máš již předešlé zkušenosti se Selenium Framework, orientuješ se v C#, Jira, Azure DevOps a nebo jsme zkrátka jen chytli Tvou pozornost, pak pokračuj dále ve čtení!");


                LogFile.WriteLine("INFO: Navigate to Career page and find all open QA position");
                career.GoToPage(config["sutUrl"]);
                career.SetVyhledatPoziciTextField("qa");
                career.RefreshComplete();

                LogFile.WriteLine("INFO: Verification that all QA positions contain same people with same description and same photo");
                List <string> QAposition = career.GetAllPosition();
                Assert.AreEqual(expectedResultsPositionDescription.Count, QAposition.Count);
                int counter = 0;

                foreach (var qa in QAposition)
                {
                    driver.Navigate().GoToUrl(qa);
                    position.LoadComplete();
                    Assert.Contains(position.getPositionDescription(), expectedResultsPositionDescription);

                    var people = position.getPeople();

                    foreach (var p in people)
                    {
                        foreach (var er in expectedResults)
                        {
                            if (p["Name"] == er["Name"])
                            {
                                Assert.AreEqual(er["Description"], p["Description"]);
                                Assert.AreEqual(position.GetHash(new Bitmap(er["Picture"])), position.parseImageURLAndDownload(p["Picture"], p["Name"] + counter));
                            }
                        }
                    }
                    driver.Navigate().Back();
                    career.LoadComplete();
                    counter++;
                }
            }
            catch (Exception e) {
                LogFile.WriteLine("ERROR: " + e);
                try
                {
                    Screenshot image = ((ITakesScreenshot)driver).GetScreenshot();
                    image.SaveAsFile(@"~..\..\..\..\..\Screenshot.png");
                }
                catch (Exception ex) {
                    LogFile.WriteLine("ERROR: " + ex);
                }
            }
        }
Beispiel #8
0
        public ActionResult CareerPage(CareerPage Model, HttpPostedFileBase LogoFile)
        {
            try
            {
                if (LogoFile != null && LogoFile.ContentLength > 0)
                {
                    //Save the File.
                    string DirectoryPath = Server.MapPath("~/Content/Images/ExternalLogo/" + Model.RecId + "/");
                    string filePath      = DirectoryPath + LogoFile.FileName;
                    Model.ExternalLogo = LogoFile.FileName;
                    if (!System.IO.Directory.Exists(DirectoryPath))
                    {
                        System.IO.Directory.CreateDirectory(DirectoryPath);
                    }
                    if (System.IO.Directory.Exists(DirectoryPath))
                    {
                        LogoFile.SaveAs(filePath);
                    }
                }
            }
            catch (Exception ex) { }
            ATSEntities db = new ATSEntities();

            using (db)
            {
                if (Model.Id == 0)
                {
                    db.CareerPages.Add(Model);
                    db.SaveChanges();
                }
                else
                {
                    var DbCareerModel = db.CareerPages.FirstOrDefault(x => x.RecId == Model.RecId);
                    //Check if File is available.


                    if (!string.IsNullOrEmpty(Model.ExternalLogo) && DbCareerModel.ExternalLogo != Model.ExternalLogo)
                    {
                        DbCareerModel.ExternalLogo = Model.ExternalLogo;
                    }
                    if (!string.IsNullOrEmpty(Model.Intro) && DbCareerModel.Intro != Model.Intro)
                    {
                        DbCareerModel.Intro = Model.Intro;
                    }
                    if (!string.IsNullOrEmpty(Model.Description) && DbCareerModel.Description != Model.Description)
                    {
                        DbCareerModel.Description = Model.Description;
                    }

                    if (!string.IsNullOrEmpty(Model.Heading) && DbCareerModel.Heading != Model.Heading)
                    {
                        DbCareerModel.Heading = Model.Heading;
                    }
                    DbCareerModel.UpdateDate = DateTime.Now;

                    db.CareerPages.Attach(DbCareerModel);
                    db.Entry(DbCareerModel).State = EntityState.Modified;
                    db.SaveChanges();
                }
            }
            return(RedirectToAction("CareerPage", "Recruiter"));
        }