Hello
I have created a new image dockerfile but i have some issue to start my test on drivers
Could you please provide solution
Thank you
Use the official Ubuntu as the base image
FROM ubuntu:latest
Set environment variables to avoid interactive prompts during installation
ENV DEBIAN_FRONTEND=noninteractive
Install necessary dependencies, including wget
RUN apt-get update && apt-get install -y
python3.10
python3-pip
unzip
wget
libnss3
libatk-bridge2.0-0
libatspi2.0-0
&& apt-get clean
&& rm -rf /var/lib/apt/lists/*RUN apt-get update -qq && apt-get install -y -qq
software-properties-common
apt-transport-https
wget \Additional packages
&& apt-get clean
&& rm -rf /var/lib/apt/lists/*Edge Installation
RUN wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | apt-key add -
RUN add-apt-repository “deb [arch=amd64] Index of /repos/edge/ stable main”
RUN apt install -y microsoft-edge-stable
RUN microsoft-edge --version
RUN which microsoft-edgeDownload and install Microsoft Edge WebDriver
RUN wget -q https://msedgedriver.azureedge.net/118.0.2088.69/edgedriver_linux64.zip
&& unzip -q edgedriver_linux64.zip
&& chmod +x msedgedriver
&& mv msedgedriver /usr/local/binVerify msedgedriver installation
RUN msedgedriver --version
Upgrade pip and install required Python packages
RUN pip3 install --upgrade pip &&
pip3 install
robotframework==4.1.3
robotframework-seleniumlibrary==5.1.3
selenium==4.2.0ENV PATH=$PATH:/usr/local/bin:/usr/bin/microsoft-edge:/usr/local/bin/msedgedriver
Install Chrome and Geckodriver
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
&& echo “deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main” >> /etc/apt/sources.list.d/google-chrome.list
&& apt-get update
&& apt-get install -f -y google-chrome-stable
chromium-browser
firefox
xvfb \&& wget -q -O /tmp/geckodriver.tar.gz https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-linux64.tar.gz
&& tar -C /usr/local/bin -xzf /tmp/geckodriver.tar.gz
&& chmod 0755 /usr/local/bin
&& cd /usr/local/bin
&& ls
&& rm /tmp/geckodriver.tar.gz
&& cd /tmp \&& wget https://chromedriver.storage.googleapis.com/114.0.5735.16/chromedriver_linux64.zip
&& unzip chromedriver_linux64.zip
&& rm -rf chromedriver_linux64.zip
&& mv -f chromedriver /usr/local/bin/chromedriver
&& chmod 0755 /usr/local/bin/chromedriver
&& apt-get clean
&& rm -rf /var/lib/apt/lists/*
&& rm -rf /usr/share/doc
/usr/share/man*
/tmp/*
/var/tmp/*Clean up
RUN apt-get clean &&
rm -rf /var/lib/apt/lists/*
running test with edge gives
SessionNotCreatedException: Message: session not created: Microsoft Edge failed to start: exited normally.
105 (session not created: DevToolsActivePort file doesn’t exist)
106 (The process started from msedge location /usr/bin/google-chrome is no longer running, so msedgedriver is assuming that msedge has crashed.)
running test with chrome gives
SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 114
110Current browser version is 118.0.5993.117 with binary path /usr/bin/google-chrome
running test with gecko gives
WebDriverException: Message: Process unexpectedly closed with status 1