WaitForAudioPlayEnd
Description
Use this command to wait until the audio play is completed. Once the audio play is completed the normal execution continues.
Audio play begins and the next step won't be performed until one of the following happens:
- The file ends.
- The waiting timeout ends.
Parameters
Name | Value | Description |
---|---|---|
Timeout | Integer | Time in milliseconds until execution ends. |
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
Wait for audio play end - 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.waitForAudioPlayEnd", 10_000);
WaitForAudioPlayEnd
DesiredCapabilities dc = new DesiredCapabilities();
driver = new AndroidDriver(new URL("<server>"), dc);
seetest = new SeeTestClient(driver);
dc.setCapability(MobileCapabilityType.UDID, "deviceid");
...
...
// Plays the Audio file
seetest.startAudioPlay("C:\\AudioFilesToPlay\\OpenWaze.wav");
//Waits till the previous audio file play is completed (10000 milliseconds).
seetest.waitForAudioPlayEnd(10000);