Description: Each window has a set of controls (buttons, input fields, text fields, etc...)
Using FindControlWithXPath you can find and subsequently interact with these controls
START already defines the initial window of the application as the mainWindow variable or you can use FindWindow to find other windows. FindControlWithXPath can use these windows to retrieve information of control within the window the ApplicationXRay.exe in the tools folder can recognize these controls and provide information. FindControlWithXPath uses the xPath to find buttons, which is the path down to the control to be used (based on class)
- xPath, defines the xPath
- Timeout, engine will throw an error after the defined timeout unless continueonerror is set to true
- continueOnError, we can indicate if the engine should keep going with the next set of actions in case of a error. This could be especially helpful with if else statements.
var Save = MainWindow.FindControlWithXPath(xPath : "Pane:FullpageUIHost/Pane:NetUIFullpageUIWindow/Pane:NetUIScrollViewer/Menu:NetUIKeyboardTabElement/TabItem:NetUIRibbonTab");
When the engine finds the control it can perform multiple actions on the control
// This will left click the control.
// This will doubleclick the control.
// This will rightclick the control.
// This will focus on the control.
Save.Focus(); // Will focus on the control.
// Type will type directly to the control and keeps the focus on this control
// Gets all direct child controls for the window (can also be used on a control)
// Gets the processname for the window or control
// Gets the title for the window or control
// Gets the class name for the window or control
// Gets the bounds of the found Window (X, Y coordinates and more)