Search code examples
seleniumselenium-webdriverwebdriverzalenium

Download recorded video of UI test case from Zalenium/Selenium


I've setup a Zalenium in Kubernates (in the cloud not local minikube or anything else), It works perfectly and everything is OK. When I run a test case with recordVideo capability on, Zalenium records the test and stores a video inside a container, I can access the video via Zalenium's dashboard, but I want to download the video programmatically (not by visiting the dashboard) by RemoteWebDriver or something else, the video's name is dynamically generated and it consists of sessionId (known) and a timestamp which makes it impossible to generate by client to construct a URL to the video file, I wonder if anyone has already experience with Zalenium and knows how to download the video ?


Solution

  • I found a workaround which it helps in my scenario, Zalenium exposes a Servlet (DashboardInformationServlet) which provides information about tests that have been done so far, this servlet returns a list of objects, each object describes the test and gives a path to the video recording of the test, the information is enough to automate further steps I need to take.