コード例 #1
0
        public void add()
        {
            ObjAddVariant objaddvariant = new ObjAddVariant(myManager);

            HtmlInputText   variantname = objaddvariant.variantnametxt.As <HtmlInputText>();
            HtmlInputText   family      = objaddvariant.familytxt.As <HtmlInputText>();
            HtmlInputText   alias       = objaddvariant.aliastxt.As <HtmlInputText>();
            HtmlInputNumber group       = objaddvariant.grouptxt.As <HtmlInputNumber>();
            HtmlInputText   groupname   = objaddvariant.groupnametxt.As <HtmlInputText>();
            HtmlInputText   freetext    = objaddvariant.freetexttxt.As <HtmlInputText>();

            variantname.Text = _variantname;
            family.Text      = _family;
            alias.Text       = _alias;
            group.Text       = _group;
            groupname.Text   = _groupname;
            freetext.Text    = _freetext;

            Element savebutton = objaddvariant.savebtn;

            myManager.ActiveBrowser.Actions.Click(savebutton);

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

            Element verifysuccess = objaddvariant.savesuccessmsg;

            Assert.IsTrue(verifysuccess.InnerText.Contains("Variant has been created successfully"));

            Thread.Sleep(3000);
            myManager.ActiveBrowser.RefreshDomTree();
        }
コード例 #2
0
        public void HtmlNumberFieldTest()
        {
            HtmlInputNumber textBox = webDriver.FindControl <HtmlInputNumber>(By.Id("myTextField"), 5);

            Assert.IsNullOrEmpty(textBox.Text);
            textBox.SetValue(10);
        }
コード例 #3
0
        /// <summary>
        /// Enters the height of the max.
        /// </summary>
        /// <param name="number">The number.</param>
        public void EnterHeight(string number)
        {
            HtmlInputNumber numberField = this.EM.Media.ImagePropertiesScreen.MaxHeightNumber
                                          .AssertIsPresent("max height");

            numberField.Text = number;
            numberField.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.change);
        }