예제 #1
0
        public static void QuickLinkClick(this IWidgetContainer container, string name)
        {
            container.Selenium.FindElement(container.WidgetContainerLocator().CombineCss(" .sf-quicklinks"));

            By quickLinkSelector = container.WidgetContainerLocator().CombineCss(" ul li.sf-quick-link[data-name='{0}'] > a".FormatWith(name));

            container.Selenium.WaitElementPresent(quickLinkSelector);
            container.Selenium.FindElement(quickLinkSelector).ButtonClick();
        }
예제 #2
0
        public static PopupControl <AlertEntity> AlertCreateClick(this IWidgetContainer container)
        {
            container.Selenium.FindElement(container.WidgetContainerLocator().CombineCss(" .sf-alerts-toggler")).Click();

            By createLocator = container.WidgetContainerLocator().CombineCss(" a.sf-alert-create");

            container.Selenium.WaitElementVisible(createLocator);
            container.Selenium.FindElement(createLocator).Click();

            PopupControl <AlertEntity> result = new PopupControl <AlertEntity>(container.Selenium, "New");

            container.Selenium.WaitElementPresent(result.PopupLocator);
            return(result);
        }
예제 #3
0
        public static SearchPopupProxy NotesViewClick(this IWidgetContainer container)
        {
            container.Selenium.FindElement(container.WidgetContainerLocator().CombineCss(" .sf-notes-toggler")).Click();

            By viewSelector = container.WidgetContainerLocator().CombineCss(" a.sf-note-view");

            container.Selenium.WaitElementVisible(viewSelector);
            container.Selenium.FindElement(viewSelector).Click();

            SearchPopupProxy result = new SearchPopupProxy(container.Selenium, "New");

            container.Selenium.WaitElementPresent(result.PopupLocator);
            result.SearchControl.WaitInitialSearchCompleted();
            return(result);
        }
예제 #4
0
        public static SearchPopupProxy AlertsViewClick(this IWidgetContainer container, AlertCurrentState state)
        {
            container.Selenium.FindElement(container.WidgetContainerLocator().CombineCss(" .sf-alerts-toggler")).Click();

            By viewSelector = container.WidgetContainerLocator().CombineCss(" .sf-alert-view .{0}.sf-alert-count-label".FormatWith(GetCssClass(state)));

            container.Selenium.WaitElementVisible(viewSelector);
            container.Selenium.FindElement(viewSelector).Click();

            SearchPopupProxy result = new SearchPopupProxy(container.Selenium, "alerts");

            container.Selenium.WaitElementPresent(result.PopupLocator);
            result.SearchControl.WaitInitialSearchCompleted();
            return(result);
        }
예제 #5
0
        public static int AlertCount(this IWidgetContainer container, AlertCurrentState state)
        {
            var result = (string)container.Selenium.ExecuteScript("return $('{0} span.sf-widget-count.{1}').html()".FormatWith(
                                                                      container.WidgetContainerLocator().CssSelector(),
                                                                      GetCssClass(state)));

            return(int.Parse(result));
        }
예제 #6
0
        public static int NotesCount(this IWidgetContainer container)
        {
            string str = (string)container.Selenium.ExecuteScript("return $('{0} .sf-notes-toggler .sf-widget-count').html()".FormatWith(container.WidgetContainerLocator().CssSelector()));

            return(int.Parse(str));
        }