Inject Audio (FR)
Perfecto Command
mobile:audio:inject
Purpose
Plays an audio file into the device audio-in.
To learn more about audio injection, including requirements and limitations, see Audio injection overview.
Parameters
Name | Type | Possible Values | Description |
---|---|---|---|
key | Multimedia |
|
(Required) The full repository path, including directory and file name, where to locate the audio file. Example: Click browse and navigate to the file. The file must first be uploaded to the Perfecto Repository. To view or modify your private repository, see Manage the repository. |
wait | String | nowait | wait |
The execution mode. No wait: (Default) Continue to the next line in the script immediately Wait: Wait for the audio file to complete before continuing to the next line in the script |
Return Value
None
Exceptions
None
Examples
Copy
Java samples
Map<String, Object> params = new HashMap<>();
params.put("key", "PUBLIC:InjectionApps/promptTts.wav");
Object res = driver.executeScript("mobile:audio:inject", params);
Copy
C# sample
Dictionary<String, Object> pars = new Dictionary<String, Object>();
pars.Add("key", "PUBLIC:InjectionApps/promptTts.wav");
driver.ExecuteScript("mobile:audio:inject", pars);