Esempio n. 1
0
        private static void AssertExternalLinks(IWebDriver driver)
        {
            var mobile = driver.IsMobile();

            LinkHelper.AssertExternalLink(driver, GetFooterLinkIdPrefix(mobile) + SiteConstants.FooterFacebookLinkId, "HowLongToBeatSteam - Home | Facebook");
            LinkHelper.AssertExternalLink(driver, GetFooterLinkIdPrefix(mobile) + SiteConstants.FooterTwitterLinkId, "hltbsteam");
            LinkHelper.AssertExternalLink(driver, GetFooterLinkIdPrefix(mobile) + SiteConstants.FooterGithubLinkId, "ohadschn/HowLongToBeatSteam");
            LinkHelper.AssertExternalLink(driver, GetFooterLinkIdPrefix(mobile) + SiteConstants.FooterSteamGroupLinkId, "Group :: HLTBS");

            LinkHelper.AssertExternalLink(driver, SiteConstants.SteamAnchorId, "Welcome to Steam");
            LinkHelper.AssertExternalLink(driver, SiteConstants.HltbAnchorId, "HowLongToBeat.com");
            LinkHelper.AssertExternalLink(driver, SiteConstants.OhadSoftAnchorId, "OhadSoft");
        }
        public void TestShareLinks()
        {
            SeleniumExtensions.ExecuteOnMultipleBrowsers(driver =>
            {
                var isInternetExplorer = driver is InternetExplorerDriver;

                SignInHelper.SignInWithId(driver);

                LinkHelper.AssertExternalLink(driver, SiteConstants.FacebookShareAnchorId, FacebookShareTitle, newWindow: true, dismissAlertOnClose: isInternetExplorer);
                LinkHelper.AssertExternalLink(driver, SiteConstants.TwitterShareAnchorId, TwitterShareTitle, newWindow: true);
                LinkHelper.AssertExternalLink(driver, SiteConstants.RedditShareAnchorId, RedditShareTitle, newWindow: true);

                SurvivalHelper.CalculateSurvival(driver, Gender.Female, DateTime.Now.Year - 20, 10, PlayStyle.Extras);

                LinkHelper.AssertExternalLink(driver, SiteConstants.SurvivalFacebookShareAnchorId, FacebookShareTitle, newWindow: true, dismissAlertOnClose: isInternetExplorer);
                LinkHelper.AssertExternalLink(driver, SiteConstants.SurvivalTwitterShareAnchorId, TwitterShareTitle, newWindow: true);
                LinkHelper.AssertExternalLink(driver, SiteConstants.SurvivalRedditShareAnchorId, RedditShareTitle, newWindow: true);
            });
        }