I received the latest blog from Brian Harry, a MSDN blogger. He wrote a post about coded UI tests and 3rd party .NET controls. He summarizes the feature of a 3rd party control provider (I won't say who).
One can start recording actions on a _____ control using Coded UI Test Builder and play them back using Coded UI Test. These controls also expose meaningful rich properties that could be used for functional validation during automation test, for example, validate the control specific property RowIndex on a ______ control. ______ has also added rich APIs to ease authoring of Coded UI Tests on custom controls. Last but not the least, conversion of sequence of actions into meaningful intent has been made possible through the aggregation filters, for example, navigation through filter tree to set filter condition on a grid is now converted to one composite action which sets the filter value.
My team has to look into the possibility of building Coded UI tests this summer with infragistics. I'd like to find out more about how difficult this task will be with Infragistics, and how deep on can drill into tests with infragistics controls. THere are many, many posts about coded ui tests on this forum. Do you have a specific guide or FAQ related specifically to Infragistics and coded UI tests to help with the issue? I am worried we will hit obstacles one at a time, having to read through the many, many posts on these forums on coded UI.
Any help for getting started in the right direction would be helpful,
Thanks all!
Hello,
What platform are you looking to use Coded UI Test with?
WPF / Visual Studio C#.NET / Windows Vista
We are hoping to build the usual coded UI tests offered in visual studio
Hi,
Do we have any workaround for this issue.
I am in real need to know whether we can continue Automation with these infragistic controls using Coded UI tests or not?
Looking forward to the reply.
Thanks!
Hi there,
I can share some of the experience we've had with Coded UI. When Ignite UI was started at Infragistics we wanted to create our UI tests using Coded UI. We started and wrote a good number of tests, so this answers the question of whether you can test Ignite UI using Coded UI: yes you can. We determined that this is not the right test framework for us though. This is due to several reasons:
1. CodedUI does not provide with a deterministic wait for UI refresh which is the issue you're facing. I assume that the correct element is retrieved by the code example you've posted, so add a Thread.Sleep() after performing the click and check whether your tests would perform the interaction that you intended. If it does succeed keep in mind that we've determined that the framework is somewhat inconsistent and the time span for the sleep should be increased if your tests are running on a slower machine.
2. CodedUI provides you with automation only for Internet Explorer.
3. CodedUI proved rather inconsistent for us when a large batch of tests needs to be executed. We were getting random framework failures after the 50th or so test.
Don't get it wrong, I am not trying to badmouth CodedUI. I am sure this framework is really good for UI tests on desktop platform, but our experience with it for browser tests has not been good.
Thank you for using the Infragistics forums!
Hi Konstantin,
Thank you for your suggestions.
I'll try with thread.sleep.
I'll post it here if it works.
Best Regards,
Hi Everyone,
I would like to post the workaround solution for the problem i was facing .
The actual issue was, that J Query Ajax Success was not getting triggered by Coded U I.
This issue is visible in J Query 2.0 and 2.0+ versions.
I found this post
http://stackoverflow.com/questions/17849074/jquery-ajax-success-not-getting-triggered-with-coded-ui-test-project/21381319
The solution they have suggested is working
Microsoft's Coded UI browser injects javascript to shim the XMLHttpRequest object for tracking. Any ajax calls in the page will use this shim instead of the real XMLHttpRequest. The shim assumes that your completion callback is attached to the XMLHttpRequest's onreadystatechange property, but jQuery 2.0 and + uses the new onload and onerror events, so the callback is never called by the shim.
Workaround
The work-around is to add the following to the App.config file for your test project:<?xml version="1.0" encoding="utf-8" ?><configuration> <appSettings> <add key="WebWaitForReadyLevel" value="3"/> </appSettings></configuration>Setting WebWaitForReadyLevel to 3 stops the Coded UI WebBrowser from injecting the javascript to track ajax calls and timers. jQuery will get a real XMLHttpRequest, and your ajax callbacks will work again.
Hope this will help others too.
Thanks,
Thank you for sharing the solution that you found.