Please anybody help me in my research on how I can automate video streaming testing using Selenium.
Here is the process to automate video streaming using Selenium
Ensure that all UI elements in the player have distinct ids. The main thing is that your automation code should interact with the UI elements in a different way. For example, I used to build stories to add the appropriate ids for the flows once I identified distinct flows to automate my Video player. The developers would then pick up the story and fill in the missing ids for those UI elements in that flow.
I was automating video players for both Android and iOS. The Appium UI inspector is your greatest ally in determining which ids are missing from the UI elements for both players.
It specifies which ids are already present and which need to be added. I had the UI inspector active at all instances. You will be responsible for automating the process of determining whether or not a stream is streaming, i.e., how do you know a specific movie is playing on the player? I used some simple reasoning to accomplish this.
I’ll retrieve the player’s starting duration, which is 0:00, and then after 15 seconds, I’ll get the playing time duration, which is around 0:15. Then I’ll run a comparison to make sure the time isn’t still 0:00.
This will, to some part, inform me whether or not the film is proceeding. I also had a strategy in place to move the scrubber bar to the center of the scrubber line and verify the move would still work. For this, I get the complete time length of the movie, which I can acquire via an id (since it is visible on the screen), divide it in half, and then programmatically shift the scrubber to this time duration using its id.
We also had some configuration files that controlled some characteristics of the video player, like the duration of time after which the player controllers will disappear from the screen after inactivity, the ability to show specific icons on the screen, like Captions, Subtitles, Language, etc. I had a secondary config file where I tweaked some of the default settings. For example, instead of the typical 5 seconds, I increased the time out for the player’s default controls to disappear to 2 minutes. This allowed me ample time to validate various player aspects in the UI when the player was first launched.
When running tests in a CI/CD pipeline, ensure sure the Jenkins machine, for example, is directly linked to the internet through an ethernet cable for a more steady internet connection. Also, ensure that the test devices connected to your Jenkins system have a stable, non-spotty Wi-Fi connection. This will prevent test failures caused by an inadequate internet connection.