I have the following script:
#!/usr/bin/python3
from selenium import webdriver
import time
def getProfile():
profile = webdriver.FirefoxProfile()
profile.set_preference("browser.privatebrowsing.autostart", True)
return profile
def main():
browser = webdriver.Firefox(firefox_profile=getProfile())
#browser shall call the URL
browser.get("http://www.google.com")
time.sleep(5)
browser.quit()
if __name__ == "__main__":
main()
How can I manage Firefox to start in private mode?