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

Test framework for dynamic controls

5 Answers 149 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Archana Sathyanarayan
Top achievements
Rank 1
Archana Sathyanarayan asked on 20 Nov 2009, 12:43 PM

Hi:

 

I need help to choose the framework. I have two scenarios:

 

1.       I am testing a product which can be customized based on the user.   For eg  the core product has 10 menus, let’s say menu1, menu2, menu3 …menu10.  User1 can have menu1, menu3, menu5 and similarly user2 can have menu2, menu1, menu6, along with some common features.  Menus are based on dynamic HTML IDs. When I record, the Telerik tool recognizes the menus based on their dynamic HTML IDs.  So, same menu option will have different HTML IDs for different users. How do I handle this issue. 
 

2.       We are using Telerik grid control. Again this control is configurable for different users i.e., it will different columns for different users.
 
Please let me know how do I choose the test framework.


Regards
-Archana

5 Answers, 1 is accepted

Sort by
0
Konstantin Petkov
Telerik team
answered on 20 Nov 2009, 01:23 PM
Hi Archana,

The framework provides various ways to access the element. You can get it by ID but you can also use a partial string for the ID or choose some other method like ByAttributes, etc. You can see all the options listed in the WebAii documentation here.

Note our control wrappers provide important constants related to RadControls. For example, you can use the CssClass constant for each RadControl to locate our wrapper like this:

RadGrid myGrid = Find.ByAttributes<RadGrid>("class=" + GridConstants.CssGrid);

Since I see you posted another question in the WebUI Test Studio forum, our advanced automation solution provides some helpful plug-ins to manage the Find Element Logic. As soon as you record your test you can check and approve the identification logic. Take a look at this KB in case you are interested.

I hope this helps.

Regards,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
sreejith prakash
Top achievements
Rank 1
answered on 07 Dec 2009, 11:38 AM
hi,

when i use the above code in my project i got an error
Error    768    The type 'Telerik.Web.UI.RadGrid' cannot be used as type parameter 'TControl' in the generic type or method 'ArtOfTest.WebAii.Core.Find.ByAttributes<TControl>(params string[])'. There is no implicit reference conversion from 'Telerik.Web.UI.RadGrid' to 'ArtOfTest.WebAii.Controls.Control'.  
can u help me please how can i solve this problem

0
Konstantin Petkov
Telerik team
answered on 07 Dec 2009, 11:42 AM
Hi sreejith,

The testing framework operates with its own built-in wrappers of RadControls. They reside in the assembly from the Telerik.WebAii.Controls.Html and Telerik.WebAii.Controls.Xaml .dll-s. You can find the .dll-s extracted as part of the installation folder.

Note, you need Test Projects to build and run your tests. Check out our sample test projects coming with the testing framework.

Feel free to post back if you need further assistance.

Regards,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
sreejith prakash
Top achievements
Rank 1
answered on 07 Dec 2009, 01:12 PM
hi,
when i use this two dll i got another exception

DataAccessLayer.WebAiiNUnitTest1.SampleWebAiiTest:
System.Security.VerificationException : Method ArtOfTest.WebAii.Core.Find.ByAttributes: type argument 'Telerik.WebAii.Controls.Html.RadGrid' violates the constraint of type parameter 'TControl'.

can u please send me the link to download webAii frame work for radcontrol testing and the other set up needs with that


with regards ,

Sreejith



0
Missing User
answered on 07 Dec 2009, 07:11 PM
Hello sreejith,

Could you try this code and post back with what happens on test execution on your end? It's based on this grid example page.

[TestMethod]
public void SampleWebAiiTest()
{
// Launch a browser instance
Manager.LaunchNewBrowser(BrowserType.InternetExplorer);
  
// The active browser
Telerik.WebAii.Controls.Html.RadGrid r = Find.ByAttributes<Telerik.WebAii.Controls.Html.RadGrid>("id=RadGrid1", "class=RadGrid RadGrid_Vista");
}

It should work with the reference Konstantin mentioned Telerik.WebAii.Controls.Html, along with ArtOfTest.Common and ArtOfTest.WebAii. Those references are pretty much all you would need from the Framework to automate non-Silverlight controls.

Greetings,
Nelson Sin
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Archana Sathyanarayan
Top achievements
Rank 1
Answers by
Konstantin Petkov
Telerik team
sreejith prakash
Top achievements
Rank 1
Missing User
Share this question
or