AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / ubuntu / Perguntas / 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 faz o quê?

  • 772

Usando Javafor Selenium, e estou curioso sobre o pacote firefoxdriver . Existem vários pacotes python específicosfirefoxdriver , mas talvez instale o geckodriverno sistema de uma maneira que seja fácil para um projeto Javabaseado Seleniumencontrar?

Eu tenho usado um arquivo de propriedades :

<!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>

O que seria um pouco menos frágil se apontasse para algum lugar padrão no sistema. (Suponho que provavelmente seja possível agrupá-lo no JAR, também.)

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 respostas
  • 1314 Views

2 respostas

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

    O pacote firefoxdriver no Debian GNU/Linux e Ubuntu só funciona com versões obsoletas do firefox. Até onde eu sei, o Ubuntu não tem um pacote geckdriver que funcione com as versões atuais do firefox, então você deve baixá-los separadamente. O Selenium deve então usá-lo automaticamente, desde que você o inicie ou esteja no caminho.

    Aparentemente, os lançamentos oficiais podem ser encontrados no 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

    Não tenho certeza de onde geckodriverestá o arquivo, mas pode estar em algum lugar:

    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:~$ 
    

    Melhor resposta apreciada. Há um xpiarquivo, que parece ser um instalador do firefox (?) que pode ter o arquivo geckodrivercompactado.

    • 0

relate perguntas

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    Existe um comando para listar todos os usuários? Também para adicionar, excluir, modificar usuários, no terminal?

    • 9 respostas
  • Marko Smith

    Como excluir um diretório não vazio no Terminal?

    • 4 respostas
  • Marko Smith

    Como descompactar um arquivo zip do Terminal?

    • 9 respostas
  • Marko Smith

    Como instalo um arquivo .deb por meio da linha de comando?

    • 11 respostas
  • Marko Smith

    Como instalo um arquivo .tar.gz (ou .tar.bz2)?

    • 14 respostas
  • Marko Smith

    Como listar todos os pacotes instalados

    • 24 respostas
  • Martin Hope
    Flimm Como posso usar o docker sem sudo? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    led-Zepp Como faço para salvar a saída do terminal em um arquivo? 2014-02-15 11:49:07 +0800 CST
  • Martin Hope
    ubuntu-nerd Como descompactar um arquivo zip do Terminal? 2011-12-11 20:37:54 +0800 CST
  • Martin Hope
    TheXed Como instalo um arquivo .deb por meio da linha de comando? 2011-05-07 09:40:28 +0800 CST
  • Martin Hope
    Ivan Como listar todos os pacotes instalados 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    David Barry Como determino o tamanho total de um diretório (pasta) na linha de comando? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher "Os seguintes pacotes foram retidos:" Por que e como resolvo isso? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford Como os PPAs podem ser removidos? 2010-07-30 01:09:42 +0800 CST

Hot tag

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

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve