示例#1
0
        public string GetAccountNumber()
        {
            AccountMenuContainer.Init(Driver, SeleniumConstants.defaultWaitTime);
            DomElement accountContainer = AccountMenuContainer.GetElementWaitByCSS(AccountSection.locator);

            return(accountContainer.GetElementWaitByCSS(AccountNumber.locator).webElement.Text);
        }
示例#2
0
        public AddAddressPage(IWebDriver driver) : base(driver)
        {
            InformationModal = new AddressesInformationModal(driver);
            Container.Init(driver, SeleniumConstants.defaultWaitTime);

            this.InitializeElements();
        }
示例#3
0
        public string OrderResultMessageGet()
        {
            searchResultMessage.Init(Driver, SeleniumConstants.defaultWaitTime);
            var spanMessage = searchResultMessage.GetElementWaitByCSS("span");

            return(spanMessage.webElement.Text);
        }
示例#4
0
        public PaymentOptionsCreatePage(IWebDriver driver) : base(driver)
        {
            DetailSection.Init(driver, SeleniumConstants.defaultWaitTime);

            ContentModal      = new PaymentsContentModal(driver);
            InfoModal         = new PaymentsInformationModal(driver);
            ConfirmationModal = new PaymentsConfirmationModal(driver);
        }
示例#5
0
        //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);
        }
示例#6
0
        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);
        }
示例#7
0
        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();
        }
示例#8
0
        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);
        }
示例#9
0
        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);
        }
示例#10
0
        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");
            }
        }
示例#11
0
        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);
        }
示例#12
0
 public ContactInfoEditPage(IWebDriver driver) : base(driver)
 {
     Container.Init(Driver, SeleniumConstants.defaultWaitTime);
 }
示例#13
0
 public ContactInfoHomePage(IWebDriver driver) : base(driver)
 {
     Header          = new Header(driver);
     AccountMenuLeft = new AccountMenuLeft(driver);
     Container.Init(driver, SeleniumConstants.defaultWaitTime);
 }
示例#14
0
        //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);
        }
示例#15
0
 public DashboardHomePage(IWebDriver driver) : base(driver)
 {
     Container.Init(driver, SeleniumConstants.defaultWaitTime);
 }
示例#16
0
 public EquipmentManualsWidget(IWebDriver driver)
 {
     Container.Init(driver, SeleniumConstants.defaultWaitTime);
 }
示例#17
0
 public BasePOM(IWebDriver driver)
 {
     Driver = driver;
     BodyContainer.Init(Driver, SeleniumConstants.defaultWaitTime);
 }
示例#18
0
 public TopHeader(IWebDriver driver) : base(driver)
 {
     SecondarySearchContainer.Init(Driver, SeleniumConstants.defaultWaitTime);
 }