如何在Windows系统上安装geckodriver [英] how to install geckodriver on a windows system

查看:197
本文介绍了如何在Windows系统上安装geckodriver的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试安装webdriver,为了打开Firefox,我需要安装geckodriver并使用正确的路径.

I am trying to intall webdriver and in order to open firefox i need the geckodriver to be installed and in the correct path.

首先,用于安装geckodriver的下载链接仅允许您安装不是可执行文件的文件.那么有没有办法使它成为可执行文件?

Firstly the download link to install geckodriver only allows you to install a file that is not an executable. So is there a way to make it an executable?

第二,我尝试在命令提示符下更改路径变量,但是当然没有用.然后,我更改了用户变量而不是系统路径变量,因为系统中没有Path.用户变量中有一个路径,因此我对其进行了编辑以更改文件的位置.

secondly I have tried to change my path variables in commmand prompt, but of course it didn't work. I then changed the user variable not the system path variables because there is not Path in system. there is a Path in user variables so I edited that to change where the file is located.

我已经提取了geckodriver rar文件,并且收到了没有扩展名的文件.我不知道如何拥有一个没有扩展名的文件,但是他们做到了.图标就像一张空白的纸,在左上角有一个折痕.

I have extracted the geckodriver rar file and have received a file with no extension. I don't know how you can have a file with no extension, but they did it. The icon is like a blank sheet of paper with a fold at the top left.

如果有人对此有解决方案,则可能包括另一个软件包,例如webdriver,它将允许我打开浏览器,然后在给定的时间后刷新页面.这就是我要做的.

If anyone has a solution for this including maybe another package that is like webdriver and will allow me to open a browser and then refresh the page after a given amount of time. this is all I want to do.

推荐答案

请确保您正在为您的操作系统下载一个. Windows在列表的底部,它将显示win32.下载该文件或64都没关系.

For one make sure you are downloading the one for your OS. Windows is at the bottom of the list it will say win32. Download that file or 64 doesn't matter.

之后,您将要提取文件.如果出现错误,表明Winrar文件中没有文件,这可能是因为在Winrar设置中,您将Winrar设置为不提取任何扩展名为.exe的文件.如果转到Winrar选项,然后单击设置,然后单击安全性,则可以将其删除,并显示* .exe,并在删除后可以解压缩文件.完成之后,搜索如何更新路径,以便可以访问gecko驱动程序.然后,您很可能需要重新启动.

After that you are going to want to extract the file. If you get an error that says there is no file in the Winrar file, this may be because in your Winrar settings you have Winrar set to not extract any files that have the extension .exe. If you go to Winrar options then settings then security you can delete this it will say *.exe, and after you delete that you can extract the file. After that is done, search how to update the path so that gecko driver can be accessed. Then you will most likely need to restart.

这篇关于如何在Windows系统上安装geckodriver的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆