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:

ProjectComponent

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:

ProjectComponent

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.

SetName(name)

Sets the name of the project component.

Parameters:
name : str

Name of the component

SetReported(state=True)

Enable or disable the reporting of the test step. If it has a parent test step, its reporting must also be enabled in order to have this test step appear in the report.

Parameters:
state : bool

True (=Default) to enable, False to disable the reporting of the test step.

GetPosition()

Returns the position in the parent project.

Returns:

parent position

Return type:

int

Deprecated since version 2024.4: Please use method GetLineNo instead.