This PR #187 changed WSL detection to detect both WSLv1 and WSLv2 as running in WSL and use Chrome on Windows for both versions. But it doesn't work on WSLv2 out of the box.
WSL2 networking is different from WSL1 and you can't connect from the WSL2 Linux on Chromedriver running on Windows using 127.0.0.1:9515, see: microsoft/WSL#4619
This PR changes the wsl detection to be explicity about v1 and only uses Chromedriver on Windows if it is WSLv1, as it doesn't work on WSLv2.
Uses the kernel version to detect if the current kernel version is V1 or V2
This is the correct implementation for https://github.com/titusfortner/webdrivers/pull/196 and all the description there applies here
Fixes #192 and #197
This PR #187 changed WSL detection to detect both WSLv1 and WSLv2 as running in WSL and use Chrome on Windows for both versions. But it doesn't work on WSLv2 out of the box.
WSL2 networking is different from WSL1 and you can't connect from the WSL2 Linux on Chromedriver running on Windows using 127.0.0.1:9515, see: microsoft/WSL#4619
This PR changes the wsl detection to be explicity about v1 and only uses Chromedriver on Windows if it is WSLv1, as it doesn't work on WSLv2.