Giter VIP home page Giter VIP logo

webdriver-install's Introduction

webdriver-install

Rust Sponsor count Crates.io docs.rs MSRV

Fast and simple webdriver installation

Usage

As a CLI

# Install into $HOME/.webdrivers
webdriver-install --install geckodriver

# Or into a specified directory
webdriver-install --install geckodriver --dir /tmp/webdrivers

# Check that it installed correctly:
/tmp/webdrivers/geckodriver --help

As a Rust library

use webdriver_install::Driver;
use std::path::PathBuf;

fn main() {
    // Install into $HOME/.webdrivers
    Driver::Chrome.install();

    // Install into specified path
    Driver::Chrome.install_into(PathBuf::from("/tmp/webdrivers"));
}

Implementation state

Driver installation support:

  • chromedriver
  • geckodriver
  • edgedriver
  • iedriver
  • operadriver
  • safaridriver Safaridriver comes pre-installed on all MacOS systems, but we can at least provide the binary location.

Usability:

  • ✅ README instructions
  • ✅ Stable-ish library API
  • ⬜ Command line interface
  • ⬜ Updating of installed drivers
  • ⬜ Removal of installed drivers
  • ✅ Published on crates.io
  • ✅ Published library docs
  • ✅ Linux support
  • ✅ Windows support
  • ✅ MacOS support
  • ⬜ WSL support
  • ⬜ Pre-built binaries

Inspired by:

webdriver-install's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar phansch avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

webdriver-install's Issues

Testing strategy

Integration tests

Unit tests

  • geckodriver::direct_download_url seems testable
  • geckodriver::latest_version could be tested with mockito

Add CLI

# If no --dir is specified, it will look in the default directory to update drivers
webdriver-install chromedriver

# Override default dir
webdriver-install chromedriver --dir /tmp/webdrivers
webdriver-install geckodriver --remove --dir /tmp/webdrivers
webdriver-install geckodriver --update --dir /tmp/webdrivers

# Install all possible drivers (except safaridriver, of course)
webdriver-install --install-all
webdriver-install --update-all
webdriver-install --remove-all

Chromedriver installation broken

called `Result::unwrap()` on an `Err` value: No support for unarchiving %3C, yet

It looks the the way to fetch chromedriver versions has changed

Add WSL support

Installation of drivers should work without problems on WSL.

Windows 10 support

This issue is about making webdriver-install compile and run on Windows 10. It is not about adding support for iedriver or edgedriver

Cross compilation

See https://stackoverflow.com/a/62853319/6830113

rustup target add x86_64-pc-windows-gnu
rustup toolchain install stable-x86_64-pc-windows-gnu
sudo apt-get install gcc-mingw-w64-x86-64 -y
cargo test --target x86_64-pc-windows-gnu

VM Development / Testing

I haven't used windows in a long time, but if I understand everything correctly..

  • I can get my Windows 10 product key via sudo acpidump -n MSDM
  • Using that key, I should be able to set up a qemu VM (See this blog post), thus avoiding the mess of VirtualBox and vagrant
  • The Windows 10 .iso can be downloaded here
  • With the above steps done, it should just be a simple VM setup. Inside the VM I'd setup my own dev environment for webdriver-install
  • Need to add windows to the CI setup as well

Decide on stable-ish library API

I think this might be a more convenient API than the current one:

Driver::Gecko.install();
Driver::Gecko.install_version(version);
Driver::Gecko.install_into(dir);
Driver::Gecko.update();
Driver::Gecko.remove();
Driver::Gecko.info();

This requires less argument passing and only one import of the enum.

Publish on crates.io

I need to figure out how to publish this both as a library and a binary installable via cargo install.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.