Do you wonder if there are any keys to get easy test automation over the RadControls components?
I’ve seen people asking about how to get a simple (at a first glance) task done through this or that test automation tool and we generally find the specific resolution with the exact tool in use. However, in most cases the things are quite similar no matter which tool you prefer. Instead of posting particular solutions though, with this post I’m sharing some of the trickiest moments one may came across while working on tests automation of RadControls for ASP.NET (AJAX) and the general solution. That is to say the questions/answers below are component-related and are not something concerning the specific test automation tool.
Ah, did I say something about a key in RadControls ASP.NET (AJAX) tests automation? Here it is – the client-side API.
So, which are the top trickiest moments in those controls test automation I’d like to share? Let me start with a common task regarding the rich text editor – setting custom content. You know, the RadEditor is one of those giant components, which does so much behind the scenes on the client, because of its rich client-side functionality.
Hello, Telerik! We're using the tool X to test our ASP.NET (AJAX) application. Whenever we encounter a page with the RadEditor on, X cannot enter text in the editor. X recognizes the frame where the editor is placed, but it cannot push text to the editor.
I remember I’ve been looking into a nice test automation tool with a colleague of mine. He didn’t like it that much saying: “Look at this, even its recorder cannot work with the Editor!”
Nice try! What I answered was there is no tool which would automatically work with the editor. No, that’s not correct, there is no tool, which would automagically work with any rich-text editor. So I don’t know about X, but RadEditor supports … all the good tools out there. ;)
Hey, Telerik! When I try to set a value in a RadInput control with the tool Y, the value I set is immediately cleared out on exiting the field. I have tried numerous ways of setting this value, all with the same effect.
Yes, the RadInput controls perform some JS validation on the client so although those are not so complex components as the RadEditor, you can’t just find the input element and set/replace its value. Instead, (guess what?) use the Client-Side API and the set_value() function in particular (SetValue() in ASP.NET version). Again, you can verify the RadInput value by get_value()/GetValue() methods.
Okay, here comes the funny part:
Good day! How do you select an item of the ComboBox manually through an automated test written with the Z tool? I’ve written such a test, which clicks on the combobox arrow, the items are displayed, then the test clicks on the item I choose, but it does not get selected! I do it myself over the demo and it is selected as expected! What is going on here?!
As some fellows noticed, the trick is first to highlight the item and then click it. Otherwise the click action over the item does nothing.
Let’s stop here for now and see what trick you’ve stumbled upon while doing some tests automation over your RadControls applications. Did you get an issue and want to share the solution you’ve found?
Subscribe to be the first to get our expert-written articles and tutorials for developers!
All fields are required