# Unable To Open Browser On Host Machine When Executing Test Suite from Container

**URL:** <https://forum.robotframework.org/t/unable-to-open-browser-on-host-machine-when-executing-test-suite-from-container/8475>\
**Category:** SeleniumLibrary\
**Created:** [17 February 2025 09:39 UTC](https://forum.robotframework.org/t/unable-to-open-browser-on-host-machine-when-executing-test-suite-from-container/8475 "2025-02-17T09:39:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Learning-RF](https://avatars.discourse-cdn.com/v4/letter/l/d9b06d/32.png) [@Learning-RF](https://forum.robotframework.org/u/Learning-RF)\
**Post date:** [17 February 2025 09:39 UTC](https://forum.robotframework.org/t/unable-to-open-browser-on-host-machine-when-executing-test-suite-from-container/8475/1 "2025-02-17T09:39:40Z")

</div>

Hi everyone,

I’m trying to run a Robot Framework test suite from a Podman container but I’m facing an issue where the browser fails to open on my host machine.

My setup details are:

- Robot Framework: 7.2.2
- Python: 3.12.3
- Container Created Using: Podman
- Goal: Run a Robot Framework test from within a container but have the browser open on my host machine.

Steps that I have followed so far are:

```python
 1. Create a dockerfile with installed python and robot framework

$ cat Dockerfile
FROM python:3.9

# Set up a working directory
WORKDIR /app

# Upgrade pip
RUN pip install --upgrade pip

# Install Robot Framework and SeleniumLibrary
RUN pip install robotframework robotframework-seleniumlibrary

# Default command
CMD ["python3"]

2. Build the image
$ podman build -t robot-framework:latest .

3. Create container
$ podman run -d --name robot_framework localhost/robot-framework:latest

4. Go inside the container
$ podman exec -it robot_framework bash

5. Create a test.robot file with given content
$ vim test.robot
***Settings***
Library SeleniumLibrary

***Test Cases***
Example Test
    Open Browser http://google.com chrome
    sleep 10s
----------------------------------------------------------------------------------------

6. Run the test.robot file and got the error
$ robot test.robot

STEP-RUN-ROBOT-TESTS

==============================================================================
Source                                                                        
==============================================================================
Source.Test                                                                  
==============================================================================
Test the code share | FAIL |
WebDriverException: Message: Service /root/.cache/selenium/chromedriver/linux64/133.0.6943.98/chromedriver unexpectedly exited. Status code was: 127
------------------------------------------------------------------------------
Source.Test | FAIL |
1 test, 0 passed, 1 failed
==============================================================================
Source | FAIL |
1 test, 0 passed, 1 failed
==============================================================================
Output: /workspace/source/reports/output.xml
Log: /workspace/source/reports/log.html
Report: /workspace/source/reports/report.html

```

What I have tried so far:  
Tried installing Chrome and Chromedriver inside the container but that did not help as the browser still wouldn’t open on my host.

How can I allow the Robot Framework test to open a browser on my host machine from within the Podman container?

Any help or insights would be greatly appreciated! Thanks in advance.
