C# Class VisualUIAVerify.Controls.AutomationElementTreeControl

Datei anzeigen Open project: geeksree/cSharpGeeks Class Usage Examples

Private Properties

Property Type Description
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

Public Methods

Method Description
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

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

OnSelectedNodeChanged ( ) : void

this methid will raise SelectedNodeChanged event

Private Methods

Method Description
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

Method Details

AutomationElementTreeControl() public method

Initilizes new instance of control
public AutomationElementTreeControl ( ) : System
return System

BuildTreeFromRootToElement() public method

this method will build tree from the AutomationElementTreeControl.RootElement to focusedElement
public BuildTreeFromRootToElement ( AutomationElement element ) : AutomationElementTreeNode
element AutomationElement
return AutomationElementTreeNode

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
return void

GoToFirstChildFromNode() public method

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
return void

GoToLastChildFromNode() public method

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
return void

GoToNextSiblingFromNode() public method

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
return void

GoToParentFromNode() public method

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
return void

GoToPreviousSiblingFromNode() public method

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
return void

IsMember() public method

public IsMember ( AutomationElement element ) : bool
element AutomationElement
return bool

MarkElementLive() public method

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
return void

OnSelectedNodeChanged() protected method

this methid will raise SelectedNodeChanged event
protected OnSelectedNodeChanged ( ) : void
return void

RefreshNode() public method

This method will refresh currentTestTypeRootNode...
public RefreshNode ( AutomationElementTreeNode Node ) : void
Node AutomationElementTreeNode
return void

ScopeToNode() public method

This method causes that the currentTestTypeRootNode in param becomes a root of a tree.
public ScopeToNode ( AutomationElementTreeNode node ) : void
node AutomationElementTreeNode
return void

SetFocusToElement() public static method

this method will set focus to the automation element
public static SetFocusToElement ( AutomationElement element ) : void
element AutomationElement
return void

SnapMouseToClickablePoint() public method

This method will snap mouse cursor to element's clickable point.
public SnapMouseToClickablePoint ( AutomationElement element ) : void
element AutomationElement
return void

StartFocusTracing() public method

this method starts listening to AutomationFocusChange event and highlights automationelement belonging to focused control in the tree.
public StartFocusTracing ( ) : void
return void

StartHoverMode() public method

this method starts hover mode.
public StartHoverMode ( ) : void
return void

StopFocusTracing() public method

This method stops highlighting of focused control
public StopFocusTracing ( ) : void
return void

StopHoverMode() public method

This method stops hover mode
public StopHoverMode ( ) : void
return void