I am new to WebAii. I have a problem when finding a RadMenu control in my asp.net app. Here is my code.
RadMenu menu = Find.ById<RadMenu>("ctlMainMenu");
When I run the test, it throws the following exception.
System.Security.VerificationException : Method ArtOfTest.WebAii.Core.Find.ById: type argument 'Telerik.WebAii.Controls.Html.RadMenu' violates the constraint of type parameter 'TControl'.
Any thought?
RadMenu menu = Find.ById<RadMenu>("ctlMainMenu");
When I run the test, it throws the following exception.
System.Security.VerificationException : Method ArtOfTest.WebAii.Core.Find.ById: type argument 'Telerik.WebAii.Controls.Html.RadMenu' violates the constraint of type parameter 'TControl'.
Any thought?
4 Answers, 1 is accepted
0
Hello Chhuong,
The framework can't locate that type of element with the given Id on the page under test -- the type mismatches. Is this a public site you can share or can you paste here the relevant piece of the Html output for reference?
Kind regards,
Konstantin Petkov
the Telerik team
The framework can't locate that type of element with the given Id on the page under test -- the type mismatches. Is this a public site you can share or can you paste here the relevant piece of the Html output for reference?
Kind regards,
Konstantin Petkov
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
Chhuong
Top achievements
Rank 1
answered on 13 Aug 2010, 06:27 AM
It is intranet site. Just tried it on different machine and it is working fine with the exact same code. Something is wrong with my machine.
0
Hello Chhuong,
Is this the exact same project you run on both machines? I've seen this reported before when the solution/project mismatches the references to assemblies like Telerik.Web.UI and Telerik.WebAii.Controls.Html. You need the latter only for the test project. Is this a mixed app/test solution by any chance?
Kind regards,
Konstantin Petkov
the Telerik team
Is this the exact same project you run on both machines? I've seen this reported before when the solution/project mismatches the references to assemblies like Telerik.Web.UI and Telerik.WebAii.Controls.Html. You need the latter only for the test project. Is this a mixed app/test solution by any chance?
Kind regards,
Konstantin Petkov
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
Chhuong
Top achievements
Rank 1
answered on 13 Aug 2010, 09:43 PM
Yep. It is the same project. The issue is resolved now by removing all dlls and adding again.
Thanks.
Thanks.