コード例 #1
0
        internal void ReceviedRequests()
        {
            //Populate the excel data

            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "ManageRequest");

            //Click on ManageRequest Tab
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[text()='Manage Requests']", 10000);
            ManageReqTab.Click();

            //Select Recieved Request
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "LinkText", "Received Requests", 10000);
            ReceivedReqSel.Click();

            //Accept or Declane request

            if (GlobalDefinitions.ExcelLib.ReadData(2, "ReceviedRequest") == "Accept")
            {
                GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='received-request-section']/div[2]/div[1]/table/tbody/tr[1]/td[8]/button[1]", 10000);
                AcceptRequest.Click();
            }
            else if (GlobalDefinitions.ExcelLib.ReadData(2, "ReceviedRequest") == "Decline")
            {
                GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='received-request-section']/div[2]/div[1]/table/tbody/tr[1]/td[8]/button[2]", 10000);
                DeclineRequest.Click();
            }

            //Complete request
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='received-request-section']/div[2]/div[1]/table/tbody/tr[3]/td[8]/button", 10000);
            CompleteRequest.Click();
            Base.test.Log(LogStatus.Info, "Responded to received request successfully");
        }
コード例 #2
0
        internal void EditListings()
        {
            //Populate the Excel Sheet
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "ManageListing");
            // Refresh the page
            GlobalDefinitions.driver.Navigate().Refresh();

            //Click on Manage Listing
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "LinkText", "Manage Listings", 10000);
            manageListingsLink.Click();

            //Click on Edit button
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='listing-management-section']/div[2]/div[1]/div[1]/table/tbody/tr[1]/td[8]/div/button[2]/i", 10000);
            edit.Click();

            //Edit title
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "Name", "title", 10000);
            Title.Click();
            Title.Clear();
            Title.SendKeys(GlobalDefinitions.ExcelLib.ReadData(3, "Title"));

            //Click on save button
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//input[@value='Save']", 10000);
            Save.Click();
        }
コード例 #3
0
        internal void EnterSkill()
        {
            //Populate the excel data

            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "Profile");
            // Refresh the page
            GlobalDefinitions.driver.Navigate().Refresh();
            //Click on skill
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[1]/a[2]", 10000);
            SkillBtn.Click();

            //Click on add new skill
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[3]/div/div[2]/div/table/thead/tr/th[3]/div", 10000);
            AddNewSkillBtn.Click();

            //Add new skill

            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "Name", "name", 10000);
            AddSkillBox.Click();
            AddSkill.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Skill"));

            //Add skill level
            AddSkillLevel.Click();
            new SelectElement(AddSkillLevel).SelectByText(GlobalDefinitions.ExcelLib.ReadData(2, "SkillLevel"));

            //Click on add skill
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//input[@value='Add']", 10000);
            AddSkillBtn.Click();
            Base.test.Log(LogStatus.Info, "Added skill successfully");
        }
コード例 #4
0
        internal void EditListings()
        {
            //Populate the Excel Sheet
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "ManageListing");
            // Refresh the page
            GlobalDefinitions.driver.Navigate().Refresh();

            //Click on Manage Listing
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "LinkText", "Manage Listings", 10000);
            manageListingsLink.Click();

            //Click on Edit button
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "(//i[contains(@class,'outline write icon')])[1]", 10000);
            edit.Click();

            //Edit title
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "Name", "title", 10000);
            Title.Click();
            Title.Clear();
            Title.SendKeys(GlobalDefinitions.ExcelLib.ReadData(3, "Title"));

            //Click on save button
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//input[@value='Save']", 10000);
            Save.Click();
        }
コード例 #5
0
        internal void SetPassword()
        {
            //Populate the excel data
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "SignIn");

            //Click on Name
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='account-profile-section']/div/div[1]/div[2]/div/span", 10000);
            NameBtn.Click();

            //Click on change password
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='account-profile-section']/div/div[1]/div[2]/div/span/div/a[2]", 10000);
            ChgPwdBtn.Click();

            //Enter old password
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "/html/body/div[4]/div/div[2]/form/div[1]/input", 10000);
            CurrentPwd.Click();
            CurrentPwd.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "NewPassword"));


            //Enter new password
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "/html/body/div[4]/div/div[2]/form/div[2]/input", 10000);
            NewPwd.Click();
            NewPwd.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Password"));

            //Confirm new password
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "/html/body/div[4]/div/div[2]/form/div[3]/input", 10000);
            ConfirmNewPwd.Click();
            ConfirmNewPwd.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Password"));

            //Click on save button
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "/html/body/div[4]/div/div[2]/form/div[4]/button", 10000);
            SaveBtn.Click();
        }
コード例 #6
0
        internal void DeleteListings()
        {
            //Populate the Excel Sheet
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "ManageListing");
            // Refresh the page
            GlobalDefinitions.driver.Navigate().Refresh();

            //Click on Manage Listing
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "LinkText", "Manage Listings", 10000);
            manageListingsLink.Click();

            //Click on delete button
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='listing-management-section']/div[2]/div[1]/div[1]/table/tbody/tr[1]/td[8]/div/button[3]/i", 10000);
            delete.Click();


            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@class='actions']", 10000);
            clickActionsButton.Click();
            //Select yes
            try
            {
                GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "/html/body/div[2]/div/div[3]/button[2]/i", 10000);
                yesBtn.Click();
                Base.test.Log(LogStatus.Pass, "Listing deleted");
            }
            catch (Exception ex)
            {
                Console.WriteLine("cannot able to delete skill", ex);
                Base.test.Log(LogStatus.Fail, "Unable to delete Listing");
            }
        }
コード例 #7
0
        internal void DeleteLanguage()
        {
            // Populate data saved in Excel
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "Profile");

            // Refresh the page
            GlobalDefinitions.driver.Navigate().Refresh();

            //Delete Language

            try
            {
                //Click on language
                GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[1]/a[1]", 10000);
                LangBtn.Click();

                //Click on language to delete
                GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[2]/div/div[2]/div/table/tbody[last()]/tr/td[1]", 10000);
                LangToSel.Click();

                //Click on delete language
                GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[2]/div/div[2]/div/table/tbody[last()]/tr/td[3]/span[2]/i", 20000);
                DeleteLangBtn.Click();
                Base.test.Log(LogStatus.Pass, "Language deleted successfully");
            }
            catch (Exception ex)
            {
                Assert.Fail("Test failed to delete Language", ex.Message);
                Base.test.Log(LogStatus.Fail, "Language is not deleted successfully");
            }
        }
コード例 #8
0
        internal void VerifyEditedSkill()
        {
            //Populate the excel data

            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "Profile");
            // Refresh the page
            GlobalDefinitions.driver.Navigate().Refresh();
            //Verify updated skill
            try
            {
                //Jump to Skill tab

                //Click on skill
                GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[1]/a[2]", 10000);
                SkillBtn.Click();

                //Verify Skill Level
                GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[3]/div/div[2]/div/table/tbody[last()]/tr/td[2]", 10000);
                var lastRowSkillLevel = GlobalDefinitions.driver.FindElement(By.XPath("//*[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[3]/div/div[2]/div/table/tbody[last()]/tr/td[2]")).Text;
                Assert.That(lastRowSkillLevel, Is.EqualTo(GlobalDefinitions.ExcelLib.ReadData(3, "SkillLevel")));
                Base.test.Log(LogStatus.Pass, "Skill edited verified successfully");
            }
            catch (Exception ex)
            {
                Assert.Fail("Test failed to verify updated Skills", ex.Message);
                Base.test.Log(LogStatus.Fail, "Skill edited is not verified successfully");
            }
        }
コード例 #9
0
        //Verify Share skill

        internal void VerifySkill()
        {
            //Populate the excel data

            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "ShareSkill");

            //Verify share skill details
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id=\"listing-management-section\"]/div[2]/div[1]/div[2]/button[2]", 10000);
            ManageLis.Click();
            try
            {
                GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, "XPath", "//*[@id='listing-management-section']/div[2]/div[1]/div[1]/table/tbody/tr[1]/td[2]", 10000);
                var categorycheck = GlobalDefinitions.driver.FindElement(By.XPath("//*[@id='listing-management-section']/div[2]/div[1]/div[1]/table/tbody/tr[1]/td[2]")).GetAttribute("textContent");
                Assert.That(categorycheck, Is.EqualTo(GlobalDefinitions.ExcelLib.ReadData(2, "Category")));

                GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, "XPath", "//*[@id='listing-management-section']/div[2]/div[1]/div[1]/table/tbody/tr[1]/td[3]", 10000);
                var titlecheck = GlobalDefinitions.driver.FindElement(By.XPath("//*[@id='listing-management-section']/div[2]/div[1]/div[1]/table/tbody/tr[1]/td[3]")).GetAttribute("textContent");
                Assert.That(titlecheck, Is.EqualTo(GlobalDefinitions.ExcelLib.ReadData(2, "Title")));
                Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Share skill added successfully");
            }
            catch (Exception ex)
            {
                Assert.Fail("verify the share skill page failed", ex.Message);
                Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Share skill not added");
            }
        }
コード例 #10
0
        internal void EditEducation()
        {
            //Populate the excel data
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "Profile");
            // Refresh the page
            GlobalDefinitions.driver.Navigate().Refresh();

            //Click on education
            //Click on Education button
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[1]/a[3]", 10000);
            EducationBtn.Click();

            //Click on education to be edit
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[4]/div/div[2]/div/table/tbody[last()]/tr/td[1]", 10000);
            EduToSel.Click();

            //Click on edit education button
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[4]/div/div[2]/div/table/tbody[last()]/tr/td[6]/span[1]/i", 10000);
            EditEduBtn.Click();

            //Update education
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "Name", "title", 10000);
            SelectTitle.Click();
            new SelectElement(SelectTitle).SelectByText(GlobalDefinitions.ExcelLib.ReadData(3, "Title"));

            //Click on update education button
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[4]/div/div[2]/div/table/tbody/tr/td/div[3]/input[1]", 10000);

            UpdateEduBtn.Click();
            Base.test.Log(LogStatus.Info, "Education edited successfully");
        }
コード例 #11
0
        internal void DeleteCertification()
        {
            //Populate the excel data

            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "Profile");
            // Refresh the page
            GlobalDefinitions.driver.Navigate().Refresh();

            //Delete Certification

            try
            {
                //Click on certification
                //Click on Certifications
                GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[1]/a[4]", 10000);
                CertificationBtn.Click();

                //Click on certification to be deleted
                GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[5]/div[1]/div[2]/div/table/tbody[last()]/tr/td[1]", 10000);
                CertiToSel.Click();

                //Click on delete certification button
                GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[5]/div[1]/div[2]/div/table/tbody[last()]/tr/td[4]/span[2]", 20000);
                DeleteCertiBtn.Click();
                Base.test.Log(LogStatus.Pass, "Certification deleted successfully");
            }

            catch (Exception ex)
            {
                Assert.Fail("Test failed to delete Certification", ex.Message);
                Base.test.Log(LogStatus.Fail, "Certification is not deleted successfully");
            }
        }
コード例 #12
0
        internal void EnterCertification()
        {
            //Populate the excel data
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "Profile");
            // Refresh the page
            GlobalDefinitions.driver.Navigate().Refresh();

            //Click on Certifications
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[1]/a[4]", 10000);
            CertificationBtn.Click();

            //Click on add new certifications
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[5]/div[1]/div[2]/div/table/thead/tr/th[4]/div", 10000);
            AddNewCertiBtn.Click();

            //Input Certification
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "Name", "certificationName", 10000);
            CertifiBtn.Click();
            CertifiName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Certificate"));

            //Input certification from
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "Name", "certificationFrom", 10000);
            CertiFromBtn.Click();
            CertifiFrom.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "CertifiedFrom"));

            //Select year from drop down
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "Name", "certificationYear", 10000);
            CertiYear.Click();
            new SelectElement(CertiYear).SelectByText(GlobalDefinitions.ExcelLib.ReadData(2, "YearOfCertification"));;

            //Click on add certification
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//input[@value='Add']", 10000);
            AddCerBtn.Click();
            Base.test.Log(LogStatus.Info, "Added Certification successfully");
        }
コード例 #13
0
        internal void EditCertification()
        {
            //Populate the excel data

            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "Profile");
            // Refresh the page
            GlobalDefinitions.driver.Navigate().Refresh();

            //Click on certification
            //Click on Certifications
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[1]/a[4]", 10000);
            CertificationBtn.Click();

            //Click on certification to be edit
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[5]/div[1]/div[2]/div/table/tbody[last()]/tr/td[1]", 10000);
            CertiToSel.Click();

            //Click on edit certification button
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[5]/div[1]/div[2]/div/table/tbody[last()]/tr/td[4]/span[1]/i", 10000);
            EditCertiBtn.Click();

            //Update certification
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "Name", "certificationYear", 10000);
            CertiYear.Click();
            new SelectElement(CertiYear).SelectByText(GlobalDefinitions.ExcelLib.ReadData(3, "YearOfCertification"));;

            //Click on update certification button
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[5]/div[1]/div[2]/div/table/tbody[1]/tr/td/div/span/input[1]", 10000);
            UpdateCertiBtn.Click();
            Base.test.Log(LogStatus.Info, "Certification edited successfully");
        }
コード例 #14
0
        internal void VerifyEditedCertification()
        {
            //Populate the excel data

            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "Profile");
            // Refresh the page
            GlobalDefinitions.driver.Navigate().Refresh();
            //verify updated certification
            //verify certification
            try
            {
                //Jump to Certification tab
                GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[1]/a[4]", 10000);
                CertificationBtn.Click();

                //Verify Certificate Year
                GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[5]/div[1]/div[2]/div/table/tbody[last()]/tr/td[3]", 10000);
                var lastRowCertificateYear = GlobalDefinitions.driver.FindElement(By.XPath("//*[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[5]/div[1]/div[2]/div/table/tbody[last()]/tr/td[3]")).Text;
                Assert.That(lastRowCertificateYear, Is.EqualTo(GlobalDefinitions.ExcelLib.ReadData(3, "YearOfCertification")));
                Base.test.Log(LogStatus.Pass, "Certification edited verified successfully");
            }
            catch (Exception ex)
            {
                Assert.Fail("Test failed to verify Entering Certification", ex.Message);
                Base.test.Log(LogStatus.Fail, "Certification edited is not verified successfully");
            }
        }
コード例 #15
0
        internal void ViewManageListings()
        {
            //Populate the Excel Sheet
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "ManageListing");

            //click on Manage Listing
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "LinkText", "Manage Listings", 10000);
            GlobalDefinitions.driver.Navigate().Refresh();
            manageListingsLink.Click();

            //click on View the Listing Icon
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "(//i[@class='eye icon'])[1]", 10000);
            view.Click();
            // Refresh the page
            GlobalDefinitions.driver.Navigate().Refresh();


            // validate view
            try
            {
                GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='service-detail-section']/div[2]/div/div[2]/div[1]/div[1]/div[2]/h1/span", 50000);
                var ViewVald = GlobalDefinitions.driver.FindElement(By.XPath("//*[@id='service-detail-section']/div[2]/div/div[2]/div[1]/div[1]/div[2]/h1/span")).Text;
                Assert.That(ViewVald, Is.EqualTo(GlobalDefinitions.ExcelLib.ReadData(2, "Title")));

                Base.test.Log(LogStatus.Pass, "Able to view listing");
            }
            catch (Exception ex)
            {
                Assert.Fail("verify the view share skill failed", ex.Message);
                Base.test.Log(LogStatus.Fail, "Unable to view listing");
            }
        }
コード例 #16
0
        internal void DeleteSkill()
        {
            //Populate the excel data

            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "Profile");
            // Refresh the page
            GlobalDefinitions.driver.Navigate().Refresh();
            //Delete Skill

            try
            {
                //Click on skill
                GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[1]/a[2]", 10000);
                SkillBtn.Click();

                //Click on skill to be deleted
                GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[3]/div/div[2]/div/table/tbody[last()]/tr/td[1]", 10000);
                SkillToSel.Click();

                //Click on Delete skill
                GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[3]/div/div[2]/div/table/tbody[last()]/tr/td[3]/span[2]/i", 20000);
                DeleteSkillBtn.Click();
                Base.test.Log(LogStatus.Pass, "Skill deleted successfully");
            }
            catch (Exception ex)
            {
                Assert.Fail("Test failed to Delete Skill", ex.Message);
                Base.test.Log(LogStatus.Fail, "Skill is deleted successfully");
            }
        }
コード例 #17
0
        internal void SearchByFilter()
        {
            //Populate the excel data
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "SearchSkill");

            //Click on search skill
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='account-profile-section']/div/div[1]/div[1]/input", 10000);
            ClickSkill.Click();
            ClickSkill.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "SearchFilter"));
            //ClickSkill.SendKeys("All");

            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='account-profile-section']/div/div[1]/div[1]/i", 10000);
            SearchSkill.Click();

            //Search by Filter online
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='service-search-section']/div[2]/div/section/div/div[1]/div[5]/button[1]", 10000);
            FilterOnline.Click();
            Thread.Sleep(2000);
            Base.test.Log(LogStatus.Info, "Skill search using Online is successfull");

            //Search by filter onsite
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='service-search-section']/div[2]/div/section/div/div[1]/div[5]/button[2]", 10000);
            FilterOnsite.Click();
            Thread.Sleep(2000);
            Base.test.Log(LogStatus.Info, "Skill search using Onsite is successfull");

            //Search by filter ShowAll
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='service-search-section']/div[2]/div/section/div/div[1]/div[5]/button[3]", 10000);
            FilterShowAll.Click();
            Thread.Sleep(2000);
            Base.test.Log(LogStatus.Info, "Skill search using Showall is successfull");
        }
コード例 #18
0
        internal void DeleteListings()
        {
            //Populate the Excel Sheet
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "ManageListing");
            // Refresh the page
            GlobalDefinitions.driver.Navigate().Refresh();

            //Click on Manage Listing
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "LinkText", "Manage Listings", 10000);
            manageListingsLink.Click();

            //Click on delete button
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "(//i[@class='remove icon'])[1]", 10000);
            delete.Click();


            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@class='actions']", 10000);
            clickActionsButton.Click();
            //Select yes
            try
            {
                GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "(//i[contains(@aria-hidden,'true')])[4]", 10000);
                yesBtn.Click();
            }
            catch (Exception ex)
            {
                Console.WriteLine("cannot able to delete skill", ex);
            }
        }
コード例 #19
0
        internal void VerifyLanguage()
        {
            //Populate the excel data

            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "Profile");
            // Refresh the page
            GlobalDefinitions.driver.Navigate().Refresh();
            //verify language
            try
            {
                //Verify Language Name
                GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[1]/a[1]", 10000);
                LangBtn.Click();
                GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[2]/div/div[2]/div/table/tbody[last()]/tr/td[1]", 10000);
                var lastRowLanguageName = GlobalDefinitions.driver.FindElement(By.XPath("//div[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[2]/div/div[2]/div/table/tbody[last()]/tr/td[1]")).Text;
                Assert.That(lastRowLanguageName, Is.EqualTo(GlobalDefinitions.ExcelLib.ReadData(2, "Language")));

                //Verify Language Level
                GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[2]/div/div[2]/div/table/tbody[last()]/tr/td[2]", 10000);
                var lastRowLanguageLevel = GlobalDefinitions.driver.FindElement(By.XPath("//*[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[2]/div/div[2]/div/table/tbody[last()]/tr/td[2]")).Text;
                Assert.That(lastRowLanguageLevel, Is.EqualTo(GlobalDefinitions.ExcelLib.ReadData(2, "LanguageLevel")));
                Base.test.Log(LogStatus.Pass, "Added Language verified successfully");
            }
            catch (Exception ex)
            {
                Assert.Fail("Test failed to verify Entering Language", ex.Message);
                Base.test.Log(LogStatus.Fail, "Added Language is not verified successfully");
            }
        }
コード例 #20
0
        internal void Listings()
        {
            //Populate the Excel Sheet
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "ManageListing");
            // Refresh the page
            GlobalDefinitions.driver.Navigate().Refresh();

            //Click on Manage Listing
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "LinkText", "Manage Listings", 10000);
            manageListingsLink.Click();
            GlobalDefinitions.driver.Navigate().Refresh();
            Thread.Sleep(1000);

            //Click on view button
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "(//i[@class='eye icon'])[1]", 10000);
            view.Click();
            // Refresh the page
            GlobalDefinitions.driver.Navigate().Refresh();
            try
            {
                GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, "XPath", "//span[@class='skill-title']", 40000);
                var ViewValidation = GlobalDefinitions.driver.FindElement(By.XPath("//span[@class='skill-title']")).Text;
                Assert.That(ViewValidation, Is.EqualTo(GlobalDefinitions.ExcelLib.ReadData(2, "Title")));
            }
            catch (Exception ex)
            {
                Assert.Fail("verify the share skill page failed", ex.Message);
            }
        }
コード例 #21
0
        internal void EditLanguage()
        {
            // Populate data saved in Excel
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "Profile");

            // Refresh the page
            GlobalDefinitions.driver.Navigate().Refresh();
            //Click on language
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[1]/a[1]", 10000);
            LangBtn.Click();

            //Click on language to edit
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[2]/div/div[2]/div/table/tbody[last()]/tr/td[1]", 10000);
            LangToSel.Click();

            //Click on edit language button
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[2]/div/div[2]/div/table/tbody[last()]/tr/td[3]/span[1]/i", 10000);
            EditLangBtn.Click();

            //Update the language
            //Update language level
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "Name", "level", 10000);
            ChooseLevel.Click();

            new SelectElement(ChooseLevel).SelectByText(GlobalDefinitions.ExcelLib.ReadData(3, "LanguageLevel"));

            //Click on update
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[2]/div/div[2]/div/table/tbody/tr/td/div/span/input[1]", 10000);
            UpdateLangBtn.Click();
            Base.test.Log(LogStatus.Info, "Language edited successfully");
        }
コード例 #22
0
        internal void EditSkills()
        {
            //Populate the excel data

            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "Profile");
            // Refresh the page
            GlobalDefinitions.driver.Navigate().Refresh();

            //Click on skill
            //Click on skill
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[1]/a[2]", 10000);
            SkillBtn.Click();

            //Click on skill to be edited
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[3]/div/div[2]/div/table/tbody[last()]/tr/td[1]", 10000);
            SkillToSel.Click();

            //Click on Edit skill
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[3]/div/div[2]/div/table/tbody[last()]/tr/td[3]/span[1]/i", 10000);
            EditSkill.Click();

            //Edit the skill
            //Add skill level
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "Name", "level", 10000);
            AddSkillLevel.Click();
            new SelectElement(AddSkillLevel).SelectByText(GlobalDefinitions.ExcelLib.ReadData(3, "SkillLevel"));

            //Click on update
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[3]/div/div[2]/div/table/tbody[1]/tr/td/div/span/input[1]", 10000);
            UpdateSkillBtn.Click();
            Base.test.Log(LogStatus.Info, "Skill edited successfully");
        }
コード例 #23
0
        //Validate edited details
        internal void ValidateEditedDetails()
        {
            //Populate the Excel Sheet
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "ManageListing");
            // Refresh the page
            GlobalDefinitions.driver.Navigate().Refresh();

            //Validate edited data
            //Click on Manage Listing
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "LinkText", "Manage Listings", 10000);
            manageListingsLink.Click();
            Thread.Sleep(5000);
            //Click on view button
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "(//i[@class='eye icon'])[1]", 10000);
            view.Click();
            GlobalDefinitions.driver.Navigate().Refresh();
            try
            {
                GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, "XPath", "//*[@id='service-detail-section']/div[2]/div/div[2]/div[1]/div[1]/div[2]/h1/span", 20000);
                var ViewValidation = GlobalDefinitions.driver.FindElement(By.XPath("//*[@id='service-detail-section']/div[2]/div/div[2]/div[1]/div[1]/div[2]/h1/span")).Text;
                Assert.That(ViewValidation, Is.EqualTo(GlobalDefinitions.ExcelLib.ReadData(3, "Title")));
                Base.test.Log(LogStatus.Pass, "Listing Edited successfully");
            }
            catch (Exception ex)
            {
                Assert.Fail("verify the edited share skill page failed", ex.Message);
                Base.test.Log(LogStatus.Fail, "Unable to edit listing");
            }
        }
コード例 #24
0
        internal void EnterDetails()
        {
            //Populate the excel data

            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "Profile");

            #region Availability

            //Click on availability edit
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='account-profile-section']/div/section[2]/div/div/div/div[2]/div/div/div/div/div/div[3]/div/div[2]/div/span/i", 10000);
            AvailabilityTimeEdit.Click();

            //Click on availability dropdown
            AvailabilityTime.Click();

            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "Name", "availabiltyType", 10000);
            //select availability time
            new SelectElement(AvailabilityTime).SelectByText(GlobalDefinitions.ExcelLib.ReadData(2, "AvailableTime"));
            Base.test.Log(LogStatus.Info, "Select the available time");

            #endregion

            #region Hour

            //click on hour edit
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='account-profile-section']/div/section[2]/div/div/div/div[2]/div/div/div/div/div/div[3]/div/div[3]/div/span/i", 10000);
            HourEdit.Click();

            //click on houredit dropdown
            AvailabilityHour.Click();

            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "Name", "availabiltyHour", 10000);
            //select availability hour
            new SelectElement(AvailabilityHour).SelectByText(GlobalDefinitions.ExcelLib.ReadData(2, "Hours"));
            Base.test.Log(LogStatus.Info, "Added hour successfully");

            #endregion

            #region EarnTarget
            //click on Target edit
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='account-profile-section']/div/section[2]/div/div/div/div[2]/div/div/div/div/div/div[3]/div/div[4]/div/span/i", 10000);
            SalaryEdit.Click();

            //click on Target salary dropdown
            SalarySelect.Click();

            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "Name", "availabiltyTarget", 10000);
            //select salary
            new SelectElement(SalarySelect).SelectByText(GlobalDefinitions.ExcelLib.ReadData(2, "EarnTarget"));
            Base.test.Log(LogStatus.Info, "Added Target successfully");
            #endregion
        }
コード例 #25
0
        internal void SentRequests()
        {
            //Populate the excel data

            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "ManageRequest");

            //Click on manage request tab
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[text()='Manage Requests']", 10000);
            ManageReqTab.Click();

            //Click on sent request
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "LinkText", "Sent Requests", 10000);
            SentReqstSel.Click();

            //Click on search icon
            Searchicon.Click();
            Thread.Sleep(1000);
            //Enter name
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='service-search-section']/div[2]/div/section/div/div[1]/div[3]/div[1]/div/div[1]/input", 10000);
            SearchNameicon.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "SearchName"));
            //SearchNameicon.SendKeys("kimi wang");
            Thread.Sleep(1000);

            //Select name
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='service-search-section']/div[2]/div/section/div/div[1]/div[3]/div[1]/div/div[2]/div[1]/div/span", 10000);
            SearchName.Click();

            //Click on image
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='service-search-section']/div[2]/div/section/div/div[2]/div/div[2]/div/div/div[last()]/a/img", 10000);
            SelName.Click();

            //Enter text data
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='service-detail-section']/div[2]/div/div[2]/div[2]/div[2]/div/div[2]/div/div[1]/textarea", 10000);
            SearchNameicon.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Text"));
            //textArea.SendKeys("I am interested on your skills");

            //Click on request
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='service-detail-section']/div[2]/div/div[2]/div[2]/div[2]/div/div[2]/div/div[3]", 10000);
            SelRequest.Click();
            Thread.Sleep(1000);

            //select ok
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "/html/body/div[4]/div/div[3]/button[1]", 10000);
            Yes.Click();
            Base.test.Log(LogStatus.Info, "Request sent successfully");
        }
コード例 #26
0
        internal void VerifyEducation()
        {
            //Populate the excel data
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "Profile");
            // Refresh the page
            GlobalDefinitions.driver.Navigate().Refresh();
            //verify education
            try
            {
                //Jump to Education tab
                GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[1]/a[3]", 10000);
                EducationBtn.Click();

                //Verify Education Country
                GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[4]/div/div[2]/div/table/tbody[last()]/tr/td[1]", 10000);
                var lastRowEducationCountry = GlobalDefinitions.driver.FindElement(By.XPath("//*[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[4]/div/div[2]/div/table/tbody[last()]/tr/td[1]")).Text;
                Assert.That(lastRowEducationCountry, Is.EqualTo(GlobalDefinitions.ExcelLib.ReadData(2, "Country")));

                //Verify Education Name
                GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[4]/div/div[2]/div/table/tbody[last()]/tr/td[2]", 10000);
                var lastRowEducationName = GlobalDefinitions.driver.FindElement(By.XPath("//*[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[4]/div/div[2]/div/table/tbody[last()]/tr/td[2]")).Text;
                Assert.That(lastRowEducationName, Is.EqualTo(GlobalDefinitions.ExcelLib.ReadData(2, "University")));

                //Verify Education Title
                GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[4]/div/div[2]/div/table/tbody[last()]/tr/td[3]", 10000);
                var lastRowEducationTitle = GlobalDefinitions.driver.FindElement(By.XPath("//*[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[4]/div/div[2]/div/table/tbody[last()]/tr/td[3]")).Text;
                Assert.That(lastRowEducationTitle, Is.EqualTo(GlobalDefinitions.ExcelLib.ReadData(2, "Title")));

                //Verify Education Degree
                GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[4]/div/div[2]/div/table/tbody[last()]/tr/td[4]", 10000);
                var lastRowEducationDegree = GlobalDefinitions.driver.FindElement(By.XPath("//*[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[4]/div/div[2]/div/table/tbody[last()]/tr/td[4]")).Text;
                Assert.That(lastRowEducationDegree, Is.EqualTo(GlobalDefinitions.ExcelLib.ReadData(2, "Degree")));

                //Verify Education Graduation Year
                GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[4]/div/div[2]/div/table/tbody[last()]/tr/td[5]", 10000);
                var lastRowEducationGraduationYear = GlobalDefinitions.driver.FindElement(By.XPath("//*[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[4]/div/div[2]/div/table/tbody[last()]/tr/td[5]")).Text;
                Assert.That(lastRowEducationGraduationYear, Is.EqualTo(GlobalDefinitions.ExcelLib.ReadData(2, "YearOfGraduation")));
                Base.test.Log(LogStatus.Pass, "Education added verified successfully");
            }
            catch (Exception ex)
            {
                Assert.Fail("Test failed to verify Entering Education", ex.Message);
                Base.test.Log(LogStatus.Fail, "Education added is not verified successfully");
            }
        }
コード例 #27
0
        internal void EnterEducation()
        {
            //Populate the excel data

            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "Profile");
            // Refresh the page
            GlobalDefinitions.driver.Navigate().Refresh();
            //Click on Education button
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[1]/a[3]", 10000);
            EducationBtn.Click();

            //Click on add new education
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/form/div[4]/div/div[2]/div/table/thead/tr/th[6]/div", 10000);
            AddNewEducationBtn.Click();

            //Choose country
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "Name", "country", 10000);
            SelectCountry.Click();
            new SelectElement(SelectCountry).SelectByText(GlobalDefinitions.ExcelLib.ReadData(2, "Country"));

            //Choose title
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "Name", "title", 10000);
            SelectTitle.Click();
            new SelectElement(SelectTitle).SelectByText(GlobalDefinitions.ExcelLib.ReadData(2, "Title"));

            //Choose year
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "Name", "yearOfGraduation", 10000);
            YearOfGraduation.Click();
            new SelectElement(YearOfGraduation).SelectByText(GlobalDefinitions.ExcelLib.ReadData(2, "YearOfGraduation"));

            //Choose institute name
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "Name", "instituteName", 10000);
            InstitName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "University"));

            //Choose degree
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "Name", "degree", 10000);
            Degree.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Degree"));

            //Click on add education
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//input[@value='Add']", 10000);
            AddEdu.Click();
            Base.test.Log(LogStatus.Info, "Education Added successfully");
        }
コード例 #28
0
        internal void DeleteManageLsitings()
        {
            //Populate the Excel Sheet
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "ManageListing");
            // Refresh the page
            GlobalDefinitions.driver.Navigate().Refresh();

            // Click on Manage Lsitings
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "LinkText", "Manage Listings", 10000);
            manageListingsLink.Click();
            Thread.Sleep(5000);

            //Click on Delete Icon
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='listing-management-section']/div[2]/div[1]/div[1]/table/tbody/tr[1]/td[8]/div/button[3]/i", 10000);
            delete.Click();
            //yes or nor...click yes
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[@class='actions']", 10000);
            clickActionsButton.Click();
            yesBtn.Click();
        }
コード例 #29
0
        internal void VerifyDescription()
        {
            //Populate the excel data
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "Profile");
            // Refresh the page
            GlobalDefinitions.driver.Navigate().Refresh();

            //Verify Description
            try
            {
                GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/div/div/div/span", 10000);
                var description = GlobalDefinitions.driver.FindElement(By.XPath("//*[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/div/div/div/span")).Text;
                Assert.That(description, Is.EqualTo(GlobalDefinitions.ExcelLib.ReadData(2, "Description")));
                Base.test.Log(LogStatus.Pass, "Adding Description Passed");
            }
            catch (Exception ex)
            {
                Assert.Fail("Test failed to verify Entering Description", ex.Message);
                Base.test.Log(LogStatus.Fail, "Adding Description failed");
            }
        }
コード例 #30
0
        internal void EditDescription()
        {
            //Populate the excel data
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "Profile");
            // Refresh the page
            GlobalDefinitions.driver.Navigate().Refresh();

            //Click on edit Description
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/div/div/div/h3/span/i", 10000);
            DescriptionEdit.Click();

            //Click on Description Text and clear the details
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/div/div/form/div/div/div[2]/div[1]/textarea", 10000);
            Thread.Sleep(1000);
            DescriptionBox.Clear();
            DescriptionBox.SendKeys(GlobalDefinitions.ExcelLib.ReadData(3, "Description"));

            //Click on Save button
            GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='account-profile-section']/div/section[2]/div/div/div/div[3]/div/div/form/div/div/div[2]/button", 10000);
            SaveDescription.Click();
            Base.test.Log(LogStatus.Info, "Description Edited Successfully");
        }