Download - Execute Automation Interface
-
8/10/2019 Execute Automation Interface
1/14
ExeCuteAutomation Interface
-
8/10/2019 Execute Automation Interface
2/14
OMICRON Test Universe
2
Article Number VESD5003 - Manual Version: ExeCuteAut.AE.1
OMICRON electronics 2004. All rights reserved.
This Reference Manual is a publication of OMICRON electronics GmbH.
All rights including translation reserved. Reproduction of any kind, e.g., photocopying, microfilming or
storage in electronic data processing systems, requires the explicit consent of OMICRON electronics.
Reprinting, wholly or in part, is not permitted.
This Reference Manual represents the technical status at the time of printing. The product information,
specifications, and all technical data contained within this reference manual are not contractually
binding. OMICRON electronics reserves the right to make changes at any time to the technology and/or
configuration without announcement. OMICRON electronics is not to be held liable for statements and
declarations given in this reference manual. The user is responsible for every application described in
this reference manual and its results. OMICRON electronics explicitly exonerates itself from all liability
for mistakes in this manual.
-
8/10/2019 Execute Automation Interface
3/14
Contents
3
Contents
Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
ExeCute Automation Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Object Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Application Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
http://preface_cms251.pdf/http://preface_cms251.pdf/ -
8/10/2019 Execute Automation Interface
4/14
OMICRON Test Universe
4
-
8/10/2019 Execute Automation Interface
5/14
5
ExeCute Automation Interface
ExeCute Automation Interface
Object Hierarchy
Figure 1:
Object hierarchy of an
ExeCute Document
Reference
The following section contains the enumeration of all the objects, properties and
methods available via automation in the ExeCutemodule. All the examples are
given in the OMICRON Control Center Scripting Language (VBA compatible).
Application Object
The application object is the root of the OMICRON ExeCuteobject hierarchy.
This object is unique within the OMICRON ExeCute Module. If you want to
create another Application object with CreateObject, a new instance of the
OMICRON ExeCuteprogram is started to handle this object.
You can use this object as a starting point to navigate through the hierarchy tree.
You can get references to the Document Object (Document) and the Predefined
Constant Values (Constants) objects.
-
8/10/2019 Execute Automation Interface
6/14
OMICRON Test Universe
6
PropertiesApplication (read only)
Constants (read only)
Syntax: object.Application
Type: Object (Application)
Description: Returns the application itself, for coherence.
Example: Dim otm As ObjectDim App As Object
Set otm =
Document.InsertObject("ExeCute.Document")
Set App = otm.Specific
Dim app As Object
Set app = App.Application'app must be the
'same object as App
Syntax: object.Constants
Type: Object (Constants)
Description: Returns the object containing the constant values (Constants)
you can use across ExeCute automation.
Example: Dim otm As Object
Dim App As Object
Dim Con As Object
Set otm =
Document.InsertObject("ExeCute.Document")
Set App = otm.Specific
Set Con = App.Constants
-
8/10/2019 Execute Automation Interface
7/14
7
ExeCute Automation Interface
Document (read only)
Name (read only)
Syntax: object.Document
Type: Object (Document)
Description: This property returns a Document Object (Document). The
Document contains all test data.
Example: Dim otm As Object
Dim App As Object
Dim Con As Object
Dim Doc As Object
Set otm =
Document.InsertObject("ExeCute.Document")
Set App = otm.Specific
Set Con = App.Constants
Set Doc = App.Document
Syntax: object.Name
Type: String
Description: Returns the name of the application.
Example: Dim otm As ObjectDim App As Object
Set otm =
Document.InsertObject("ExeCute.Document")
Set App = otm.Specific
Dim Name As String
Set Name = App.Name
-
8/10/2019 Execute Automation Interface
8/14
OMICRON Test Universe
8
Parent (read only)
Visible
Syntax: object.Parent
Type: Object
Description: This property always returns the parent object in the object
hierarchy. In this case it is theApplicationObject
(Application).
Example: Dim otm As Object
Dim App As Object
Dim Con As Object
Dim Parent As Object
Set otm =
Document.InsertObject("ExeCute.Document")
Set App = otm.Specific
Set Parent = App.Parent'In this case, Parentwill be the same
'object as App
Syntax: object.Visible
Type: Boolean
Description: Shows/hides the main application window.
Example: Dim otm As Object
Dim App As Object
Set otm =
Document.InsertObject("ExeCute.Document")
Set App = otm.Specific
'Is the application visible?
If App.Visible then
MsgBox "Application is already visible"
Else 'Make the application visible
App.Visible = True
End If
-
8/10/2019 Execute Automation Interface
9/14
9
ExeCute Automation Interface
MethodsQuit
Syntax: object.Quit
Return
type:
None
Description: Terminates execution of the application.
Example: Dim otm As Object
Dim App As Object
Set otm = Document.TestModules(1)
Set App = otm.Specific
App.Test
App.Quit
-
8/10/2019 Execute Automation Interface
10/14
OMICRON Test Universe
10
Document ObjectWith the Document Object (Document) you have access to all the data in the
ExeCute module.
Properties
Application (read only)
Comment
Syntax: Object.Application
Type: Object (Application)
Description: Returns the Application Object (Application).
Example: Dim otm As Object
Dim App As Object
Set otm =
Document.InsertObject("ExeCute.Document")
Set App = otm.Specific
Dim app2 As Object
Set app2 = App.Document.Application'app2 must
be the
'same object as App
Syntax: object.Comment
Type: String
Description: This property allows access to the comment string which can
be shown in the report.
Example: Dim otm As Object
Dim App As Object
Set otm =Document.InsertObject("ExeCute.Document")
Set App = otm.Specific
'Set comment in the report
App.Document.Comment = "This test is
simulated"
-
8/10/2019 Execute Automation Interface
11/14
11
ExeCute Automation Interface
Option
Parameters
Syntax: object.Option
Type: Long
Description: Get / Set the behavior of the module after launching the
application. This property controls when the OCC test will be
continued after the application is launched. The possible
values for this property are:EXEC_WAIT_FOR_TERM Wait until the application exits
EXEC_ASK Prompt the user to continue
immediately after launching
the application
EXEC_CONTINUE Continue immediately after
launching the application
Example: Dim otm As ObjectDim App As Object
Dim Con As object
Dim settings As Object
Set otm =
Document.InsertObject("ExeCute.Document")
Set App = otm.Specific
Set Con = App.Constants
App.Document.Option = Con.EXEC_CONTINUE
'Continue at once
Syntax: object.Parameters
Type: String
Description: This property holds the command line parameters that will be
passed to the application when it is launched.
-
8/10/2019 Execute Automation Interface
12/14
OMICRON Test Universe
12
Parent (read only)
Path
Example: Dim otm As Object
Dim App As Object
Set otm =
Document.InsertObject("ExeCute.Document")
Set App = otm.Specific
App.Document.Path = "c:\WINDOWS\Notepad.exe"
App.Document.Parameters = "c:\mydoc.txt"
'Notepad will start and
'open this document
Syntax: object.Parent
Type: Object (Application)
Description: This property always returns the parent object in the object
hierarchy. In this case it is the Application Object(Application).
Syntax: object.Path
Type: String
Description: This property holds the full path of the application we wish themodule to launch.
Example: Dim otm As Object
Dim App As Object
Set otm =
Document.InsertObject("ExeCute.Document")
Set App = otm.Specific
App.Document.Path = "c:\WINDOWS\Notepad.exe"
-
8/10/2019 Execute Automation Interface
13/14
13
ExeCute Automation Interface
Version (read only)
Syntax: object.Version
Type: String
Description: Returns the version of the ExeCute module in form
"M.mm.bbb" where:
M: major
m: minorb: build.
Example: Dim otm As Object
Dim App As Object
Set otm =
Document.InsertObject("ExeCute.Document")
Set App = otm.Specific
MsgBox "Module version is " +
App.Document.Version
-
8/10/2019 Execute Automation Interface
14/14
OMICRON Test Universe
14
MethodsUpdateAllViews(hint)l
Syntax: object.UpdateAllViews(hint)
Long hint
Type: None
Description: This method updates the UI and the report. The optional Hint
parameter is used to add information that the views can
interpret. By calling this method without parameters, all the UI
is fully updated.
Example: Dim otm As Object
Dim App As Object
Set otm =
Document.InsertObject("ExeCute.Document")
Set App = otm.SpecificApp.Document.Comment = "This is an Automation
test"
App.Document.UpdateAllViews