Skip to content

Conversation

bonigarcia
Copy link
Member

Description

This PR implements a new argument for SM: --log-level, e.g.:

./selenium-manager --browser chrome --log-level debug

[2024-02-09T14:50:16.495Z DEBUG] chromedriver not found in PATH
[2024-02-09T14:50:16.496Z DEBUG] chrome detected at C:\Program Files\Google\Chrome\Application\chrome.exe
[2024-02-09T14:50:16.497Z DEBUG] Running command: wmic datafile where name='C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe' get Version /value
[2024-02-09T14:50:16.573Z DEBUG] Output: "\r\r\n\r\r\nVersion=121.0.6167.161\r\r\n\r\r\n\r\r\n\r"
[2024-02-09T14:50:16.578Z DEBUG] Detected browser: chrome 121.0.6167.161
[2024-02-09T14:50:16.579Z DEBUG] Required driver: chromedriver 121.0.6167.85
[2024-02-09T14:50:16.580Z DEBUG] chromedriver 121.0.6167.85 already in the cache
[2024-02-09T14:50:16.580Z INFO ] Driver path: C:\Users\boni\.cache\selenium\chromedriver\win64\121.0.6167.85\chromedriver.exe
[2024-02-09T14:50:16.580Z INFO ] Browser path: C:\Program Files\Google\Chrome\Application\chrome.exe
./selenium-manager --browser chrome --log-level TRACE

[2024-02-09T14:50:56.293Z TRACE] Reading metadata from C:\Users\boni\.cache\selenium\se-metadata.json
[2024-02-09T14:50:56.294Z TRACE] Checking chromedriver in PATH
[2024-02-09T14:50:56.311Z DEBUG] chromedriver not found in PATH
[2024-02-09T14:50:56.312Z DEBUG] chrome detected at C:\Program Files\Google\Chrome\Application\chrome.exe
[2024-02-09T14:50:56.312Z TRACE] Path C:\Program Files\Google\Chrome\Application\chrome.exe has been escaped to C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe
[2024-02-09T14:50:56.312Z TRACE] Using shell command to find out chrome version
[2024-02-09T14:50:56.313Z DEBUG] Running command: wmic datafile where name='C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe' get Version /value
[2024-02-09T14:50:56.380Z DEBUG] Output: "\r\r\n\r\r\nVersion=121.0.6167.161\r\r\n\r\r\n\r\r\n\r"
[2024-02-09T14:50:56.384Z TRACE] The version of chrome is 121.0.6167.161
[2024-02-09T14:50:56.384Z DEBUG] Detected browser: chrome 121.0.6167.161
[2024-02-09T14:50:56.385Z TRACE] Reading metadata from C:\Users\boni\.cache\selenium\se-metadata.json
[2024-02-09T14:50:56.385Z TRACE] Driver TTL is valid. Getting chromedriver version from metadata
[2024-02-09T14:50:56.386Z DEBUG] Required driver: chromedriver 121.0.6167.85
[2024-02-09T14:50:56.386Z DEBUG] chromedriver 121.0.6167.85 already in the cache
[2024-02-09T14:50:56.386Z INFO ] Driver path: C:\Users\boni\.cache\selenium\chromedriver\win64\121.0.6167.85\chromedriver.exe
[2024-02-09T14:50:56.386Z INFO ] Browser path: C:\Program Files\Google\Chrome\Application\chrome.exe

Motivation and Context

Requested in #13437.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@bonigarcia bonigarcia merged commit 5bee19e into trunk Feb 13, 2024
@bonigarcia bonigarcia deleted the sm_log_level branch February 13, 2024 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-rust Rust code is mostly Selenium Manager
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants