EzRootElement
EzRootElement provides the entry point for element querying. It is created with an instance of EzProcess
Syntax
public class EzRootElement : EzElement
Constructors
Name |
Input |
Description |
EzRoot(EzProcess process) |
EzProcess |
This is the only constructor for EzRootelement. Must have a resolved instance of EzProcess to pass into the constructor |
Properties
Name |
Type |
Description |
RootElement |
EzElement |
The root element of the application. All querying for elements must start at this point |
Process |
EzProcess |
The backing EzProcess instance for the application under test |
Methods
Name |
Return Type |
Description |
ResizeWindow(int x, int y, int width, int height) |
void |
Resizes the window housing the application to the values passed in. X and Y are the starting coordinates of the window and width and height control the size |
Samples and Usage
The EzRoot element finds the entry point for finding automation elements within an application
Sample:
const string calculatorPath = C:\\Windows\\System32\\calc.exe";
using (EzProcess process = new EzProcess(calculatorPath, "Calculator"))
{
process.StartProcess();
EzRoot root = new EzRoot(process);
}