Delete Method

Applies to TestComplete 15.45, last modified on December 01, 2022

Description

The Jobs.Delete method deletes a job specified by its index from the Jobs object.

Declaration

JobsObj.Delete(AIndex)

JobsObj An expression, variable or parameter that specifies a reference to a Jobs object
AIndex [in]    Required    Integer    
Result

Applies To

The method is applied to the following object:

Parameters

The method has the following parameter:

AIndex

The zero-based index of the job to delete.

Example

The code below creates a new job in a job collection, specifies a name for this job and runs it at the end of the test.

JavaScript, JScript

function DeleteJobExample()
{
  // Obtains information about the job collection
  var colJobs = NetworkSuite.Jobs;
  // Deletes the first job from the collection
   colJobs.Delete(0);
}

Python

def DeleteJobExample():
  # Obtains information about the job collection
  colJobs = NetworkSuite.Jobs
  # Deletes the first job from the collection
  colJobs.Delete(0)

VBScript

Sub DeleteJobExample()
  ' Obtains information about the job collection
  Set colJobs = NetworkSuite.Jobs
  ' Deletes the first job from the collection
   colJobs.Delete(0)
End Sub

DelphiScript

function DeleteJobExample;
var colJobs;
begin
  // Obtains information about the job collection
  colJobs := NetworkSuite.Jobs;
  // Deletes the first job from the collection
  colJobs.Delete(0);
end;

C++Script, C#Script

function DeleteJobExample()
{
  // Obtains information about the job collection
  var colJobs = NetworkSuite["Jobs"];
  // Deletes the first job from the collection
   colJobs["Delete"](0);
}

See Also

Distributed Testing
Items Property
ItemByName Property
Count Property

Highlight search results