This page is maintained for older versions of Rapise only. The latest documentation can be found at: https://rapisedoc.inflectra.com
Rapise Spy Dialog

 

Screenshot

ses spy dialog

 

Purpose

The Spy dialog is used to Object Spy.

 

How to Open

There are three ways to open the Spy dialog:

1.

Press the Spy Button on the Ribbon (Test tab > Tools menu)

ses spy dialog, spy button

2.

Press the Spy Button on the Recording Activity Dialog Note: If you use this method, the dialog has an extra Learn Selected button.

 

Choosing the type of Spy

You can change the type of Spy that will be launched by clicking on the down arrow to the right of the Spy icon in the main application Ribbon:

spy_choose_library

There are six types of Spy available:

1.Accessible - This is used to inspect applications that expose their properties using the Microsoft Active Accessibility (MSAA) technology. This is typically used by applications written in MFC, ATL, Qt, C++ and Visual Basic.

2.Java Object - This is used to inspect applications written using the Java AWT and Swing UI frameworks.

3.Managed Object - This is used to inspect applications written in .NET 1.1, .NET 2.0, .NET 4.0 using Microsoft Windows Forms.

4.Mobile Object - This is used to inspect mobile applications running on iOS or Android devices as well as the iOS or Android simulator

5.UIAutomation Object - This is used to inspect applications that expose their properties using the Microsoft's newer UIAutomation technology. This is typically used by applications written in WPF, Silverlight and Java SWT.

6.Web Object - This is used to inspect web applications using any of the supported web browsers. It also allows you to dynamically query web pages using CSS or XPath and learn the results as objects.

Start Tracking

The Start Tracking button (or CTRL+G) causes Rapise to enter Tracking Mode. In Tracking Mode, Rapise investigates the object under your mouse.  It identifies the object's type and learns the object's properties.  As you move your mouse, the objects you point to are highlighted (a box is drawn around them).

 

Stop Tracking

The Stop Tracking button is only visible in Tracking Mode.  Press Stop Tracking (or CTRL+G) to exit Tracking Mode.  The Spy dialog will display information for the last object highlighted.

 

Learn Object

The Learn Object button will be visible if you clicked the Spy during recording (vs. just clicking the Spy icon in the Test ribbon). This lets you add a specific object in the Spy treeview to the currently recorded test.

 

Maximize/Minimize buttons

The maximize ses spy dialog, maximize button and minimize ses spy dialog, minimize button buttons control the appearance of the dialog.  They either hide or make visible the sections to their right or below.  See the example below.  The button highlighted in yellow in the left image is pressed to show/hide the appropriate pane.

ses spy dialog, maximize demonstration

 

Accessible Object

This is the Spy dialog that is used for Accessible (MSAA) objects. It is described in more detail in the Accessible Spy topic.

ses spy dialog, accessible object

The Accessible Object section of the Spy dialog shows properties of the object that are visible through the Microsoft Active Accessibility interface.

 

Tree

The spied upon object and its children are displayed here.

 

Properties

Object fields and field values are displayed here.

 

Tools

Mouse Button Click: Emulate Left mouse click for the item selected in Spy tree.

Default Action: Execute DoDefaultAction for given accessible object.

Set Selection: Perform accSelect using the option flags set in the corresponding checklist (above).

Java Object

This is the Spy dialog that is used for Java (Swing / AWT) objects. It is described in more detail in the Java Spy topic.

spy_dialog_java_object

The Java Object section of the Spy dialog shows properties of the object that are visible through the Java Access Bridge interface.

 

Tree

The spied upon object and its children are displayed here.

 

Properties

Object fields and field values are displayed here.

 

 

Managed Object

This is the Spy dialog that is used for Managed (.NET) objects. It is described in more detail in the Managed Spy topic.

spy_dialog_managed_object

The Managed Object section of the Spy dialog shows properties of the object that are visible through .NET Framework reflection interface.

 

Tree

The spied upon object and its children are displayed here.

 

Properties

Object fields and field values are displayed here.

 

Mobile Object

This is the Spy dialog that is used for Mobile objects. It is described in more detail in the Mobile Spy topic.

spy_dialog_mobile_ios

The Mobile Object section of the Spy dialog shows a snapshot of the screen displayed on the connected Mobile device as well as the properties of the currently selected object. You can selected the object either by clicking on the screen snapshot or the control hierarchy displayed to the left. The properties displayed will depend on the type of mobile device being tested (iOS vs. Android).

 

Tree

The spied upon object and its children are displayed here. When you click on an object it will also be highlighted in the snapshot view to the right.

 

Properties

Object fields and field values are displayed here.

 

Snapshot

This displays a snapshot of what is displayed on the mobile device being tested. The objects in the snapshot are clickable, which allows you to visually select objects from the hierarchy.

 

Tools

·Get Snapshot (CTRL + G) - This will connect to the mobile device and get the latest snapshot from the mobile device and display in the right-hand window.

·Disconnect - This option disconnects the Spy from the mobile device and ends the connection.

·Learn Object - This option is only displayed in Recording mode and lets you take the currently selected object and add it to the Object Tree for the current test. It can then be used as a scriptable object in the test script.

·Page Source - This lets you view the source of the mobile device in a text editor such as Notepad. It will show the objects in the treeview represented as an XML document.

·Go to URL - This will instruct the mobile device to navigate its built in web browser to a specific URL.

·Test Locator - This will display the Mobile Test Locator dialog box that lets you try different locators to resolve specific objects in the object hierarchy. It will include options such as using XPath and IDs.

·Select Profile - This lets you change the profile of the mobile device you are testing while the Spy dialog is open.

·Edit Profiles - This will open up the Mobile Settings dialog box. You cannot be connected to do this.

·Context - This will display either 'Discovery Mode' or 'Recording Mode'.

 

Events

The Mobile Spy also includes an Events ribbon tab that lets you send events to mobile device from Rapise, as if you were actually performing them on the device:

ribbon_mobile_spy_events

This dialog lets you perform the following events on the device:

·Tap - this will simulate tapping the currently selected object on the device

·Swipe - you specify the start and end points of the swipe operation. This is useful for simulating a real swipe on the device in a specific direction at a specific location (e.g. on a progress selector)

·Shake - for devices that support it (e.g. iOS) this simulates shaking the device physically

·Precise Tap - you specific the specific location on the screen within the bounds of the current object that you will be simulating a tap.

·Scroll To - simulates scrolling to the selected object in the device object tree (which may not be visible).

·Text / Send Keys - to use this, enter in text in the text box and click 'Send Keys', this sends text to the currently selected object as if you were using the virtual keyboard on the device.

·Accept Alert - if you have a popup alert on the device, this simulates accepting it

·Dismiss Alert - if you have a popup alert on the device, this simulates dismissing it

·Change Orientation - for devices that support it, this simulates changing the orientation of the device from landscape to portrait (or vice-versa)

·Execute Script - this is not currently supported and is for future functionality

 

UIAutomation Object

This is the Spy dialog that is used for UI Automation (WPF, Silverlight) objects. It is described in more detail in the UIAutomation Spy topic.

spy_dialog_uiautomation_object

The UIAutomation Object section of the Spy dialog shows properties of the object that are visible through the UIAutomation interface.

 

Tree

The spied upon object and its children are displayed here.

 

Properties

Object fields and field values are displayed here.

 

Web Object

This is the Spy dialog that is used for Web objects. It is described in more detail in the Web Spy topic.

 

web_spy1

 

The Web Spy is used to inspect web applications running on any of the supported web browsers (currently Internet Explorer, Firefox and Chrome). It allows you to view the hierarchy of objects in the web browser Document Object Model (DOM). In addition it makes the testing of dynamic data-driven web applications easier because it lets you test out dynamic XPath or CSS queries against the web page and verify that the objects return match your expectations.

 

For more information on the Web Spy, please refer to the Web Spy topic.

 

HWND Object

ses spy dialog, hwnd object

The HWND Object section of the Spy dialog shows properties of the object that are visible with its HWND handle.

 

Tree

The spied upon object and its children are displayed here.

 

Properties

Object fields and field values are displayed here.

 

Tools

Mouse Button Click: Emulate Left mouse click for the item selected in Spy tree.

Highlight: Draw rectangle surrounding selected object (HWND or Accessible).

These tools can be accessed from the right-click Spy context menu:

ses spy dialog, context menu

 

See Also

Microsoft Active Accessibility is described here http://msdn.microsoft.com/en-us/magazine/cc301312.aspx

HWND is described HERE.

Microsoft UIAutomation is described here http://support.microsoft.com/kb/971513/