Table of Contents

Interface IUiObjectBase

Base interface of all Java test objects.

Namespace: HP.LFT.SDK.Java
Assembly: HP.LFT.SDK.dll
Syntax
public interface IUiObjectBase : IClickable, IDoubleClickable, ILocationInfoProvider, ISupportsNativeObject, IEnabledProvider, IVisibleProvider

Properties

AttachedText

The static text attached to the object.

Declaration
string AttachedText { get; }
Property Value
Type Description
string

BackgroundColor

The object's background color.

Declaration
string BackgroundColor { get; }
Property Value
Type Description
string

ForegroundColor

The object's foreground color.

Declaration
string ForegroundColor { get; }
Property Value
Type Description
string

IsFocused

Indicates whether this object has focus.

Declaration
bool IsFocused { get; }
Property Value
Type Description
bool

Label

The object's label.

Declaration
string Label { get; }
Property Value
Type Description
string

NativeClass

The object's Java class name.

Declaration
string NativeClass { get; }
Property Value
Type Description
string

ObjectName

The object's internal name.

Declaration
string ObjectName { get; }
Property Value
Type Description
string
Remarks

For example, hpe/controls/my$control

Path

The object's hierarchy (object ancestors).

Declaration
string Path { get; }
Property Value
Type Description
string

TagName

The object's Java name.

Declaration
string TagName { get; }
Property Value
Type Description
string

Methods

CreateObject(string)

Creates a native object wrapping an instance of a Java object within your application.

Declaration
dynamic CreateObject(string className)
Parameters
Type Name Description
string className

The java class name.

Returns
Type Description
dynamic

A native object wrapping an instance of a Java object within your application.

CreateObject(string, params object[])

Creates a native object wrapping an instance of a Java object within your application.

Declaration
dynamic CreateObject(string className, params object[] arguments)
Parameters
Type Name Description
string className

The java class name.

object[] arguments

Any arguments required for the object's constructor.

Returns
Type Description
dynamic

A native object wrapping an instance of a Java object within your application.

FireEvent(IEventInfo)

Triggers an event on the test object. Note: use the EventInfoFactory class to generate the eventInfo argument value.

Declaration
void FireEvent(IEventInfo eventInfo)
Parameters
Type Name Description
IEventInfo eventInfo

the event info describing the event to trigger.

GetObjectProperty<TValue>(string)

Returns the value of a test object property.

Declaration
TValue GetObjectProperty<TValue>(string propName)
Parameters
Type Name Description
string propName

The property name.

Returns
Type Description
TValue
Type Parameters
Name Description
TValue

The property type.

Remarks

This method can return any property of this control, including custom properties declared in a custom control.

GetStatics(string)

Get a native object wrapping a Java class capable of accessing static members (methods and fields) of the specified Java class.

Declaration
dynamic GetStatics(string className)
Parameters
Type Name Description
string className

The java class name whose static members you want to access.

Returns
Type Description
dynamic

A native object wrapping a Java class capable of accessing static members within your application.

SendKeys(string)

Types the specified string into the object in the application, including special keys.

Declaration
void SendKeys(string input)
Parameters
Type Name Description
string input

The string can include constants from Keys class.

SendKeys(string, KeyModifier)

Types the specified string into the test object in the application, including special keys or key modifiers.

Declaration
void SendKeys(string input, KeyModifier modifiers)
Parameters
Type Name Description
string input

The string can include constants from Keys class.

KeyModifier modifiers

A mask of KeyModifier values indicating keys to be pressed and held while the specified string is entered. The keys are released when the SendKeys step is finished.

The Windows Logo modifier is not supported.

Extension Methods

TestObjectExtensions.WaitUntilEnabled<T>(T)
TestObjectExtensions.WaitUntilEnabled<T>(T, int)
TestObjectExtensions.WaitUntilVisible<T>(T)
TestObjectExtensions.WaitUntilVisible<T>(T, int)