コード例 #1
0
        public void SearchbyFilters()
        {
            //Read data from Excel file
            ExcelLib.PopulateInCollection(ExcelPath, "SearchSkills");
            string searchSkill     = ExcelLib.ReadData(3, "SearchSkills");
            string username_Onsite = ExcelLib.ReadData(3, "User");
            string title_Onsite    = ExcelLib.ReadData(3, "Title");
            string username_Online = ExcelLib.ReadData(4, "User");
            string title_Online    = ExcelLib.ReadData(4, "Title");


            //Search by skillname
            var searchSkillsObj = new SearchSkills();

            searchSkillsObj.ClickSearch();
            searchSkillsObj.InputSearchSkills(searchSkill);

            //filter by Online
            searchSkillsObj.FilterbyOnline();
            Assert.IsTrue(searchSkillsObj.ValidateResults(username_Online, title_Online), "Filtered by Online failed");

            //filter by Onsite
            searchSkillsObj.FilterbyOnsite();
            Assert.IsTrue(searchSkillsObj.ValidateResults(username_Onsite, title_Onsite), "Filtered by Onsite failed");

            //filter by showall
            searchSkillsObj.FilterbyShowAll();
            Assert.IsTrue(searchSkillsObj.ValidateTitle(searchSkill), "Filtered by ShowAll failed");
        }
コード例 #2
0
        public void SearchbyCategory()
        {
            //Read data from Excel file
            ExcelLib.PopulateInCollection(ExcelPath, "SearchSkills");
            string category    = ExcelLib.ReadData(2, "Category");
            string subcategory = ExcelLib.ReadData(2, "SubCategory");

            //Search by category and subcategory
            var searchSkillsObj = new SearchSkills();

            searchSkillsObj.ClickSearch();
            searchSkillsObj.ClickCategory(category, subcategory);

            //Validate the result in ServiceDetails Page
            for (int i = 0; i < searchSkillsObj.ServiceDetailsLinks.Count(); i++)
            {
                Actions builder = new Actions(Driver);
                builder.KeyDown(Keys.Shift).Click(searchSkillsObj.ServiceDetailsLinks[i]).KeyUp(Keys.Shift).Build().Perform();
                var serviceDetailsObj = new ServiceDetails();
                var windowList        = Driver.WindowHandles;
                Driver.SwitchTo().Window(windowList[1]);
                Thread.Sleep(2000);
                Assert.Multiple(() =>
                {
                    Assert.AreEqual(category, serviceDetailsObj.Category.Text);
                    Assert.AreEqual(subcategory, serviceDetailsObj.SubCategory.Text);
                });
                Assert.AreEqual("Online", serviceDetailsObj.LocationType.Text);
                Driver.Close();
                Driver.SwitchTo().Window(windowList[0]);
            }
        }
コード例 #3
0
        public void SearchbyFiltersOnSite()
        {
            //Read data from Excel file
            ExcelLib.PopulateInCollection(ExcelPath, "SearchSkills");
            string searchSkill = ExcelLib.ReadData(3, "SearchSkills");

            //Search by skill first
            var searchSkillsObj = new SearchSkills();

            searchSkillsObj.ClickSearch();

            searchSkillsObj.InputSearchSkills(searchSkill);

            //Filter by Onsite
            searchSkillsObj.FilterbyOnsite();
            //Validate the result in ServiceDetails Pag
            for (int i = 0; i < searchSkillsObj.ServiceDetailsLinks.Count(); i++)
            {
                Actions builder = new Actions(Driver);
                builder.KeyDown(Keys.Shift).Click(searchSkillsObj.ServiceDetailsLinks[i]).KeyUp(Keys.Shift).Build().Perform();
                var serviceDetailsObj = new ServiceDetails();
                var windowList        = Driver.WindowHandles;
                Driver.SwitchTo().Window(windowList[1]);
                Thread.Sleep(2000);
                Assert.AreEqual("On-Site", serviceDetailsObj.LocationType.Text, "Filter by Onsite failed");
                Driver.Close();
                Driver.SwitchTo().Window(windowList[0]);
            }
        }
コード例 #4
0
        public void GivenIClickSearchIconOnProfilePage()
        {
            //Search by category and subcategory
            var searchSkillsObj = new SearchSkills();

            _scenarioContext["searchSkillsObj"] = searchSkillsObj;
            searchSkillsObj.ClickSearch();
        }
コード例 #5
0
            public void SearchSkillsByCategoriesTest()
            {
                test = extent.StartTest("Search Skills By Categories");
                SearchSkills searchSkills = new SearchSkills();

                searchSkills.SearchSkillsByCategories(driver);

                searchSkills.VerifySearchSkillsByCategories(driver);
            }
コード例 #6
0
            public void SearchSkillsByFiltersTest()
            {
                test = extent.StartTest("Search Skills By Filters");
                SearchSkills searchSkills = new SearchSkills();

                searchSkills.SearchSkillsByFilters(driver);

                searchSkills.VerifySearchSkillsByFilters(driver);
            }
コード例 #7
0
            public void SearchSkills()
            {
                // Creates a toggle for the given test, adds all log events under it
                test = extent.StartTest("SearchSkills");

                //Create a Class & an Object to call the ManageRequests method
                SearchSkills SS = new SearchSkills();

                SS.ClickOnSearchSkills();
                SS.ClickOnCatagories();
                SS.ClickOnSubCatagories();
            }
コード例 #8
0
            public void SrchSkill()
            {
                //Start Report
                test = extent.StartTest("Search Skill");

                SearchSkills create = new SearchSkills();

                create.SkillSearch_By_AllCategories();
                // create.SkillSearch_By_SubCateogory();
                //  create.Validation_Search_By_Filter();
                // create.Search_By_Filter();
            }
コード例 #9
0
            public void CategorySearchSkills()
            {
                // Log in first
                LogIn();

                // Create a toggle for the given test, adds all log events under it
                test = extent.StartTest("Search Skills by categores and subcategories");

                // SearchSkills object
                SearchSkills obj = new SearchSkills();

                obj.CategorySearchSkills();
            }
コード例 #10
0
            public void FilterSearchSkills()
            {
                // Log in first
                LogIn();

                // Create a toggle for the given test, adds all log events under it
                test = extent.StartTest("Search Skills by filters");

                // SearchSkills object
                SearchSkills obj = new SearchSkills();

                obj.FilterSearchSkills();
            }
コード例 #11
0
        public void SearchSkillByInput()
        {
            SignIn.OpenForm();
            SignIn.FillCredentials(2);

            //Check if user is able to Enter Skill in Search box
            SearchSkills.EnterText(2);

            //Check if user is able to click on search icon
            SearchSkills.ClickOnSearchButton();

            //check if search for particular input
            SearchSkills.CheckSearchSkills(2);
        }
コード例 #12
0
        public void SearchSkillBySubcategory()
        {
            SignIn.OpenForm();
            SignIn.FillCredentials(2);

            //Check if user is able to click on search icon
            SearchSkills.ClickOnSearchButton();

            //Check if user is able to click on Category and Sub category respectively
            SearchSkills.ClickOnCategory(3);

            //Check if user is at right page
            SearchSkills.CheckSubCategory();
        }
コード例 #13
0
        public void LastPageNavi()
        {
            SignIn.OpenForm();
            SignIn.FillCredentials(2);

            //Check if user is able to click on search icon
            SearchSkills.ClickOnSearchButton();

            //Check if user is able to click on Show All Button
            SearchSkills.ClickOnShowAll();

            //Check if user is at Last Page
            SearchSkills.CheckLastPage();
        }
コード例 #14
0
        public void FilterByOnline()
        {
            SignIn.OpenForm();
            SignIn.FillCredentials(2);

            //Check if user is able to click on search icon
            SearchSkills.ClickOnSearchButton();

            //Check if user is able to click on Online filter
            SearchSkills.ClickOnOnline();

            //Check if user is at right page
            SearchSkills.CheckClickOnOnline();
        }
コード例 #15
0
        public void SearchSkillByUsername()
        {
            SignIn.OpenForm();
            SignIn.FillCredentials(2);

            //Check if user is able to click on search icon
            SearchSkills.ClickOnSearchButton();

            //Check if user is able to input username
            SearchSkills.EnterUserName(5);

            //Check if user is able to find all record of user
            SearchSkills.CheckSkillByUsername(5);
        }
コード例 #16
0
        public void GivenTheUserFindAnInterestingSkill()
        {
            //LogIn
            SignIn.OpenForm();
            SignIn.FillCredentials(2);

            //Check if user is able to click on search icon
            SearchSkills.ClickOnSearchButton();

            //Check if user is able to input username
            SearchSkills.EnterUserName(4);

            //Check if user can open a Skill Box
            SearchSkills.ClickOnOnFirstBox();
        }
コード例 #17
0
        public void SearchbyFiltersShowAll()
        {
            //Read data from Excel file
            ExcelLib.PopulateInCollection(ExcelPath, "SearchSkills");
            string searchSkill = ExcelLib.ReadData(3, "SearchSkills");

            //Search by skill first
            var searchSkillsObj = new SearchSkills();

            searchSkillsObj.ClickSearch();
            searchSkillsObj.InputSearchSkills(searchSkill);

            //Filter by showall
            searchSkillsObj.FilterbyShowAll();

            Assert.IsTrue(searchSkillsObj.ValidateTitle(searchSkill));
        }
コード例 #18
0
            public void SearchSkillOperation()
            {
                // Start Report
                test = extent.StartTest("SearchSkillOperation");

                //Creating an Instance of Search Skill Page
                SearchSkills find = new SearchSkills();

                //Find SkillSearch_By_All_Categories
                find.SkillSearch_By_AllCategories();  //(working properly)

                //Find SkillSearch_By_Sub_Categories
                find.SkillSearch_By_SubCateogory();  //(Working Properly)

                //Find SkillSearch_By_Filters
                find.Search_By_Filter();   //(Working Properly)

                //Validate Search By Filters
                find.Validation_Search_By_Filter();  //(Working Properly)
            }
コード例 #19
0
        public void SearchbyCategory()
        {
            //Read data from Excel file
            ExcelLib.PopulateInCollection(ExcelPath, "SearchSkills");
            string searchSkill = ExcelLib.ReadData(2, "SearchSkills");
            string category    = ExcelLib.ReadData(2, "Category");
            string subcategory = ExcelLib.ReadData(2, "SubCategory");
            string username    = ExcelLib.ReadData(2, "User");
            string title       = ExcelLib.ReadData(2, "Title");

            //Search by category and skillname
            var searchSkillsObj = new SearchSkills();

            searchSkillsObj.ClickSearch();
            searchSkillsObj.ClickCategory(category, subcategory);
            searchSkillsObj.InputSearchSkills(searchSkill);

            //Validate the result
            //The expected result should have title and username as expected
            Assert.IsTrue(searchSkillsObj.ValidateResults(username, title), "search skills by category failed");
        }
コード例 #20
0
        internal void SearchSharedSkill()
        {
            Extension.WaitForElementDisplayed(Driver, By.CssSelector("input[placeholder='Search skills']"), 2);

            //Enter the title in search skill field and press enter
            SearchSkills.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Title") + "\n");
            Extension.WaitForElementDisplayed(Driver, By.XPath("//b[text()='All Categories']/following-sibling::span"), 2);
            Thread.Sleep(2000);

            //Validate if All categories count is greater than 0
            GlobalDefinitions.ValidateBoolean(int.Parse(AllCategoriesCount.Text) > 0, "All Categories shown");

            //Validate Category and subcategory added count is greater than 0 when searched
            foreach (IWebElement Category in CategoriesList)
            {
                string CategoryValue = Category.Text.Replace(Category.FindElement(By.XPath("./*")).Text, "").TrimEnd();

                if (CategoryValue.ToLower() == GlobalDefinitions.ExcelLib.ReadData(2, "Category").ToLower())
                {
                    Category.Click();
                    GlobalDefinitions.ValidateBoolean(int.Parse(Category.FindElement(By.XPath("span")).Text) > 0, "Category shown");
                    IList <IWebElement> SubCategoryList = Driver.FindElements(By.XPath("//a[@role='listitem'][@class='item subcategory']"));
                    foreach (IWebElement SubCategory in SubCategoryList)
                    {
                        string SubCategoryValue = SubCategory.Text.Replace(SubCategory.FindElement(By.XPath("./*")).Text, "").TrimEnd();
                        if (SubCategoryValue.ToLower() == GlobalDefinitions.ExcelLib.ReadData(2, "SubCategory").ToLower())
                        {
                            SubCategory.Click();
                            GlobalDefinitions.ValidateBoolean(int.Parse(SubCategory.FindElement(By.XPath("span")).Text) > 0, "SubCategory Shown");
                            Base.Image = SaveScreenShotClass.SaveScreenshot(Driver, "Report");
                            break;
                        }
                    }
                    break;
                }
            }
        }
コード例 #21
0
ファイル: SanityTest.cs プロジェクト: MoyaLiu/NUnitSourceMRS
        public static void HappyPathAsLearner()
        {
            //LogIn
            SignIn.OpenForm();
            SignIn.FillCredentials(2);

            //Check if user is able to click on search icon
            SearchSkills.ClickOnSearchButton();

            //Check if user is able to input username
            SearchSkills.EnterUserName(4);

            //Check if user can open a Skill Box
            SearchSkills.ClickOnOnFirstBox();

            //Sent a request for an already opened Skill
            ManageRequestPage.SentRequest();

            //Go to manage request page
            ManageRequestPage.NavigateToSentRequest();

            //The User checks the new request
            ManageRequestPage.CheckNewSentStatus("Pending");
        }
コード例 #22
0
 public void ThenIShouldSeeAllRecordOfSub_Categories()
 {
     //assertion
     SearchSkills.CheckSubCategory();
 }
コード例 #23
0
 public void WhenIEnterUsername()
 {
     SearchSkills.EnterUserName(5);
 }
コード例 #24
0
 public void ThenIShouldSeeAllSkillOfThatUser()
 {
     SearchSkills.CheckSkillByUsername(5);
 }
コード例 #25
0
 public void WhenIClickOnOnlineButton()
 {
     SearchSkills.ClickOnOnline();
 }
コード例 #26
0
 public void ThenIShouldSeeAllOnlineSkills()
 {
     //Assertion
     SearchSkills.CheckClickOnOnline();
 }
コード例 #27
0
 public void WhenIClickOnOnsiteButton()
 {
     SearchSkills.ClickOnOnsite();
 }
コード例 #28
0
 public void ThenIShouldSeeAllOnsiteSkills()
 {
     SearchSkills.CheckClickOnsite();
 }
コード例 #29
0
 public void WhenIClickOnShowAllButton()
 {
     SearchSkills.ClickOnShowAll();
 }
コード例 #30
0
 public void ThenIShouldSeeAllSkills()
 {
     SearchSkills.CheckLastPage();
 }