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

[py] Add debug logging for urllib response data #10568

Merged
merged 3 commits into from
Apr 20, 2022

Conversation

symonk
Copy link
Member

@symonk symonk commented Apr 20, 2022

Adds a little debug logging for urllib responses:

  • status code
  • decoded data
  • headers (not sure on this, added it to discuss)
# example:
DEBUG    selenium.webdriver.remote.remote_connection:remote_connection.py:347 POST http://localhost:45941/session/466ce33e335f29ddb99ddc51b738c3fd/element {"using": "css selector", "value": "[id=\"multilinelink\"]"}
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:45941 "POST /session/466ce33e335f29ddb99ddc51b738c3fd/element HTTP/1.1" 200 88
DEBUG    selenium.webdriver.remote.remote_connection:remote_connection.py:369 Remote response: response.status=200 | data='{"value":{"element-6066-11e4-a52e-4f735466cecf":"a7a58249-b553-442a-a4ed-7b48533749ef"}}' | HTTPHeaderDict({'Content-Length': '88', 'Content-Type': 'application/json; charset=utf-8', 'cache-control': 'no-cache'})
DEBUG    selenium.webdriver.remote.remote_connection:remote_connection.py:398 Finished Request

@codecov-commenter
Copy link

codecov-commenter commented Apr 20, 2022

Codecov Report

Merging #10568 (d65fdb0) into trunk (989f7fd) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##            trunk   #10568      +/-   ##
==========================================
- Coverage   45.03%   45.02%   -0.01%     
==========================================
  Files          85       85              
  Lines        5507     5508       +1     
  Branches      268      268              
==========================================
  Hits         2480     2480              
- Misses       2759     2760       +1     
  Partials      268      268              
Impacted Files Coverage Δ
py/selenium/webdriver/remote/remote_connection.py 30.03% <0.00%> (-0.12%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fbef19e...d65fdb0. Read the comment docs.

@diemol diemol merged commit 86ee772 into SeleniumHQ:trunk Apr 20, 2022
elgatov pushed a commit to elgatov/selenium that referenced this pull request Jun 27, 2022
* debug urllib response status, decoded data and headers

* use `python3.7` compliant f-strings

Co-authored-by: Diego Molina <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants