I'm trying to setup a container to test with RobotFramework on chrome.
But when I run my container I keep getting a WebDriverException. I've searched but couldn't find any fix that actually works for me.
This is my Dockerfile
FROM python:3
RUN apt-get update -y
# Dependencies
RUN apt-get install -y \
apt-utils \
build-essential \
fonts-liberation \
gconf-service \
libappindicator1 \
libasound2 \
libcurl3 \
libffi-dev \
libgconf-2-4 \
libindicator7 \
libnspr4 \
libnss3 \
libpango1.0-0 \
libssl-dev \
libxss1 \
python-dev \
python-pip \
python-pyasn1 \
python-pyasn1-modules \
unzip \
wget \
xdg-utils \
xvfb \
libappindicator3-1 \
libatk-bridge2.0-0 \
libgtk-3-0 \
lsb-release
# Install Chrome for Selenium
RUN curl https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -o /chrome.deb
RUN dpkg -i /chrome.deb || apt-get install -yf
RUN rm /chrome.deb
# Install chromedriver for Selenium
RUN curl https://chromedriver.storage.googleapis.com/2.42/chromedriver_linux64.zip -o /usr/local/bin/chromedriver
RUN unzip -o /usr/local/bin/chromedriver -d /usr/local/bin
RUN chmod +x /usr/local/bin/chromedriver
WORKDIR /home
COPY . .
RUN pip install -e .
CMD [ "pybot","./tests/test.robot" ]
This is the error I keep getting
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.) (Driver info: chromedriver=2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux 4.15.0-34-generic x86_64)
My test.robot:
*** Settings ***
Library Selenium2Library
*** Variables ***
*** Test Cases ***
Connect
Open Browser https://google.es Chrome
I think I am missing something but, I just dont know what to do.
On my setup.py:
install_requires=[
'robotframework',
'robotframework-selenium2library',
'selenium'
]