. Advertisement .
..3..
. Advertisement .
..4..
“WebDriverException: unknown error: unexpected command response” is an error occurring in the testing life cycle. This article will discover this error and how to solve it.
How Does The Error “WebDriverException: unknown error: unexpected command response” Occur?
Selenium is a free, open-source automated testing framework that validates applicants from different platforms or browsers. It allows you to write test scripts using multiple programming languages like Python, Java, PHP, C#, etc.
You may encounter this unexpected “WebDriverException: unknown error: unexpected command response” while testing your codes using Selenium Software. Following is the snippet for the error:
WebDriverException: unknown error: unexpected command response (Session info: chrome=103.0.5060.66)
And below are some possible solutions to resolve this error.
How To Solve “WebDriverException: unknown error: unexpected command response”?
METHOD 1: Downgrade Chrome
- Downgrade Chrome Browser
This error is happening on Chrome version 103.0.5060.114. To solve this error, you must downgrade your Chrome Browse to version 102.
Before you uninstall your Chrome Browser, you may lose all your Data. Ensure you have backup Chrome Data on your computer.
- Downgrade Chrome Web Driver
You have to downgrade your Chrome to version 102. If you already use Chrome version 102, download ChromeDriver 102.0.5005.61 and assign Selenium with this driver path.
For Window users:
Open the zip file and move the contents to “C:\Program Files\Google\Chrome Beta\Application\chrome.exe”.
For Mac users:
Open the zip file and move the contents to “/Applications/Google Chrome Beta.app/Contents/MacOS/Google Chrome Beta”
METHOD 2: Matching Versions of Browser and WebDriver
The different versions of Chrome Browser and Chrome Web Driver also result in this error. This error will occur if you use the Chrome Browser version 103 and the WebDriver version 102.
Installing the identical versions of Chrome and Chrome Web Driver will solve the problem.
METHOD 3: Upgrade Chrome
As I mentioned above, this error happens on Chrome version 103. So you just need to upgrade to Chrome Beta version 104. Below are the steps for you to follow.
- Step 1: Install Chrome Beta here: https://www.google.com/chrome/beta/
- Step 2: Install ChromeDriver version 104: https://chromedriver.storage.googleapis.com/index.html?path=104.0.5112.20/
- Step 3: Assign Selenium with this driver path.
- For Window users: Open the zip file and move the contents to “C:\Program Files\Google\Chrome Beta\Application\chrome.exe”.
- For Mac users: Open the zip file and move the contents to “/Applications/Google Chrome Beta.app/Contents/MacOS/Google Chrome Beta”.
With these two solutions, we believe the issue will be resolved.
Conclusion
With the solutions we give you above, the error “WebDriverException: unknown error: unexpected command response” would be resolved. The Selenium community has closed this issue because the error is from the Chrome team. Thank you for visiting our website. Please leave a comment below about what you think or any problem with this error.
Read more
Leave a comment