Im trying to run a very simple robot framework test of launching a browser from github actions. I have installed chrome and chrome browser and gave necessary permissions. But tests are failing with error “WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally. (unknown error: DevToolsActivePort file doesn’t exist) (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)”
Dependencies in github actions:
sudo apt-get update
sudo apt -y --force-yes install fonts-liberation libasound2 libatk-bridge2.0-0 libatk1.0-0 libatspi2.0-0 libcairo2 libcups2 libdrm2 libgbm1 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libx11-6 libxcb1 libxcomposite1 libxdamage1 libxext6 libxfixes3 libxkbcommon0 libxrandr2 xdg-utils
sudo apt -y --force-yes install wget
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
sudo apt install -f
google-chrome --version
wget -N https://chromedriver.storage.googleapis.com/106.0.5249.61/chromedriver_linux64.zip -P ~/
unzip ~/chromedriver_linux64.zip -d ~/
rm ~/chromedriver_linux64.zip
echo $PATH
sudo mv -f ~/chromedriver /usr/local/bin
sudo chmod +x /usr/local/bin/chromedriver
echo $PATH
Parent setup:
Launch URL
${chrome_options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys, selenium.webdriver
Call Method ${chrome_options} add_argument --no-sandbox
Call Method ${chrome_options} add_argument --disable-extensions
Call Method ${chrome_options} add_argument --headless
Call Method ${chrome_options} add_argument --disable-gpu
Create Webdriver Chrome chrome_options=${chrome_options}
Go To ${URL}