<i id='S4Ukj'><tr id='S4Ukj'><dt id='S4Ukj'><q id='S4Ukj'><span id='S4Ukj'><b id='S4Ukj'><form id='S4Ukj'><ins id='S4Ukj'></ins><ul id='S4Ukj'></ul><sub id='S4Ukj'></sub></form><legend id='S4Ukj'></legend><bdo id='S4Ukj'><pre id='S4Ukj'><center id='S4Ukj'></center></pre></bdo></b><th id='S4Ukj'></th></span></q></dt></tr></i><div id='S4Ukj'><tfoot id='S4Ukj'></tfoot><dl id='S4Ukj'><fieldset id='S4Ukj'></fieldset></dl></div>

        <bdo id='S4Ukj'></bdo><ul id='S4Ukj'></ul>

    1. <tfoot id='S4Ukj'></tfoot>
        <legend id='S4Ukj'><style id='S4Ukj'><dir id='S4Ukj'><q id='S4Ukj'></q></dir></style></legend>

      1. <small id='S4Ukj'></small><noframes id='S4Ukj'>

      2. 如何让 Firefox 在 Mac OSX 上与 Selenium WebDriver 一起工作

        时间:2023-07-13

          <small id='LY7tF'></small><noframes id='LY7tF'>

            <legend id='LY7tF'><style id='LY7tF'><dir id='LY7tF'><q id='LY7tF'></q></dir></style></legend>

          • <tfoot id='LY7tF'></tfoot>

                  <tbody id='LY7tF'></tbody>
                  <bdo id='LY7tF'></bdo><ul id='LY7tF'></ul>
                  <i id='LY7tF'><tr id='LY7tF'><dt id='LY7tF'><q id='LY7tF'><span id='LY7tF'><b id='LY7tF'><form id='LY7tF'><ins id='LY7tF'></ins><ul id='LY7tF'></ul><sub id='LY7tF'></sub></form><legend id='LY7tF'></legend><bdo id='LY7tF'><pre id='LY7tF'><center id='LY7tF'></center></pre></bdo></b><th id='LY7tF'></th></span></q></dt></tr></i><div id='LY7tF'><tfoot id='LY7tF'></tfoot><dl id='LY7tF'><fieldset id='LY7tF'></fieldset></dl></div>
                • 本文介绍了如何让 Firefox 在 Mac OSX 上与 Selenium WebDriver 一起工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试为 WebDriver 配置代理设置,所以我使用了以下代码 ....

                  I am trying to config proxy settings for the WebDriver so I have used the following code ....

                  FirefoxProfile profile = new FirefoxProfile();
                  profile.setPreference("network.proxy.type", 1);
                  profile.setPreference("network.proxy.http","207.229.122.162");
                  profile.setPreference("network.proxy.http_port", 3128); 
                  WebDriver driver = new FirefoxDriver(profile);
                  selenium = new WebDriverBackedSelenium(driver, "http://www.example.com/");
                  

                  在对文件执行运行后,我得到了类似...的异常

                  and after performing run on the file I am getting exception like ...

                  org.openqa.selenium.WebDriverException:在 PATH 中找不到 firefox 二进制文件.

                  org.openqa.selenium.WebDriverException: Cannot find firefox binary in PATH.

                  确保已安装 Firefox.操作系统似乎是:MAC

                  Make sure firefox is installed. OS appears to be: MAC

                  系统信息:os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.6.8',

                  System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.6.8',

                  java.version: '1.6.0_29'

                  java.version: '1.6.0_29'

                  驱动信息:driver.version:FirefoxDriver

                  Driver info: driver.version: FirefoxDriver

                  谁能帮助我了解如何以及在何处提供 firefoxprofile()

                  Can anyone help me out regarding how and where to give path to firefoxprofile()

                  推荐答案

                  相信你有几个选择:

                  在 PATH 系统变量中指定文件夹(Firefox 二进制文件所在的文件夹) - 方法如下.

                  Either specify the folder (in which your Firefox binary is) in your PATH system variable - here's how.

                  或者打电话

                  WebDriver driver = new FirefoxDriver(new FirefoxBinary(new File("path/to/your/firefox.exe")), profile);
                  

                  这篇关于如何让 Firefox 在 Mac OSX 上与 Selenium WebDriver 一起工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何使用 Selenium WebDriver 和 Java 获得选定的选项 下一篇:如何使用 Java 在 Selenium WebDriver 中关闭子浏览器窗口

                  相关文章

                  <legend id='vGtOO'><style id='vGtOO'><dir id='vGtOO'><q id='vGtOO'></q></dir></style></legend>
                    <bdo id='vGtOO'></bdo><ul id='vGtOO'></ul>
                • <small id='vGtOO'></small><noframes id='vGtOO'>

                      <i id='vGtOO'><tr id='vGtOO'><dt id='vGtOO'><q id='vGtOO'><span id='vGtOO'><b id='vGtOO'><form id='vGtOO'><ins id='vGtOO'></ins><ul id='vGtOO'></ul><sub id='vGtOO'></sub></form><legend id='vGtOO'></legend><bdo id='vGtOO'><pre id='vGtOO'><center id='vGtOO'></center></pre></bdo></b><th id='vGtOO'></th></span></q></dt></tr></i><div id='vGtOO'><tfoot id='vGtOO'></tfoot><dl id='vGtOO'><fieldset id='vGtOO'></fieldset></dl></div>

                      <tfoot id='vGtOO'></tfoot>