js-apis-inner-application-abilityDelegatorArgs.md 1.6 KB
Newer Older
W
wusongqing 已提交
1 2
# AbilityDelegatorArgs

3
The **AbilityDelegatorArgs** module provides a global register to store the registered **AbilityDelegator** and **AbilityDelegatorArgs** instances during application startup.
4

W
wusongqing 已提交
5 6
> **NOTE**
> 
W
wusongqing 已提交
7 8
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.

G
Gloria 已提交
9 10 11 12 13 14
## Modules to Import

```ts
import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry';
```

15 16
## Usage

17
An **AbilityDelegatorArgs** object is obtained by calling [getArguments](js-apis-app-ability-abilityDelegatorRegistry.md#abilitydelegatorregistrygetarguments) in **AbilityDelegatorRegistry**.
W
wusongqing 已提交
18 19 20

## AbilityDelegatorArgs

21 22 23
Describes the ability delegator arguments.

**System capability**: SystemCapability.Ability.AbilityRuntime.Core
W
wusongqing 已提交
24 25 26

| Name               | Type                  | Readable| Writable| Description                                                        |
| ------------------- | ---------------------- | ---- | ---- | ------------------------------------------------------------ |
27 28 29 30 31 32 33 34
| bundleName          | string                 | Yes  | Yes  | Bundle name of the application to test.|
| parameters          | {[key:string]: string} | Yes  | Yes  | Parameters of the unit test that is started currently.|
| testCaseNames       | string                 | Yes  | Yes  | Test case names.|
| testRunnerClassName | string                 | Yes  | Yes  | Names of the test case executors.|

**Example**

```ts
G
Gloria 已提交
35
let args: AbilityDelegatorRegistry.AbilityDelegatorArgs = AbilityDelegatorRegistry.getArguments();
36
```