Mats Bryntse
4 July 2012

Siesta v1.1 released.

  It’s with great pleasure we can now announce the latest 1.1 version of Siesta. This version has been in […]


It’s with great pleasure we can now announce the latest 1.1 version of Siesta. This version has been in beta status for some time, and contains loads of improvements and new features. In this post we will look at a few of the really important ones, starting with Sencha Touch support.


Testing Sencha Touch

This feature was on our roadmap long ago very early, when we the released the first pre-1.0 version of Siesta. In version 1.1 you can now make use of the Sencha Touch layer we created, to run your tests in iOS and Android browsers. Using the new Siesta Harness for ST2, you can observe your running tests just as you do in the desktop browsers. Currently we support simulating touch events such as tap, double tap, longpress, drag and swipe. To try this yourself, have a look at the new sample test suite in the Siesta SDK in the /examples-touch/ folder. We are also investigating how to support automation for mobile devices, and will report once there is any progress.


PhantomJS and Selenium upgrades

Included in the Siesta SDK you will find both PhantomJS and Selenium, and in this release we upgraded PhantomJS to the latest 1.6 release (“Lavender”). Some of the new goodies in this release include being “pure headless” on Linux, updating to Qt 4.8.2 and improved exception details. For more information about the 1.6 version of PhantomJS please see the release notes. We also upgraded our Selenium launcher script to use v2.24.1 of Selenium WebDriver which seems a lot more stable than Selenium RC.


Improved Siesta UI

Hopefully you will also notice a cleaner and more lightweight UI in v1.1. All main panels can now be resized and state will be remembered between browser sessions. Double clicking a failed assertion now shows the row with the relevant code line highlighted. We have reduced the DOM footprint of the Siesta harness which greatly improves the overall performance. There is still more to come though, so the performance should be even better in future releases.


Improved target selectors

To target your HTML elements in a test involving the DOM, you now have plenty of options. Consider the simple HTML fragment below, and let’s say you want to click the DIV tag.

<div class="someclass" style="width: 50px; height: 50px;"> Hello world </div>

You then have the following options:

// Use coordinate, not robust nor recommended[25,25], function() { console.log('clicked the div'); });

// Use CSS selector'.someclass', function() { console.log('clicked the div'); });

// Use reference to DOM node
var node = document.getElementsByClassName('someclass')[0];, function() { console.log('clicked the div'); });

// Use a function to grab the target { return node; }, function() { console.log('panel'); });

Now let’s assume you have rendered a simple Ext.Panel in your page, and you want to click somewhere on it. Sample code:

var myPanel = new Ext.Panel({
    renderTo : Ext.getBody(),
    height : 100,
    width : 100,
    html : '
Hello World

You can then use a higher abstraction level leveraging Component Query, or the new Composite Query or you can use any of the options mentioned above. Quite a lot of choices wouldn’t you say?

// Using the special leading >> indicates to use Component Query. 
// The click will be performed in the center of the outer panel element.'>>panel', function() { console.log('panel'); });

// Using Composite Query, a Component Query combined with a CSS selector
// Query for a component with xtype 'panel' and click the element with 
// class ".someclass", inside the panel.'panel => .someclass', function() { console.log('panel'); });

// Use the myPanel reference directly, function() { console.log('panel'); });

Is that all…?

There are more features not mentioned here, for more information please see the full change log. We encourage you to download this new release and give it a spin. As always, we are very interested to hear your thoughts and suggestions so please leave a comment and let us know what’s on your mind.

Product updates