public void PurchaseAppsForNCDomains(IWebDriver driver, String sectionUrl) { driver.Navigate().GoToUrl(sectionUrl); driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromMinutes(1.00)); AppsMrktPlaceUI_WeeblyBtn.Click(); driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromMinutes(1.00)); AppsMrktPlaceUI_UpliftSocialAddToCartBtn.Click(); Thread.Sleep(8000); AppsMrktPlaceUI_OwnDomainBtn.Click(); int len; Int32.TryParse( ((IJavaScriptExecutor)driver).ExecuteScript(" return document.getElementsByClassName('result').length;") .ToString(), out len); if (len > 0) { AppsMrktPlaceUI_SelectDomainLnk.Click(); _cart.CartUI_ContinueBtn.Click(); AppsMrktPlaceUI_UpliftSocialConfirmOrderBtn.Click(); driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromMinutes(1.00)); Assert.IsTrue(_cart.OrderUI_OrderReviewSectionTitle.Text.Contains(UiConstants.ORDER_REVIEW)); CommonUtils.ExecEnvBasedPaymentFlow(driver, _cart); } else { Assert.Throws <Exception>(() => len = 0, "FAILURE DUE TO INSUFFICIENT DATA : No Domains are displayed to purchase an Apps."); } }
public void PurchaseAppsForBrandIdentity(IWebDriver driver, String sectionUrl) { driver.Navigate().GoToUrl(sectionUrl); Thread.Sleep(4000); AppsMrktPlaceUI_BrandIdentityTab.Click(); Thread.Sleep(4000); AppsMrktPlaceUI_UpliftSocialBtn.Click(); AppsMrktPlaceUI_UpliftSocialAddToCartBtn.Click(); AppsMrktPlaceUI_UpliftSocialConfirmOrderBtn.Click(); Assert.IsTrue(_cart.OrderUI_OrderReviewSectionTitle.Text.Contains(UiConstants.ORDER_REVIEW)); /* Checks for SANDBOX & LIVE Environments * Purchases and makes Payment if SandBox else navigates to Paypal and back */ CommonUtils.ExecEnvBasedPaymentFlow(driver, _cart); }
public void PurchaseAppsForToolsInvoiced(IWebDriver driver, String sectionUrl) { driver.Navigate().GoToUrl(sectionUrl); driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromMinutes(1.00)); AppsMrktPlaceUI_ToolsTab.Click(); Thread.Sleep(6000); AppsMrktPlaceUI_InvoicedLnk.Click(); driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromMinutes(1.00)); AppsMrktPlaceUI_UpliftSocialAddToCartBtn.Click(); driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromMinutes(1.00)); AppsMrktPlaceUI_UpliftSocialConfirmOrderBtn.Click(); driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromMinutes(1.00)); Assert.IsTrue(_cart.OrderUI_OrderReviewSectionTitle.Text.Contains(UiConstants.ORDER_REVIEW)); CommonUtils.ExecEnvBasedPaymentFlow(driver, _cart); }