StartAudioPlay
Description
This starts playing an audio file to the device. The file is played until it ends. The test proceeds while the file is played unless WaitForAudioPlayEnd
is used. For more information, see WaitForAudioPlayEnd.
info
Only Wave files are supported.
Parameters
Name | Value | Description |
---|---|---|
Audio File | String | Full path to audio file In Appium Server (Appium Open Source) file unique name can be provided in the following format: cloud:file_unique_name For more information, see Using File Repository. |
Usage
info
Replace <server> with the appropriate URL.
- Public Continuous Testing Cloud - https://cloud.seetest.io/wd/hub/.
- Dedicated Continuous Testing Cloud environment - Your own domain. For example: https://company.experitest.com/wd/hub/
- On-premises Continuous Testing Cloud environment - Your designated URL. For example: https://company.com/wd/hub
Audio Play - Using file repository
// File with unique name my_music must exist in file repository
driver.executeScript("seetest:client.startAudioPlay", "cloud:my_music");
// ...
driver.executeScript("seetest:client.stopAudioPlay");
StartAudioPlay
DesiredCapabilities dc = new DesiredCapabilities();
driver = new AndroidDriver(new URL("<server>"), dc);
seetest = new SeeTestClient(driver);
dc.setCapability(MobileCapabilityType.UDID, "deviceid");
...
...
seetest.startAudioPlay("C:\\AudioFilesToPlay\\OpenWaze.wav");