You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/developer.md
+9-8
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ In order to get access to the automation API, an UIAutomation instance needs to
53
53
54
54
### Launching an application
55
55
56
-
The AutomationApplication class provides functionality to start and attach to an application. There are 3 class methods provided to do this.
56
+
The Application class provides functionality to start and attach to an application. There are 3 class methods provided to do this.
57
57
58
58
* Launch - this will launch the application supplied, and pass in any supplied arguments
59
59
* Attach - this will attach to an already launched application, based on the executable name
@@ -63,8 +63,8 @@ The snippet below will check whether Project1.exe is running, attaching to it if
63
63
64
64
```
65
65
// Build the application details up, ready for launching
66
-
AutomationApplication application =
67
-
new AutomationApplication(
66
+
Application application =
67
+
new Application(
68
68
new ElementBuilder()
69
69
.automation(automation)
70
70
.applicationPath("apps\\Project1.exe"));
@@ -85,7 +85,7 @@ The root element of the tree of automation elements is the user’s desktop.
85
85
To get a 'desktop' window (i.e. one that appears in the Windows tasks bar), then the AutomationDesktop class provides a class function that returns a AutomationWindow object.
@@ -96,7 +96,7 @@ This will find (if it is there) a window that has the given title, and set focus
96
96
Each control contained in a container (such as a window or panel) can be identified by the index of that control, sometimes (this depends on the control type), by the text associated with it, OR by the Automation Id. For example, in order to get the textbox associated with the connection window (and assuming that it is the 1st Edit box on the window), the following code will find the editbox, and change the text to be USER1.
97
97
98
98
```
99
-
AutomationEditBox user = window.getEditBox(Search.getBuilder(0).build());
99
+
EditBox user = window.getEditBox(Search.getBuilder(0).build());
100
100
user.setText("USER1");
101
101
```
102
102
@@ -106,26 +106,27 @@ In order to click the 'OK' button associated with a given window, it can be foun
The controls that have been implemented reflect the requirements for automating the applications that we are testing ourselves, so some controls have not been implemented, or only partially. The currently supported controls are ...
The [DelphiUIAutomation](https://github.com/markhumphreysjhc/DelphiUIAutomation) project introduced some Delphi controls that implement IUIAutomation providers, allowing them to be accessed by automation. The TAutomatedStringGrid is one of these, as the base Delphi (as of XE5 at least) control does not implement the Grid or Table interfaces and so is opaque to automation. In order to get the element associated with the specific TAutomationStringGrid, then this is done in the following manner.
0 commit comments