ClassSilverlightApp
Class that represents a Silverlight Application hosted in a browser.
Definition
Namespace:ArtOfTest.WebAii.Silverlight
Assembly:ArtOfTest.WebAii.dll
Syntax:
[Obsolete("Silverlight support has been deprecated!")]
public class SilverlightApp : VisualTreeHost, IApplication, IAutomationHost, ISupportSearchHost, IAnnotationHost
Inheritance: objectVisualTreeHostSilverlightApp
Implements:
Inherited Members
Constructors
SilverlightApp(HtmlControl)
Declaration
public SilverlightApp(HtmlControl plugin)
Parameters
plugin
Properties
Annotator
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public override Annotator Annotator { get; }
Property Value
Overrides
Implements
Bounds
Get the Rectangle bounds of this application relative to the entire screen.
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public Rectangle Bounds { get; }
Property Value
Implements
Content
Gets the 'content' object of this plugin: plugin.content.xxx
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public SilverlightAppContent Content { get; }
Property Value
ContentWindow
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public override Window ContentWindow { get; }
Property Value
Overrides
Implements
CustomAssemblies
Gets the list of custom assemblies included
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public static string[] CustomAssemblies { get; }
Property Value
string[]
Desktop
Get the Desktop object used for real Keyboard/Mouse automation.
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public Desktop Desktop { get; }
Property Value
Implements
EnableValidateMouseLocation
Gets / Sets whether to validate mouse click locations before allowing user interaction automation
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public bool EnableValidateMouseLocation { get; set; }
Property Value
Implements
Find
Gets the XamlFind object used to search the silverlight plugin VisualTree.
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public VisualFind Find { get; }
Property Value
Implements
FriendlyName
Returns a friendly name for this host
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public override string FriendlyName { get; }
Property Value
Overrides
Implements
Host
Gets the Html tag hosting this Silverlight App as an HtmlControl object. (The parent Html tag of the object/embed tag)
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public HtmlControl Host { get; }
Property Value
IsConnected
Gets whether the SilverlightApp is connected to the automation host
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public bool IsConnected { get; }
Property Value
IsLoaded
Gets whether this plugin is loaded or not.
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public bool IsLoaded { get; }
Property Value
IsRecordingHost
Indicates whether host has attached recorder.
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public bool IsRecordingHost { get; }
Property Value
Implements
ManagedProxy
The proxy that allows this app to communicate with the managed world inside a silverlight application
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public ICommunicationProxy ManagedProxy { get; }
Property Value
Implements
Manager
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public override Manager Manager { get; }
Property Value
Overrides
Implements
OwnerBrowser
Gets the owner browser object instance of this silverlight application.
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public Browser OwnerBrowser { get; }
Property Value
Plugin
Gets the actual plugin element (object or embed) as an HtmlControl
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public HtmlControl Plugin { get; }
Property Value
Popups
List of popup elements.
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public IList<VisualTreeHost> Popups { get; }
Property Value
Implements
Settings
Gets the 'settings' object of this plugin: plugin.settings.xxx
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public SilverlightAppSettings Settings { get; }
Property Value
TechnologyType
VisualTreeHosts are only used for Silverlight
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public override TechnologyType TechnologyType { get; }
Property Value
Overrides
Implements
UniqueId
A unique identifier that identifies this plugin instance. This id is updated only when the plug-in is reloaded on a postback or a browser refresh.
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public override string UniqueId { get; }
Property Value
Overrides
Implements
Methods
AddCustomAssembly(string, MemoryStream)
Add a custom assembly to the list of types that will be available for automation in addition to what ArtOfTest.WebAii.Silverlight.UI contains.
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public static void AddCustomAssembly(string assemblyName, MemoryStream assembly)
Parameters
assemblyName
The name of the assembly to add.
assembly
The assembly to include as a MemoryStream. This must be a Silverlight compiled assembly.
Capture()
Return a bitmap of the host
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public Bitmap Capture()
Returns
Implements
Capture(FrameworkElement)
Captures the image of an element
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public Bitmap Capture(FrameworkElement element)
Parameters
element
The element to capture an image of
Returns
Element image as bitmap.
Implements
ClearAppCache()
Clear the application's cache.
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public static void ClearAppCache()
ClearHighlight()
Clear any highlighting on the Silverlight surface.
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public void ClearHighlight()
Connect()
Connect to the Silverlight app
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public void Connect()
Connect(int)
Connect the silverlight application to the automation host.
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public void Connect(int timeout)
Parameters
timeout
ElementFromPoint(int, int)
Returns a proxy for the element at the specified application coordinates
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public FrameworkElement ElementFromPoint(int x, int y)
Parameters
x
The x-coordinate of the element
y
The y-coordinate of the element
Returns
A proxy for the element at those coordinates, or null if no element corresponds to the specified coordinates
Implements
ElementsFromPoint(Point)
Gets a list of FrameworkElements under the specified point in the application
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public IList<FrameworkElement> ElementsFromPoint(Point p)
Parameters
p
The point to hit-test, in application-relative coordinates
Returns
A list of FrameworkElements under the point, starting with the topmost FrameworkElement
EnsureElementClickable(FrameworkElement)
Ensures element is can be clicked.
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public void EnsureElementClickable(FrameworkElement element)
Parameters
element
Implements
EnsureStateIsCurrent()
Will force all visual trees in the application to refresh.
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public override void EnsureStateIsCurrent()
Overrides
Implements
FindName(string)
Finds an element with a specific name in the Silverlight Application. If the name is not found using the Root.FindName, it will use the VisualTree to traverse the tree and find the first name occurrence.
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public FrameworkElement FindName(string name)
Parameters
name
The name to find.
Returns
The found FrameworkElement, else returns null.
Remarks
This method is a short-cut for Find.ByName()
FindName<T>(string)
Finds an element with a specific name in the Silverlight Application. If the name is not found using the Root.FindName(), it will use the VisualTree to traverse the tree and find the first name occurrence.
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public T FindName<T>(string name) where T : FrameworkElement
Parameters
name
The name to find.
Returns
T
The found FrameworkElement, else returns null.
Remarks
This method is a short-cut for Find.ByName()
GetApp(HtmlControl)
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public static SilverlightApp GetApp(HtmlControl host)
Parameters
host
Returns
GetApp(HtmlControl, int, bool)
Gets the Silverlight application for the specified HtmlControl host.
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public static SilverlightApp GetApp(HtmlControl host, int timeout, bool catchedOnly)
Parameters
host
timeout
catchedOnly
Returns
GetChildHosts()
Get all contained hosts. This will always return an empty array for SilverlightApp hosts.
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public override IAutomationHost[] GetChildHosts()
Returns
Contained Hosts
Overrides
Implements
GetScreenRectangle(FrameworkElement)
Gets the rectangle of the element in screen coordinates
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public Rectangle GetScreenRectangle(FrameworkElement element)
Parameters
element
Returns
Implements
GetToolTipText(FrameworkElement)
Gets the text of a tooltip on the element
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public string GetToolTipText(FrameworkElement element)
Parameters
element
Returns
Any text contained by the element's tooltip, or null if the element has no toolip
Implements
InitializeCustomTypes()
Searches the AppDomain for assemblies that provide custom Silverlight types and adds the assemblies containing those types to the custom assembly list
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public static void InitializeCustomTypes()
LocateAllInHost(string[])
Locate all in host.
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public override IList<ITargetElement> LocateAllInHost(string[] expression)
Parameters
expression
string[]
The expression to use.
Returns
The list of target elements
Overrides
Implements
RefreshVisualTrees()
Refreshes the main visual tree for the application as well as any open Popup visual trees.
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public void RefreshVisualTrees()
Implements
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
[Obsolete("Silverlight support has been deprecated!")]
public void ScrollElementVisible(FrameworkElement element, ScrollToVisibleType scrollType)
Parameters
element
Element to scroll to.
scrollType
Scroll type.
Implements
SetWindowFocus()
Makes the window containing this host active
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public override bool SetWindowFocus()
Returns
Whether we successfully set the window to active
Overrides
Implements
ValidateMouseLocation(Point)
Validate the location of the mouse.
Declaration
[Obsolete("Silverlight support has been deprecated!")]
public override void ValidateMouseLocation(Point point)
Parameters
point
Overrides
Implements