InterfaceIApplication
Use the IApplication interface to manage a wrapped Silverlight application.
Definition
Namespace:ArtOfTest.WebAii.Silverlight
Assembly:ArtOfTest.WebAii.dll
Syntax:
public interface IApplication : IAutomationHost, ISupportSearchHost, IAnnotationHost
Derived Classes:
Inherited Members
Properties
Bounds
Gets the rectangular bounds of this app.
Desktop
Gets the Desktop object for this app.
EnableValidateMouseLocation
Whether to validate that the mouse will be within the application's bounds before performing a mouse action.
IsConnected
Checks if we're connected to the automation client.
IsRecordingHost
Indicates whether host has attached recorder.
ManagedProxy
Gets the ManagedProxy for this app.
Declaration
ICommunicationProxy ManagedProxy { get; }
Property Value
Popups
List of popup elements.
Declaration
IList<VisualTreeHost> Popups { get; }
Property Value
VisualTree
Gets the VisualTree of this app.
Methods
Capture(FrameworkElement)
Captures the image of an element
Declaration
Bitmap Capture(FrameworkElement element)
Parameters
element
The element to capture an image of
Returns
Element image as bitmap.
ElementFromPoint(int, int)
Get element from screen point.
Declaration
FrameworkElement ElementFromPoint(int x, int y)
Parameters
x
Point X coordinate.
y
Point Y coordinate.
Returns
Instance of FrameworkElement
EnsureElementClickable(FrameworkElement)
Ensures element is can be clicked.
Declaration
void EnsureElementClickable(FrameworkElement element)
Parameters
element
GetScreenRectangle(FrameworkElement)
Gets the rectangle of the element in screen coordinates
Declaration
Rectangle GetScreenRectangle(FrameworkElement element)
Parameters
element
Returns
GetSubtreeFriendlyName(VisualTree)
Gets a friendly name for the specified sub-tree of this IApplication
Declaration
string GetSubtreeFriendlyName(VisualTree subtree)
Parameters
subtree
The sub-tree we want the friendly name of
Returns
The sub-tree's friendly name
GetToolTipText(FrameworkElement)
Gets the text of a tooltip on the element
Declaration
string GetToolTipText(FrameworkElement element)
Parameters
element
Returns
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
RefreshVisualTrees()
Refresh application visual tree.
Declaration
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.
ScrollElementVisible(FrameworkElement, ScrollToVisibleType)
Scrolls a control into view
Declaration
void ScrollElementVisible(FrameworkElement element, ScrollToVisibleType scrollType)
Parameters
element
Element to scroll to.
scrollType
Scroll type.