DeprecationWarnings on selenium 4
When running a customer project's tests I get the following deprecation warnings:
/.../selenium-4.1.0-py3.9.egg/selenium/webdriver/chrome/webdriver.py:70: DeprecationWarning: desired_capabilities has been deprecated, please pass in a Service object
super(WebDriver, self).__init__(DesiredCapabilities.CHROME['browserName'], "goog",
/.../selenium-4.1.0-py3.9.egg/selenium/webdriver/chrome/webdriver.py:70: DeprecationWarning: service_log_path has been deprecated, please pass in a Service object
super(WebDriver, self).__init__(DesiredCapabilities.CHROME['browserName'], "goog",
Using pytest-selenium = 2.0.1 on selenium = 4.1.0.
Working on it.
Working on it.
Hey.
Between the 15th and 22nd of December, I'm taking vacation with the explicit purpose of working on this plugin (and the other plugins I maintain).
Would you be interested in helping me during that time? Mainly with reviewing PRs and maybe triaging issues?
If you are please shoot me an email at jimbrannlund at fastmail dot com.
Maybe @ssbarnea and @gnikonorov are able to help out as well? 🙇
will continue after https://github.com/pytest-dev/pytest-selenium/pull/282 is merged
Merged @dosas 😊
v4.0.0 was just released. Any updates here?
I have been trying to work on it but could not get it done on time. The desired capabilities are an essential part of this plugin for the cloud based drivers.
I pushed some of the work to this fork
Seeing this with Python Selenium 4.5 and pytest-selenium 4.0.0
========== warnings summary ===========
tests/selenium/test_milestones.py::TestMilestones::test_add_new_to_ip_with_required_attr
/home/dborin/.pyenv/versions/3.9.6/envs/upgrade-pytest-packages/lib/python3.9/site-packages/selenium/webdriver/chrome/webdriver.py:69: DeprecationWarning: desired_capabilities has been deprecated, please pass in a Service object
super().__init__(DesiredCapabilities.CHROME['browserName'], "goog",
tests/selenium/test_milestones.py::TestMilestones::test_add_new_to_ip_with_required_attr
/home/dborin/.pyenv/versions/3.9.6/envs/upgrade-pytest-packages/lib/python3.9/site-packages/selenium/webdriver/chrome/webdriver.py:69: DeprecationWarning: service_log_path has been deprecated, please pass in a Service object
super().__init__(DesiredCapabilities.CHROME['browserName'], "goog",
-- Docs: https://docs.pytest.org/en/stable/warnings.html
============== 1 passed, 2 warnings in 11.74s ========
Seeing this with Python Selenium 4.5 and pytest-selenium 4.0.0
========== warnings summary =========== tests/selenium/test_milestones.py::TestMilestones::test_add_new_to_ip_with_required_attr /home/dborin/.pyenv/versions/3.9.6/envs/upgrade-pytest-packages/lib/python3.9/site-packages/selenium/webdriver/chrome/webdriver.py:69: DeprecationWarning: desired_capabilities has been deprecated, please pass in a Service object super().__init__(DesiredCapabilities.CHROME['browserName'], "goog", tests/selenium/test_milestones.py::TestMilestones::test_add_new_to_ip_with_required_attr /home/dborin/.pyenv/versions/3.9.6/envs/upgrade-pytest-packages/lib/python3.9/site-packages/selenium/webdriver/chrome/webdriver.py:69: DeprecationWarning: service_log_path has been deprecated, please pass in a Service object super().__init__(DesiredCapabilities.CHROME['browserName'], "goog", -- Docs: https://docs.pytest.org/en/stable/warnings.html ============== 1 passed, 2 warnings in 11.74s ========
Would you mind creating a small repro repo?
It really speeds up my ability to solve the issue. 🙏 🙇
Maybe hold off on that, as I think the repo created for me in this issue: https://github.com/pytest-dev/pytest-selenium/issues/284 actually covers this issue as well.