Selenium py3.8+ DepreciationWarnings - where to find doc to update code?

Akkana Peck akkana at
Sat Oct 16 12:02:39 EDT 2021

jkk writes:
> Selenium 3.141+
> python 3.8+
> ubuntu 20.04 or windows 10
> I'm trying to upgrade code from py3.6+ to py3.8+ and I'm getting several DepreciationWarnings.
> Can someone point me to where I can find the documentation that explains how to to remedy these warnings. What are the new preferred coding practices?

I've also been looking for that (Selenium 4.0.0a1, Python 3.9.5,
Ubuntu 21.04). For instance:

>>> from selenium import webdriver
>>> profiledir = "/path/to/profile/dir"
>>> driver = webdriver.Firefox(firefox_profile=profiledir)
<stdin>:1: DeprecationWarning: firefox_profile has been deprecated, please pass in a Service object

What is a Service object and how do you use it to pass in profiles?
I've found API references like
but how do you create one, or use it to reference a specific profile?
I haven't been able to find any examples. 


More information about the Python-list mailing list