To run the pyquibbler lab-extension tests, you'll need to install chromedriver
,
which allows selenium to run and control a browser.
To install chromedriver
and add it to your path:
Go to https://chromedriver.chromium.org/downloads, and download the chromedriver corresponding to your chrome version and operating system. You can get your Chrome version by choosing "About Google Chrome" in the Chrome menu (e.g., 102.0.x). After clicking on the correct version, you'll be able to choose your operating system. After downloading, you will need to click the downloaded archive to unzip it.
After downloading and unzipping chromedriver, go to your terminal and run echo $PATH
(or path
on Windows).
This will show you a set of locations separated by a colon where executable files are expected to be found.
You need to place your downloaded chromedriver in one of them (if /usr/local/bin
is in your PATH, we recommend
placing it there).
For example, to place it in the /usr/local/bin folder, run
mv ~/Downloads/chromedriver /usr/local/bin/
After placing the chromedriver in your PATH, we need to make it executable. To do this, run:
chmod 777 /usr/local/bin/chromedriver
Go to tests/lab_extension
and run pytest
.
If tests fail, try:
-
when running the tests, make sure the chrome selenium opens is visible to you (there are issues with jupyter when it's not, as it doesn't load).
-
restart pycharm
-
If getting “chromedriver” cannot be opened because the developer cannot be verified, try running:
xattr -d com.apple.quarantine /usr/local/bin/chromedriver