pytest-selenium icon indicating copy to clipboard operation
pytest-selenium copied to clipboard

DeprecationWarnings on selenium 4

Open icemac opened this issue 4 years ago • 13 comments

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.

icemac avatar Dec 01 '21 14:12 icemac

Working on it.

dosas avatar Dec 01 '21 20:12 dosas

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? 🙇

BeyondEvil avatar Dec 05 '21 14:12 BeyondEvil

will continue after https://github.com/pytest-dev/pytest-selenium/pull/282 is merged

dosas avatar Apr 01 '22 19:04 dosas

Merged @dosas 😊

BeyondEvil avatar Apr 01 '22 19:04 BeyondEvil

v4.0.0 was just released. Any updates here?

BeyondEvil avatar Sep 22 '22 12:09 BeyondEvil

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

dosas avatar Sep 24 '22 09:09 dosas

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 ========

dborin avatar Sep 29 '22 22:09 dborin

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. 🙏 🙇

BeyondEvil avatar Sep 30 '22 10:09 BeyondEvil

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.

BeyondEvil avatar Sep 30 '22 10:09 BeyondEvil