This is a migrated thread and some comments may be shown as answers.

Automating Kendo UI NumericTextBox

3 Answers 49 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Michael Douglas
Top achievements
Rank 1
Michael Douglas asked on 14 Jun 2013, 07:50 PM
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?

3 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 18 Jun 2013, 07:13 PM
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
0
Aktaar
Top achievements
Rank 1
answered on 14 Dec 2013, 02:03 PM
Hi Cody,

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

http://demos.kendoui.com/web/numerictextbox/index.html
0
Boyan Boev
Telerik team
answered on 16 Dec 2013, 01:57 PM
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
Tags
General Discussions
Asked by
Michael Douglas
Top achievements
Rank 1
Answers by
Cody
Telerik team
Aktaar
Top achievements
Rank 1
Boyan Boev
Telerik team
Share this question
or