A
A
Alex_8882020-01-30 11:12:31
Python
Alex_888, 2020-01-30 11:12:31

How to save sessions in selenium firefox?

I do this in chrome and it works great!

options = webdriver.ChromeOptions()
phone_acc = input('Введите название для сесии: ')
options.add_argument("user-data-dir=acc/" + session_acc)
options.binary_location = r'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe'
driver = webdriver.Chrome(chrome_options=options, executable_path=r'C:\Users\Administrator\chromedriver_win32\chromedriver.exe')
driver.set_window_position(0, 0)
driver.get('https://......')


But Mozilla is just some kind of ugliness.
I registered the path to the geckodriver in PATH, I prescribe
driver = webdriver.Firefox(options=options, executable_path=r'C:\Users\Administrator\gecodriver\geckodriver.exe')�

Swears Message: 'geckodriver.exe' executable needs to be in PATH.�
If you write it like this
driver = webdriver.Firefox(options=options,capabilities=caps)�

Mozilla starts, but does not go to the site.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
alternativshik, 2020-01-30
@alternativshik

https://stackoverflow.com/questions/40208051/selen...

U
Umpiro, 2020-01-30
@Umpiro

А у вас путь к файлу точно верно прописан?)
C:\Users\Administrator\gecodriver\geckodriver.exe

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question