public void GoToPasswordPage() { IWebElement nextButton; nextButton = fluentWait.Until(ExpectedConditions.ElementIsVisible(this.nextButton)); nextButton.Click(); }
public void SignOutFromAccount() { IWebElement signOut; fluentWait = FluentWait.GetFluentWait(this.driver); signOut = fluentWait.Until(x => x.FindElement(this.signOut)); signOut.Click(); }
public void LoginClick() { IWebElement nextButton; fluentWait = FluentWait.GetFluentWait(this.driver); nextButton = fluentWait.Until(ExpectedConditions.ElementIsVisible(this.nextButton)); nextButton.Click(); }
public void Signin() { if (!_buttonSignout.IsElementPresent()) { if (!Driver.Url.Equals(_baseUrl)) { Driver.Navigate().GoToUrl(_baseUrl); } input_ClientID.Insert(_clientId); input_UserID.Insert(_userId); button_Next.Click(); input_Password.Insert(_password); button_Next.Click(); if (input_VerificationCode.IsElementPresent()) { input_VerificationCode.Insert(_verificationCode); button_Next.Click(); } TestLog.Pass("Successfully logged in."); } }
public LoginPage ChangeLanguage(string language) { if (dropdown_Language.IsElementPresent()) { dropdown_Language.Click(); switch (language) { case "English": dropdownOption_English.Click(); break; case "Español": dropdownOption_Espanol.Click(); break; case "Português": dropdownOption_Portugues.Click(); break; case "Deutsch": dropdownOption_Deutsch.Click(); break; case "Français": dropdownOption_Francais.Click(); break; case "中文": dropdownOption_Chinese.Click(); break; case "日本語": dropdownOption_Japanese.Click(); break; } if (language == Driver.FindElement(dropdown_Language).Text.Trim()) { TestLog.Pass("Language changed to: " + language); } } return(this); }
public void DeleteSentMessageFrom(string mail) { IWebElement windowValidationAppearance; IWebElement deleteSelectedMessagesButton; DefaultWait <IWebDriver> fluentWait = FluentWait.GetFluentWait(this.driver); int countOfMessages = GetMessagesFrom(mail).Count; try { deleteSelectedMessagesButton = fluentWait.Until(ExpectedConditions.ElementIsVisible(this.deleteSelectedMessagesButton)); deleteSelectedMessagesButton.Click(); windowValidationAppearance = fluentWait.Until(ExpectedConditions.ElementIsVisible(By.XPath("//div[@class='vh']/span[@class='aT']/span[@class='bAq'][contains (text(),' moved to Bin.')]"))); } catch (OpenQA.Selenium.WebDriverTimeoutException e) { Console.WriteLine(e.Message + $"\nMessages from {mail} to delete not found"); } }
public static void ClickPageButton(this By by, IWebDriver driver) { WaitForElementExists(by, driver); WaitForElementEnabled(by, driver); by.Click(driver); }
public UnRegisteredVehiclePermit ClickNextButton() { _nextButton.Click(); return(this); }
/// <summary> /// Waits to become available, scrolls into view, then retries to wait to become available and click. /// </summary> public static void Click(this By selector, IWebDriver driver, int retryCount = 3, int miliseconds = 500) { var policy = CreateClickRetryPolicy(retryCount, miliseconds); selector.Click(driver, policy); }
public static void ClickWithWait(this By elementLocator, TimeSpan?customTimeout = null) { Wait.UntilElementIsDisplayed(elementLocator, customTimeout); elementLocator.Click(); }
/// <summary> /// Actions can be performed on web page /// </summary> #region Actions public void SomeAction() { link_MoreInformation.Click(); }