Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 98324

Gitlab CI/CD : Pytest unrecognized arguments

$
0
0

I have the following .gitlab-ci.yml

image: python:3.7

stages:
  - deploy

deploy:
  stage: deploy
  script:
    - pip install selenium
    - pip install pytest
    - pip install webdriver-manager
    - pip install pytest-logger
    - pip install pytest-reportportal
    - pip install reportportal-client
    - pip install parameterized
    - pip install pytest-xdist
    - pip install pytest-selenium
    - pytest -vvv --driver Remote --capability browserName chrome --host selenium --port 4444 --testsuite tests/xyz.py
  services:
    - name: selenium/standalone-chrome
      alias: selenium

When the above .yml runs on gitlab it produces following error:

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
     def chrome_version():
         pattern = r'\d+\.\d+\.\d+'
         cmd_mapping = {
             OSType.LINUX: 'google-chrome --version',
             OSType.MAC: r'/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --version',
             OSType.WIN: r'reg query "HKEY_CURRENT_USER\Software\Google\Chrome\BLBeacon" /v version'
         }

         cmd = cmd_mapping[os_name()]
         stdout = os.popen(cmd).read()
         version = re.search(pattern, stdout)
         if not version:
             raise ValueError(
                 'Could not get version for Chrome with this command: {}'>               .format(cmd)
             )
 E           ValueError: Could not get version for Chrome with this command: google-chrome --version
 env/lib/python3.7/site-packages/webdriver_manager/utils.py:98: ValueError

Viewing all articles
Browse latest Browse all 98324

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>