Comments (2)
I was working on my personal project, which requires webscraping so I looked into this library. The problem that came to my mind is that you need to have something-geckodriver already running, which i dont really know how to start programmatically... Can somebody explain it to me?
Hey i use a macro like this to spawn it programmatically
macro_rules! spawn {
($f: expr) => {
std::thread::spawn(move || {
Command::new($f).output().expect("failed to spawn");
});
};
($f: expr, $($x: expr),*) => {
std::thread::spawn(move || {
Command::new($f)
$(.arg($x))*.output().expect("failed to spawn");
});
};
}
macro_rules! exec {
($f: expr) => {
match Command::new($f).output() {
Ok(x) => println!("{}", str::from_utf8(&x.stdout).expect("failed to parse")),
Err(e) => panic!(e.raw_os_error()),
}
};
($f: expr, $($x: expr),*) => {
match Command::new($f)
$(.arg($x))*.output() {
Ok(x) => println!("{}", str::from_utf8(&x.stdout).expect("failed to parse")),
Err(e) => panic!(e.raw_os_error()),
}
};
}
#[tokio::main(flavor = "current_thread")]
async fn main() {
spawn!("geckodriver");
}
from fantoccini.
As @mdrokz says, it should just be a matter of running the geckodriver
command. Beyond that, running the WebDriver host is sort of outside the scope of this project :)
from fantoccini.
Related Issues (20)
- What's happening here? (fantoccini breaks String + &String) HOT 10
- Error when connecting to browserstack: Session not started or terminated HOT 1
- Test whether text is visible? HOT 3
- excute() doesnt execute some scripts correctly HOT 3
- SessionNotCreated error on second run with fantoccini and geckodriver HOT 1
- How to specify options for webdriver? HOT 1
- An error occurs in the IE mode of the Edge browser. HOT 2
- Testing of client&server-side Rust interaction HOT 1
- returning Prototype.Array shows in console.log but nothing from println. HOT 1
- Please add Network Request Interception HOT 1
- Get console log messages HOT 1
- webdriver might be part of public API HOT 1
- WheelActions needed HOT 2
- Any blockers for 0.20? HOT 1
- wait_* methods deprecated with no alternative HOT 2
- Any suggested pattern for closing the Client on test failure? HOT 1
- How can I use it with no display? HOT 1
- scrollIntoView HOT 2
- incomplete attr HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fantoccini.