ClassElementsGenerator
Used to generate element descriptors
Definition
Namespace:ArtOfTest.WebAii.Design
Assembly:ArtOfTest.WebAii.Design.dll
Syntax:
public static class ElementsGenerator
Inheritance: objectElementsGenerator
Fields
INDEPENDENT_KEY
Independent key
Declaration
public const string INDEPENDENT_KEY = "$$Independent$$"
Field Value
s_controlTypeLookup
The controls type lookup dictionary.
Declaration
public static Dictionary<string, Type> s_controlTypeLookup
Field Value
Methods
CreateElementDescriptor(string, ITargetElement, INodeData, Type)
Create one single ElementDescriptor for an Element.
Declaration
public static ElementDescriptor CreateElementDescriptor(string descriptorName, ITargetElement element, INodeData page, Type customType)
Parameters
descriptorName
element
The actual element
page
The pageUri that element should live in.
customType
Custom control type to use for codegen, else pass in null.
Returns
The generated ElementDescriptor
CreateElementDescriptor(string, string, ITargetElement, INodeData, Type)
Create one single ElementDescriptor for an Element.
Declaration
public static ElementDescriptor CreateElementDescriptor(string descriptorName, string elementFriendlyName, ITargetElement element, INodeData page, Type customType)
Parameters
descriptorName
The descriptor name.
elementFriendlyName
The name to give the element
element
The actual element
page
The pageUri that element should live in.
customType
Custom control type to use for codegen, else pass in null.
Returns
The generated ElementDescriptor
CreateElementsForDescriptor(INodeData, AutomationDescriptor, ref Rectangle, bool)
Declaration
public static Dictionary<string, ElementDescriptor> CreateElementsForDescriptor(INodeData page, AutomationDescriptor descriptor, ref Rectangle location, bool shouldGetRectangle = true)
Parameters
page
descriptor
location
shouldGetRectangle
Returns
CreatePage(string, string, UserSettings)
Declaration
public static PageUri CreatePage(string title, string path, UserSettings settings)
Parameters
title
path
settings
Returns
FindUsingBackupXPath(string, ITargetElement, out ITargetElement)
FindUsingBackupXPath
Declaration
public static ITargetElement FindUsingBackupXPath(string path, ITargetElement root, out ITargetElement failureLocation)
Parameters
path
root
failureLocation
Returns
GenerateFriendlyName(ITargetElement)
Generates friendly name for the element.
Declaration
public static string GenerateFriendlyName(ITargetElement element)
Parameters
element
The element.
Returns
PromptForElementsNamesOnAdd(List<ITargetElement>, bool, out bool, string)
Declaration
public static List<string> PromptForElementsNamesOnAdd(List<ITargetElement> elements, bool promptNameOnAddElement, out bool toAdd, string ownerTag = null)
Parameters
elements
List<ITargetElement>
promptNameOnAddElement
toAdd
ownerTag
Returns
SetCurrentScheme(IdentificationOptionsScheme)
Set the scheme to be used for identification.
Declaration
public static void SetCurrentScheme(IdentificationOptionsScheme scheme)
Parameters
scheme
Scheme to use.