Пример #1
0
        public FrameModalProxy <T> Create <T>() where T : ModifiableEntity
        {
            var popup = SearchControl.CreateButton.Find().CaptureOnClick();

            if (SelectorModalProxy.IsSelector(popup))
            {
                popup = popup.GetDriver().CapturePopup(() => SelectorModalProxy.Select(popup, typeof(T)));
            }

            return(new FrameModalProxy <T>(popup));
        }
Пример #2
0
        public FrameModalProxy <T> Create <T>() where T : ModifiableEntity
        {
            var popup = SearchControl.CreateButton.Find().CaptureOnClick();

            if (SelectorModalProxy.IsSelector(popup))
            {
                popup = popup.AsSelectorModal().SelectAndCapture <T>();
            }

            return(new FrameModalProxy <T>(popup));
        }
Пример #3
0
        private void ChooseType(Type selectType, IWebElement element)
        {
            if (!SelectorModalProxy.IsSelector(element))
            {
                return;
            }

            if (selectType == null)
            {
                throw new InvalidOperationException("No type to choose from selected");
            }

            SelectorModalProxy.Select(this.Element, TypeLogic.GetCleanName(selectType));
        }
Пример #4
0
        private IWebElement ChooseTypeCapture(IWebElement element, Type?selectType)
        {
            if (!SelectorModalProxy.IsSelector(element))
            {
                return(element);
            }

            if (selectType == null)
            {
                throw new InvalidOperationException("No type to choose from selected");
            }

            return(element.AsSelectorModal().SelectAndCapture(TypeLogic.GetCleanName(selectType)));
        }
Пример #5
0
        private IWebElement ChooseTypeCapture(Type?selectType, IWebElement element)
        {
            if (!SelectorModalProxy.IsSelector(element))
            {
                return(element);
            }

            if (selectType == null)
            {
                throw new InvalidOperationException("No type to choose from selected");
            }

            var newElement = element.GetDriver().CapturePopup(() =>
                                                              SelectorModalProxy.Select(this.Element, TypeLogic.GetCleanName(selectType !)));

            return(newElement);
        }