ClassSilverlightProxy
For internal use only.
Definition
Namespace:ArtOfTest.WebAii.Silverlight
Assembly:ArtOfTest.WebAii.dll
Syntax:
public class SilverlightProxy : ICommunicationProxy
Inheritance: objectSilverlightProxy
Implements:
Constructors
SilverlightProxy(SilverlightApp)
Declaration
public SilverlightProxy(SilverlightApp hostApp)
Parameters
hostApp
Properties
Application
Get the parent application object.
Declaration
public IApplication Application { get; }
Property Value
Implements
Methods
GetAllVisualTrees()
Gets all visual trees of the application
Declaration
public string GetAllVisualTrees()
Returns
An encoded string containing all the visual trees of the application in the format (@@[length]@@[tree])+.
Implements
GetPeerHashCode(IAutomationPeer)
Gets the hash code of the peer.
Declaration
public int GetPeerHashCode(IAutomationPeer peer)
Parameters
peer
The peer to get the hash code from.
Returns
The hash code.
Implements
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
public Dictionary<string, string> GetProperties(IAutomationPeer peer)
Parameters
peer
Returns
Implements
GetProperty(AutomationProperty, IAutomationPeer)
Get a property for an automation peer
Declaration
public object GetProperty(AutomationProperty property, IAutomationPeer peer)
Parameters
property
peer
Returns
Implements
GetRectangle(IAutomationPeer)
Get the real rectangle of an elements
Declaration
public object GetRectangle(IAutomationPeer peer)
Parameters
peer
Returns
Implements
GetRectangle(IAutomationPeer, IAutomationPeer)
Get the rectangle of one element relative to another
Declaration
public object GetRectangle(IAutomationPeer peer, IAutomationPeer relativeTo)
Parameters
peer
relativeTo
Returns
Implements
GetRectangle(IAutomationPeer, int)
Get the bounding rectangle for an automation peer
Declaration
public object GetRectangle(IAutomationPeer peer, int maxUiBlockingTime)
Parameters
peer
Peer.
maxUiBlockingTime
Max UI blocking time in ms.
Returns
Implements
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
public string GetTextRecursive(AutomationReference targetRef)
Parameters
targetRef
Returns
The text content, as described above
Implements
GetVirtualizedViewportOffset(IAutomationPeer)
Declaration
public int GetVirtualizedViewportOffset(IAutomationPeer virtualizingPanel)
Parameters
virtualizingPanel
Returns
Implements
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
public Visibility GetVisibility(IAutomationPeer peer)
Parameters
peer
The element whose Visibility value we're retrieving
Returns
Collapsed if the element or any of its visual tree ancestors have Visibility == Collapsed. Otherwise, Visible.
Implements
GetVisualTree(IAutomationPeer)
Declaration
public string GetVisualTree(IAutomationPeer root)
Parameters
root
Returns
Implements
GetVisualTree(IAutomationPeer, string)
Declaration
public string GetVisualTree(IAutomationPeer root, string hash)
Parameters
root
hash
Returns
Implements
GetVisualTree(string)
Get the full visual tree of the application
GetVisualTree(string, string)
Get the full visual tree of the application, but only if it's different from the one we already have
Highlight(IAutomationPeer, bool)
Highlight an element on the surface
Declaration
public void Highlight(IAutomationPeer peer, bool clear)
Parameters
peer
The element to highlight
clear
True/False whether to clear it.
Implements
HitTest(Point)
Gets a list of all FrameworkElements under the specified point
Declaration
public IList<FrameworkElement> HitTest(Point p)
Parameters
p
The point to hit test
Returns
List of all elements under the point
InvokeMethod(AutomationMethod, IAutomationPeer)
Invokes method on automation peer's client side.
Declaration
public object InvokeMethod(AutomationMethod method, IAutomationPeer peer)
Parameters
method
Method to be invoked.
peer
Automation peer, containing the method.
Returns
The object client side method returned.
Implements
PublishKnownControlTypes(List<string>)
Publish Known Control types
ScrollToVisible(IAutomationPeer)
Scroll the controls containing an element so that the element comes into view
Declaration
public void ScrollToVisible(IAutomationPeer peer)
Parameters
peer
The element to bring into view
Implements
SetProperty(AutomationProperty, IAutomationPeer, object)
Set a property for an automation peer
Declaration
public void SetProperty(AutomationProperty property, IAutomationPeer peer, object value)
Parameters
property
peer
value
Implements