Ruby selenium webdriver unable to find Mozilla geckodriver

前端 未结 6 2091
名媛妹妹
名媛妹妹 2021-01-02 00:21

I have geckodriver installed in my development directory

ls | grep geckodriver
geckodriver
geckodriver-v0.11.1-linux64.tar.gz

I also exported

相关标签:
6条回答
  • 2021-01-02 00:29

    You have selenium-webdriver-3.0.0.beta3.1 which is only for Firefox 48 and later (and not yet properly working). Fallback to selenium-webdriver version 2.53.4 and try again.

    And also try this..

    • In the terminal change directory path to the directory where gem was installed
    • Run gem uninstall selenium-webdriver
    • Run gem install selenium-webdriver -v 2.53.4
    0 讨论(0)
  • 2021-01-02 00:32

    Works for me if I add this part to the command: PATH=$PATH:/home/username/folder/driver cucumber features/new.feature

    0 讨论(0)
  • 2021-01-02 00:37

    After download the "geckodriver" I unzipped the driver into new folder "webdrivers". Second, in the system path, create a new entry that points to the new "geckodriver" directory. Finally restart the command prompt after modifying the environment variable. Maybe the last past could be the trick

    0 讨论(0)
  • 2021-01-02 00:46

    You can now move toselenium-webdriver 3.4.3 which is the latest version. However, you still need the GeckoDriver because there no native extensions of Selenium in FF. You can also add the geckodriver-helper gem to your GemFile. Check https://github.com/DevicoSolutions/geckodriver-helper .

    Be aware of that there are still some issues that have to be fixed when you use the combination of Selenium3 & FF48+ combination and can affect your tests like double-click and modal windows.

    0 讨论(0)
  • 2021-01-02 00:52

    You have to make sure that geckodriver is in your PATH.

    In my case you can see that /usr/local/bin is already in my path:

    $echo $PATH
    /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin:/usr/local/mysql/bin
    

    So simply moving geckodriver into /usr/local/bin makes it accessible.

    mv geckodriver /usr/local/bin/
    
    0 讨论(0)
  • 2021-01-02 00:54

    Download geckodriver and add it to your PATH

    cd ~/Downloads/
    wget https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz
    tar -zxvf geckodriver-v0.24.0-linux64.tar.gz
    sudo mv geckodriver /usr/local/bin/
    

    Note: That's currently the path for the latest release. If you need another release, modify the download path accordingly.

    0 讨论(0)
提交回复
热议问题