Skip to main content

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

NameValueDescription
Audio FileStringFull 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.

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");