jonhoo / jonhoo/fantoccini

Getting started and unable to run first example

Open
#271 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2k
Forks
135
PR merge metrics
No merged PRs in 30d

Description

Is there a getting started guide I could use? I looked in the examples folder but these don't seem to be complete projects. Quite new to Rust so not sure how to get started. I tried to make a project to run the first example in the readme but immediately got an error.

```
cargo run
Compiling scraper-wiki v0.1.0 (~/code/scraper-wiki)
error[E0599]: no function or associated item named `rustls` found for struct `ClientBuilder` in the current scope
--> src/main.rs:12:28
|
12 | let c = ClientBuilder::rustls()
| ^^^^^^ function or associated item not found in `ClientBuilder<_>`
|
note: if you're trying to build a new `ClientBuilder<_>` consider using one of the following associated functions:
ClientBuilder::>::native
ClientBuilder::::new
--> ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fantoccini-0.21.1/src/lib.rs:198:5
|
198 | pub fn native() -> Self {
| ^^^^^^^^^^^^^^^^^^^^^^^
...
207 | pub fn new(connector: C) -> Self {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0599`.
error: could not compile `scraper-wiki` (bin "scraper-wiki") due to 1 previous error

```

### Cargo.toml
```toml
[package]
name = "scraper-wiki"
version = "0.1.0"
edition = "2021"

[dependencies]
fantoccini = "0.21.1"
tokio = { version = "1.39.3", features = ["rt-multi-thread", "macros"] }
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the first example in the README, the examples folder, and the reported src/main.rs and Cargo.toml setup. Reproduce the cargo run failure using the listed fantoccini version, then compare the example with the current API. Done means a newcomer can follow a complete, working getting-started example.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.