public void InputAdrressInformationValidFields(String firstName, String lastName, String address, String zip, String city, String state, String county, String phoneNumber, String mobileNumber, String emailAddress, String dob) { SendKeysSlowly(FirstNameShippingAddressField, firstName); SendKeysSlowly(LastNameShippingAddressField, lastName); SendKeysSlowly(AddressShippingAddressField, address); SendKeysSlowly(PhoneNumberShippingAddressField, phoneNumber); SendKeysSlowly(MobileNumberShippingAddressField, mobileNumber); SendKeysSlowly(EmailAddressShippingAddressField, emailAddress); if (IsElementDisplayed(ZipLookupButton)) { ZipLookup(zip, city); } else { SendKeysSlowly(ZipShippingAddressField, zip); SendKeysSlowly(CityShippingAddressField, city); if (!state.Equals("N/A") && IsElementDisplayed(StateShippingAddressField)) { SendKeysSlowly(StateShippingAddressField, state); } if (!county.Equals("N/A") && IsElementDisplayed(CountyShippingAddressField)) { SendKeysSlowly(CountyShippingAddressField, county); } } if (!dob.Equals("N/A") && IsElementDisplayed(DateOfBirthShippingAddressField)) { SendKeysSlowly(DateOfBirthShippingAddressField, dob); } ContinueButton.Click(); }
public CheckOut VerifyProductQuantityAndTotalInCheckout(string expectedProductName, string expectedQuantity, string expectedSubTotal, string expectedTotal) { Assert.AreEqual(expectedProductName, IphoneName.Text, "Iphone 4s black product name is did not matched."); Assert.AreEqual(expectedQuantity, Quantity.GetAttribute("value"), "Quantity for the product at the checkout did not matched."); Assert.AreEqual(expectedSubTotal, CheckOutSubTotal.Text, "SubTotal at the checkout did not matched."); Assert.AreEqual(expectedTotal, Total.Text, "Total at the checkout did not matched."); ContinueButton.Click(); DoPageTransition(); return(this); }
internal void LoginWithUnknownEmail(Table table) { SignIn.Click(); dynamic values = table.CreateDynamicInstance(); string email = values.userName.ToString(); //string password = values.password.ToString(); Email.Click(); Email.SendKeys(email); ContinueButton.Click(); }
public void InputAdrressInformation(String firstName, String lastName, String address, String zip, String city, String phoneNumber, String mobileNumber, String emailAddress) { SendKeysSlowly(FirstNameShippingAddressField, firstName); SendKeysSlowly(LastNameShippingAddressField, lastName); SendKeysSlowly(AddressShippingAddressField, address); SendKeysSlowly(PhoneNumberShippingAddressField, phoneNumber); SendKeysSlowly(MobileNumberShippingAddressField, mobileNumber); SendKeysSlowly(EmailAddressShippingAddressField, emailAddress); ZipLookup(zip, city); ContinueButton.Click(); }
public void ClickOnContinueButton() { if (ContinueButton.Displayed) { ContinueButton.Click(); Thread.Sleep(3000); } else { throw new Exception("Element is not found or not clickable"); } }
public void InputBasicInformation(String distributorNumber, String aroType) { String[] newStringArray = { "FR", "GER", "SUI" }; String selectedCountry = new SelectElement(CountrySelect).SelectedOption.Text; if (newStringArray.Contains(selectedCountry)) { AroNumberField.SendKeys("" + new Random().Next(100000, 1000000)); } DistributorNumberField.SendKeys(distributorNumber); AroTypeDropdown.SendKeys(aroType); ContinueButton.Click(); }
public void InputProductInformation(String sku, int quantity) { ClearAllProducts(); if (ExpectedConditions.ElementExists(By.Id("qt" + sku)) != null) { SkuInputField.SendKeys(sku); UpdateButton.Click(); } Driver.WebDriver.FindElement(By.Id("qt" + sku)).Clear(); Driver.WebDriver.FindElement(By.Id("qt" + sku)).SendKeys("" + quantity); /*if (sku.Equals("2000")) * { * if (!IsElementDisplayed(JuicePlusCapsulesQuantityField)) * { * SkuInputField.SendKeys(sku); * UpdateButton.Click(); * } * * JuicePlusCapsulesQuantityField.Clear(); * JuicePlusCapsulesQuantityField.SendKeys("" + quantity); * } else if (sku.Equals("2000CA")) * { * if (!IsElementDisplayed(JuicePlusCapsulesCAQuantityField)) * { * SkuInputField.SendKeys(sku); * UpdateButton.Click(); * } * * JuicePlusCapsulesCAQuantityField.Clear(); * JuicePlusCapsulesCAQuantityField.SendKeys("" + quantity); * } else if (sku.Equals("2000AS")) * { * if (!IsElementDisplayed(JuicePlusCapsulesASQuantityField)) * { * SkuInputField.SendKeys(sku); * UpdateButton.Click(); * } * * JuicePlusCapsulesASQuantityField.Clear(); * JuicePlusCapsulesASQuantityField.SendKeys("" + quantity); * } * else * { * throw new Exception("Invalid Product Code."); * }*/ UpdateButton.Click(); ContinueButton.Click(); }
public void SelectFlights() { Thread.Sleep(4000); SelectFirstFlightButton.Click(); Helper.ScrollToSeeTheFlights(_driver, SelectPriceOfFirstFlightButton); SelectPriceOfFirstFlightButton.Click(); SelectReturnFlightButton.Click(); Helper.ScrollToSeeTheFlights(_driver, SelectPriceOfReturnFlightButton); SelectPriceOfReturnFlightButton.Click(); ContinueButton.Click(); }
public void InputPaymentInformation(String paymentType, String accountNumber, String expirationMonth, String expirationYear) { SelectElement paymentTypeDropdown = new SelectElement(PaymentTypeSelect); SelectElement expirationMonthDropdown = new SelectElement(ExpirationMonthDropdown); SelectElement expirationYearDropdown = new SelectElement(ExpirationYearDropdown); SameBillingAndShippingAddressCheckbox.Click(); paymentTypeDropdown.SelectByText(paymentType); Thread.Sleep(500); AccountNumberField.SendKeys(accountNumber); Thread.Sleep(500); expirationMonthDropdown.SelectByText(expirationMonth); expirationYearDropdown.SelectByText(expirationYear); ContinueButton.Click(); if (Driver.WebDriver.PageSource.Contains("Please Verify this ARO is not a Duplicate")) { ContinueButton.Click(); } }
public bool Login(string email, string password) { EmailField.SendKeys(email); test.Log(Status.Pass, $"Enter '{email}' in the Email field "); PasswordField.SendKeys(password); test.Log(Status.Pass, $"Enter '{password}' in the Password field"); ContinueButton.Click(); test.Log(Status.Pass, "Click the 'Continue' Button"); Thread.Sleep(3000); if (new FarmerDashboardPage(driver, test).IsLogOutBtnFound()) { return(true); } return(false); }
public PlaceOrderPage ProvideCardInformation(string cardName, string cardNumber, string expMonth, string expYear) { //PaymentMethodFirstOption.Click(); //CreditCardNumberField.Clear(); //CreditCardNumberField.SendKeys(cardNumber); //ConfirmCardButton.Click(); //ObjectWaiter ObjectWaiter = new ObjectWaiter(); //ObjectWaiter.WaitGetElement() //ContinueButton.Click(); //return new SelectShippingAddress(_driver); NewCreditCardExpander.Click(); NewCreditCardNameField.Clear(); NewCreditCardNameField.SendKeys(cardName); NewCreditCardNumberField.Clear(); NewCreditCardNumberField.SendKeys(cardNumber); //!!!!!!!DELETE!!!!!!!!! Thread.Sleep(5000); NewCreditCardExpMonthDropDownExpander.Click(); NewCreditCardExpMonthDropDown(expMonth).Click(); //!!!!!!!DELETE!!!!!!!!! Thread.Sleep(5000); NewCreditCardExpYearDropDownExpander.Click(); NewCreditCardExpYearDropDown(expYear).Click(); AddNewCreditCardButton.Click(); //!!!!!!!DELETE!!!!!!!!! Thread.Sleep(5000); ContinueButton.Click(); return(new PlaceOrderPage(_driver)); }
/*Actions*/ //Login Method public void logIn(String userName, String password) { //conditionals should be added here logInButtonTitle.Click(); UserField.SendKeys(userName); ContinueButton.Click(); try { PasswordField.SendKeys(password); } catch (ElementNotInteractableException) { Console.WriteLine("UserField Element not Interactable"); } try { LoginButton.Click(); } catch (NoSuchElementException) { Console.WriteLine("No Element is displayed"); } }
public void WhenIAddAnANZNZBankAccount(string bankName, string type) { BankAccountsPage.AddBankAccountButton.Click(); SearchYourBank(bankName).Click(); Random random = new Random(); string accountName = String.Format("New" + random.Next(10000, 99999).ToString()); ScenarioContext.Current.Add("AccountName", accountName); AccountName.SendKeys(accountName); AccountTypeCombobox.Click(); SelectAccountTypeComboboxValue(type).Click(); string accountNumber = random.Next(11111, 99999).ToString(); ScenarioContext.Current.Add("AccountNumber", accountNumber); AccountNumber.SendKeys(accountNumber); ContinueButton.Click(); }
public void ContinueButtonClick() { ContinueButton.Click(); }
public void ContinueButtonClick() { logger.Info("Click continue button"); ContinueButton.Click(); WaitForAMinute(); }
public void ContinueOrder() { ContinueButton.Click(); }
public void InputBasicInformation(String distributorNumber) { DistributorNumberField.SendKeys(distributorNumber); ContinueButton.Click(); }
// Buttons /// <summary>Click on confirm button</summary> public void ClickConfirmButton() { ContinueButton.Click(); }