AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1104721
Accepted
Thufir
Thufir
Asked: 2018-12-27 11:10:00 +0800 CST2018-12-27 11:10:00 +0800 CST 2018-12-27 11:10:00 +0800 CST

sudo apt install firefoxdriver 做什么?

  • 772

使用Javafor ,对firefoxdriver包Selenium很好奇。有几个特定的​​包,但是否可能以一种易于基于项目找到的方式将其安装到系统中?python firefoxdrivergeckodriverJavaSelenium

我一直在使用属性文件:

<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
    <comment>selenium config and vehicle type</comment>
    <entry key="gecko">/home/thufir/.gecko/geckodriver</entry>
    <entry key="url">http://books.toscrape.com/</entry>
    <entry key="driver">webdriver.gecko.driver</entry>
    <entry key="usr">admin</entry>
    <entry key="pwd">12345</entry>
    <entry key="option01">--headless</entry>
</properties>

如果它指向系统上的某个标准位置,它会稍微不那么脆弱。(我想也可以将它捆绑在JAR, 中。)

thufir@dur:~$ 
thufir@dur:~$ sudo apt install firefoxdriver
Reading package lists... Done
Building dependency tree       
Reading state information... Done
firefoxdriver is already the newest version (3.8.0-1).
0 upgraded, 0 newly installed, 0 to remove and 98 not upgraded.
thufir@dur:~$ 
programming firefox browser java selenium
  • 2 2 个回答
  • 1314 Views

2 个回答

  • Voted
  1. Remember Monica
    2020-03-28T10:01:15+08:002020-03-28T10:01:15+08:00

    Debian GNU/Linux 和 Ubuntu 中的 firefoxdriver 软件包仅适用于长期过时的 firefox 版本。据我所知,Ubuntu没有适用于当前firefox版本的geckdriver软件包,因此您必须单独下载它们。Selenium应该会自动使用它,只要您自己启动它或它在路径中。

    官方版本显然可以在 github 上找到:https ://github.com/mozilla/geckodriver/releases

    • 1
  2. Best Answer
    Thufir
    2018-12-28T05:17:09+08:002018-12-28T05:17:09+08:00

    不完全确定geckodriver文件在哪里,但它可能在某处:

    thufir@dur:~$ 
    thufir@dur:~$ cat /usr/share/doc/firefoxdriver/README.Debian 
    selenium-firefoxdriver for Debian
    ------------------------
    
    This package contains the prebuilded shared objects for x386 and amd64 to
    use firefox webdriver with e.g. python-selenium. Some of the shared objects
    are packed inside the webdriver.xpi. The python bindings, which this package
    is for, requires the path of all .so and select/copy them files by themself. 
    
    The source for selenium-firefoxdriver is the same like the python-bindings but we filter out all other stuff except the webdriver.xpi.
    
     -- Sascha Girrulat <[email protected]>  Sat, 22 Aug 2015 11:43:04 +0200
    thufir@dur:~$ 
    thufir@dur:~$ dpkg -L firefoxdriver
    /.
    /usr
    /usr/lib
    /usr/lib/firefoxdriver
    /usr/lib/firefoxdriver/amd64
    /usr/lib/firefoxdriver/amd64/x_ignore_nofocus.so
    /usr/lib/firefoxdriver/webdriver.xpi
    /usr/lib/firefoxdriver/x86
    /usr/lib/firefoxdriver/x86/x_ignore_nofocus.so
    /usr/share
    /usr/share/doc
    /usr/share/doc/firefoxdriver
    /usr/share/doc/firefoxdriver/README.Debian
    /usr/share/doc/firefoxdriver/README.rst.gz
    /usr/share/doc/firefoxdriver/changelog.Debian.gz
    /usr/share/doc/firefoxdriver/copyright
    /usr/share/lintian
    /usr/share/lintian/overrides
    /usr/share/lintian/overrides/firefoxdriver
    thufir@dur:~$ 
    

    更好的答案表示赞赏。有一个xpi文件,它看起来是 Firefox(?) 的安装程序,它可能已geckodriver压缩。

    • 0

相关问题

  • 如何解决 Firefox 中的字体问题?

  • 如何在 Ubuntu 上开发 .NET 应用程序?

  • 谷歌的 Go 语言有任何 PPA 吗?

  • 使用突触或通过 Firefox 的插件菜单安装 adblock?

  • Firefox 的 Ubuntu Firefox 修改扩展有什么作用?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve