Using @DebanjanB's reply in How to make firefox headless programatically in Selenium with python?, I'm trying to use his code and change it to use --screenshot argument, but it's not working. This is my code
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
options = Options()
options.add_argument( "--screenshot test.jpg http://google.com/" )
driver = webdriver.Firefox( firefox_options=options )
driver.get('http://google.com/')
print driver.title
driver.quit()
sys.exit()
Can someone let me know please how to use --screenshot with Python and Firefox? Thanks