I am using selenium and want to use separate firefox profiles for 3 different scripts. Is this possible?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Not sure how you are executing your scripts, but when you instantiate your
webdriverobject, you can specify aFirefoxProfileas thefirefox_profileargument. This is done by creating aFirefoxProfileobject (example below) and providing the path to your target profile as the argument:To the best of my knowledge you can’t modify the profile after the
driverhas been instantiated (I could be wrong about this though – worth experimenting if that is what you need to do 🙂 ). That being the case, in each of your scripts you would create a profile that pointed to the profile you want to use, and then instantiate thedriverwith thefirefox_profileargument pointed to theprofileobject created byFirefoxProfile.