I
I
Ivan Yakushenko2019-05-29 10:42:34
Python
Ivan Yakushenko, 2019-05-29 10:42:34

Why is the Firefox Selenium profile folder not working?

With this option:

driver_options = Options()
profile_path = FirefoxProfile('D:\\Develop\\redirect_watotg\\profile.default')
driver_options.profile(profile_path)
driver = webdriver.Firefox(options=driver_options, executable_path='D:\\Develop\\redirect_watotg\\Lib\\geckodriver.exe')

Mistake:
Traceback (most recent call last):
File "D:/Develop/redirect_watotg/main.py", line 12, in
driver_options.profile(profile_path)
TypeError: 'NoneType' object is not callable

With this option:
driver_options = Options()
driver_options.add_argument('-profile')
driver_options.add_argument('D:\\Develop\\redirect_watotg\\profile.default')
driver = webdriver.Firefox(options=driver_options, executable_path='D:\\Develop\\redirect_watotg\\Lib\\geckodriver.exe')

The browser starts, Firefox files are created in the folder I specified, but the script does nothing at all, even driver.get () is not executed.
I also tried to specify the profile as the firefox_profile= argument for webdriver.Firefox - it doesn’t work, the browser starts up, the script works fine, but the profile files are created somewhere in the User\Temp\ area, but not in the one I specified.
Tried different spellings of folder names - upper/lowercase letters, different paths, etc.
Nothing works. What could be wrong?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Ivan Yakushenko, 2019-05-29
@kshnkvn

Following the official Firefox documentation, it was necessary to add the service_args=["--marionette-port", "2828"] argument to webdriver.Firefox, otherwise the geckodriver could not connect and, accordingly, the script was not executed.
That's how everything works.

A
Andrey Novikov, 2017-06-13
@dima9595

If you are writing standard authentication, and not some specific one, why not use the one that is out of the box?

Auth::routes();
или
Route::auth()

A
Alexander Sisyukin, 2017-06-12
@Caarl

If everywhere is empty in the logs and it’s not clear, I would try to do Auth::attempt without a pass, I would look at the session being created, if not, it means something with the creation of the session, if the default settings mean you have a session on files (it seems they are in the storage folder are stored) and most likely that there are no rights to the session directory, it may also be that the pass was not converted to a hash, but this seems to me unlikely.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question