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

How to get the count of the matching element count

1 Answer 48 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
duggirala
Top achievements
Rank 1
duggirala asked on 14 Nov 2014, 03:03 AM
I need to get the count of the number of text fields with attribute id = 'getcount' . My page has n number of text fields and i should fill the all the fields having id attribute as 'getcount'. Any help is highly appreciated.

Regards,
Avinash


1 Answer, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 18 Nov 2014, 10:46 PM
Hello Avinash,

You will need to do this in code. Here's how to get started:
IList<HtmlInputText> inputs = ActiveBrowser.Find.AllByExpression<HtmlInputText>("id=getcount");
foreach (HtmlInputText anInput in inputs)
{
    // do something with the anInput variable here
}


Regards,
Cody
Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
Tags
General Discussions
Asked by
duggirala
Top achievements
Rank 1
Answers by
Cody
Telerik team
Share this question
or