Squish tip of the week: Clipboard Access

With the clipboard function in Squish Version 6.1 there will be an option to write text to the system clipboard and to get text from the system clipboard back into your automated test suite.

This feature will work on all platforms & languages and will help users solving issues getting access to the system clipboard. Furthermore it enhances the functionality of BDD in a time- and script efficient approach.
(more…)

Squish tip of the week: Execute Ruby scripts using external interpreter

As most Ruby users know, a variety of Ruby installations exist. Squish gives you the flexibility to call Ruby scripts using external interpreters as well as the one shipped with Squish.

Follow the Ruby script execution through external interpreter knowledgebase article to learn how!

Learn more here:

froglogic_cropped

Squish Product Roadmap: Version 6.1

As members of the Squish user community, we would like to share with you our upcoming features. In Squish 6.1 we are implementing:

New Window Convenience script functions for:
  • Desktop. Implemented as wrapper-independent script functions to maximize, minimize, resize and move windows.
  • Mobile. Implemented as wrapper-independent script functions to change the display orientation.
Visual Testing & Capture Object Snapshot with:
  • A script API to collect, or dump, the current object tree of a window, form, etc.
  • The first implementation of a verification point type to verify entire window based on the object dump. Offering customizable strictness for content, topology, geometry, visual and rendering.
Clipboard access with:
  • Convenience functions allow reading and writing text from and to the system clipboard, respectively.
Qt-specific:
  • Added support for QtWebEngine (which replaces QtWebKit)
An improved installer with:
  • A modernized look & feel
  • A Start Menu Item entry on Windows
  • An unattended command-line installer option

Watch for follow-up posts to learn more about the upcoming features and examples of working with the new window convenience functions, visual testing & object snapshot capturing.

Squish tip of the week: Updating changed objects


Periodically (or frequently) objects change in applications. Having a time-efficient approach to updating your automated test suite is important.

The Object Not Found tool in Squish helps users update any changed objects by prompting the user for the new or changed object when tests are run from the IDE.

(more…)

Squish tip of the week: Select list option based on partial list value

Ever try to complete a form, start typing “Dec”, hoping “December” would be selected? And instead the list value reads “(12) December”.

Or perhaps the list contains static and dynamic values within each option.

Using the following function, you can lookup the full or actual list value:
function getItemFullStringValue(obj, subStr){
    listObj = waitForObject(obj);
    listObjArray = listObj.options();
    subStrRegex = new RegExp(subStr, "i");
        
    for(var i=0; i < listObjArray.length; i++){
        fullString = listObjArray.at(i).text;
        
        if(subStrRegex.test(fullString)){
          test.log("String found at index " + i + ".");
          return fullString;
        }
    }
    test.fail("Sub-string " + subStr + " not found.");
    return false;
}

(more…)

Squish tip of the week: Validating all scenarios of a list object

Need to validate all options in a particular scenario in your application?
For example a list which triggers another event.

The following example takes list values and validates the exacted text appears when the value is selected:

BDD Test Case (Feature File)

Feature: Product details lookup

  Looking up product description

   Scenario Outline: Verify details for selected project
   Given the application is loaded
   When I select product '<Product>' to evaluate
   Then the related product '<Product>' text '<Description>' appears
   Examples:
     | Product 		| Description  		| 
     | Qt   		| Test Qt, QML and QtQuick and 4JS GDC applications on Windows, Mac OS X, Linux, Unix, embedded Linux, WinCE, QNX and other RTOSes |
     | Java 		| Test AWT, Swing, SWT, RCP, Eclipse and JavaFx applications on Windows, Mac OS X, Linux and other Unix-based systems.  |
     | Coco         | C/C++, C# and Tcl code coverage (commercial evaluation) |  

Test Script (Implementation File)

Given("the application is loaded", function(context, Product, Description) {
        startBrowser("http://www.froglogic.com/squish/evaluate.php");
    });

When("I select product '|any|' to evaluate", function(context, product, description) {
    productString = getItemFullStringValue(":froglogic • • Evaluate Squish.d[product]_select-one", product)  
    selectOption(waitForObject(":froglogic • • Evaluate Squish.d[product]_select-one"), productString);
    });

Then("the related product '|any|' text '|any|' appears", function(context, Product, Description) {
        waitFor("object.exists(':froglogic • • Evaluate Squish.productdescription_SPAN')", 20000);
        test.compare(findObject(":froglogic • • Evaluate Squish.productdescription_SPAN").simplifiedInnerText, Description);
    });

function getItemFullStringValue(obj, subStr){
    listObj = waitForObject(obj);
    listObjArray = listObj.options();
    subStrRegex = new RegExp(subStr, "i");
        
    for(var i=0; i < listObjArray.length; i++){
        fullString = listObjArray.at(i).text;
        
        if(subStrRegex.test(fullString)){
          test.log("String found at index " + i + ".");
          return fullString;
        }
    }
    test.fail("Sub-string " + subStr + " not found.");
    return false;
}