I want to take screenshot of a local html page in full-screen. But the following code produces different dimensional files(screenshots) for different html files. I find it strange as I am doing it full-screen, It should not happen. Please help.
firefox_options = Options()
firefox_options.add_argument("--headless")
driver = webdriver.Firefox(firefox_options=firefox_options)
driver.get('file:///'+q.html.path)
driver.fullscreen_window()
shot = driver.get_screenshot_as_png()
driver.close()