We are happy to announce the release of the highly anticipated WebAii Beta2 to the public. Beta2 contains lots of enhancements in terms of bug fixes and feature requests. Beta2 also contains some of the refactoring work that we have been working on for a while now. If you have not used WebAii 2.0 yet, check out the general feature set it contains here.
DOWNLOAD BETA2
(Make sure to uninstall beta1 before installing beta2)
As for Beta2, here are some of the highlights that are worth noting:
1. Silverlight Automation: We have spent a substantial amount of time to enhance and fix any issues reported by customers on the forums to make Silverlight automation experience as rich and seamless as possible including support for Silverlight 3. Here are some of the key advancements in Beta2:
- No Proxy needed in IE: When running Silverlight automation in Internet Explorer, we no longer require the HttpProxy to be set. So, no more issues with LocalHost, WCF web services or streaming media. Silverlight automation in IE should be seamless. You though still need the EnableSilverlight flag to be set in the settings. We are working on getting rid of this dependency for Firefox too. This enhancement should resolve many of the http proxy related issues that customers reported.
- Performance Enhancements: For complex automation and complex visual tree searches, you should see a considerable performance boost.
- InvokeMethod Support: You can now invoke methods on Silverlight controls in addition to accessing their complex properties. For example:
1: // Invoke the ScrollToVerticalOffset method
2: searchScroll.InvokeMethod("ScrollToVerticalOffset",2000);
- Wait.For Support: All FrameworkElement objects, now have a generic Wait.For that can take a predicate. This is a key piece in making test automation easier to synchronize with Silverlight animations. For example, you can wait on a Transform to finish or reach a certain point:
1: // The Grid uses a TranslateTransform to hide/show the top bit
2: app.FindName<Grid>("navBarGrid").Wait.For( 3: r => (r.RenderTransform as TranslateTransform).Y == -50);
- We also added a Wait.ForNoMotion() call on the FrameworkElement that uses the element’s position and waits until that element has stopped moving or resizing.
- Find.ByType<T>(): Added the Find.ByType<T>() which allows you to find the first occurrence of a specific type
- Silverlight 3 Support. In case you already started using Silverlight 3!
- Many other bug fixes: (Added AbsoluteSiblingTagIndex and AbsoluteTagIndex to FrameworkElement), IsChecked tri-state issue, Bitmap.UriSource access. Localization issue for GetRectangle().
If you are new to Silverlight automation in WebAii we encourage you to take a look at the following blog posts that should introduce you to it:
- Introduction to Silverlight Automation using WebAii.
- Automation Real World Silverlight Applications using WebAii.
Note: The above sample is now included in the QuickStart Samples that ship with the product.
2. Safari 4 Support: In addition to our existing Safari 3.x support on Windows, WebAii 2.0 Beta2 now supports Safari 4 on windows. We also worked on the Safari automation support to address the following issues:
- Performance: Safari automation should be faster in Beta2 than in Beta1. We made several optimizations in the synchronization code.
- Frames Issues: We no longer load the main page in our own frameset which means that we no longer mess with how a page’s frameset is accessed within the application. There was at least one customer that reported issues with how their application accessed frames in Safari.
- Reliability: We made few enhancements in how we wait for the browser to be ready which was causing random timeouts in Beta1.
3. MbUnit & XUnit Integration + Templates: If you use MbUnit or xUnit as your unit testing framework, we now have built-in templates that get installed for you to use. Right-Click, Add New Item and you should be able to pick from 4 installed templates (NUnit, VSUnit, MbUnit or XUnit). You now have no more excuses not to use WebAii :).
4. Browser Recycling: Although the ability to use the same browser instance across tests have been enabled in 1.1, we now made browser recycling very easy to setup within our templates. All the testing templates + our base test class have been updated for this. Using the latest templates you will notice an additional overload for the Initialize() method that takes in a boolean flag on whether you want recycling on or off. By default it is off. All you need to turn recycling on, is to set that flag to true, no more SharedManager Templates (We actually got rid of those templates).
1: // Pass in 'true' to recycle the browser between test methods
2: Initialize(false, this.TestContext.TestLogsDir,
3: new TestContextWriteLine(this.TestContext.WriteLine));
BREAKING CHANGES IN BETA2
With Beta2, we had to make few breaking changes as we refactored some of our namespaces. Here are the key breaking changes that customers might hit.
- In addition to the ArtOfTest.WebAii.dll, you also now need to reference the ArtOfTest.Common.dll. Both dlls should be available in the Bin\ folder under ArtOfTest or from the Add-References / .NET tab
- BaseNUnitTestSharedManager & BaseVsUnitTestSharedManager base classes are gone. These classes are no longer needed. We are unifying our base classes into one single base class for all frameworks and scenarios. Simply replace these classes wit the new BaseTest class that exists under TestTemplates and make sure to use the new Initialize() method for browser recycling as described in #4 above. The templates associated with these two classes are also removed.
- Wait.For() class has been refactored to simplify the overloads, leverage generics and make it consistent. No more ElementCondition or ControlCondition delegates are needed. The Wait.For<>() now can take a predicate or a function with two parameters. So you can pass in a control and other properties that you want to check or wait for. Example:
1: Wait.For<HtmlTable>(
2: table => table.BaseElement.GetAttributeValueOrEmpty("align") != string.Empty, 3: myTableInstance,false, 5000);
IN OTHER NEWS:
Keep an eye on our partners (Telerik) Q2 release. There is some exciting work done on top of WebAii framework that they are going to release sometime this week. For both their Silverlight and Ajax RadControls. Once they release, we will dedicate some blog posts to describe how you can achieve the level of productivity they have achieved for their RadControls for your own testing projects!
Also as a reminder, make sure to sign-up for the FREE Webinar conducted by our consulting partners Falafel, Inc. The webinar will be using our latest WebAii 2.0 Beta2!
Thanks for all the feedback and support! Keep the feedback coming and let us know what you think of our Beta2 release!
ArtOfTest, Inc. Team.