Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How do I set a PATH for my chromedriver in my bitbucket pipeline

I am trying to configure my yaml file to enable my tests to be run. Currently it seems that it can read my test files, but it keeps on failing and giving this error WebDriverException: Message: 'chromedriver' executable needs to be in PATH. How do i set a PATH to my chromedriver in Bitbucket?

 

My YAML file:-

image: python:3.7.3
pipelines:

  default:

   - step:

      caches: - pip

  script:

- pip install --upgrade pip

- pip install robotframework robotframework-seleniumlibrary && pip install chromedriver

- robot -d results test_scripts/Tests/Songs.robot

2 answers

0 votes
Hana Kučerová Community Leader Oct 31, 2020

Hi @Kunalkumar ,

please look at this article. To be honest, I'm not the Bitbucket Pipelines expert, but it seems to me it could help you.

Something like this would do the job

image: python:3.7.3
pipelines:
default:
- step:
caches: - pip
script:
- pip install --upgrade pip
- pip install robotframework robotframework-seleniumlibrary && pip install chromedriver
- PATH=/path/to/chromedriver/binary:$PATH robot -d results test_scripts/Tests/Songs.robot

The addition is PATH=/path/to/chromedriver/binary:$PATH before calling robot executable. It passes modified PATH environmental variable to this binary execution.

From the other hand, it is strange that pip installs it into the inaccessible location. You may want to check PYPATH passed to robot script too and make sure that the default libraries path is passed.

Ok I understand what you mean, but can I point it to the chromedriver in my PC, or do i need to upload the chromedriver to Bitbucket as well?

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

2,589 views 1 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you