I am trying to create a CI/CD pipeline for my robot framework project. However, I am facing the below issue:
"WebDriverException: Message: 'chromedriver' executable may have wrong permissions."
This is my bitbucket-pipelines.yml file:
image: python:3.7.2
pipelines:
default:
- step:
script:
- export PYTHONPATH="${PYTHONPATH}:/opt/atlassian/pipelines/agent/build/custom_library/"
- export PATH="$PATH:/opt/atlassian/pipelines/agent/build/environment_setup/"
- pip install -r requirements.txt
- robot --exclude NORUN test_suite-site #run test-suite for site
- echo "Code Execution is Complete" #notify code execution
I ran the below command to check permissions:
ls -l /opt/atlassian/pipelines/agent/build/environment_setup/
The results for this were as below:
+ ls -l /opt/atlassian/pipelines/agent/build/environment_setup/
total 19916
-rw-rw-rw-. 1 root root 11606728 Nov 7 19:11 chromedriver
-rw-rw-rw-. 1 root root 8835072 Nov 7 19:11 chromedriver.exe
Please help me out in fixing this.
Hello @Ameet Kumar Pradhan,
Thanks for reaching out.
I can’t say if this is the best way to configure a pipeline for robot framework project, but I think the root cause of the error you faced is that chromedriver binary lacks execution bit in the permissions. That is, it should be at least r-x (don’t think it needs to be writable). However I can’t say why it ended up in this state.
So just to try it out, try running
chmod +x /path/to/chromedriver
but this is definitely a workaround.
Maybe there’s a docker image with robot framework preinstalled? In this case you might want to switch to it?
Hope this helps.
Cheers,
Daniil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.