コード例 #1
0
        public static void VerifyFacebookURL()
        {
            try
            {
                IWebDriver driver = BrowserManagement.driver;
                Assert.AreEqual(driver.Title, TestdataValidation.homePageTitle);

                UserAction.ButtonClick(driver, GlobalEnums.Locators.XPath, HomePage.ReturnWebelements(GlobalEnums.HomePageElements.about));
                UserAction.ButtonClick(driver, GlobalEnums.Locators.XPath, HomePage.ReturnWebelements(GlobalEnums.HomePageElements.contact));
                string faceBookUrl = UserAction.GetUrl(driver, GlobalEnums.Locators.XPath, HomePage.ReturnWebelements(GlobalEnums.HomePageElements.faceBook));

                Console.WriteLine(faceBookUrl);
                Assert.AreEqual(faceBookUrl, TestdataValidation.crawfordFacebookURL);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }