Search code examples
dockerraspberry-piselenium-chromedriverraspberry-pi4

ChromeDriver in RaspberryPi 4


I am trying to use appium in a docker container runs on RaspberryPi4. But I encounter a problem regarding chrome driver. Apparently chrome drivers are not published for armv7l. I searched and found that some people used apt-get install chromium-chromedriver but when I try it I get, Unable to locate package chromium-chromedriver. My docker file is like this,

FROM node:20.5.0-bullseye

WORKDIR /usr/src/app

RUN --mount=type=cache,target=/var/cache/apt apt-get update || : && apt-get install -y python3 python3-pip

RUN apt-get -y install android-sdk-build-tools android-tools-adb android-tools-fastboot

ENV ANDROID_HOME /usr/lib/android-sdk

RUN npm i --location=global appium

RUN appium driver install uiautomator2

RUN --mount=type=cache,target=/root/.cache/pip pip install --upgrade pip --extra-index-url https://www.piwheels.org/simple

COPY ./requirements.txt .

RUN --mount=type=cache,target=/root/.cache/pip pip install -r requirements.txt --extra-index-url https://www.piwheels.org/simple

Is it possible to install a chrome driver to this container? Do you know a way to achieve this?

Edit: --allow-insecure chromedriver_autodownload also exists in the arguments of appium service.


Solution

  • It is not chromium-chromedriver as specified here but chromium-driver. This worked for me but also appium does not recognize the chromedriver if you do not set the capability chromedriverExecutable= "/usr/bin/chromedriver" (in my case). After these, I as able to run the appium tests from docker container on RaspberryPi 4.