Interface
ICommunicationProxy

Interface for communication across application boundaries.

Definition

Namespace:ArtOfTest.WebAii.Silverlight

Assembly:ArtOfTest.WebAii.dll

Syntax:

cs-api-definition
public interface ICommunicationProxy

Derived Classes: SilverlightProxy

Properties

Application

Get the parent application object.

Declaration

cs-api-definition
IApplication Application { get; }

Property Value

IApplication

Methods

GetAllVisualTrees()

Gets all visual trees of the application

Declaration

cs-api-definition
string GetAllVisualTrees()

Returns

string

An encoded string containing all the visual trees of the application in the format (@@[length]@@[tree])+.

GetPeerHashCode(IAutomationPeer)

Gets the hash code of the peer.

Declaration

cs-api-definition
int GetPeerHashCode(IAutomationPeer peer)

Parameters

peer

IAutomationPeer

The peer to get the hash code from.

Returns

int

The hash code.

GetProperties(IAutomationPeer)

Gets a collection of the properties of an element whose values we are able to transfer from the application back to the testing framework.

Declaration

cs-api-definition
Dictionary<string, string> GetProperties(IAutomationPeer peer)

Parameters

peer

IAutomationPeer

Returns

Dictionary<string, string>

GetProperty(AutomationProperty, IAutomationPeer)

Get a property for an automation peer

Declaration

cs-api-definition
object GetProperty(AutomationProperty property, IAutomationPeer peer)

Parameters

property

AutomationProperty

peer

IAutomationPeer

Returns

object

GetRectangle(IAutomationPeer)

Get the bounding rectangle for an automation peer

Declaration

cs-api-definition
object GetRectangle(IAutomationPeer peer)

Parameters

peer

IAutomationPeer

Returns

object

GetRectangle(IAutomationPeer, IAutomationPeer)

Get the bounding rectangle for one automation peer relative to another automation peer

Declaration

cs-api-definition
object GetRectangle(IAutomationPeer peer, IAutomationPeer relativeTo)

Parameters

peer

IAutomationPeer

The peer whose rectangle to get

relativeTo

IAutomationPeer

The reference point peer

Returns

object

GetRectangle(IAutomationPeer, int)

Get the bounding rectangle for an automation peer

Declaration

cs-api-definition
object GetRectangle(IAutomationPeer peer, int maxUiBlockingTime)

Parameters

peer

IAutomationPeer

Peer.

maxUiBlockingTime

int

Max UI blocking time in ms.

Returns

object

GetTextRecursive(AutomationReference)

Gets the text content of an element or property. Recursively descends into children of an element and collects the text of all TextBlocks contained in it. Or if the reference is string-valued, simply returns that string

Declaration

cs-api-definition
string GetTextRecursive(AutomationReference reference)

Parameters

reference

AutomationReference

The target reference (element or property of an element)

Returns

string

The text content, as described above

GetVirtualizedViewportOffset(IAutomationPeer)

Declaration

cs-api-definition
int GetVirtualizedViewportOffset(IAutomationPeer peer)

Parameters

peer

IAutomationPeer

Returns

int

GetVisibility(IAutomationPeer)

Get the Visibility property value of an element, where the element inherits the Collapsed value if any of its visual tree ancestors have Visibility == Collapsed

Declaration

cs-api-definition
Visibility GetVisibility(IAutomationPeer peer)

Parameters

peer

IAutomationPeer

The element whose Visibility value we're retrieving

Returns

Visibility

Collapsed if the element or any of its visual tree ancestors have Visibility == Collapsed. Otherwise, Visible.

GetVisualTree(IAutomationPeer)

Declaration

cs-api-definition
string GetVisualTree(IAutomationPeer root)

Parameters

root

IAutomationPeer

Returns

string

GetVisualTree(IAutomationPeer, string)

Declaration

cs-api-definition
string GetVisualTree(IAutomationPeer root, string hash)

Parameters

root

IAutomationPeer

hash

string

Returns

string

GetVisualTree(string)

Get the full visual tree of the application

Declaration

cs-api-definition
string GetVisualTree(string startAt)

Parameters

startAt

string

Returns

string

GetVisualTree(string, string)

Get the full visual tree of the application, but only if it's different from the one we already have

Declaration

cs-api-definition
string GetVisualTree(string startAt, string hash)

Parameters

startAt

string

hash

string

The hash of the visual tree we already have

Returns

string

A string representation of the visual tree, or null if the tree has not changed

Highlight(IAutomationPeer, bool)

Highlight an element on the surface

Declaration

cs-api-definition
void Highlight(IAutomationPeer peer, bool clear)

Parameters

peer

IAutomationPeer

The element to highlight

clear

bool

True/False whether to clear it.

InvokeMethod(AutomationMethod, IAutomationPeer)

Invokes a method on an automation peer

Declaration

cs-api-definition
object InvokeMethod(AutomationMethod method, IAutomationPeer peer)

Parameters

method

AutomationMethod

peer

IAutomationPeer

Returns

object

PublishKnownControlTypes(List<string>)

Publish the known control types to the Silverlight application.

Declaration

cs-api-definition
void PublishKnownControlTypes(List<string> knownTypes)

Parameters

knownTypes

List<string>

ScrollToVisible(IAutomationPeer)

Scroll the controls containing an element so that the element comes into view

Declaration

cs-api-definition
void ScrollToVisible(IAutomationPeer peer)

Parameters

peer

IAutomationPeer

The element to bring into view

SetProperty(AutomationProperty, IAutomationPeer, object)

Set a property for an automation peer

Declaration

cs-api-definition
void SetProperty(AutomationProperty property, IAutomationPeer peer, object value)

Parameters

property

AutomationProperty

peer

IAutomationPeer

value

object