public PayPalSite(IWebDriver driver) { this.driver = driver; Task.Delay(1000).Wait(); if (driver.FindElements(By.Id("preloaderSpinner")).Count > 0) { WaitIdToDisappear(driver, "preloaderSpinner", 120); } var r = WaitUtils.WaitLocators(driver, 60, By.Id("confirmButtonTop"), By.XPath("//b[contains(text(), 'Have a PayPal account?')]"), By.XPath("//h1[contains(text(), 'Pay with PayPal')]"), By.Id("miniCart"), By.Id("btnLogin") ); signature = r.Item1 ?? -1; if (signature == 2) { var a = driver.FindElements(By.Id("email")); if (a != null && a.Count > 0) { signature = 11; } } Console.WriteLine($"PAYPAL SITE SIGNATURE {signature}"); }
public PayPalContinue3(IWebDriver driver) { this.driver = driver; WaitUtils.WaitIdToDisappear(driver, "preloaderSpinner", 60); WaitUtils.WaitLocators(driver, 30, locators["continue"]); Task.Delay(5000).Wait(); // elements are still being created by java script elements = new PageElements(driver, locators); }