UseCustomCertificate Property

Applies to TestComplete 15.47, last modified on January 20, 2023

Description

Use the UseCustomCertificate property to get or set whether TestComplete uses a custom or the debug certificate to instrument the application. You can use this property to specify parameters for instrumenting your Android application.

Declaration

AndroidTestedAppObj.UseCustomCertificate

Read-Write Property Boolean
AndroidTestedAppObj An expression, variable or parameter that specifies a reference to an AndroidTestedApp object

Applies To

The property is applied to the following object:

Property Value

True if a custom certificate is used; false if the debug certificate is used.

Remarks

If you use a custom certificate, make sure the following properties are specified:

  • KeystorePath - specifies the path to the keystore.

  • KeystorePassword - specifies the password used to access the keystore.

  • KeyAlias - specifies the alias of the key from the keystore that is used to instrument the application with a custom certificate.

  • KeyPassword - specifies the password used to access the key.

Example

Below is an example of how you can set the instrumentation properties to use a custom certificate:

JavaScript, JScript

AndroidTestedApp.UseCustomCertificate = true;
AndroidTestedApp.KeystorePath = "C:\\Android\\Keystore";
AndroidTestedApp.KeystorePassword = "KstrPass";
AndroidTestedApp.Alias = "KeyAlias";
AndroidTestedApp.KeyPassword = "KeyPass";

Python

AndroidTestedApp.UseCustomCertificate = True;
AndroidTestedApp.KeystorePath = "C:\\Android\\Keystore";
AndroidTestedApp.KeystorePassword = "KstrPass";
AndroidTestedApp.Alias = "KeyAlias";
AndroidTestedApp.KeyPassword = "KeyPass";

VBScript

AndroidTestedApp.UseCustomCertificate = true
AndroidTestedApp.KeystorePath = "C:\Android\Keystore"
AndroidTestedApp.KeystorePassword = "KstrPass"
AndroidTestedApp.Alias = "KeyAlias"
AndroidTestedApp.KeyPassword = "KeyPass"

DelphiScript

AndroidTestedApp.UseCustomCertificate := true;
AndroidTestedApp.KeystorePath := 'C:\Android\Keystore';
AndroidTestedApp.KeystorePassword := 'KstrPass';
AndroidTestedApp.Alias := 'KeyAlias';
AndroidTestedApp.KeyPassword := 'KeyPass';

C++Script, C#Script

AndroidTestedApp["UseCustomCertificate"] = true;
AndroidTestedApp["KeystorePath"] = "C:\\Android\\Keystore";
AndroidTestedApp["KeystorePassword"] = "KstrPass";
AndroidTestedApp["Alias"] = "KeyAlias";
AndroidTestedApp["KeyPassword"] = "KeyPass";

See Also

AndroidTestedApp Object
About Tested Android Applications (Legacy)

Highlight search results