Coder Social home page Coder Social logo

webdriver-downloader's People

Contributors

ik1ne avatar selu avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

selu

webdriver-downloader's Issues

Add is_installed interface to WebdriverInfo

Currently, there's no way to verify driver without using clone().

let driver_path = ...;
let driver_info = ChromedriverInfo::new(driver_path.clone(), browser_path);
    if = driver_info.verify_driver(driver_path).await.is_err() {
    driver_info.download_verify_install(5).await?;
}

If we add is_installed to WebdriverInfo, this can be improved.

Add tokio runtime dependency information to readme.md

Although webdriver-downloader itself does not depend on tokio runtime(it only uses tokio features that are runtime independent), fantoccini depends on tokio runtime.
So we should explain that webdriver-downloader must be run on tokio runtime.

Use random port for webdriver verification

WebdriverVerificationInfo::verify_driver always uses port number 4444.
If webdriver didn't exit successfully for some reason, next run of webdriver-downloader will always fail.
Using a random port instead of fixed one should solve this problem.

Wait asynchronously

Replace std::thread::sleep with async_std::task::sleep or tokio::time::sleep.
It would be better to add cargo feature so users can decide which runtime to use.

Additional "chromium" environment

In webdriver-downloader/webdriver-downloader/src/os_specific/chromedriver/linux.rs at line 10, "chromium" boot name is not supported. This leads to an initialization error:

thread 'main' panicked at 'called Result::unwrap() on an Err value: Which(CannotFindBinaryPath)',


In the archlinux environment, the default installation through the package manager points to "chromium"

Add lightweight verification process

WebdriverVerificationInfo::verify_driver always run webdriver to check if it's properly installed.
However, in most circumstances it's enough to compare major versions instead of actually running it.
Adding lightweight verification process which only uses webdriver --version would be helpful for frequent verify_driver calls.

Find out alternatives to Mockall.

Related: #27.
Mockall requires 'static lifetime bound for mocking generics.
Removing Mockall will relieve this requirement, leading to more relaxed lifetime management.

Use thiserror to display all errors.

Currently, some errors are not being displayed properly due to its return types being ().
We should use thiserror to notify end users with detailed information.

Separate cli and lib as a separate crate

Currently, cli and lib are in same crate which results to mixed dependency.
By separating cli and lib as individual crates, we can minimize dependency required for each crate.

Windows CI sometimes fails

https://github.com/ik1ne/webdriver-downloader/actions/runs/5653813026/job/15315644707

Trying url for version 114.0.5735+90: https://chromedriver.storage.googleapis.com/114.0.5735.90/chromedriver_win32.zip. Verification failed: Failed to connect to driver: webdriver server did not respond: error trying to connect: tcp connect error: No connection could be made because the target machine actively refused it. (os error 10061).

Windows CI sometimes fails even though the tests run fine on local machine.

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.