public virtual bool totalsInformationDislayed() { DomElement detailNavRight = rightNavigationSection.GetElementWaitByCSS(rightNavProceedToCheckOutButton.locator); DomElement detailCheckoutSummary = detailNavRight.GetElementWaitByCSS(checkoutSummary.locator); DomElement detailOrderSummary = detailCheckoutSummary.GetElementWaitByCSS(orderSummarytotals.locator); return(detailOrderSummary.webElement.Enabled); }
public void TypeAllPointsNumber(string skunumber) { DomElement mainQuickOrderPage = detailSummary.GetElementWaitByCSS(detailQuickOrder.locator); DomElement detailProductSection = mainQuickOrderPage.GetElementWaitByCSS(detailProductTextBox.locator); DomElement formControlTxtBox = detailProductSection.GetElementWaitByCSS(detailFormControl.locator); formControlTxtBox.webElement.SendKeys(skunumber); }
public virtual void ClickAddtoListButton() { DomElement modalSection = detailModal.GetElementWaitByCSS(modalContent.locator); DomElement detailmodailContent = modalSection.GetElementWaitByCSS(modalFooter.locator); DomElement detailmodalButton = detailmodailContent.GetElementWaitByCSS(addToListbutton.locator); detailmodalButton.webElement.Click(); }
public void FilterSetDates(string dateFrom, string dateTo) { filterDateComponent = filterForm.GetElementWaitByCSS(filterDateComponent.locator); filterDateFromInput = filterDateComponent.GetElementWaitByCSS(filterDateFromInput.locator); filterDateToInput = filterDateComponent.GetElementWaitByCSS(filterDateToInput.locator); SetInputField(filterDateFromInput, dateFrom); SetInputField(filterDateToInput, dateTo); }
public List <string> GetManufacturerMenuOptionsText() { DomElement searchContainer = SecondarySearchContainer.GetElementWaitByCSS(ProductSearchContainer.locator); DomElement select = searchContainer.GetElementWaitByCSS(ProductSearchContainerManufacturerSelect.locator); select.webElement.Click(); return(select.GetElementsWaitByCSS(ProductSearchContainerManufacturerSelectItem.locator).Select(el => el.webElement.Text).ToList()); }
public bool IsSubmitButtonEnabled() { DomElement formContainer = DetailSection.GetElementWaitByCSS(DetailSectionCardTokenForm.locator); DomElement actions = formContainer.GetElementWaitByCSS(DetailSectionCardTokenFormActions.locator); return(formContainer.GetElementWaitByCSS(DetailSectionCardTokenFormActionsSubmit.locator) .webElement.Enabled); }
public void FilterSetSearchOption(string searchOption, string searchValue) { filterSearchComponent = filterForm.GetElementWaitByCSS(filterSearchComponent.locator); filterSearchDropDown = filterSearchComponent.GetElementWaitByCSS(filterSearchDropDown.locator); filterSearchInput = filterSearchComponent.GetElementWaitByCSS(filterSearchInput.locator); SelectDropDownOption(filterSearchDropDown, searchOption); SetInputField(filterSearchInput, searchValue); }
public void ClickOnSubmit() { DomElement formContainer = DetailSection.GetElementWaitByCSS(DetailSectionCardTokenForm.locator); DomElement actions = formContainer.GetElementWaitByCSS(DetailSectionCardTokenFormActions.locator); DomElement submitButton = formContainer.GetElementWaitByCSS(DetailSectionCardTokenFormActionsSubmit.locator); submitButton.webElement.Click(); }
public void SetInputValue(AddressInputs input, string value) { var addressForm = Container.GetElementWaitByCSS(AddressForm.locator); switch (input) { case AddressInputs.Country: var countryInput = addressForm.GetElementWaitByCSS(CountrySelector.locator); countryInput.webElement.Click(); var options = countryInput.GetElementsWaitByCSS(CountryOptionItems.locator); var option = options.FirstOrDefault(el => el.webElement.Text.Contains(value)); option.webElement.Click(); break; case AddressInputs.CompanyName: var companyNameField = addressForm.GetElementWaitByCSS(CompanyNameInput.locator); companyNameField.webElement.Clear(); companyNameField.webElement.SendKeys(value); break; case AddressInputs.State: var stateField = addressForm.GetElementWaitByCSS(stateSelect.locator); stateField.webElement.Clear(); stateField.webElement.SendKeys(value); break; case AddressInputs.City: var cityField = addressForm.GetElementWaitByCSS(cityInput.locator); cityField.webElement.Clear(); cityField.webElement.SendKeys(value); break; case AddressInputs.Street: var streetField = addressForm.GetElementWaitByCSS(streetSelectDropdownlist.locator); streetField.webElement.Clear(); streetField.webElement.SendKeys(value); break; case AddressInputs.Postal: var postalField = addressForm.GetElementWaitByCSS(postalInput.locator); postalField.webElement.Clear(); postalField.webElement.SendKeys(value); break; case AddressInputs.Apartment: var apartmentField = addressForm.GetElementWaitByCSS(aptNumberInput.locator); if (!string.IsNullOrEmpty(value)) { apartmentField.webElement.Clear(); apartmentField.webElement.SendKeys(value); } break; default: throw new ArgumentException($"{input} is not supported"); } }
public void FillCardTokenForm(PaymentOptionModel cardToken) { string parentWindow = Driver.WindowHandles[0]; DomElement cardTokenContainer = DetailSection.GetElementWaitByCSS(DetailSectionCardTokenForm.locator); DomElement cardTokenContainerFrame = cardTokenContainer.GetElementWaitByCSS(CenposFrame.locator); IWebDriver iFrame = Driver.SwitchTo().Frame(FrameName); Helper.FindByCondition(By.CssSelector(CenposFrameForm.locator), (el) => el.Displayed); IWebElement cardTokenContainerFrameFormCardNumber = iFrame.FindElement(By.CssSelector(CardNumberField.locator)); IWebElement cardTokenContainerFrameFormCardMonth = iFrame.FindElement(By.CssSelector(CardMonthField.locator)); IWebElement cardTokenContainerFrameFormCardYear = iFrame.FindElement(By.CssSelector(CardYearField.locator)); IWebElement cardTokenContainerFrameFormCardName = iFrame.FindElement(By.CssSelector(CardNameField.locator)); IWebElement cardTokenContainerFrameFormCardCvv = iFrame.FindElement(By.CssSelector(CardCvvField.locator)); cardTokenContainerFrameFormCardNumber.SendKeys(cardToken.CardNumber); cardTokenContainerFrameFormCardMonth.SendKeys(cardToken.ExpirationMont); cardTokenContainerFrameFormCardYear.SendKeys(cardToken.ExpirationYear); cardTokenContainerFrameFormCardName.SendKeys(cardToken.HolderName); cardTokenContainerFrameFormCardCvv.SendKeys(cardToken.Cvv); Driver.SwitchTo().Window(parentWindow); }
public PaymentOptionsHomePage ClickOnCancel() { DomElement formContainer = DetailSection.GetElementWaitByCSS(DetailSectionCardTokenForm.locator); DomElement actions = formContainer.GetElementWaitByCSS(DetailSectionCardTokenFormActions.locator); DomElement cancelButton = formContainer.GetElementWaitByCSS(DetailSectionCardTokenFormActionsCancel.locator); cancelButton.webElement.Click(); return(new PaymentOptionsHomePage(Driver)); }
public virtual void SelectFirstInBillingDropDown() { DomElement billingForm = detailSummary.GetElementWaitByCSS(detailBillingSection.locator); DomElement billingDropDown = billingForm.GetElementWaitByCSS(detailBillingEditFormInputExistingDropdown.locator); billingDropDown.webElement.Click(); DomElement billingOnlyDropdown = billingForm.GetElementWaitByCSS(detailBillingEditFormInputExistingDropdownOnly.locator); List <DomElement> dropdownOptions = billingOnlyDropdown.GetElementsWaitByCSS(detailBillingEditFormInputExistingDropdownOption.locator); dropdownOptions.FirstOrDefault().webElement.Click(); }
public OfferingProductsPage ClickOnFirstItemInCatalog() { DomElement catalogPageView = catalogSummary.GetElementWaitByCSS(detailGridItemContent.locator); DomElement itemImageView = catalogPageView.GetElementWaitByCSS(detailItemImage.locator); itemImageView.webElement.Click(); return(new OfferingProductsPage(Driver)); }
public virtual void SetLoginCredentials(LoginCredential loginCredentials) { DomElement signInPageContainer = BodyContainer.GetElementWaitByCSS(SignInSectionContainer.locator); DomElement loginContainer = signInPageContainer.GetElementWaitByCSS(LoginContainer.locator); DomElement emailField = loginContainer.GetElementWaitByCSS(EmailInput.locator); DomElement passwordField = loginContainer.GetElementWaitByCSS(PasswordInput.locator); emailField.webElement.SendKeys(loginCredentials.User); passwordField.webElement.SendKeys(loginCredentials.Password); //TODO: //use a selenium wait to replace this Sleep System.Threading.Thread.Sleep(1900); }
public virtual bool DefaultTitlePage() { DomElement listDetailSummary = detailSummary.GetElementWaitByCSS(detailSection.locator); DomElement listDetailSection = listDetailSummary.GetElementWaitByCSS(detaulfTitleList.locator); return(listDetailSection.webElement.Enabled); }
public string GetCoBrandSectionText(IndexHomePageSectionsEnum section) { DomElement mainContainer = BodyContainer.GetElementWaitByCSS(MainContainer.locator); switch (section) { case IndexHomePageSectionsEnum.Top: return(mainContainer.GetElementWaitByCSS(TopZoneContainer.locator).webElement.Text); case IndexHomePageSectionsEnum.Bottom: return(mainContainer.GetElementWaitByCSS(BottomZoneContainer.locator).webElement.Text); default: throw new ArgumentException($"{section} is not supported yet.."); } }
public bool SpecificationsSection() { DomElement offeringProductSection = offeringSummary.GetElementWaitByCSS(productSection.locator); DomElement sectionShippingAvailable = offeringProductSection.GetElementWaitByCSS(detailSpecifications.locator); return(sectionShippingAvailable.webElement.Enabled); }
public bool ShippingInfoSectionAvailable() { DomElement offeringProductSection = offeringSummary.GetElementWaitByCSS(productSection.locator); DomElement sectionShippingAvailable = offeringProductSection.GetElementWaitByCSS(detailshippingavailable.locator); return(sectionShippingAvailable.webElement.Enabled); }
public void AddtoCartInOffering() { DomElement offeringProductSection = offeringSummary.GetElementWaitByCSS(productSection.locator); DomElement buttonaddtocart = offeringProductSection.GetElementWaitByCSS(detailaddbutton.locator); buttonaddtocart.webElement.Click(); }
public bool SavingsMsgDisplayed() { DomElement offeringProductSection = offeringSummary.GetElementWaitByCSS(productSection.locator); DomElement savingmessagedisplayed = offeringProductSection.GetElementWaitByCSS(savingsmsglabel.locator); return(savingmessagedisplayed.webElement.Enabled); }
public bool YourPriceLabelforAUTH() { DomElement offeringProductSection = offeringSummary.GetElementWaitByCSS(productSection.locator); DomElement yourpriceLabeltextforAUTH = offeringProductSection.GetElementWaitByCSS(detailYourPriceLabel.locator); return(yourpriceLabeltextforAUTH.webElement.Enabled); }
public bool ContactInfoExist() { DomElement dashboardContainer = Container.GetElementWaitByCSS(Subcontainer.locator); DomElement contactInfoSection = dashboardContainer.GetElementWaitByCSS(ContactInfoSection.locator); return(contactInfoSection.webElement.Displayed && contactInfoSection.webElement.Enabled); }
public void SelectPreviouslyStoreAddress(string address) { DomElement formContainer = DetailSection.GetElementWaitByCSS(DetailSectionCardTokenForm.locator); DomElement prevStoredAddressesDropdown = formContainer.GetElementWaitByCSS(DetailSectionCardTokenFormItemSelection.locator); SelectDropDownAutoCompleteOption(prevStoredAddressesDropdown, address); }
//public bool ClickContactInfoLink() //{ // this.linkContactInfo.webElement = _helper.GetElementWait(this.linkContactInfo.findsBy); // linkContactInfo.webElement.Click(); // return true; //} public bool AddressesExist() { DomElement dashboardContainer = Container.GetElementWaitByCSS(Subcontainer.locator); DomElement addressesSection = dashboardContainer.GetElementWaitByCSS(AddressesSection.locator); return(addressesSection.webElement.Displayed && addressesSection.webElement.Enabled); }
//public string GetNoRecentOrdersMessage() => this.WebElementGetText(this.MessageNotRecentOrders.findsBy); public bool DashboardTitleExist() { DomElement dashboardContainer = Container.GetElementWaitByCSS(Subcontainer.locator); DomElement title = dashboardContainer.GetElementWaitByCSS(PageTitle.locator); return(title.webElement.Displayed && title.webElement.Enabled); }
public bool RecentOrdersExist() { DomElement dashboardContainer = Container.GetElementWaitByCSS(Subcontainer.locator); DomElement recentOrdersSection = dashboardContainer.GetElementWaitByCSS(RecentOrdersSection.locator); return(recentOrdersSection.webElement.Displayed && recentOrdersSection.webElement.Enabled); }
public void ClickOnMakeDefault() { DomElement cardTokenContainer = DetailSection.GetElementWaitByCSS(DetailSectionCardTokenForm.locator); DomElement cardTokenCheckbox = cardTokenContainer.GetElementWaitByCSS(DetailSectionCardTokenFormCheckbox.locator); cardTokenCheckbox.webElement.Click(); }
public string GetPhoneNumber() { DomElement contactSection = Container.GetElementWaitByCSS(ContainerContact.locator); DomElement phoneNumber = contactSection.GetElementWaitByCSS(ContactPhoneNumber.locator); return(phoneNumber.webElement.Text); }
//public bool AreNotRecentOrders() //{ // this.messageNotRecentOrders.webElement = _helper.GetElementWait(this.messageNotRecentOrders.findsBy); // return this.messageNotRecentOrders.webElement.Displayed && this.messageNotRecentOrders.webElement.Enabled; //} //internal bool ClickOrderDetail() //{ // var orderTable = recentOrdersSection.GetElementsWaitByCSS("table tbody").FirstOrDefault(); // if (orderTable == null) // { // return false; // } // var tableRows = orderTable.GetElementsWaitByCSS("tr"); // if (tableRows.Count > 0) // { // var ancor = orderTable.GetElementsWaitByCSS("a").FirstOrDefault(); // if (ancor != null) // { // ancor.webElement.Click(); // return true; // } // } // return true; //} public bool PaymentOptionsExist() { DomElement dashboardContainer = Container.GetElementWaitByCSS(Subcontainer.locator); DomElement paymentOptionsSection = dashboardContainer.GetElementWaitByCSS(PaymentOptionsSection.locator); return(paymentOptionsSection.webElement.Displayed && paymentOptionsSection.webElement.Enabled); }
public bool ListPriceLabelforANON() { DomElement offeringProductSection = offeringSummary.GetElementWaitByCSS(productSection.locator); DomElement listpriceLabeltextforANON = offeringProductSection.GetElementWaitByCSS(detailListPriceLabel.locator); return(listpriceLabeltextforANON.webElement.Enabled); }