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

Repository for "SelectItembyText"

3 Answers 14 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Darshana
Top achievements
Rank 1
Darshana asked on 27 Jan 2014, 04:43 PM
Hi,

In one of the test step selects value From Drop down List. Now I have done a coded step to select value, which uses method 'selectitembytext'. But whenever I run my test, It shows me this error. "Account.tstest.cs: Line 201: (CS1061) 'ArtOfTest.WebAii.Controls.HtmlControls.HtmlInputText' does not contain a definition for 'SelectItemByText' and no extension method 'SelectItemByText' accepting a first argument of type 'ArtOfTest.WebAii.Controls.HtmlControls.HtmlInputText' could be found (are you missing a using directive or an assembly reference?)"

Can you help me to resolve this issue?

Thank you

3 Answers, 1 is accepted

Sort by
0
Accepted
Cody
Telerik team
answered on 28 Jan 2014, 11:22 PM
Hello Darshana,

It would help us if you could show us the entire line of code that is giving you this compile error. One thing to keep in mind is that an HtmlInputText control is not a dropdown. It is a plain input text box in which you're supposed to just type some text (like a name, an address, or something similar). It doesn't have a "SelectItemByText" method because an input text box can't select by text.

Regards,
Cody
Telerik
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Darshana
Top achievements
Rank 1
answered on 29 Jan 2014, 03:39 PM
Thank you Cody and Boyen. It was my mistake,I Put InputText Element instead of Div Element. I was working with DropDown Element, to select value from DropDown List.
0
Cody
Telerik team
answered on 29 Jan 2014, 03:51 PM
Hello,

I am glad to hear you got this worked out. Thank you for the update.

Regards,
Cody
Telerik
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Darshana
Top achievements
Rank 1
Answers by
Cody
Telerik team
Darshana
Top achievements
Rank 1
Share this question
or