Example #1
0
        /// <summary>
        /// Sets the Section Header content in the field designer
        /// </summary>
        public void SetSectionHeaderText(string sectionHeader)
        {
            HtmlTableCell textbox = this.EM.Forms.FormsBackend.SectionHeaderText.AssertIsPresent("Text field");

            textbox.MouseClick();
            Manager.Current.Desktop.KeyBoard.TypeText(sectionHeader);
        }
Example #2
0
        /// <summary>
        /// Fill content to the content block widget
        /// </summary>
        /// <param name="content">The content value</param>
        public void FillContentToContentBlockWidget(string content)
        {
            HtmlTableCell editable = EM.GenericContent
                                     .ContentBlockWidget
                                     .EditableArea
                                     .AssertIsPresent("Editable area");

            editable.ScrollToVisible();
            editable.Focus();
            editable.MouseClick();

            Manager.Current.Desktop.KeyBoard.TypeText(content);
        }
Example #3
0
        /// <summary>
        /// Selects the content in editable area.
        /// </summary>
        public void SelectAllContentInEditableArea()
        {
            HtmlTableCell editable = EM.GenericContent
                                     .ContentBlockWidget
                                     .EditableArea
                                     .AssertIsPresent("Editable area");

            editable.ScrollToVisible();
            editable.Focus();
            editable.MouseClick();

            Manager.Current.Desktop.KeyBoard.KeyDown(System.Windows.Forms.Keys.Control);
            Manager.Current.Desktop.KeyBoard.KeyPress(System.Windows.Forms.Keys.A);
            Manager.Current.Desktop.KeyBoard.KeyUp(System.Windows.Forms.Keys.Control);
        }
Example #4
0
        public void TestMethod_Article()
        {
            ReadData();

            //Login
            //Login to the system
            myManager.ActiveBrowser.NavigateTo(_Url);
            CommonFunctions.HandleSpashScreen(myManager, myManager.ActiveBrowser);
            myManager.ActiveBrowser.WaitUntilReady();
            myManager.ActiveBrowser.RefreshDomTree();
            CommonFunctions.Login(myManager, myManager.ActiveBrowser, _Uname, _Password);
            Thread.Sleep(7000);

            myManager.ActiveBrowser.NavigateTo(_Url + "/customer/");
            myManager.ActiveBrowser.WaitUntilReady();
            myManager.ActiveBrowser.RefreshDomTree();
            Thread.Sleep(5000);

            //Click On episerverButton
            HtmlUnorderedList Episerverlink = myManager.ActiveBrowser.Find.ById <HtmlUnorderedList>("epi-quickNavigator");

            Episerverlink.MouseClick();
            //it takes more than 15seconds to load the edit mode
            Thread.Sleep(30000);
            myManager.ActiveBrowser.Refresh();
            Thread.Sleep(25000);

            //Click on left sub tree
            ObjEditMode editmode = new ObjEditMode(myManager);

            myManager.ActiveBrowser.WaitUntilReady();
            myManager.ActiveBrowser.RefreshDomTree();
            HtmlSpan PagesTree = editmode.PagesTree.As <HtmlSpan>();

            PagesTree.MouseClick();

            //Click on leftmenu anchor

            Thread.Sleep(5000);
            myManager.ActiveBrowser.WaitUntilReady();
            myManager.ActiveBrowser.RefreshDomTree();
            HtmlSpan PagesTreePin = editmode.PagesTreePin.As <HtmlSpan>();

            PagesTreePin.MouseClick();

            //-----------------------------------------------------------------------------

            //CLick on customer Branch to create a new file
            Thread.Sleep(5000);
            myManager.ActiveBrowser.WaitUntilReady();
            myManager.ActiveBrowser.RefreshDomTree();
            HtmlSpan NewpageDropDown = editmode.CustomerNewDropdown.As <HtmlSpan>();

            NewpageDropDown.MouseClick();


            //Click On New Page
            Thread.Sleep(3000);
            myManager.ActiveBrowser.WaitUntilReady();
            myManager.ActiveBrowser.RefreshDomTree();
            //Element newPage = editmode.CustomerNewPage;
            HtmlTableCell newPage = editmode.CustomerNewPage.As <HtmlTableCell>();;

            //myManager.ActiveBrowser.Actions.Click(newPage);
            newPage.MouseClick();


            //Find The Community List
            Thread.Sleep(5000);
            myManager.ActiveBrowser.RefreshDomTree();
            HtmlDiv           CommunityArea  = myManager.ActiveBrowser.Find.ById("dijit__KeyNavContainer_1").As <HtmlDiv>();
            HtmlUnorderedList CommunityPages = CommunityArea.Find.AllByTagName("ul")[0].As <HtmlUnorderedList>();

            System.Collections.ObjectModel.ReadOnlyCollection <HtmlListItem> CommunityItems = CommunityPages.Find.AllByTagName <HtmlListItem>("li");

            foreach (HtmlListItem item in CommunityItems)
            {
                if (item.InnerText.Contains("[Community] Article"))
                {
                    item.MouseClick();
                    Thread.Sleep(2000);
                    myManager.ActiveBrowser.RefreshDomTree();
                    CreateArticle(_Heading, _PageName, _ClubsList, _Introduction, _Description);
                    Thread.Sleep(20000);
                    ValidateArticle(_Heading);
                    break;
                }
            }
        }
Example #5
0
        public void TestMethod_StanderdPage()
        {
            ReadData();

            //Login
            //Login to the system
            myManager.ActiveBrowser.NavigateTo(_Url);
            CommonFunctions.HandleSpashScreen(myManager, myManager.ActiveBrowser);
            myManager.ActiveBrowser.WaitUntilReady();
            myManager.ActiveBrowser.RefreshDomTree();
            CommonFunctions.Login(myManager, myManager.ActiveBrowser, _Uname, _Password);
            Thread.Sleep(7000);

            //Navigate to customer
            myManager.ActiveBrowser.NavigateTo(_Url + "/customer/");
            myManager.ActiveBrowser.WaitUntilReady();
            myManager.ActiveBrowser.RefreshDomTree();
            Thread.Sleep(5000);

            ObjEditMode editmode = new ObjEditMode(myManager);


            Thread.Sleep(5000);
            myManager.ActiveBrowser.RefreshDomTree();
            //Click On episerverButton
            HtmlUnorderedList Epilink = editmode.Episerverlink.As <HtmlUnorderedList>();

            Epilink.MouseClick();
            //it takes more than 15seconds to load the edit mode
            Thread.Sleep(30000);
            myManager.ActiveBrowser.Refresh();
            Thread.Sleep(25000);

            //Click on left sub tree
            myManager.ActiveBrowser.WaitUntilReady();
            myManager.ActiveBrowser.RefreshDomTree();
            HtmlSpan PagesTree = editmode.PagesTree.As <HtmlSpan>();

            PagesTree.MouseClick();


            //Click on leftmenu anchor
            Thread.Sleep(5000);
            myManager.ActiveBrowser.WaitUntilReady();
            myManager.ActiveBrowser.RefreshDomTree();
            HtmlSpan PagesTreeAnchor = editmode.PagesTreePin.As <HtmlSpan>();

            PagesTreeAnchor.MouseClick();


            //-------------------------------------------------------------------------------------------------------------------------------------

            //CLick on customer Branch to create a new file
            Thread.Sleep(5000);
            myManager.ActiveBrowser.WaitUntilReady();
            myManager.ActiveBrowser.RefreshDomTree();
            HtmlSpan NewpageDropDown = editmode.CustomerNewDropdown.As <HtmlSpan>();

            NewpageDropDown.MouseClick();


            //Click On New Page
            Thread.Sleep(3000);
            myManager.ActiveBrowser.WaitUntilReady();
            myManager.ActiveBrowser.RefreshDomTree();
            HtmlTableCell newPage = editmode.CustomerNewPage.As <HtmlTableCell>();;

            newPage.MouseClick();


            //Add a name to the page
            Thread.Sleep(3000);
            myManager.ActiveBrowser.RefreshDomTree();
            ObjStanderd   standerd = new ObjStanderd(myManager);
            HtmlInputText PageName = standerd.PageName.As <HtmlInputText>();

            PageName.ScrollToVisible();
            PageName.MouseHover();
            PageName.MouseClick();
            PageName.Text = _Name;

            //Find The Community List
            Thread.Sleep(5000);
            myManager.ActiveBrowser.RefreshDomTree();
            HtmlDiv           CommunityArea  = myManager.ActiveBrowser.Find.ById("dijit__KeyNavContainer_1").As <HtmlDiv>();
            HtmlUnorderedList CommunityPages = CommunityArea.Find.AllByTagName("ul")[0].As <HtmlUnorderedList>();

            System.Collections.ObjectModel.ReadOnlyCollection <HtmlListItem> CommunityItems = CommunityPages.Find.AllByTagName <HtmlListItem>("li");


            foreach (HtmlListItem item in CommunityItems)
            {
                if (item.InnerText.Contains("[Community] Standard Page"))
                {
                    item.MouseClick();
                    Thread.Sleep(2000);
                    myManager.ActiveBrowser.RefreshDomTree();
                    EditStanderPage(_Name, _TopContent);
                    Thread.Sleep(20000);
                    //ValidateStanderPag(_Heading);
                    break;
                }
            }
        }