예제 #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
        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));
        }
예제 #3
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);
        }