https://malinowski.dev/recording-headless-selenium-tests-to-mp4.html this is the link i am using but i don't even know how to do all these.I don't know whether i should run all the commands in that as a single script or should i run the xvfb command in one terminal and then open a new window for ffmpeg command for x11 grab.So,can anyone elaborate the steps for running test cases in xvfb and record the same.
.sh
file(for Linux) and enter the below linesxvfb-run --listen-tcp --server-num 93 -s "-ac -screen 0 1920x1080x24" (--command for running the program--) &
export DISPLAY=:93
ffmpeg -f x11grab -video_size 1920x1080 -i :93 -codec:v libx264 -r 12 video.mp4
System.setProperty("webdriver.gecko.driver","/home/saran/Downloads/geckodriver");
Map<String, String> environment = new HashMap<>();
environment.put("DISPLAY", ":93");
GeckoDriverService service = new GeckoDriverService.Builder().usingAnyFreePort().withEnvironment(environment).build();
driver = new FirefoxDriver(service);
.sh
file