public override void Execute() { //Select Music file to be played StartStep(); bool res2 = CL.EA.UI.Utils.EPG_Milestones_SelectMenuItem("Music"); if (!res2) { FailStep(CL, "Failed to navigate to Music"); } CL.EA.UI.Utils.SendIR("SELECT"); res2 = CL.EA.UI.Utils.EPG_Milestones_SelectMenuItem("All Music"); CL.EA.UI.Utils.SendIR("SELECT"); if (!res2) { FailStep(CL, "Failed to navigate to All Music"); } string CurrentAudioFile; string FirstAudioFile; string timeStamp = ""; res = CL.IEX.IR.SendIR("SELECT_DOWN", out timeStamp, 3); if (!res.CommandSucceeded) { FailStep(CL, res, "Failed to Send IR Key SELECT_DOWN"); } CL.IEX.Wait(3); res = CL.IEX.MilestonesEPG.GetEPGInfo("title", out FirstAudioFile); if (!res.CommandSucceeded) { FailStep(CL, res, "Failed to Get audio file Name"); } if (!AudioFile.Equals(FirstAudioFile)) { do { CL.IEX.Wait(3); res = CL.IEX.IR.SendIR("SELECT_UP", out timeStamp, 3); if (!res.CommandSucceeded) { FailStep(CL, res, "Failed to Send IR Key SELECT_UP"); } CL.IEX.Wait(3); res = CL.IEX.MilestonesEPG.GetEPGInfo("title", out CurrentAudioFile); if (!res.CommandSucceeded) { FailStep(CL, res, "Failed to Get audio file Name"); } if (AudioFile.Equals(CurrentAudioFile)) { break; } } while (!CurrentAudioFile.Equals(FirstAudioFile)); } //Verify if the item is of type Music content string audioContent = ""; res = CL.IEX.MilestonesEPG.GetEPGInfo("object", out audioContent); if (!res.CommandSucceeded) { FailStep(CL, res, "Failed to Get audio content object"); } if (audioContent != "[object AudioContent]") { FailStep(CL, "Targeted content is not audio object"); } //Verify is the item is playable string isPlayable = ""; res = CL.IEX.MilestonesEPG.GetEPGInfo("isPlayable", out isPlayable); if (!res.CommandSucceeded) { FailStep(CL, res, "Failed to Get isPlayable"); } if (isPlayable != "true") { FailStep(CL, "Targeted audio content is not playable"); } //Select the item CL.IEX.Wait(3); res = CL.IEX.IR.SendIR("SELECT", out timeStamp, 3); if (!res.CommandSucceeded) { FailStep(CL, res, "Failed to Send IR Key SELECT"); } //Verify if the selected file is same as audio file res = CL.IEX.MilestonesEPG.GetEPGInfo("title", out CurrentAudioFile); if (!res.CommandSucceeded) { FailStep(CL, res, "Failed to Get audio file Name"); } if (!AudioFile.Equals(CurrentAudioFile)) { FailStep(CL, res, "Selected file name is not same as targeted file name"); } //Play Video file res = CL.IEX.IR.SendIR("SELECT", out timeStamp, 3); if (!res.CommandSucceeded) { FailStep(CL, res, "Failed to Send IR Key SELECT"); } PassStep(); }