コード例 #1
0
        public void addinvalid()
        {
            ObjAddStandardActivity objaddstandardactivity = new ObjAddStandardActivity(myManager);

            HtmlInputText name           = objaddstandardactivity.standactivitynametxt.As <HtmlInputText>();
            HtmlInputText invalidvariant = objaddstandardactivity.varianttxt.As <HtmlInputText>();

            name.Text           = _standactivityname;
            invalidvariant.Text = _invalidvariant;

            Thread.Sleep(2000);
            myManager.ActiveBrowser.RefreshDomTree();

            Element savebutton = objaddstandardactivity.savebtn;

            myManager.ActiveBrowser.Actions.Click(savebutton);

            Thread.Sleep(2000);
            myManager.ActiveBrowser.RefreshDomTree();

            Element verifyinvalid = objaddstandardactivity.invalidvariantmsg;

            Assert.IsTrue(verifyinvalid.InnerText.Contains("Invalid Variant(s) String (V1) . Please try again"));

            Thread.Sleep(2000);
            myManager.ActiveBrowser.RefreshDomTree();
        }
コード例 #2
0
        public void TestMethod_addStandardActCancel()
        {
            readData();

            CommonFunctions.Login(myManager, _username, _password, _Url);

            myManager.ActiveBrowser.Window.Maximize();

            // -- End of Login ---
            ObjMenus menus = new ObjMenus(myManager);

            HtmlAnchor process = menus.processlink.As <HtmlAnchor>();

            process.MouseHover();

            myManager.ActiveBrowser.RefreshDomTree();

            Thread.Sleep(1000);
            myManager.ActiveBrowser.RefreshDomTree();

            HtmlAnchor standardactivity = menus.standardactivitylink.As <HtmlAnchor>();

            standardactivity.MouseClick();

            Thread.Sleep(1000);
            myManager.ActiveBrowser.RefreshDomTree();

            ObjAddStandardActivity objaddstandardactivity = new ObjAddStandardActivity(myManager);
            ObjStandardActivity    objstandardactivity    = new ObjStandardActivity(myManager);


            Element addbutton = objaddstandardactivity.addactivitybtn;

            myManager.ActiveBrowser.Actions.Click(addbutton);

            Thread.Sleep(4000);
            myManager.ActiveBrowser.RefreshDomTree();

            Element verifypage = objaddstandardactivity.addpagetitle;

            Assert.IsTrue(verifypage.InnerText.Contains("Activity Details"));

            Thread.Sleep(2000);

            Element cancelbutton = objaddstandardactivity.cancelbtn;

            myManager.ActiveBrowser.Actions.Click(cancelbutton);

            Thread.Sleep(4000);
            myManager.ActiveBrowser.RefreshDomTree();

            Element tabletitle = objstandardactivity.standardactivitytblheading;

            Assert.IsTrue(tabletitle.InnerText.Contains("Standard Activity"));

            Thread.Sleep(3000);
            myManager.ActiveBrowser.RefreshDomTree();
        }
コード例 #3
0
        public void verifycreate()
        {
            ObjAddStandardActivity objaddstandardactivity = new ObjAddStandardActivity(myManager);

            HtmlTable standacttbl = objaddstandardactivity.standardactivitytable.As <HtmlTable>();

            HtmlInputText searchname = objaddstandardactivity.searchnamefield.As <HtmlInputText>();

            searchname.Text = _standactivityname;

            myManager.Desktop.Mouse.Click(MouseClickType.LeftClick, searchname.GetRectangle());
            myManager.Desktop.KeyBoard.KeyPress(System.Windows.Forms.Keys.Enter);

            Thread.Sleep(2000);
            myManager.ActiveBrowser.RefreshDomTree();


            Assert.AreEqual(standacttbl.BodyRows[0].Cells[2].InnerText, _standactivityname);

            Thread.Sleep(3000);
            myManager.ActiveBrowser.RefreshDomTree();
        }
コード例 #4
0
        public void TestMethod_addStandardActivityPage()
        {
            readData();

            CommonFunctions.Login(myManager, _username, _password, _Url);

            myManager.ActiveBrowser.Window.Maximize();

            // -- End of Login ---
            ObjMenus menus = new ObjMenus(myManager);

            HtmlAnchor process = menus.processlink.As <HtmlAnchor>();

            process.MouseHover();

            myManager.ActiveBrowser.RefreshDomTree();

            Thread.Sleep(1000);
            myManager.ActiveBrowser.RefreshDomTree();

            HtmlAnchor standardactivity = menus.standardactivitylink.As <HtmlAnchor>();

            standardactivity.MouseClick();

            Thread.Sleep(2000);
            myManager.ActiveBrowser.RefreshDomTree();

            ObjAddStandardActivity objaddstandardactivity = new ObjAddStandardActivity(myManager);

            Element addbutton = objaddstandardactivity.addactivitybtn;

            myManager.ActiveBrowser.Actions.Click(addbutton);

            Thread.Sleep(2000);
            myManager.ActiveBrowser.RefreshDomTree();

            Element verifypage = objaddstandardactivity.addpagetitle;

            Assert.IsTrue(verifypage.InnerText.Contains("Activity Details"));

            Element namelbl = objaddstandardactivity.namelabel;

            Assert.IsTrue(namelbl.InnerText.Contains("Name *"));

            Element freetxtlbl = objaddstandardactivity.freetextlabel;

            Assert.IsTrue(freetxtlbl.InnerText.Contains("Free Text"));

            Element grouplbl = objaddstandardactivity.grouplabel;

            Assert.IsTrue(grouplbl.InnerText.Contains("Group"));

            Element poslbl = objaddstandardactivity.poslabel;

            Assert.IsTrue(poslbl.InnerText.Contains("Pos"));

            Element postlbl = objaddstandardactivity.postlabel;

            Assert.IsTrue(postlbl.InnerText.Contains("Post"));

            Element oplbl = objaddstandardactivity.oplabel;

            Assert.IsTrue(oplbl.InnerText.Contains("Op"));

            Element activitytypelbl = objaddstandardactivity.activitytypelabel;

            Assert.IsTrue(activitytypelbl.InnerText.Contains("Activity Type"));

            Element weslbl = objaddstandardactivity.weslabel;

            Assert.IsTrue(weslbl.InnerText.Contains("Wes"));

            Element variantlbl = objaddstandardactivity.variantlabel;

            Assert.IsTrue(variantlbl.InnerText.Contains("Variant String *"));

            Element memolbl = objaddstandardactivity.memolabel;

            Assert.IsTrue(memolbl.InnerText.Contains("Memo"));

            Element additionalmemolbl = objaddstandardactivity.additionalmemolabel;

            Assert.IsTrue(additionalmemolbl.InnerText.Contains("Additional Memo"));

            Thread.Sleep(3000);
            myManager.ActiveBrowser.RefreshDomTree();
        }
コード例 #5
0
        public void TestMethod_addStandardactMandatory()
        {
            readData();

            CommonFunctions.Login(myManager, _username, _password, _Url);

            myManager.ActiveBrowser.Window.Maximize();

            // -- End of Login ---
            ObjMenus menus = new ObjMenus(myManager);

            HtmlAnchor process = menus.processlink.As <HtmlAnchor>();

            process.MouseHover();

            myManager.ActiveBrowser.RefreshDomTree();

            Thread.Sleep(1000);
            myManager.ActiveBrowser.RefreshDomTree();

            HtmlAnchor standardactivity = menus.standardactivitylink.As <HtmlAnchor>();

            standardactivity.MouseClick();

            Thread.Sleep(1000);
            myManager.ActiveBrowser.RefreshDomTree();

            ObjAddStandardActivity objaddstandardactivity = new ObjAddStandardActivity(myManager);

            Element addbutton = objaddstandardactivity.addactivitybtn;

            myManager.ActiveBrowser.Actions.Click(addbutton);

            Thread.Sleep(2000);
            myManager.ActiveBrowser.RefreshDomTree();

            Element verifypage = objaddstandardactivity.addpagetitle;

            Assert.IsTrue(verifypage.InnerText.Contains("Activity Details"));

            Thread.Sleep(2000);
            myManager.ActiveBrowser.RefreshDomTree();

            Element savebutton = objaddstandardactivity.savebtn;

            myManager.ActiveBrowser.Actions.Click(savebutton);

            /*
             * HtmlInputText name = objaddstandardactivity.standactivitynametxt.As<HtmlInputText>();
             * HtmlInputText variant = objaddstandardactivity.varianttxt.As<HtmlInputText>();
             *
             * name.Text = _namemandatory;
             * variant.Text = _variantmandatory;
             */

            Thread.Sleep(2000);
            myManager.ActiveBrowser.RefreshDomTree();

            Element mandatorymsg = objaddstandardactivity.mandatoryMsg;

            Assert.IsTrue(mandatorymsg.InnerText.Contains("Please fill all mandatory fields"));

            Thread.Sleep(2000);
            myManager.ActiveBrowser.RefreshDomTree();

            Element namemandatory = objaddstandardactivity.namemandatory;

            Assert.IsTrue(namemandatory.InnerText.Contains("Activity name is mandatory"));

            Element variantmandatory = objaddstandardactivity.variantmandatory;

            Assert.IsTrue(variantmandatory.InnerText.Contains("Variant string is mandatory"));

            Thread.Sleep(3000);
            myManager.ActiveBrowser.RefreshDomTree();
        }
コード例 #6
0
        public void addactivity()
        {
            ObjAddStandardActivity objaddstandardactivity = new ObjAddStandardActivity(myManager);

            HtmlInputText name           = objaddstandardactivity.standactivitynametxt.As <HtmlInputText>();
            HtmlInputText freetext       = objaddstandardactivity.freetexttxt.As <HtmlInputText>();
            HtmlInputText memo           = objaddstandardactivity.memotxt.As <HtmlInputText>();
            HtmlInputText additionalmemo = objaddstandardactivity.additionalmemotxt.As <HtmlInputText>();
            HtmlSelect    group          = objaddstandardactivity.grouptxt.As <HtmlSelect>();
            HtmlSelect    pos            = objaddstandardactivity.postxt.As <HtmlSelect>();
            HtmlSelect    post           = objaddstandardactivity.posttxt.As <HtmlSelect>();
            HtmlSelect    op             = objaddstandardactivity.optxt.As <HtmlSelect>();
            HtmlInputText variant        = objaddstandardactivity.varianttxt.As <HtmlInputText>();

            name.Text           = _standactivityname;
            freetext.Text       = _freetext;
            memo.Text           = _memo;
            additionalmemo.Text = _additionalmemo;

            Thread.Sleep(2000);

            Thread.Sleep(2000);
            myManager.ActiveBrowser.RefreshDomTree();

            group.MouseClick();
            Thread.Sleep(1000);
            group.SelectByText(_group, true);

            //Thread.Sleep(1000);
            //myManager.ActiveBrowser.RefreshDomTree();

            pos.MouseClick();
            Thread.Sleep(1000);
            pos.SelectByText(_pos, true);

            //Thread.Sleep(1000);
            //myManager.ActiveBrowser.RefreshDomTree();

            post.MouseClick();
            Thread.Sleep(1000);
            post.SelectByText(_post, true);

            //Thread.Sleep(1000);
            //myManager.ActiveBrowser.RefreshDomTree();

            op.MouseClick();
            Thread.Sleep(1000);
            op.SelectByText(_op, true);

            //Thread.Sleep(1000);
            //myManager.ActiveBrowser.RefreshDomTree();

            variant.Text = _variant;

            /*
             * //variant combination
             * name.Text = _standactivityname;
             * variant.Text = _variantcombination;
             */

            Thread.Sleep(3000);

            Element savebutton = objaddstandardactivity.savebtn;

            myManager.ActiveBrowser.Actions.Click(savebutton);

            Thread.Sleep(3000);
            myManager.ActiveBrowser.RefreshDomTree();

            Element verifysave = objaddstandardactivity.savesuccessmsg;

            Assert.IsTrue(verifysave.InnerText.Contains("Standard Activity has been added successfully"));

            Thread.Sleep(3000);
            myManager.ActiveBrowser.RefreshDomTree();
        }
コード例 #7
0
        public void defaultvariant()
        {
            ObjAddStandardActivity objaddstandardactivity = new ObjAddStandardActivity(myManager);

            HtmlInputText name    = objaddstandardactivity.standactivitynametxt.As <HtmlInputText>();
            HtmlInputText variant = objaddstandardactivity.varianttxt.As <HtmlInputText>();

            name.Text    = _standactivityname;
            variant.Text = _variantmandatory;

            Thread.Sleep(2000);
            myManager.ActiveBrowser.RefreshDomTree();

            Element savebutton = objaddstandardactivity.savebtn;

            myManager.ActiveBrowser.Actions.Click(savebutton);

            Thread.Sleep(2000);
            myManager.ActiveBrowser.RefreshDomTree();

            Element popuptitle = objaddstandardactivity.globalvariantpopuptitle;

            Assert.IsTrue(popuptitle.InnerText.Contains(""));

            Thread.Sleep(2000);
            myManager.ActiveBrowser.RefreshDomTree();

            Element popupmsg = objaddstandardactivity.globalvariantpopupmsg;

            Assert.IsTrue(popupmsg.InnerText.Contains("Variant String is a mandatory field. If you want to apply this to all orders, please enter the Default Variant <variant>."));

            Thread.Sleep(2000);
            myManager.ActiveBrowser.RefreshDomTree();

            // click on Add Default Variant button
            Element addDefaultbutton = objaddstandardactivity.yesbtn;

            myManager.ActiveBrowser.Actions.Click(addDefaultbutton);

            Thread.Sleep(2000);
            myManager.ActiveBrowser.RefreshDomTree();

            /*
             * // Click on Cancel button
             * Element canceltbutton = objaddstandardactivity.nobtn;
             * myManager.ActiveBrowser.Actions.Click(canceltbutton);
             *
             * Thread.Sleep(2000);
             * myManager.ActiveBrowser.RefreshDomTree();
             *
             * Element variantmandatory = objaddstandardactivity.variantmandatory;
             * Assert.IsTrue(variantmandatory.InnerText.Contains("Variant string is mandatory"));
             *
             * Thread.Sleep(2000);
             * myManager.ActiveBrowser.RefreshDomTree();
             *
             */

            Element save = objaddstandardactivity.savebtn;

            myManager.ActiveBrowser.Actions.Click(save);

            Thread.Sleep(2000);
            myManager.ActiveBrowser.RefreshDomTree();

            Element verifysave = objaddstandardactivity.savesuccessmsg;

            Assert.IsTrue(verifysave.InnerText.Contains("Standard Activity has been created successfully"));

            Thread.Sleep(2000);
            myManager.ActiveBrowser.RefreshDomTree();
        }