Ramco Ramco

Ramco Ramco

  • 437
  • 3.4k
  • 548.4k

Videos are not running

May 1 2024 5:00 AM

Hi Naimish

  I have below code. What is happening . It opens 1,2,3, video but only last one is run. I want first video should run then second,third and so on.

foreach (var video in videos)
{
    _driver.Navigate().GoToUrl(video);
    await Task.Delay(1000); // This is just to simulate the time it takes to play the video
}


var videos = new List<string>
{
    "youtu.be/f7V5l5-EU",
    "youtu.be/WI-KwauaM",
    "youtu.be/_KOUp4WBo0",
    "youtu.be/5CPMILQrE"
};

Answers (2)