V
V
Vyacheslav Grachunov2019-09-27 22:26:59
Python
Vyacheslav Grachunov, 2019-09-27 22:26:59

How to create a normal Firefox profile in python through Selenium?

How to create a normal Firefox profile in python through Selenium?
What is needed is a normal profile that is saved to disk, and not an empty anonymous one, as with a normal start.
Found something for Java but can't seem to find anything for Python. Java, unfortunately, I can not

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Yakushenko, 2019-09-27
@Qwentor

from selenium import webdriver
from selenium.webdriver.firefox.options import Options

options = Options()
options.add_argument('-profile')
options.add_argument('D:/путь_куда_сохранить/профиль')

driver = webdriver.Firefox(options=options,
                           executable_path='geckodriver.exe',
                           service_args=['--marionette-port', '2828'])

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question