Пример #1
0
        private bool ElementIsPresentOnSection(DomElement container, ViewPaymentsElements element)
        {
            switch (element)
            {
            case ViewPaymentsElements.SectionSubtitle:
                return(container.IsElementPresent(DetailSectionAccountSectionSubtitle.locator));   //can be only an H2 tag

            case ViewPaymentsElements.DefaultTile:
                return(container.IsElementPresent(DetailSectionAccountLiCardsDefaultCard.locator));

            default:
                throw new ArgumentException("Element is not valid");
            }
        }
Пример #2
0
        public bool ElementExistOnPage(AccessLevel level, ViewPaymentsElements element)
        {
            switch (level)
            {
            case AccessLevel.Account:
                DomElement accountSection = DetailSection.GetElementWaitByCSS(DetailSectionAccountSection.locator);

                return(ElementIsPresentOnSection(accountSection, element));

            case AccessLevel.User:
                DomElement userSection = DetailSection.GetElementWaitByCSS(DetailSectionUserSection.locator);

                return(ElementIsPresentOnSection(userSection, element));

            default:
                return(false);
            }
        }