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

deprecation warnings for selenium when using dash_duo #2590

Open
prokie opened this issue Jul 7, 2023 · 9 comments
Open

deprecation warnings for selenium when using dash_duo #2590

prokie opened this issue Jul 7, 2023 · 9 comments
Assignees
Labels
bug something broken P3 not needed for current cycle

Comments

@prokie
Copy link

prokie commented Jul 7, 2023

Describe your context
When using dash_duo and performing tests on our application we get the following deprecation warnings

  C:\repositories\database-gui\venv\Lib\site-packages\selenium\webdriver\remote\remote_connection.py:391: DeprecationWarning:
  HTTPResponse.getheader() is deprecated and will be removed in urllib3 v2.1.0. Instead use HTTPResponse.headers.get(name, default).
  • replace the result of pip list | grep dash below
dash                      2.11.1 
dash-bootstrap-components 1.4.1  
dash-chart-editor         0.0.1a4
dash-core-components      2.0.0  
dash-extensions           1.0.1  
dash-html-components      2.0.0  
dash-table                5.0.0  
dash-testing-stub         0.0.2  

Describe the bug
When running pytest with dash_duo the following deprecation warnings show up.

  C:\repositories\database-gui\venv\Lib\site-packages\selenium\webdriver\remote\remote_connection.py:391: DeprecationWarning:
  HTTPResponse.getheader() is deprecated and will be removed in urllib3 v2.1.0. Instead use HTTPResponse.headers.get(name, default).

Expected behavior

I expect to not get any deprecation warnings.

@prokie
Copy link
Author

prokie commented Jul 7, 2023

This issue seems to be solved if we update requires-testing.txt to allow for selenium version 4.7.0.

# Dependencies necessary for utilizing Dash provided testing utilities
beautifulsoup4>=4.8.2
cryptography<3.4;python_version<"3.7"
lxml>=4.6.2
percy>=2.0.2
pytest>=6.0.2
requests[security]>=2.21.0
selenium>=3.141.0,<=4.7.0
waitress>=1.4.4
multiprocess>=0.70.12
psutil>=5.8.0
dash_testing_stub>=0.0.2

@T4rk1n
Copy link
Contributor

T4rk1n commented Jul 7, 2023

This is on selenium side, should be fixed in selenium 4.6.1 and above.

@T4rk1n T4rk1n closed this as completed Jul 7, 2023
@T4rk1n T4rk1n reopened this Jul 7, 2023
@prokie
Copy link
Author

prokie commented Jul 7, 2023

Seems like the latest working selenium version is 4.9.1. The version latest version 4.10.0 is giving me errors.

E       selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: unrecognized capability: loggingPrefs
E       Stacktrace:
E       Backtrace:
E               GetHandleVerifier [0x00ADA813+48355]
E               (No symbol) [0x00A6C4B1]
E               (No symbol) [0x00975358]
E               (No symbol) [0x0098AC31]
E               (No symbol) [0x009BFCEE]
E               (No symbol) [0x009BF9A8]
E               (No symbol) [0x009C0AD7]
E               (No symbol) [0x009C093C]
E               (No symbol) [0x009BA536]
E               (No symbol) [0x009982DC]
E               (No symbol) [0x009993DD]
E               GetHandleVerifier [0x00D3AABD+2539405]
E               GetHandleVerifier [0x00D7A78F+2800735]
E               GetHandleVerifier [0x00D7456C+2775612]
E               GetHandleVerifier [0x00B651E0+616112]
E               (No symbol) [0x00A75F8C]
E               (No symbol) [0x00A72328]
E               (No symbol) [0x00A7240B]
E               (No symbol) [0x00A64FF7]
E               BaseThreadInitThunk [0x756500C9+25]
E               RtlGetAppContainerNamedObjectPath [0x773C7B4E+286]
E               RtlGetAppContainerNamedObjectPath [0x773C7B1E+238]

venv\Lib\site-packages\selenium\webdriver\remote\errorhandler.py:245: InvalidArgumentException

@T4rk1n
Copy link
Contributor

T4rk1n commented Jul 7, 2023

@prokie I think there was a bug introduced in the version I locked last year that caused our tests to fail, I'll do some more testing to get latest when I have some time or if you want you can create a PR with the new version and see if the tests still fails.

@prokie
Copy link
Author

prokie commented Jul 7, 2023

I can create a PR

@prokie
Copy link
Author

prokie commented Jul 9, 2023

Some of the tests are failing in #2591. I will look into it when I am back from my vacation.

@huong-li-nguyen
Copy link

Hey guys! Have there been any updates on whether the upper bound for selenium will be removed for dash testing? We still get the same deprecation warnings and it seems to be solved by upgrading to 4.6 and higher? See here

However, there is an upper bound on dash testing right now, which prevents that:

selenium>=3.141.0,<=4.2.0

@T4rk1n
Copy link
Contributor

T4rk1n commented Dec 14, 2023

@huong-li-nguyen The issue with removing the upper bound is mostly with our CI percy integration that would also need to be updated otherwise it causes the tests to fail.

We can delete this line to get chrome to work on latest selenium:

options.set_capability("loggingPrefs", {"browser": "SEVERE"})

And selenium now auto download the browser and driver in the latest versions, the circleci config would need to remove the browser download orb.

cc @alexcjohnson

@alexcjohnson
Copy link
Collaborator

@T4rk1n if it's just about our own tests but most users would be able to use the latest Selenium, can we remove the upper bound in requires-testing.txt but add a line with this restriction in requires-ci.txt?

@gvwilson gvwilson added P3 not needed for current cycle bug something broken labels Aug 13, 2024
@gvwilson gvwilson changed the title [BUG] deprecation warnings for selenium when using dash_duo deprecation warnings for selenium when using dash_duo Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken P3 not needed for current cycle
Projects
None yet
Development

No branches or pull requests

6 participants
@gvwilson @alexcjohnson @T4rk1n @prokie @huong-li-nguyen and others