ppodgorsek / docker-robot-framework

Robot Framework in Docker
https://cloud.docker.com/repository/docker/ppodgorsek/robot-framework
MIT License
333 stars 235 forks source link

Add user account (support Display from Host) #425

Open Hamsterbau opened 1 year ago

Hamsterbau commented 1 year ago

Is your feature request related to a problem? Please describe. Before having a headless test suite for GUI testing, it is nice to see in real, what is going on. For this i tried to use your great image, what failed because of missing home folder, where X11 wants to create some hidden folders/files.

Describe the solution you'd like Just add a user with home folder to the image:

# Create a specific robot user - especially needed for X11 magic from host
RUN useradd ${ROBOT_UID}

Describe alternatives you've considered I build my own image based on yours. But perhaps in the future this is not needed anymore? :)

Additional context With user in place, under linux with X11 just start image with following parameter:

--env="DISPLAY=$DISPLAY"

and robot GUI tests (Selenium/Playwright) with headless mode deactivated.