C# Класс VisualUIAVerify.Controls.AutomationElementTreeControl

Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
BuildNodeTreePath AutomationElementTreeNode
CheckNodeIsValid void
InitializeComponent void
InitializeElementTree void
InitializeTreeWalker void
PrepareNodeToExpand void
ScopeToElement_Click void
SetSelectedNodeActiveColor void
SetSelectedNodeTransparentColor void
_elementsTreeView_AfterSelect void
_elementsTreeView_BeforeExpand void
_elementsTreeView_BeforeSelect void
_elementsTreeView_NodeMouseClick void
goToFirstChildrenToolStripMenuItem_Click void
goToLastChildrenToolStripMenuItem_Click void
goToNextSiblingToolStripMenuItem_Click void
goToParentToolStripMenuItem_Click void
goToPreviousSiblingToolStripMenuItem_Click void
refreshToolStripMenuItem_Click void
setControlToolStripMenuItem_Click void
snapToolStripMenuItem_Click void

Открытые методы

Метод Описание
AutomationElementTreeControl ( ) : System

Initilizes new instance of control

BuildTreeFromRootToElement ( AutomationElement element ) : AutomationElementTreeNode

this method will build tree from the AutomationElementTreeControl.RootElement to focusedElement

GoToFirstChildFromNode ( AutomationElementTreeNode node ) : void

This method will select first child currentTestTypeRootNode from the parameter currentTestTypeRootNode in a tree. If there is no child currentTestTypeRootNode then nothing happens.

GoToLastChildFromNode ( AutomationElementTreeNode node ) : void

This method will select last child currentTestTypeRootNode from the parameter currentTestTypeRootNode in a tree. If there is no child currentTestTypeRootNode then nothing happens.

GoToNextSiblingFromNode ( AutomationElementTreeNode node ) : void

This method will select next sibling currentTestTypeRootNode from the parameter currentTestTypeRootNode in a tree. If there is no next sibling nothing happens.

GoToParentFromNode ( AutomationElementTreeNode node ) : void

This method will select to parent AutomationElement from the currentTestTypeRootNode. If the parent element is not in a tree then this method will try to find the element and show him in a tree.

GoToPreviousSiblingFromNode ( AutomationElementTreeNode node ) : void

This method will select previous sibling currentTestTypeRootNode from the parameter currentTestTypeRootNode in a tree. If there is no previous sibling nothing happens.

IsMember ( AutomationElement element ) : bool

MarkElementLive ( AutomationElementTreeNode node, bool live ) : void

This method marks currentTestTypeRootNode in param as 'live' so it will listen to StructureChangedEvent and everytime the event fires the currentTestTypeRootNode will be refeshed.

RefreshNode ( AutomationElementTreeNode Node ) : void

This method will refresh currentTestTypeRootNode...

ScopeToNode ( AutomationElementTreeNode node ) : void

This method causes that the currentTestTypeRootNode in param becomes a root of a tree.

SetFocusToElement ( AutomationElement element ) : void

this method will set focus to the automation element

SnapMouseToClickablePoint ( AutomationElement element ) : void

This method will snap mouse cursor to element's clickable point.

StartFocusTracing ( ) : void

this method starts listening to AutomationFocusChange event and highlights automationelement belonging to focused control in the tree.

StartHoverMode ( ) : void

this method starts hover mode.

StopFocusTracing ( ) : void

This method stops highlighting of focused control

StopHoverMode ( ) : void

This method stops hover mode

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Clean up any resources being used.

OnSelectedNodeChanged ( ) : void

this methid will raise SelectedNodeChanged event

Приватные методы

Метод Описание
BuildNodeTreePath ( AutomationElementTreeNode rootNode, Stack path ) : AutomationElementTreeNode

this method will build currentTestTypeRootNode tree from rootNode to last item in path

CheckNodeIsValid ( AutomationElementTreeNode node ) : void

This method is for validating that currentTestTypeRootNode in parametr is not null and belongs to this tree

InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

InitializeElementTree ( ) : void

This method initiliazes all required classes and builds a tree from the root element.

InitializeTreeWalker ( ) : void

this method will asign default tree walker if there is not asigned one

PrepareNodeToExpand ( AutomationElementTreeNode node ) : void

This method will make sure that for every child currentTestTypeRootNode of the currentTestTypeRootNode in parameter all children will be populated

ScopeToElement_Click ( object sender, EventArgs e ) : void
SetSelectedNodeActiveColor ( ) : void
SetSelectedNodeTransparentColor ( ) : void
_elementsTreeView_AfterSelect ( object sender, TreeViewEventArgs e ) : void
_elementsTreeView_BeforeExpand ( object sender, TreeViewCancelEventArgs e ) : void
_elementsTreeView_BeforeSelect ( object sender, TreeViewCancelEventArgs e ) : void
_elementsTreeView_NodeMouseClick ( object sender, TreeNodeMouseClickEventArgs e ) : void
goToFirstChildrenToolStripMenuItem_Click ( object sender, EventArgs e ) : void
goToLastChildrenToolStripMenuItem_Click ( object sender, EventArgs e ) : void
goToNextSiblingToolStripMenuItem_Click ( object sender, EventArgs e ) : void
goToParentToolStripMenuItem_Click ( object sender, EventArgs e ) : void
goToPreviousSiblingToolStripMenuItem_Click ( object sender, EventArgs e ) : void
refreshToolStripMenuItem_Click ( object sender, EventArgs e ) : void
setControlToolStripMenuItem_Click ( object sender, EventArgs e ) : void
snapToolStripMenuItem_Click ( object sender, EventArgs e ) : void

Описание методов

AutomationElementTreeControl() публичный Метод

Initilizes new instance of control
public AutomationElementTreeControl ( ) : System
Результат System

BuildTreeFromRootToElement() публичный Метод

this method will build tree from the AutomationElementTreeControl.RootElement to focusedElement
public BuildTreeFromRootToElement ( AutomationElement element ) : AutomationElementTreeNode
element AutomationElement
Результат AutomationElementTreeNode

Dispose() защищенный Метод

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
Результат void

GoToFirstChildFromNode() публичный Метод

This method will select first child currentTestTypeRootNode from the parameter currentTestTypeRootNode in a tree. If there is no child currentTestTypeRootNode then nothing happens.
public GoToFirstChildFromNode ( AutomationElementTreeNode node ) : void
node AutomationElementTreeNode
Результат void

GoToLastChildFromNode() публичный Метод

This method will select last child currentTestTypeRootNode from the parameter currentTestTypeRootNode in a tree. If there is no child currentTestTypeRootNode then nothing happens.
public GoToLastChildFromNode ( AutomationElementTreeNode node ) : void
node AutomationElementTreeNode
Результат void

GoToNextSiblingFromNode() публичный Метод

This method will select next sibling currentTestTypeRootNode from the parameter currentTestTypeRootNode in a tree. If there is no next sibling nothing happens.
public GoToNextSiblingFromNode ( AutomationElementTreeNode node ) : void
node AutomationElementTreeNode
Результат void

GoToParentFromNode() публичный Метод

This method will select to parent AutomationElement from the currentTestTypeRootNode. If the parent element is not in a tree then this method will try to find the element and show him in a tree.
public GoToParentFromNode ( AutomationElementTreeNode node ) : void
node AutomationElementTreeNode
Результат void

GoToPreviousSiblingFromNode() публичный Метод

This method will select previous sibling currentTestTypeRootNode from the parameter currentTestTypeRootNode in a tree. If there is no previous sibling nothing happens.
public GoToPreviousSiblingFromNode ( AutomationElementTreeNode node ) : void
node AutomationElementTreeNode
Результат void

IsMember() публичный Метод

public IsMember ( AutomationElement element ) : bool
element AutomationElement
Результат bool

MarkElementLive() публичный Метод

This method marks currentTestTypeRootNode in param as 'live' so it will listen to StructureChangedEvent and everytime the event fires the currentTestTypeRootNode will be refeshed.
public MarkElementLive ( AutomationElementTreeNode node, bool live ) : void
node AutomationElementTreeNode
live bool
Результат void

OnSelectedNodeChanged() защищенный Метод

this methid will raise SelectedNodeChanged event
protected OnSelectedNodeChanged ( ) : void
Результат void

RefreshNode() публичный Метод

This method will refresh currentTestTypeRootNode...
public RefreshNode ( AutomationElementTreeNode Node ) : void
Node AutomationElementTreeNode
Результат void

ScopeToNode() публичный Метод

This method causes that the currentTestTypeRootNode in param becomes a root of a tree.
public ScopeToNode ( AutomationElementTreeNode node ) : void
node AutomationElementTreeNode
Результат void

SetFocusToElement() публичный статический Метод

this method will set focus to the automation element
public static SetFocusToElement ( AutomationElement element ) : void
element AutomationElement
Результат void

SnapMouseToClickablePoint() публичный Метод

This method will snap mouse cursor to element's clickable point.
public SnapMouseToClickablePoint ( AutomationElement element ) : void
element AutomationElement
Результат void

StartFocusTracing() публичный Метод

this method starts listening to AutomationFocusChange event and highlights automationelement belonging to focused control in the tree.
public StartFocusTracing ( ) : void
Результат void

StartHoverMode() публичный Метод

this method starts hover mode.
public StartHoverMode ( ) : void
Результат void

StopFocusTracing() публичный Метод

This method stops highlighting of focused control
public StopFocusTracing ( ) : void
Результат void

StopHoverMode() публичный Метод

This method stops hover mode
public StopHoverMode ( ) : void
Результат void