如何将 IEDriverServer 添加到 PATH

编程入门 行业动态 更新时间:2024-10-26 18:21:56
本文介绍了如何将 IEDriverServer 添加到 PATH的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在详细说明我昨天提出的关于 PATH 的问题.我正在尝试在 IE 8 中运行我的硒测试.我已经下载了 IEDriverServer_x64_2.33.0,它位于我的下载文件夹中.我尝试通过以下方式添加此位置:

I am elaborating on a question I asked yesterday about PATHs. I am trying to run my selenium tests in IE 8. I have downloaded the IEDriverServer_x64_2.33.0 and it is located in my downloads folder. I have tried adding this location in the following ways:

控制面板>系统>高级>环境变量

Control Panel> System>Advanced> Environment Variables

路径在 PATH 和 CLASSPATH 中用分号分隔(例如;C:UsersusernameDownloadsIEDriverServer_x64_2.33.0)这些都不能让我的测试运行.难道是我如何关联ie浏览器?我无法在 cmd.exe 中运行驱动程序,所以我假设它不是这个.

The path is separated by a semicolon in PATH and CLASSPATH (ex.;C:UsersusernameDownloadsIEDriverServer_x64_2.33.0) Neither of these gets my test to run. Could it be how i'm associating the ie browser? I can not run the driver in cmd.exe so i have assumed it is not this.

env.rb :

require 'selenium-webdriver' require 'rubygems' require 'rspec/expectations' @driver = Selenium::WebDriver.for :ie

任何建议.我希望这是足够的信息来显示我的问题.

Any advice. I hope this is enough information to show my problem.

这里也是错误输出:

Unable to find standalone executable. Please download the IEDriverServer from code.google/p/selenium/downloads/list and place the executable on your PATH. (Selenium::WebDriver::Error::WebDriverError)

推荐答案

您需要先解压缩 IEdriver zip 文件.然后在路径中提供 C:UsersmegaxelizeDownloads.IEDriver文件的路径就是IEDriver所在的文件夹"的路径.

You need to unzip the IEdriver zip file first. Then provide C:UsersmegaxelizeDownloads in the path. Path to the IEDriver file is the path of the "folder" in which the IEDriver lies.

更新

为了快速测试,只需将 IEDriver(不是 zip 文件)拖放到 `C:WindowsSystem32.然后运行你的测试.

For a quick test, just drop the IEDriver (not the zip file) and drop it in `C:WindowsSystem32. Then run your tests.

更多推荐

如何将 IEDriverServer 添加到 PATH

本文发布于:2023-05-31 10:03:40,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/389522.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何将   IEDriverServer   PATH

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!