示例#1
0
        internal void VerifyEditedSkill()
        {
            //Populate excel data
            ExcelLibHelper.PopulateInCollection(ConstantHelpers.ExcelPath, "Profile");
            // Refresh the page
            Driver.driver.Navigate().Refresh();
            //Verify updated skill
            try
            {
                //Start the Reports
                CommonMethods.ExtentReports();
                Thread.Sleep(1000);
                CommonMethods.test = CommonMethods.extent.StartTest("Edit skill");

                //Jump to Skill tab

                //Click on skill
                WaitHelpers.WaitForElementVisibility(Driver.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
                WaitHelpers.WaitForElementVisibility(Driver.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 = Driver.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(ExcelLibHelper.ReadData(3, "SkillLevel")));
                CommonMethods.test.Log(LogStatus.Pass, "Test Passed, Skill Updated Successfully");
                SaveScreenShotClass.SaveScreenshot(Driver.driver, "SkillUpdated");
            }
            catch (Exception ex)
            {
                CommonMethods.test.Log(LogStatus.Fail, "Test Failed");
                Assert.Fail("Test failed to verify updated Skills", ex.Message);
            }
        }
        public static void SelectAvailabilityvalue()
        {
            ExcelLibHelper.PopulateInCollection(@"C:\AdvancedTaskLevel1\onboarding.specflow-master\MarsQA-1\SpecflowTests\Data\ProfileData.xlsx", "ProfileData");
            SelectElement Availobj = new SelectElement(Type);

            Availobj.SelectByText(ExcelLibHelper.ReadData(2, "Availability"));
        }
        internal void SetPassword()
        {
            //Populate excel data
            ExcelLibHelper.PopulateInCollection(ConstantHelpers.ExcelPath, "SignIn");
            //Click on Name
            WaitHelpers.WaitForElementVisibility(Driver.driver, "XPath", "//*[@id='account-profile-section']/div/div[1]/div[2]/div/span", 10000);
            NameBtn.Click();

            //Click on change password
            WaitHelpers.WaitForElementVisibility(Driver.driver, "XPath", "//*[@id='account-profile-section']/div/div[1]/div[2]/div/span/div/a[2]", 10000);
            ChgPwdBtn.Click();
            Thread.Sleep(1000);
            //Enter old password
            WaitHelpers.WaitForElementVisibility(Driver.driver, "XPath", "/html/body/div[4]/div/div[2]/form/div[1]/input", 10000);
            CurrentPwd.Click();
            CurrentPwd.SendKeys(ExcelLibHelper.ReadData(2, "NewPassword"));


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

            //Confirm new password
            WaitHelpers.WaitForElementVisibility(Driver.driver, "XPath", "/html/body/div[4]/div/div[2]/form/div[3]/input", 10000);
            ConfirmNewPwd.Click();
            ConfirmNewPwd.SendKeys(ExcelLibHelper.ReadData(2, "Password"));
            Thread.Sleep(1000);
        }
示例#4
0
        internal void register()
        {
            //Click on Join button
            Join.Click();
            Thread.Sleep(2000);

            //Enter FirstName
            FirstName.SendKeys(ExcelLibHelper.ReadData(2, "FirstName"));

            //Enter LastName
            LastName.SendKeys(ExcelLibHelper.ReadData(2, "LastName"));

            //Enter Email
            Email.SendKeys(ExcelLibHelper.ReadData(2, "Email"));

            //Enter Password
            Password.SendKeys(ExcelLibHelper.ReadData(2, "Password"));

            //Enter Password again to confirm
            ConfirmPassword.SendKeys(ExcelLibHelper.ReadData(2, "Confirm Password"));

            //Click on Checkbox
            Checkbox.Click();

            //Click on join button to Sign Up
            JoinBtn.Click();
        }
        public static void VerifyEditEducation()

        {
            var actualCountry = EducationDataCountryFirstrow.Text;
            var ExpCountry    = ExcelLibHelper.ReadData(3, "CountryOfCollege");

            var actualColl = EducationDataUniveristyFirstrow.Text;
            var ExpColl    = ExcelLibHelper.ReadData(3, "CollegeName");


            var actualTitle = EducationDataTitleFirstrow.Text;
            var ExpTitle    = ExcelLibHelper.ReadData(3, "TitleDrop");

            var actualDegree = EducationDataDegreeFirstrow.Text;
            var ExpDegree    = ExcelLibHelper.ReadData(3, "Degree");

            var actualYear = EducationDataGradYearFirstrow.Text;
            var ExpYear    = ExcelLibHelper.ReadData(3, "Year");



            Assert.AreEqual(actualCountry, ExpCountry, "Country is not updated");

            Assert.AreEqual(actualColl, ExpColl, "College is not updated");

            Assert.AreEqual(actualTitle, ExpTitle, "Title is not updated");

            Assert.AreEqual(actualDegree, ExpDegree, "Degree is not updated");


            Assert.AreEqual(actualYear, ExpYear, "Year is not updated");
        }
示例#6
0
        public static void Verifyskilledit()
        {
            ExcelLibHelper.PopulateInCollection(@"D:\\Mars\\AdvancedTaskTeam-master\\onboarding.specflow-master\\MarsQA-1\\SpecflowTests\\Data\\ProfileData.xlsx", "Skill");
            var ActSkilllevel = Skilllevelvalue.Text;

            Assert.AreEqual(ActSkilllevel, ExcelLibHelper.ReadData(3, "Level"), "Skill level is changed");
        }
示例#7
0
        internal void VerifyEditedCertification()
        {
            //Populate excel data
            ExcelLibHelper.PopulateInCollection(ConstantHelpers.ExcelPath, "Profile");
            // Refresh the page
            Driver.driver.Navigate().Refresh();
            //verify updated certification
            //verify certification
            try
            {
                //Start the Reports
                CommonMethods.ExtentReports();
                Thread.Sleep(1000);
                CommonMethods.test = CommonMethods.extent.StartTest("Update Certification");


                //Jump to Certification tab
                WaitHelpers.WaitForElementVisibility(Driver.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
                WaitHelpers.WaitForElementVisibility(Driver.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 = Driver.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(ExcelLibHelper.ReadData(3, "YearOfCertification")));
                CommonMethods.test.Log(LogStatus.Pass, "Test Passed, Certification Updated Successfully");
                SaveScreenShotClass.SaveScreenshot(Driver.driver, "CertificationUpdated");
            }
            catch (Exception ex)
            {
                CommonMethods.test.Log(LogStatus.Fail, "Test Failed", ex.Message);
            }
        }
        public void ValidateDeleteLanguage()
        {
            try
            {
                //Start the Reports
                CommonMethods.ExtentReports();
                Thread.Sleep(1000);
                CommonMethods.test = CommonMethods.Extent.StartTest("Delete Language");

                Thread.Sleep(1000);
                string deletedValue = ExcelLibHelper.ReadData(6, "Language");
                for (int i = 1; i <= 4; i++)
                {
                    var Actual = Driver.driver.FindElement(By.XPath("/html[1]/body[1]/div[1]/div[1]/section[2]/div[1]/div[1]/div[1]/div[3]/form[1]/div[2]/div[1]/div[2]/div[1]/table[1]/tbody[1]/tr[1]/td[1]")).Text;
                    if (Actual != deletedValue)
                    {
                        CommonMethods.test.Log(LogStatus.Pass, "Test Passed, Deleted Language Successfully");
                        SaveScreenShotClass.SaveScreenshot(Driver.driver, "Language Deleted");
                        Thread.Sleep(500);
                        return;
                    }
                }
            }
            catch (Exception e)
            {
                CommonMethods.test.Log(LogStatus.Fail, "Test Failed", e.Message);
            }
        }
示例#9
0
        //Delete a given language
        internal void DeleteLanguage()
        {
            ExtentionHelpers.TurnOnWait(driver);

            //populate from excel data
            ExcelLibHelper.PopulateInCollection(ConstantHelpers.TestDataPath, "FieldValues");

            //expected value of language
            String expectedValue1 = ExcelLibHelper.ReadData(4, "Language");

            //Get the table row list
            IList <IWebElement> Tablerows = driver.FindElements(By.XPath("//form/div[2]/div/div[2]/div/table/tbody/tr"));

            //Count how many rows
            var rowCount = Tablerows.Count;

            for (int i = 1; i <= rowCount; i++)
            {
                ExtentionHelpers.TurnOnWait(driver);
                //xpath of ith languagename(row)
                String actualValue = driver.FindElement(By.XPath("//div/table/tbody[" + i + "]/tr/td[1]")).Text;
                if (expectedValue1 == actualValue)
                {
                    //click on delete icon
                    driver.FindElement(By.XPath("//div/table/tbody[" + i + "]/tr/td[3]/span[2]/i")).Click();

                    Console.WriteLine("Language deleted");
                }
                break;
            }
        }
        //Delete a given Certification
        internal void DeleteCertification()
        {
            CertificationsButton.Click();

            ExcelLibHelper.PopulateInCollection(ConstantHelpers.TestDataPath, "FieldValues");

            String expectedValue1 = ExcelLibHelper.ReadData(4, "Certificate");

            //Get the row list
            IList <IWebElement> Trows = driver.FindElements(By.XPath("//form/div[5]/div/div[2]/div/table/tbody/tr"));

            //Get the row count of table
            var rows = Trows.Count;

            for (int i = 1; i <= rows; i++)
            {
                //Get the xpath of ith row Name
                String actualValue = driver.FindElement(By.XPath("//form/div[5]/div/div[2]/div/table/tbody[" + i + "]/tr/td[1]")).Text;


                if (actualValue == expectedValue1)
                {
                    // Click on delete button
                    driver.FindElement(By.XPath("//form/div[5]/div[1]/div[2]/div/table/tbody[" + i + "]/tr/td[4]/span[2]/i")).Click();
                }
            }
        }
        //Validate Deletion
        internal void ValidateDeleteCertification()
        {
            try
            {
                String expectedValue1 = ExcelLibHelper.ReadData(4, "Certificate");

                //get the table list
                IList <IWebElement> Tablerows = driver.FindElements(By.XPath("//form/div[5]/div/div[2]/div/table/tbody/tr"));

                for (int i = 1; i <= Tablerows.Count; i++)
                {
                    string actualvalue1 = driver.FindElement(By.XPath("//form/div[5]/div/div[2]/div/table/tbody[" + i + "]/tr/td[1]")).Text;

                    //check if expected value is equal to actual value
                    if (expectedValue1 != actualvalue1)
                    {
                        SaveScreenShotClass save = new SaveScreenShotClass();
                        string img = save.SaveScreenshot(driver, "CerficationsDeleted");
                        Assert.Pass();
                        Console.WriteLine("Certification deleted");
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
        }
        internal void ValidateAddcertifications()
        {
            //Validate the certification is added sucessfully
            try
            {
                ExcelLibHelper.PopulateInCollection(ConstantHelpers.TestDataPath, "FieldValues");
                String expectedValue = ExcelLibHelper.ReadData(3, "Certificate");

                //Get the table list
                IList <IWebElement> Trows = driver.FindElements(By.XPath("//form/div[5]/div[1]/div[2]/div/table/tbody/tr"));

                //Get the row count in table
                var rows = Trows.Count;
                for (var i = 1; i <= rows; i++)
                {
                    ExtentionHelpers.TurnOnWait(driver);
                    string actualValue = driver.FindElement(By.XPath("//form/div[5]/div/div[2]/div/table/tbody[" + i + "]/tr/td[1]")).Text;

                    //Check if expected value is equal to actual value
                    if (expectedValue == actualValue)
                    {
                        SaveScreenShotClass save = new SaveScreenShotClass();
                        string img = save.SaveScreenshot(driver, "certification added");
                    }
                }
            }
            catch (Exception)
            {
                Assert.Fail();
            }
            ExtentionHelpers.TurnOnWait(driver);
        }
        //update operation performs on Certification field
        internal void UpdateCertification()
        {
            ExtentionHelpers.TurnOnWait(driver);

            //click the pen icon to edit
            CerficationUpdate.Click();

            ExtentionHelpers.TurnOnWait(driver);

            // clear text and enter value
            CertificationText.Clear();
            CertificationText.SendKeys(ExcelLibHelper.ReadData(4, "Certificate"));

            CertifiedFromText.Clear();
            CertifiedFromText.SendKeys(ExcelLibHelper.ReadData(4, "Certified from"));

            selectdropdown1("certificationYear", ExcelLibHelper.ReadData(4, "CertificationYear"));

            //click on update button
            UpdateButton.Click();

            ExtentionHelpers.TurnOnWait(driver);

            Console.WriteLine(driver.FindElement(By.XPath("//div[contains(@class,'ns-box-inner')]")).Text);

            driver.FindElement(By.XPath("//a[contains(@class,'ns-close')]"));

            Console.WriteLine("*******************************");
        }
示例#14
0
        internal void EnterSkill()
        {
            //Populate excel data
            ExcelLibHelper.PopulateInCollection(ConstantHelpers.ExcelPath, "Profile");
            // Refresh the page
            Driver.driver.Navigate().Refresh();
            //Click on skill
            WaitHelpers.WaitForElementVisibility(Driver.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
            WaitHelpers.WaitForElementVisibility(Driver.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

            WaitHelpers.WaitForElementVisibility(Driver.driver, "Name", "name", 10000);
            AddSkillBox.Click();
            AddSkill.SendKeys(ExcelLibHelper.ReadData(2, "Skill"));

            //Add skill level
            AddSkillLevel.Click();
            new SelectElement(AddSkillLevel).SelectByText(ExcelLibHelper.ReadData(2, "SkillLevel"));
            Thread.Sleep(1000);
        }
        public void ThenShouldBeAbleToVerifyTheEditedSkill()
        {
            ExcelLibHelper.PopulateInCollection(ConstantHelpers.DataFilePath, "Skill");
            SkillPage skillPage = new SkillPage();

            skillPage.EditSkill(ExcelLibHelper.ReadData(2, "Skill"), ExcelLibHelper.ReadData(3, "Skill"));
        }
示例#16
0
        //validate deletion
        internal void ValidateDeleteLanguage()
        {
            try
            {
                String expectedValue1 = ExcelLibHelper.ReadData(3, "Language");

                //get the table list
                IList <IWebElement> Tablerows = driver.FindElements(By.XPath("//form/div[2]/div/div[2]/div/table/tbody/tr"));

                for (int i = 1; i <= Tablerows.Count; i++)
                {
                    string actualvalue1 = driver.FindElement(By.XPath("//div/table/tbody[" + i + "]/tr/td[1]")).Text;

                    //check if expected value is  not equal to actual value
                    if (expectedValue1 != actualvalue1)
                    {
                        SaveScreenShotClass save = new SaveScreenShotClass();
                        string img = save.SaveScreenshot(driver, "LanguageDeleted");

                        Console.WriteLine("deleted Successfully");
                    }
                }
            }
            catch (Exception)
            {
                Assert.Fail();
            }
        }
        public void WhenSellerClickOnEducationTabAndClickOnDeleteExistingEducationButton()
        {
            EducationPage educationPage = new EducationPage();

            ExcelLibHelper.PopulateInCollection(ConstantHelpers.DataFilePath, "Education");
            string originalCollegeName = ExcelLibHelper.ReadData(2, "CollegeName");
            string NewcollegeName      = ExcelLibHelper.ReadData(3, "CollegeName");
            string country             = ExcelLibHelper.ReadData(2, "Country");
            string title         = ExcelLibHelper.ReadData(2, "Title");
            string degree        = ExcelLibHelper.ReadData(2, "Degree");
            string yearOfPassing = ExcelLibHelper.ReadData(2, "YearOfPassing");

            educationPage.EducationDelete(NewcollegeName);
            bool isRecordPresent = educationPage.VerifyDegree(NewcollegeName, country, title, degree, yearOfPassing);

            // Assert.False(isRecordPresent);

            if (!isRecordPresent)
            {
                Assert.False(isRecordPresent);
            }
            else
            {
                Assert.Fail("Verification Failed.");
                throw new Exception("Result does not match");
            }
        }
示例#18
0
        //Add new Lanuguage
        internal void Addlanguage()
        {
            Console.WriteLine("******************************");

            //implicit wait
            ExtentionHelpers.TurnOnWait(driver);

            //click on add new button
            AddNewLanguage.Click();

            ExtentionHelpers.TurnOnWait(driver);
            //enter text in language field
            LanguageText.SendKeys(ExcelLibHelper.ReadData(3, "Language"));

            //select level from drop down

            new SelectElement(driver.FindElement(By.XPath("//select[@class='ui dropdown']"))).SelectByValue(ExcelLibHelper.ReadData(2, "LanguageLevel"));

            ExtentionHelpers.TurnOnWait(driver);

            //click on add button
            AddLanguage.Click();

            ExtentionHelpers.TurnOnWait(driver);

            Console.WriteLine("Language added");
            Console.WriteLine("******************************");
        }
示例#19
0
        internal void EditCertification()
        {
            //Populate excel data
            ExcelLibHelper.PopulateInCollection(ConstantHelpers.ExcelPath, "Profile");
            // Refresh the page
            Driver.driver.Navigate().Refresh();

            //Click on certification
            //Click on Certifications
            WaitHelpers.WaitForElementVisibility(Driver.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
            WaitHelpers.WaitForElementVisibility(Driver.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
            WaitHelpers.WaitForElementVisibility(Driver.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
            WaitHelpers.WaitForElementVisibility(Driver.driver, "Name", "certificationYear", 10000);
            CertiYear.Click();
            new SelectElement(CertiYear).SelectByText(ExcelLibHelper.ReadData(3, "YearOfCertification"));;
            Thread.Sleep(1000);
        }
        internal void ValidateEditedDetails()
        {
            //Populate excel data
            ExcelLibHelper.PopulateInCollection(ConstantHelpers.ExcelPath, "ManageListing");
            // Refresh the page
            Driver.driver.Navigate().Refresh();

            //Validate edited data
            //Click on Manage Listing
            WaitHelpers.WaitForElementVisibility(Driver.driver, "LinkText", "Manage Listings", 10000);
            manageListingsLink.Click();
            Thread.Sleep(5000);
            //Click on view button
            WaitHelpers.WaitForElementVisibility(Driver.driver, "XPath", "(//i[@class='eye icon'])[1]", 10000);
            view.Click();
            Driver.driver.Navigate().Refresh();
            try
            {
                //Start the Reports
                CommonMethods.ExtentReports();
                Thread.Sleep(1000);
                CommonMethods.test = CommonMethods.extent.StartTest("EditListing");

                WaitHelpers.WaitForElement(Driver.driver, "XPath", "//*[@id='service-detail-section']/div[2]/div/div[2]/div[1]/div[1]/div[2]/h1/span", 20000);
                var ViewValidation = Driver.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(ExcelLibHelper.ReadData(3, "Title")));
                CommonMethods.test.Log(LogStatus.Pass, "Listing Edited successfully");
                SaveScreenShotClass.SaveScreenshot(Driver.driver, "ListingUpdated");
            }
            catch (Exception ex)
            {
                Assert.Fail("verify the edited share skill page failed", ex.Message);
                CommonMethods.test.Log(LogStatus.Fail, "Unable to edit listing");
            }
        }
示例#21
0
        internal void EnterCertification()
        {
            //Populate excel data
            ExcelLibHelper.PopulateInCollection(ConstantHelpers.ExcelPath, "Profile");
            // Refresh the page
            Driver.driver.Navigate().Refresh();

            //Click on Certifications
            WaitHelpers.WaitForElementVisibility(Driver.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
            WaitHelpers.WaitForElementVisibility(Driver.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
            WaitHelpers.WaitForElementVisibility(Driver.driver, "Name", "certificationName", 10000);
            CertifiBtn.Click();
            CertifiName.SendKeys(ExcelLibHelper.ReadData(2, "Certificate"));

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

            //Select year from drop down
            WaitHelpers.WaitForElementVisibility(Driver.driver, "Name", "certificationYear", 10000);
            CertiYear.Click();
            new SelectElement(CertiYear).SelectByText(ExcelLibHelper.ReadData(2, "YearOfCertification"));;
            Thread.Sleep(1000);
        }
        internal void ValidateDeletedDetails()
        {
            //Populate excel data
            ExcelLibHelper.PopulateInCollection(ConstantHelpers.ExcelPath, "ManageListing");
            // Refresh the page
            Driver.driver.Navigate().Refresh();
            try
            {
                //Start the Reports
                CommonMethods.ExtentReports();
                Thread.Sleep(1000);
                CommonMethods.test = CommonMethods.extent.StartTest("DeleteListing");
                //Verify deleted details

                var deletedListing = Driver.driver.FindElement(By.XPath("//*[@id='listing-management-section']/div[2]/div[1]/div[1]/table/tbody/tr/td[3]")).Text;
                if (deletedListing != ExcelLibHelper.ReadData(3, "Title"))
                {
                    Assert.Pass("Manage Listing deleted successfuly");
                    CommonMethods.test.Log(LogStatus.Pass, "deleted successfuly");
                    SaveScreenShotClass.SaveScreenshot(Driver.driver, "ListingDeleted");
                }
                else
                {
                    Assert.Fail("Manage Listing not deleted");
                    CommonMethods.test.Log(LogStatus.Fail, "Listing not deleted successfuly");
                }
            }
            catch
            {
                Console.WriteLine("Test passed, Listing deleted");
            }
        }
示例#23
0
        public static void EditEducation()

        {
            ExcelLibHelper.PopulateInCollection(@"C:\AdvancedTaskLevel1\onboarding.specflow-master\MarsQA-1\SpecflowTests\Data\ProfileData.xlsx", "Education");

            EducationEditiconFirst.Click();

            CollegeName.Clear();

            CollegeName.SendKeys(ExcelLibHelper.ReadData(3, "CollegeName"));

            SelectElement country = new SelectElement(CountryDropdown);

            country.SelectByText(ExcelLibHelper.ReadData(3, "CountryOfCollege"));

            SelectElement Titledrop = new SelectElement(TitleDropdown);

            Titledrop.SelectByText(ExcelLibHelper.ReadData(3, "TitleDrop"));

            Degree.Clear();

            Degree.SendKeys(ExcelLibHelper.ReadData(3, "Degree"));



            Thread.Sleep(3000);
            SelectElement Yeardrop = new SelectElement(GradutionYearDropDown);

            Yeardrop.SelectByText(ExcelLibHelper.ReadData(3, "Year"));


            Thread.Sleep(3000);
            UpdateButtonEducationData.Click();
            Thread.Sleep(5000);
        }
示例#24
0
 //Fill Skill Share Page
 public void ShareSkillPage()
 {
     ShareSkillButton.Click();
     WaitClass.ElementPresent(driver, "Name", "categoryId");
     Title.SendKeys(ExcelLibHelper.ReadData(rownum, "Title"));
     Description.SendKeys(ExcelLibHelper.ReadData(rownum, "Description"));
 }
示例#25
0
        public static void EditCertification()

        {
            ExcelLibHelper.PopulateInCollection(@"C:\AdvancedTaskLevel1\onboarding.specflow-master\MarsQA-1\SpecflowTests\Data\ProfileData.xlsx", "Cerification");

            Driver.TurnOnWait();
            EditCertificateIconlastRow.Click();

            Thread.Sleep(1000);


            CertificatevalueEdit.Clear();

            CertificatevalueEdit.SendKeys(ExcelLibHelper.ReadData(3, "Certificate"));

            CertificateFromEdit.Clear();

            CertificateFromEdit.SendKeys(ExcelLibHelper.ReadData(3, "From"));

            SelectElement year = new SelectElement(CertificateYearEdit);

            year.SelectByText(ExcelLibHelper.ReadData(3, "Year"));

            UpdateCertificateButtonlastRow.Click();


            Thread.Sleep(1000);
        }
示例#26
0
        public void EditCreditExchange()
        {
            SkillTradeCredit.Click();
            var Creditamount = ExcelLibHelper.ReadData(rownum, "Credit");

            Credit.SendKeys(Creditamount);
        }
        public static void AddEducation()

        {
            ExcelLibHelper.PopulateInCollection(@"C:\AdvancedTaskLevel1\onboarding.specflow-master\MarsQA-1\SpecflowTests\Data\ProfileData.xlsx", "Education");


            //Click on Add new button for education
            Driver.TurnOnWait();
            EducationAddNew.Click();

            //Enter Valid Education details
            Driver.TurnOnWait();

            CollegeName.SendKeys(ExcelLibHelper.ReadData(2, "CollegeName"));

            SelectElement country = new SelectElement(CountryDropdown);

            country.SelectByText(ExcelLibHelper.ReadData(2, "CountryOfCollege"));

            SelectElement Titledrop = new SelectElement(TitleDropdown);

            Titledrop.SelectByText(ExcelLibHelper.ReadData(2, "TitleDrop"));

            Degree.SendKeys(ExcelLibHelper.ReadData(2, "Degree"));



            SelectElement Yeardrop = new SelectElement(GradutionYearDropDown);

            Yeardrop.SelectByText(ExcelLibHelper.ReadData(2, "Year"));

            AddButtonEducationData.Click();
        }
示例#28
0
 public void EditTitle()
 {
     Title.Clear();
     Title.SendKeys(ExcelLibHelper.ReadData(rownum, "Title"));
     Description.Clear();
     Description.SendKeys(ExcelLibHelper.ReadData(rownum, "Description"));
 }
        public static void FillSchedrule(int DataRow)
        {
            //Check if the user is able to click on a "Start Date" for the "Available days" field
            StartDateDropDown.Click();
            StartDateDropDown.Clear();
            StartDateDropDown.SendKeys(ExcelLibHelper.ReadData(DataRow, "StartDate"));

            //Check if the user is able to click on a "End Date" for the "Available days" field
            EndDateDropDown.Click();
            EndDateDropDown.Clear();
            EndDateDropDown.SendKeys(ExcelLibHelper.ReadData(DataRow, "EndDate"));

            //Check if the user is able to click on a "Day" checkbox for the "Available days" field
            for (var i = 1; i <= 5; i++)
            {
                Days[i].Click();
            }

            //Check if the user is able to select a "Start Time" for the "Available days" field
            StartTimeDropDown.SendKeys(ExcelLibHelper.ReadData(DataRow, "StartTime"));

            //Check if the user is able to select a "End Time" for the "Available days" field
            EndTimeDropDown.SendKeys(ExcelLibHelper.ReadData(DataRow, "EndTime"));

            //Check if the user is able to click on "Credits" as the "Skill Trade" option
            SkillTradeCreditsOption.Click();

            //Check if the user is able to enter a number for the "Credits" field
            CreditAmount.Clear();
            CreditAmount.SendKeys(ExcelLibHelper.ReadData(DataRow, "Credit"));

            //Check if the user is able to set an option for the "Active" field
            ActiveOption.Click();
        }
示例#30
0
        internal void EditSkills()
        {
            //Populate excel data
            ExcelLibHelper.PopulateInCollection(ConstantHelpers.ExcelPath, "Profile");
            // Refresh the page
            Driver.driver.Navigate().Refresh();

            //Click on skill
            //Click on skill
            WaitHelpers.WaitForElementVisibility(Driver.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
            WaitHelpers.WaitForElementVisibility(Driver.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
            WaitHelpers.WaitForElementVisibility(Driver.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
            WaitHelpers.WaitForElementVisibility(Driver.driver, "Name", "level", 10000);
            AddSkillLevel.Click();
            new SelectElement(AddSkillLevel).SelectByText(ExcelLibHelper.ReadData(3, "SkillLevel"));
            Thread.Sleep(1000);
        }