public static bool DoesPageExist(FirefoxDriver driver, string pageName)
 {
     GotoPage(driver, pageName);
     bool exists = false;
     try
     {
         IWebElement pageTitle = null;
         PerformActionWithRetry(() => { pageTitle = driver.FindElementById("title-text"); });
         // Space Tools is the page to recover a deleted page.
         exists = pageTitle.Text != "Page Not Found" && pageTitle.Text != "Space Tools";
         if (exists)
         {
             // in case the page is in another space.
             // confluence shows the title with the correct page name
             // but the page does not exist.
             exists = driver.FindElementByCssSelector("div#content div.aui-message p.title").Text != "Page Not Found";
         }
     }
     catch
     {
         // ignored
     }
     return exists;
 }
        private void EnterDummyPaymentOptions(FirefoxDriver seleniumInstance,StripeCardDetails cardDetails)
        {
            seleniumInstance.SwitchTo().Frame(seleniumInstance.FindElementByCssSelector(".stripe_checkout_app"));
            var emailEl = seleniumInstance.FindElementByName("email");
            emailEl.SendKeys("*****@*****.**");
            var cardEl = seleniumInstance.FindElementByName("card_number");
            cardEl.SendKeys(cardDetails.CardNumber);
            var expiresEl = seleniumInstance.FindElementByName("cc-exp");
            expiresEl.SendKeys(cardDetails.Expiry);
            //var nameOnCard = seleniumInstance.FindElementById("paymentName");
            //nameOnCard.SendKeys(cardDetails.CardHolderName);
            var cvc = seleniumInstance.FindElementByName("cc-csc");
            cvc.SendKeys(cardDetails.CVC);

            var submitButton = seleniumInstance.FindElementByCssSelector(".button button");
            submitButton.ClickWithJavascript(seleniumInstance);
        }