Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warnings when using Firefox and IE (Python) #9678

Closed
JohnA2 opened this issue Jul 23, 2021 · 2 comments
Closed

Warnings when using Firefox and IE (Python) #9678

JohnA2 opened this issue Jul 23, 2021 · 2 comments
Assignees
Labels

Comments

@JohnA2
Copy link

JohnA2 commented Jul 23, 2021

💥 Regression Report

I noticed that if I run tests using Chrome, there are zero warnings, but with Firefox or IE, Selenium itself produces some deprecation warnings. I know it's only warnings, but the problem is each tests produces 1 or 2 of them. If there are a lot of tests, it takes some time to go over all warnings to check if they are real warnings that should be fixed or they are just these, caused by the Selenium code itself. Selenium 3 didn't have this problem.

Last working Selenium version

Worked up to version: 3.141.0

Stopped working in version: 4.x

To Reproduce

  • Install pytest using pip install pytest.
  • Save the following code to test_warnings.py.
from selenium.webdriver import Chrome, Firefox, Ie

def test_warnings():
    driver = <insert Chrome or Firefox or Ie here>()
    driver.get('http://example.com')
    driver.quit()
  • Execute pytest to run the test case.

Expected behavior

No warnings.

Actual behavior

No warnings with Chrome only. Warnings with Firefox and IE.

================================= warnings summary =================================
test_warnings.py::test_warnings
...\lib\site-packages\selenium\webdriver\firefox\webdriver.py:182: DeprecationWarning: desired_capabilities has been deprecated, please pass in an Options object with options kwarg
RemoteWebDriver.init(

-- Docs: https://docs.pytest.org/en/stable/warnings.html
============================== 1 passed, 1 warning in 9.95s ==============================

================================= warnings summary =================================
test_warnings.py::test_warnings
...\lib\site-packages\selenium\webdriver\ie\webdriver.py:119: DeprecationWarning: desired_capabilities has been deprecated, please pass in an Options object with options kwarg
RemoteWebDriver.init(

test_warnings.py::test_warnings
...\lib\site-packages\selenium\webdriver\ie\webdriver.py:119: DeprecationWarning: keep_alive has been deprecated. We will be using True as the default value as we start removing it.
RemoteWebDriver.init(

-- Docs: https://docs.pytest.org/en/stable/warnings.html
============================== 1 passed, 2 warnings in 5.17s ==============================

Environment

OS: any
Browser: Firefox and Internet Explorer
Browser version: any
Browser Driver version: latest
Language Bindings version: Python 4.0.0b4
Selenium Grid version (if applicable): N/A

@JohnA2
Copy link
Author

JohnA2 commented Aug 2, 2021

@AutomatedTester I've tested your commit. 1 Firefox and 1 IE warnings were fixed, but the second IE warning still remains:

...\lib\site-packages\selenium\webdriver\ie\webdriver.py:120: DeprecationWarning: keep_alive has been deprecated. We will be using True as the default value as we start removing it.
RemoteWebDriver.init(

@github-actions
Copy link

github-actions bot commented Sep 5, 2021

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants