ProjectComponent¶
- class ProjectComponent¶
- Clone()¶
Call this method if you want to use API-objects in multiple contexts, e.g. if you want to insert a specific test step in multiple blocks.
- Returns:
A copy of this object
- Return type:
- GetIndex()¶
Returns the zero based index in the parent.
- Returns:
Zero based index
- Return type:
int
- GetLineNo()¶
Returns the line number within its project.
- Returns:
Line number
- Return type:
int
- GetName()¶
Returns the name of the project component.
- Returns:
Name of the component
- Return type:
str
- GetParent()¶
Returns the parent project component.
- Returns:
Parent component
- Return type:
- GetType()¶
- Returns the type (class name) of the project component, e.g.
“ConfigChange”
“ParameterSet”
“PackageCall”
“Project”
“PackageGenerator”
- Returns:
Type (class name) of the project component
- Return type:
str
- IsEnabled()¶
Returns the state of the test step.
- Returns:
True if test step is enabled, otherwise False
- Return type:
bool
- IsReported()¶
Returns whether the test step will be reported. If it has a parent test step, this function will only return true if both this test step and the parent test step should be reported.
- Returns:
True if test step will be reported, otherwise False
- Return type:
bool
- RemoveFromProject()¶
Removes this component from the project.
- Raises:
ApiError – if the component is not part of any project
-
SetEnabled(state=
True)¶ Enable or disable the test step.
- Parameters:
- state : bool¶
True (=Default) to enable, False to disable the test step.