![]() ![]() Open a terminal and run the brew install geckodriver command.Now save the above python source code in a file such as RunFirefox.py and run it in a terminal, the Firefox browser will be started as normal.ģ.3 Use Brew To Install Geckodriver In macOS.# Make the PATH environment variable value change take effect. # Press keyboard : then wq! to save and quite. # Press keyboard esc and i key to insert geckodriver saved folder to the PATH environment variable and export PATH. Then run the below shell command in the terminal. ![]() If the PATH environment variable value does not include the geckodriver executable file saved folder.Open a terminal and run the command env to show the PATH environment variable value.This method also takes effect when you run or debug the above python code in the Eclipse PyDev plugin.ģ.2 Set Geckodriver Saved Folder In OS Path Environment Variable. Now the Firefox browser can be started as normal.Please see below source code.īrowser = webdriver.Firefox(executable_path = '/Users/zhaosong/Documents/WorkSpace/tool/geckodriver') This is the simplest way to fix this problem.Then unzip it to a local folder such as /Users/zhaosong/Documents/WorkSpace/tool.ģ.1 Specify The executable_path Parameter Value When Initialize Firefox. But before any solution takes effect, we should download the related geckodriver executable file from Mozilla/Geckodriver. ![]() After some investigation, I finally find the method to resolve it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |