Skip to main content

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

NameValueDescription
TimeoutIntegerTime in milliseconds until execution ends.

Usage

info

Replace <server> with the appropriate URL.

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