Credentials Property

Applies to TestComplete 15.65, last modified on July 17, 2024
Testing web services with TestComplete is obsolete. We recommend that you use ReadyAPI, another SmartBear's automated testing tool for SOAP and REST web services.
If needed, you can run ReadyAPI tests from TestComplete.


Use this property to obtain access to client and service credentials as well as service credentials authentication settings for the web service.



Read-Only Property WebServiceCredentials object
WebServiceObj An expression, variable or parameter that specifies a reference to a WebService object

Applies To

The property is applied to the following object:

Property Value

The WebServiceCredentials object that assists you in specifying a certificate’s credentials.


The following code defines the Windows credentials for the SampleWebService web service.

JavaScript, JScript

function Test()
  var service = WebServices.SampleWebService;

  var auth = service.Credentials.Windows;
  auth.AllowNtlm = true;
  auth.ClientCredentials.UserName = "Tester";
  auth.ClientCredentials.Domain = "QA";
  auth.ClientCredentials.Password = "123456";


def Test():
  service = WebServices.SampleWebService;
  auth = service.Credentials.Windows;
  auth.AllowNtlm = True;
  auth.ClientCredentials.UserName = "Tester";
  auth.ClientCredentials.Domain = "QA";
  auth.ClientCredentials.Password = "123456";


Sub Test
  Dim service, auth

  Set service = WebServices.SampleWebService

  Set auth = service.Credentials.Windows
  auth.AllowNtlm = True
  auth.ClientCredentials.UserName = "Tester"
  auth.ClientCredentials.Domain = "QA"
  auth.ClientCredentials.Password = "123456"
End Sub


procedure Test;
var service, auth;
  service := WebServices.SampleWebService;

  auth := service.Credentials.Windows;
  auth.AllowNtlm := true;
  auth.ClientCredentials.UserName := 'Tester';
  auth.ClientCredentials.Domain := 'QA';
  auth.ClientCredentials.Password := '123456';

C++Script, C#Script

function Test()
  var service = WebServices["SampleWebService"];

  var auth = service["Credentials"]["Windows"];
  auth["AllowNtlm"] = true;
  auth["ClientCredentials"]["UserName"] = "Tester";
  auth["ClientCredentials"]["Domain"] = "QA";
  auth["ClientCredentials"]["Password"] = "123456";

See Also

WebServiceCredentials Object
About Testing Web Services

Highlight search results