[Selenium] How to specify the relative path of chromedriver?

1. I'm addicted

I had Selenium's chromedriver in the same directory as the python script files. The chromedriver is in the current directory as seen from the script file, so it worked below.

python


driver = webdriver.Chrome()

However, one day, when I updated my Mac OS, I got an error saying that the chromedriver could not be found (passed through the path).

2. Solution

As a workaround, I modified it below and it worked fine.

python


driver = webdriver.Chrome(executable_path='./chromedriver')

Recommended Posts

[Selenium] How to specify the relative path of chromedriver?
[Python] Summary of how to specify the color of the figure
A story about how to specify a relative path in python.
How to determine the existence of a selenium element in Python
How to check the version of Django
[Beginner memo] How to specify the library reading path in Python
[Python] How to specify the window display position and size of matplotlib
Learning record (4th day) #How to get the absolute path from the relative path
How to calculate the volatility of a brand
How to specify the launch browser for JupyterLab 3.0.0
How to find the area of the Voronoi diagram
How to specify the NIC to scan with amazon-dash
How to specify attributes with Mock of python
How to debug selenium
How to get the number of digits in Python
How to visualize the decision tree model of scikit-learn
[Python] How to specify the download location with youtube-dl
[Blender] How to dynamically set the selection of EnumProperty
How to hit the document of Magic Function (Line Magic)
How to access the global variable of the imported module
How to use the generator
How to use the decorator
How to increase the axis
How to start the program
How to find the optimal number of clusters in k-means
How to test the attributes added by add_request_method of pyramid
How to manipulate the DOM in an iframe with Selenium
How to calculate the amount of calculation learned from ABC134-D
How to summarize the results of FreeSurfer ~ aparc, aseg, wmparc ~
How to run the Export function of GCP Datastore automatically
How to increase the number of machine learning dataset images
How to see the contents of the Jupyter notebook ipynb file
How to find the scaling factor of a biorthogonal wavelet
How to connect the contents of a list into a string
How to specify an infinite number of tolerances in the numeric argument validation check of argparse
How to calculate the autocorrelation coefficient
How to use the zip function
How to handle multiple versions of CUDA in the same environment
How to use the optparse module
How to implement Java code in the background of RedHat (LinuxONE)
How to know the internal structure of an object in Python
Summary of how to use pandas.DataFrame.loc
How to change the color of just the button pressed in Tkinter
How to get the ID of Type2Tag NXP NTAG213 with nfcpy
[EC2] How to install chrome and the contents of each command
How to check the memory size of a variable in Python
Make the theme of Pythonista 3 like Monokai (how to make your own theme)
Summary of how to use pyenv-virtualenv
How to read the SNLI dataset
[EC2] How to run selenium webdriver
How to check the memory size of a dictionary in Python
[TensorFlow 2] How to check the contents of Tensor in graph mode
[Linux] How to disable the automatic update of the /etc/resolv.conf file (AmazonLinux2)
[EC2] How to install and download chromedriver from the command line
How to find the memory address of a Pandas dataframe value
[Python] How to import the library
How to output the output result of the Linux man command to a file
How to monitor the execution status of sqlldr with the pv command
[Introduction to Udemy Python3 + Application] 69. Import of absolute path and relative path
How to get the vertex coordinates of a feature in ArcPy
How to use Jupyter on the front end of supercomputer ITO