I have tried to add the path of chrome driver in Ubuntu 18.04LTS.
its located at
/home/<usr>/Documents/Python/chromedriverin my laptop
can any one help me with the solution for this?
Thanks in advance.
1 Answer
After you downloaded und extracted ChromeDriver you have three options.
A) Save the file in a directory which is already in
PATHB) Save the file at a custom location and add it to
PATHC) Save the file at a custom location and create a symlink to the file in one of the directories that are already in
PATH
For the following examples let's assume the extracted file is in ~/Downloads
Example to A)
// Move file to a directory that's already in PATH
sudo mv ~/Downloads/chromedriver /usr/local/bin
// Make file executable
sudo chmod +x /usr/local/bin/chromedriverExample to B)
// Move file to a directory that's not in PATH
mv ~/Downloads/chromedriver ~/Documents/Python/ChromeDriver/
// Make file executable
chmod +x ~/Documents/Python/ChromeDriver/chromedriver
// Add directory to PATH
echo 'export PATH="$HOME/Documents/Python/ChromeDriver:$PATH"' >> ~/.profile
source ~/.profileExample to C)
// Move file to a directory that's not in PATH
mv ~/Downloads/chromedriver ~/Documents/Python/ChromeDriver/
// Make file executable
chmod +x ~/Documents/Python/ChromeDriver/chromedriver
// Create a symlink to 'chromedriver' in one of the directories
// that are already in PATH (e.g. /usr/bin or /usr/local/bin)
sudo ln -s ~/Documents/Python/ChromeDriver/chromedriver /usr/bin/chromedriverI hope i could make it clear.
2