Automating Kendo UI NumericTextBox

4 posts, 0 answers
  1. Michael Douglas
    Michael Douglas avatar
    1 posts
    Member since:
    May 2013

    Posted 14 Jun 2013 Link to this post

    I have an HTML page where I have three fields to enter the following values​​:
    Manufactures Suggested Value, Suggested Value and Value Sales Association, these three field are using "NumericTextBox".

    With this script:
    'KendoInput textboxVSAssociacao = ActiveBrowser.Find.ByExpression <KendoInput> ("class = k-k-NumericTextBox widget");
                     textboxVSAssociacao.TypeText ("8500");'

    I can put the value in the first field but can not in demics, because the other values ​​will be reported in the first field. How do I proceed to inform the value in each field?
  2. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 18 Jun 2013 Link to this post

    Hi,

    Since you also filed a support ticket (with more details) on this same issue, we'll respond to this problem there.

    Regards,
    Cody
    Telerik
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  3. Aktaar
    Aktaar avatar
    1 posts
    Member since:
    Jan 2012

    Posted 14 Dec 2013 Link to this post

    Hi Cody,

    Can i have the sample code please i am having the same issue..

    http://demos.kendoui.com/web/numerictextbox/index.html
  4. Boyan Boev
    Admin
    Boyan Boev avatar
    1039 posts

    Posted 16 Dec 2013 Link to this post

    Hello Michael,

    Thank you for contacting us.

    If the textboxes don't have any unique attribute (i.e. they are absolutely identical like on the demo site) you can put all 4 textboxes in a collection and the select  them one after another from the collection. Here is a code sample:

    HtmlDiv theWrapper = ActiveBrowser.Find.ById<HtmlDiv>("add-product");
                IList<KendoInput> myList = theWrapper.Find.AllByTagName<KendoInput>("span");
                foreach (KendoInput item in myList)
                {
                    item.Clear();
                }
               
                myList[0].TypeText("123");
                myList[1].TypeText("456");
                myList[2].TypeText("789");
                myList[3].TypeText("000");

    Here is a demo video.

    Hope this helps.

    Regards,
    Boyan Boev
    Telerik
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
Back to Top