ik1ne / webdriver-downloader Goto Github PK
View Code? Open in Web Editor NEWCli Interface&Library for webdriver download.
License: MIT License
Cli Interface&Library for webdriver download.
License: MIT License
Add support for linux, Mac
Instead of formatting browser_path.display(), we should properly pass arguments as Path on Windows Powershell.
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.
Replace "C:\Program Files" with %ProgramFiles(x86)%.
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.
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.
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.
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"
There is a slight random delay for webdriver initialization, in other words it takes some time for the webdriver to open ports.
This random delay causes the verification process fail because the port is not open yet.
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.
Related: #27.
Mockall requires 'static lifetime bound for mocking generics.
Removing Mockall will relieve this requirement, leading to more relaxed lifetime management.
If there's multiple versions of same major version(for example, 110.0.5, 110.0.6, 110.0,7) all versions will be tried.
We should try one version with the highest minor version and skip the rest.
In case the users want to skip the verification of the downloaded driver, we can support --skip-verification option to download only one version and exit early.
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.
It's tedious to find default path when using the lib.
Moving the default path finding logics to lib will solve this.
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.
https://developer.chrome.com/blog/chrome-for-testing/
Google Chrome 116 and newer versions do not support chromedriver, instead Google Chrome for Testing should be used.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.