DEV Community

Discussion on: How did you setup Capybara + Webdrivers on WSL for testing?

Collapse
 
amorpheuz profile image
Yash Dave • Edited

Hey, the issues I was facing got resolved once WSL2 came out. With WSL2, it became possible to install chrome directly to my Linux distro without any problems. I followed the following steps for Ubuntu 18.04 with bash:

sudo apt install fonts-liberation libappindicator3-1 libasound2 libgbm1 libnspr4 libnss3 libxss1 xdg-utils
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
echo 'alias chrome="google-chrome-stable"' >> ~/.bashrc
exec $SHELL
Enter fullscreen mode Exit fullscreen mode

If you get an error while running dpkg, run sudo apt --fix-broken install after which run the dpkg command again. You can run the following command to test your install:

chrome --headless --disable-gpu --dump-dom https://www.chromestatus.com/
Enter fullscreen mode Exit fullscreen mode
Thread Thread
 
mirzalazuardi profile image
Mirzalazuardi Hermawan

thanks , it works. this what I been searching for