Interface
IApplication

Use the IApplication interface to manage a wrapped Silverlight application.

Definition

Namespace:ArtOfTest.WebAii.Silverlight

Assembly:ArtOfTest.WebAii.dll

Syntax:

cs-api-definition
public interface IApplication : IAutomationHost, ISupportSearchHost, IAnnotationHost

Derived Classes: SilverlightAppWpfWindow

Inherited Members IAutomationHost.EnsureStateIsCurrent()IAutomationHost.GetHostRoot()IAutomationHost.GetChildHosts()IAutomationHost.UpdateInterHostLinks()IAutomationHost.Capture()IAutomationHost.ValidateMouseLocation(Point)IAutomationHost.SetWindowFocus()IAutomationHost.GetWindowRectangle()IAutomationHost.TechnologyTypeIAutomationHost.UniqueIdIAutomationHost.StateHashCodeIAutomationHost.FriendlyNameISupportSearchHost.LocateInHost(string[])ISupportSearchHost.LocateAllInHost(string[])IAnnotationHost.FixAnnotationArea(Rectangle)IAnnotationHost.AnnotatorIAnnotationHost.ManagerIAnnotationHost.WindowIAnnotationHost.ContentWindowIAnnotationHost.ShouldDisplayAnnotation

Properties

Bounds

Gets the rectangular bounds of this app.

Declaration

cs-api-definition
Rectangle Bounds { get; }

Property Value

Rectangle

Desktop

Gets the Desktop object for this app.

Declaration

cs-api-definition
Desktop Desktop { get; }

Property Value

Desktop

EnableValidateMouseLocation

Whether to validate that the mouse will be within the application's bounds before performing a mouse action.

Declaration

cs-api-definition
bool EnableValidateMouseLocation { get; set; }

Property Value

bool

Find

Find object.

Declaration

cs-api-definition
VisualFind Find { get; }

Property Value

VisualFind

IsConnected

Checks if we're connected to the automation client.

Declaration

cs-api-definition
bool IsConnected { get; }

Property Value

bool

IsRecordingHost

Indicates whether host has attached recorder.

Declaration

cs-api-definition
bool IsRecordingHost { get; }

Property Value

bool

ManagedProxy

Gets the ManagedProxy for this app.

Declaration

cs-api-definition
ICommunicationProxy ManagedProxy { get; }

Property Value

ICommunicationProxy

Popups

List of popup elements.

Declaration

cs-api-definition
IList<VisualTreeHost> Popups { get; }

Property Value

IList<VisualTreeHost>

VisualTree

Gets the VisualTree of this app.

Declaration

cs-api-definition
VisualTree VisualTree { get; }

Property Value

VisualTree

Methods

Capture(FrameworkElement)

Captures the image of an element

Declaration

cs-api-definition
Bitmap Capture(FrameworkElement element)

Parameters

element

FrameworkElement

The element to capture an image of

Returns

Bitmap

Element image as bitmap.

ElementFromPoint(int, int)

Get element from screen point.

Declaration

cs-api-definition
FrameworkElement ElementFromPoint(int x, int y)

Parameters

x

int

Point X coordinate.

y

int

Point Y coordinate.

Returns

FrameworkElement

Instance of FrameworkElement

EnsureElementClickable(FrameworkElement)

Ensures element is can be clicked.

Declaration

cs-api-definition
void EnsureElementClickable(FrameworkElement element)

Parameters

element

FrameworkElement

GetScreenRectangle(FrameworkElement)

Gets the rectangle of the element in screen coordinates

Declaration

cs-api-definition
Rectangle GetScreenRectangle(FrameworkElement element)

Parameters

element

FrameworkElement

Returns

Rectangle

GetSubtreeFriendlyName(VisualTree)

Gets a friendly name for the specified sub-tree of this IApplication

Declaration

cs-api-definition
string GetSubtreeFriendlyName(VisualTree subtree)

Parameters

subtree

VisualTree

The sub-tree we want the friendly name of

Returns

string

The sub-tree's friendly name

GetToolTipText(FrameworkElement)

Gets the text of a tooltip on the element

Declaration

cs-api-definition
string GetToolTipText(FrameworkElement element)

Parameters

element

FrameworkElement

Returns

string

Any text contained by the element's tooltip, or null if the element has no toolip

PopulateVisualTree()

Ensures that the IApplication's visual tree is in a valid state

Declaration

cs-api-definition
VisualTree PopulateVisualTree()

Returns

VisualTree

A valid VisualTree

RefreshVisualTrees()

Refresh application visual tree.

Declaration

cs-api-definition
void RefreshVisualTrees()

ResizeContainer(int, int, int, int)

Resizes the browser or application window so its content rectangle is (x, y, width, height) if possible. If that rectangle doesn't fit on the screen, then try it at the upper left corner of the screen and as close to that size as possible.

Declaration

cs-api-definition
void ResizeContainer(int x, int y, int width, int height)

Parameters

x

int

y

int

width

int

height

int

ScrollElementVisible(FrameworkElement, ScrollToVisibleType)

Scrolls a control into view

Declaration

cs-api-definition
void ScrollElementVisible(FrameworkElement element, ScrollToVisibleType scrollType)

Parameters

element

FrameworkElement

Element to scroll to.

scrollType

ScrollToVisibleType

Scroll type.