public void ShareSkill()
            {
                // Creates a toggle for the given test, adds all log events under it
                test = extent.StartTest("ShareSkill");

                //Create a Class & an Object to call the method
                ShareSkill SK = new ShareSkill();

                SK.ClickOnShareSkillButton();
                SK.EnterTitle();
                SK.EnterDescription();
                SK.SelectCategoryDropDown();
                SK.SelectSubCategoryDropDown();
                SK.SelectTags();
                SK.SelectLocationTypeOptions();
                SK.SelectStartDateDropDown();
                SK.SelectEndDateDropDown();
                SK.SelectDays();
                SK.SelectStartTimeDropDown();
                SK.SelectEndTimeDropDown();
                SK.SelectSkillTradeOption();
                SK.SelectSkillExchangeOption();
                SK.SelectActiveOption();
                SK.UploadWorkSamplesAutoIt();
                SK.ClickSave();
            }
Beispiel #2
0
        //Failed, Edit not working properly
        public void EditService()
        {
            //Populate the Excel Sheet
            ExcelLib.PopulateInCollection(ExcelPath, "ManageListings");
            string title = ExcelLib.ReadData(2, "Title");

            //Search from listing and click edit
            var managementListingsInstance = new ManageListings();

            managementListingsInstance.ClickManageListings();
            managementListingsInstance.ClickEdit(title);

            //Verify if user has been navigated to ServiceListing Page
            string expectedTitle = "ServiceListing";
            string actualTitle   = Driver.Title;

            Assert.That(actualTitle, Is.EqualTo(expectedTitle), "Navigation to ServiceListing Page failed");

            //Edit the service
            #region read data from ShareSkill sheet, row 3
            //Populate the excel data
            ExcelLib.PopulateInCollection(ExcelPath, "ShareSkill");

            //Read data
            //Keep title same
            //string title = ExcelLib.ReadData(3, "Title");
            string description      = ExcelLib.ReadData(3, "Description");
            string category         = ExcelLib.ReadData(3, "Category");
            string subCategory      = ExcelLib.ReadData(3, "SubCategory");
            string tags             = ExcelLib.ReadData(3, "Tags");
            string serviceType      = ExcelLib.ReadData(3, "ServiceType");
            string locationType     = ExcelLib.ReadData(3, "LocationType");
            string startDate        = ExcelLib.ReadData(3, "Startdate");
            string endDate          = ExcelLib.ReadData(3, "Enddate");
            string day              = ExcelLib.ReadData(3, "Selectday");
            string startTime        = ExcelLib.ReadData(3, "Starttime");
            string endTime          = ExcelLib.ReadData(3, "Endtime");
            string skillTradeOption = ExcelLib.ReadData(3, "SkillTrade");
            string skillExchangeTag = ExcelLib.ReadData(3, "Skill-exchange");
            string creditAmount     = ExcelLib.ReadData(3, "Credit");
            string active           = ExcelLib.ReadData(3, "Active");
            #endregion
            //Enter the data
            var shareSkillInstance = new ShareSkill();
            //shareSkillInstance.ClickShareSkill();
            shareSkillInstance.EnterShareSkill(title, description, category, subCategory, tags, serviceType, locationType, startDate, endDate,
                                               day, startTime, endTime, skillTradeOption, skillExchangeTag, creditAmount, active);
            shareSkillInstance.ClickSave();

            //Verify if the service has been updated successfully in ListManagement Page
            var manageListingsInstance = new ManageListings();
            manageListingsInstance.ClickManageListings();
            Assert.That(manageListingsInstance.ValidateData(category, title, description, serviceType, skillTradeOption),
                        "Editing Service failed");
        }
Beispiel #3
0
        //Failed, uploading work sample not working properly
        public void CreateService()
        {
            #region read data from ShareSkill sheet, row 2
            //Populate the excel data
            ExcelLib.PopulateInCollection(ExcelPath, "ShareSkill");

            //Read data
            string title            = ExcelLib.ReadData(2, "Title");
            string description      = ExcelLib.ReadData(2, "Description");
            string category         = ExcelLib.ReadData(2, "Category");
            string subCategory      = ExcelLib.ReadData(2, "SubCategory");
            string tags             = ExcelLib.ReadData(2, "Tags");
            string serviceType      = ExcelLib.ReadData(2, "ServiceType");
            string locationType     = ExcelLib.ReadData(2, "LocationType");
            string startDate        = ExcelLib.ReadData(2, "Startdate");
            string endDate          = ExcelLib.ReadData(2, "Enddate");
            string day              = ExcelLib.ReadData(2, "Selectday");
            string startTime        = ExcelLib.ReadData(2, "Starttime");
            string endTime          = ExcelLib.ReadData(2, "Endtime");
            string skillTradeOption = ExcelLib.ReadData(2, "SkillTrade");
            string skillExchangeTag = ExcelLib.ReadData(2, "Skill-exchange");
            string creditAmount     = ExcelLib.ReadData(2, "Credit");
            string active           = ExcelLib.ReadData(2, "Active");
            #endregion

            //Create a new service
            var shareSkillInstance = new ShareSkill();
            shareSkillInstance.ClickShareSkill();
            shareSkillInstance.EnterShareSkill(title, description, category, subCategory, tags, serviceType, locationType, startDate, endDate,
                                               day, startTime, endTime, skillTradeOption, skillExchangeTag, creditAmount, active);
            shareSkillInstance.ClickSave();

            //Verify if user get the message correctly
            string expectedMsg = "Service Listing Added successfully";
            string actualMsg   = Driver.FindElement(By.XPath("/html/body/div/div[@class='ns-box-inner']")).Text;
            Assert.That(actualMsg, Is.EqualTo(expectedMsg), "Getting expected message failed");

            //Verify if user been navigated to ListManagement Page
            string expectedTitle = "ListingManagement";
            string actualTitle   = Driver.Title;
            Assert.That(actualTitle, Is.EqualTo(expectedTitle), "Navigation to ListManagement Page failed");

            //Verify if the created service is listed in ListManagement Page successfully
            var manageListingsInstance = new ManageListings();
            Assert.That(manageListingsInstance.ValidateData(category, title, description, serviceType, skillTradeOption),
                        "Creating service failed");
        }