public string GetAccountNumber() { AccountMenuContainer.Init(Driver, SeleniumConstants.defaultWaitTime); DomElement accountContainer = AccountMenuContainer.GetElementWaitByCSS(AccountSection.locator); return(accountContainer.GetElementWaitByCSS(AccountNumber.locator).webElement.Text); }
public AddAddressPage(IWebDriver driver) : base(driver) { InformationModal = new AddressesInformationModal(driver); Container.Init(driver, SeleniumConstants.defaultWaitTime); this.InitializeElements(); }
public string OrderResultMessageGet() { searchResultMessage.Init(Driver, SeleniumConstants.defaultWaitTime); var spanMessage = searchResultMessage.GetElementWaitByCSS("span"); return(spanMessage.webElement.Text); }
public PaymentOptionsCreatePage(IWebDriver driver) : base(driver) { DetailSection.Init(driver, SeleniumConstants.defaultWaitTime); ContentModal = new PaymentsContentModal(driver); InfoModal = new PaymentsInformationModal(driver); ConfirmationModal = new PaymentsConfirmationModal(driver); }
//top header //categories list //In checkout this list does not exist public BaseHeader(IWebDriver driver) : base(driver) { Container.Init(driver, SeleniumConstants.defaultWaitTime); var utilityMenuContainer = Container.GetElementWaitByCSS(UtilityMenuContainer.locator); //initialize subcomponents _utilityMenu = new UtilityMenu(driver, utilityMenuContainer); }
public PaymentOptionsHomePage(IWebDriver driver) : base(driver) { DetailSection.Init(driver, SeleniumConstants.defaultWaitTime); //initialize the modals too InfoModal = new PaymentsInformationModal(driver); ContentModal = new PaymentsContentModal(driver); ConfirmationModal = new PaymentsConfirmationModal(driver); }
public EditAddressPage(IWebDriver driver) : base(driver) { InformationModal = new AddressesInformationModal(driver); NoEditsModal = new AddressesNoEditsModal(driver); Container.Init(driver, SeleniumConstants.defaultWaitTime); //TODO: //stop using this method and replace it with containers this.InitializeElements(); }
public bool OrderResultTableHaveValues() { searchResultTable.Init(Driver, SeleniumConstants.defaultWaitTime); searchResultTableOrders = searchResultTable.GetElementWaitByCSS(searchResultTableOrders.locator); List <DomElement> orders = searchResultTableOrders.GetElementsWaitByCSS("tr"); if (orders.Count > 0) { return(true); } return(false); }
public AddressesHomePage(IWebDriver driver) : base(driver) { Header = new Header(driver); AccountMenuLeft = new AccountMenuLeft(driver); DetailSection.Init(driver, SeleniumConstants.defaultWaitTime); ContentModal = new AddressesContentModal(driver); InformationModal = new AddressesInformationModal(driver); ConfirmationModal = new AddressesConfirmationModal(driver); }
public string GetSection(MiniCartSections section) { Container.Init(Driver, SeleniumConstants.defaultWaitTime); switch (section) { case MiniCartSections.PricingTag: DomElement amountContainer = Container.GetElementWaitByCSS(SectionAmounts.locator); DomElement amountUnitPriceContainer = amountContainer.GetElementWaitByCSS(AmountUnitPriceSection.locator); return(amountUnitPriceContainer.GetElementWaitByCSS(AmountUnitPriceSectionPriceTag.locator).webElement.Text); default: throw new ArgumentException($"Section {section} is not supported"); } }
public void AddToCartPartNumber(string partNumber) { iFrame = Driver.SwitchTo().Frame(FrameName); TableParts.Init(iFrame, SeleniumConstants.defaultWaitTime); //IWebElement partsTable = iFrame.FindElement(By.CssSelector(TableParts.locator)); List <DomElement> rows = TableParts.GetElementsWaitByCSS("tr"); int columnNum = GetColumnForHeader(rows, "PART #"); int rowNum = GetRowNumberForItem(rows, columnNum, partNumber); //rows[rowNum - 1].GetElementWaitByCSS("td > div.gridconqty input").webElement.Click(); var addBtn = rows[rowNum - 1].GetElementWaitByCSS("td > div.gridconqty input").webElement; if (addBtn == null) { throw new NotFoundException($"{partNumber} is not found in the table"); } addBtn.Click(); Driver.SwitchTo().Window(parentWindow); }
public ContactInfoEditPage(IWebDriver driver) : base(driver) { Container.Init(Driver, SeleniumConstants.defaultWaitTime); }
public ContactInfoHomePage(IWebDriver driver) : base(driver) { Header = new Header(driver); AccountMenuLeft = new AccountMenuLeft(driver); Container.Init(driver, SeleniumConstants.defaultWaitTime); }
//TODO: add menu items as fmp needs them #region constructor public UtilityMenu(IWebDriver driver) : base(driver) { Container.Init(Driver, SeleniumConstants.defaultWaitTime); MiniCart = new MiniCart(Driver); }
public DashboardHomePage(IWebDriver driver) : base(driver) { Container.Init(driver, SeleniumConstants.defaultWaitTime); }
public EquipmentManualsWidget(IWebDriver driver) { Container.Init(driver, SeleniumConstants.defaultWaitTime); }
public BasePOM(IWebDriver driver) { Driver = driver; BodyContainer.Init(Driver, SeleniumConstants.defaultWaitTime); }
public TopHeader(IWebDriver driver) : base(driver) { SecondarySearchContainer.Init(Driver, SeleniumConstants.defaultWaitTime); }