I'm tying to create multiple windows of one website, so I need new identity for each. Private mode would be nice solution for me, I think. But old ways to do it doesn't give result:
firefox_profile = webdriver.FirefoxProfile()
firefox_profile.set_preference("browser.privatebrowsing.autostart", True)
browser = webdriver.Firefox(firefox_profile=firefox_profile)
def main():
browser.switch_to.new_window('window')
browser.get("https://example.com")
I couldn't find any information in docks, so maybe you can help
I figured how to make private mode for firefox:
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
def main():
firefox_options = Options()
firefox_options.add_argument('-private')
driver = webdriver.Firefox(options=firefox_options)
# driver.get("https://example.com")
if __name__ == "__main__":
main()
I've commented line with get to make sure that browser truly opens in private mode. You can see it in tab name.
But it didn't gave me new identity for each new window as I expected.