I have a small Python app that records a webpage/ web animation with Selenium and FFmpeg. This Worked until yesterday but it seems that the "--disable-infobars" feature has been removed. How can I overcome this because otherwise I am forced to add padding to the top and record from the padding?
Below is the sample code:-
#!/usr/bin/env python3
from pyvirtualdisplay import Display
import os
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options
url = "http://foo.bar"
os.environ['DISPLAY'] = ':99'
display = Display(visible=0, size=(1920, 1080))
display.start()
display_port = os.environ['DISPLAY']
chrome_driver_path = "/usr/local/bin/chromedriver"
options = webdriver.ChromeOptions()
options.add_argument('--disable-gpu')
options.add_argument('--kiosk')
options.add_argument('--window-position=0,0')
options.add_argument('--disable-infobars');
options.add_argument('--window-size=1920,1080')
browser = webdriver.Chrome(executable_path=chrome_driver_path, chrome_options=options)
browser.get(url)
command = "/home/fidox/bin/ffmpeg -r 60 -t {} -video_size {}x{} -framerate 60 -f x11grab -i foo.mp4 f-an {}".format(10,1920,1080,display_port)
os.system(command)
self.browser.quit()
display.stop()