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");
            }
        }
Пример #2
0
        internal void VerifySkill()
        {
            //Populate excel data
            ExcelLibHelper.PopulateInCollection(ConstantHelpers.ExcelPath, "ShareSkill");
            //Verify share skill details

            WaitHelpers.WaitForElementVisibility(Driver.driver, "XPath", "//*[@id=\"listing-management-section\"]/div[2]/div[1]/div[2]/button[2]", 10000);
            ManageLis.Click();
            Driver.driver.Navigate().Refresh();
            try
            {
                //Start the Reports
                CommonMethods.ExtentReports();
                Thread.Sleep(1000);
                CommonMethods.test = CommonMethods.extent.StartTest("Verify ShareSkill");

                WaitHelpers.WaitForElement(Driver.driver, "XPath", "//*[@id='listing-management-section']/div[2]/div[1]/div[1]/table/tbody/tr[1]/td[2]", 10000);
                var categorycheck = Driver.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(ExcelLibHelper.ReadData(2, "Category")));

                WaitHelpers.WaitForElement(Driver.driver, "XPath", "//*[@id='listing-management-section']/div[2]/div[1]/div[1]/table/tbody/tr[1]/td[3]", 10000);
                var titlecheck = Driver.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(ExcelLibHelper.ReadData(2, "Title")));
                CommonMethods.test.Log(LogStatus.Pass, "Test Passed, ShareSkill Verified Successfully");
                SaveScreenShotClass.SaveScreenshot(Driver.driver, "ShareSkillVerified");
            }
            catch (Exception ex)
            {
                CommonMethods.test.Log(LogStatus.Fail, "Test Failed", ex.Message);
            }
        }
        internal void ListingsVerify()
        {
            //Populate excel data
            ExcelLibHelper.PopulateInCollection(ConstantHelpers.ExcelPath, "ManageListing");
            try
            {
                //Start the Reports
                CommonMethods.ExtentReports();
                Thread.Sleep(1000);
                CommonMethods.test = CommonMethods.extent.StartTest("ViewListing");

                WaitHelpers.WaitForElement(Driver.driver, "XPath", "//*[@id='service-detail-section']/div[2]/div/div[2]/div[1]/div[1]/div[2]/h1/span", 40000);
                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(2, "Title")));
                CommonMethods.test.Log(LogStatus.Pass, "Able to view listing");
                SaveScreenShotClass.SaveScreenshot(Driver.driver, "ListingViewSuccessfull");
            }
            catch (Exception ex)
            {
                Assert.Fail("verify the share skill page failed", ex.Message);
                CommonMethods.test.Log(LogStatus.Fail, "Unable to view listing");
            }
        }
Пример #4
0
        public static void SigninStep()
        {
            Driver.NavigateUrl();
            SignInBtn.Click();
            Email.SendKeys(ExcelLibHelper.ReadData(2, "Username"));
            Password.SendKeys(ExcelLibHelper.ReadData(2, "Password"));
            LoginBtn.Click();

            try
            {
                //Start the Reports
                CommonMethods.ExtentReports();
                Thread.Sleep(1000);
                CommonMethods.test = CommonMethods.extent.StartTest("SignIn to Mars");

                WaitHelpers.WaitForElement(Driver.driver, "XPath", "//*[contains(text(),'Ishaan Sandeep')]", 10000);
                // check login is successfull
                var loginCheck = "test";
                loginCheck = Driver.driver.FindElement(By.XPath("//*[contains(text(),'Ishaan Sandeep')]")).GetAttribute("innerText");

                if (loginCheck == "Ishaan Sandeep")
                {
                    CommonMethods.test.Log(LogStatus.Pass, "Login Passed");
                    SaveScreenShotClass.SaveScreenshot(Driver.driver, "Login Passed");
                    Assert.IsTrue(true);
                }
                else
                {
                    CommonMethods.test.Log(LogStatus.Fail, "Login failed");
                }
            }
            catch (Exception e)
            {
                CommonMethods.test.Log(LogStatus.Fail, "Test Failed", e.Message);
            }
        }