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

Assembly reference for "SelectItemBytext"

1 Answer 81 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:45 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

1 Answer, 1 is accepted

Sort by
0
Boyan Boev
Telerik team
answered on 29 Jan 2014, 03:35 PM
Hello Darshana,

It seems you are using HtmlInputText control for that. This is expected exception since HtmlInputText does not have SelectItemByText method.

You should use HtmlSelect which has such method.

Let me know if you need further help.

Regards,
Boyan Boev
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
Boyan Boev
Telerik team
Share this question
or