问题
Trying to find a way to switch the active profile in a Selenium Firefox driver. This question about multiple Firefox profiles states that creating and using multiple profiles is possible. However, it would be better if there were some way to switch the active Firefox profile within the driver session - instead of starting a new one.
How can I switch the active Firefox profile with Selenium?
Thanks very much!
回答1:
You can't. Selenium does not let you change Firefox profiles, and I'm pretty sure even Firefox doesn't.
来源:https://stackoverflow.com/questions/16406271/how-to-switch-firefox-profile-with-selenium-without-instantiating-a-new-driver