zoukankan      html  css  js  c++  java
  • 【cl】找不到火狐Cannot find firefox binary in PATH

    org.openqa.selenium.WebDriverException: Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: VISTA
    Build info: version: '2.48.2', revision: '41bccdd', time: '2015-10-09 19:59:12'
    System info: host: 'MININT-RQ9DS4O', ip: '30.10.3.30', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_60'
    Driver info: driver.version: FirefoxDriver

    解决办法有四个:

    1.重新安装firefox在默认路径下; 

    OS Expected Location of Firefox
    Linux firefox (found using "which")
    Mac /Applications/Firefox.app/Contents/MacOS/firefox
    Windows %PROGRAMFILES%Mozilla Firefoxfirefox.exe



    2.直接用System.setProperty方法设置webdriver.firefox.bin的值 ;

     3.利用setCapability进行设置 ;

    4.用FirefoxBinary类和public FirefoxDriver(FirefoxBinary binary, FirefoxProfile profile)这个构造方法;

     参考:http://sariyalee.iteye.com/blog/1688271

  • 相关阅读:
    运用Python计算Π的多少(大致计算)
    运用python绘制小猪佩奇
    博客园使用指南 wiki
    博客园 — 打赏功能
    新SSM框架整合
    springMVC
    Eclipse转IDEA的配置!!
    Java学习小知识总结
    java-StringBuffer
    博客园自定义主题
  • 原文地址:https://www.cnblogs.com/dieyaxianju/p/5013431.html
Copyright © 2011-2022 走看看