Class
ElementsGenerator

Used to generate element descriptors

Definition

Namespace:ArtOfTest.WebAii.Design

Assembly:ArtOfTest.WebAii.Design.dll

Syntax:

cs-api-definition
public static class ElementsGenerator

Inheritance: objectElementsGenerator

Fields

INDEPENDENT_KEY

Independent key

Declaration

cs-api-definition
public const string INDEPENDENT_KEY = "$$Independent$$"

Field Value

string

s_controlTypeLookup

The controls type lookup dictionary.

Declaration

cs-api-definition
public static Dictionary<string, Type> s_controlTypeLookup

Field Value

Dictionary<string, Type>

Methods

CreateElementDescriptor(string, ITargetElement, INodeData, Type)

Create one single ElementDescriptor for an Element.

Declaration

cs-api-definition
public static ElementDescriptor CreateElementDescriptor(string descriptorName, ITargetElement element, INodeData page, Type customType)

Parameters

descriptorName

string

element

ITargetElement

The actual element

page

INodeData

The pageUri that element should live in.

customType

Type

Custom control type to use for codegen, else pass in null.

Returns

ElementDescriptor

The generated ElementDescriptor

CreateElementDescriptor(string, string, ITargetElement, INodeData, Type)

Create one single ElementDescriptor for an Element.

Declaration

cs-api-definition
public static ElementDescriptor CreateElementDescriptor(string descriptorName, string elementFriendlyName, ITargetElement element, INodeData page, Type customType)

Parameters

descriptorName

string

The descriptor name.

elementFriendlyName

string

The name to give the element

element

ITargetElement

The actual element

page

INodeData

The pageUri that element should live in.

customType

Type

Custom control type to use for codegen, else pass in null.

Returns

ElementDescriptor

The generated ElementDescriptor

CreateElementsForDescriptor(INodeData, AutomationDescriptor, ref Rectangle, bool)

Declaration

cs-api-definition
public static Dictionary<string, ElementDescriptor> CreateElementsForDescriptor(INodeData page, AutomationDescriptor descriptor, ref Rectangle location, bool shouldGetRectangle = true)

Parameters

page

INodeData

descriptor

AutomationDescriptor

location

Rectangle

shouldGetRectangle

bool

Returns

Dictionary<string, ElementDescriptor>

CreatePage(string, string, UserSettings)

Declaration

cs-api-definition
public static PageUri CreatePage(string title, string path, UserSettings settings)

Parameters

title

string

path

string

settings

UserSettings

Returns

PageUri

FindUsingBackupXPath(string, ITargetElement, out ITargetElement)

FindUsingBackupXPath

Declaration

cs-api-definition
public static ITargetElement FindUsingBackupXPath(string path, ITargetElement root, out ITargetElement failureLocation)

Parameters

path

string

root

ITargetElement

failureLocation

ITargetElement

Returns

ITargetElement

GenerateFriendlyName(ITargetElement)

Generates friendly name for the element.

Declaration

cs-api-definition
public static string GenerateFriendlyName(ITargetElement element)

Parameters

element

ITargetElement

The element.

Returns

string

PromptForElementsNamesOnAdd(List<ITargetElement>, bool, out bool, string)

Declaration

cs-api-definition
public static List<string> PromptForElementsNamesOnAdd(List<ITargetElement> elements, bool promptNameOnAddElement, out bool toAdd, string ownerTag = null)

Parameters

elements

List<ITargetElement>

promptNameOnAddElement

bool

toAdd

bool

ownerTag

string

Returns

List<string>

SetCurrentScheme(IdentificationOptionsScheme)

Set the scheme to be used for identification.

Declaration

cs-api-definition
public static void SetCurrentScheme(IdentificationOptionsScheme scheme)

Parameters

scheme

IdentificationOptionsScheme

Scheme to use.