I have tried every solution suggested on stackoverflow and banging my head from days. I am facing "chromedriver unexpectedly exited with error code 255" issue while running the tests in docker on a MacBook with M1 chip, I am able to build the image successfully. Return ("-browser")įor now, I am just trying to configure chrome out of my browser options. Help="specify the browser to use for running the tests (chrome, firefox, or autouse=True) Parser.addoption("-browser", action="store", default=os.environ.get('BROWSER', 'chrome'), Options.binary_location = "/usr/lib/chromium/chrome"Ĭhrome_driver_path = "/usr/bin/chromedriver"ĭriver = webdriver.Chrome(service=service, options=options)ĭriver = webdriver.Firefox(service=Service(GeckoDriverManager().install()))ĭriver = webdriver.Edge(EdgeChromiumDriverManager().install()) # options.binary_location = f"/opt/headless-chromium" Options.add_argument("-crash-dumps-dir=/tmp") Options.add_argument('-disable-dev-shm-usage') Options.add_argument("-disable-extensions") Options.add_experimental_option('useAutomationExtension', False) Options.add_argument('-disable-blink-features=AutomationControlled') Service = Service(executable_path=ChromeDriverManager().install()) pynacl_deps build-base python3-dev libffi-dev \īelow is the implementation in conftest: setup(request, browser=None): Below is my Dockerfile code: FROM python:3.10-alpine3.17Īpk add -no-cache chromium chromium-chromedriver wget curl unzip gnupgĬMD Xvfb :99 -screen 0 1024x768x16 -nolisten tcp
0 Comments
Leave a Reply. |