TPTP 4.4.0 Testing Tools Project
Internal API Specification

org.eclipse.tptp.test.auto.gui.internal.core
Interface IWidgetResolver

All Known Implementing Classes:
AdaptiveWidgetResolver, NonTrivialWidgetResolver

public interface IWidgetResolver

This interface is registered using extension point org.eclipse.tptp.test.auto.gui.widgetResolver which is expected to return a unique identifier from a provided widget. The identifier must be reproducable between sessions so that it can be used to locate the widget on playback.

Since:
3.1

Method Summary
 boolean foundWidget(java.lang.Object object, java.lang.Object id)
          Given an object and an id, this method should return true if and only if the id of object as determined by this resolver equals the 'id' passed in.
 IWidgetId getUniqueId(org.eclipse.swt.widgets.Widget parent, java.lang.Object object)
          Returns a unique identifier for the provided widget.
 

Method Detail

getUniqueId

public IWidgetId getUniqueId(org.eclipse.swt.widgets.Widget parent,
                             java.lang.Object object)
Returns a unique identifier for the provided widget.

Parameters:
object - The object whose id is suppose to be resolved. The type of this object is usually a widget, but it can also be a java.lang.String or any other arbitrary type depending on the implementation of the widget. For example, when attempting to resolve a combo box item, parent will point to the combo box and object will point to a java.lang.String item representing the item selected.
Returns:
unique identifier that can be used to locate the widget or null if none can be found.

foundWidget

public boolean foundWidget(java.lang.Object object,
                           java.lang.Object id)
Given an object and an id, this method should return true if and only if the id of object as determined by this resolver equals the 'id' passed in.

Parameters:
object - An object
id - The being searched for
Returns:
true iff object's id is equalled to 'id'

TPTP 4.4.0 Testing Tools Project
Internal API Specification