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

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

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?

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.

Suggest an answer

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

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,826 views 10 16
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