Code Monkey home page Code Monkey logo

Comments (11)

phrohdoh avatar phrohdoh commented on May 27, 2024 2

I noticed that in the geckodriver snippet a protocol was not given.

I could be wrong but I believe the http protocol is necessary.

from fantoccini.

jonhoo avatar jonhoo commented on May 27, 2024

The following works for me:

$ chromedriver --port=4444
Client::new("http://localhost:4444");

So does just starting geckodriver and using the same Rust code to connect.
You're running these two commands on the same machine, right?

from fantoccini.

kokinarido avatar kokinarido commented on May 27, 2024

yes

from fantoccini.

kokinarido avatar kokinarido commented on May 27, 2024

now it sees the chrome driver. but

thread 'main' panicked at 'called Result::unwrap()on anErr value: NotW3C(Object({"message": String("session not created exception: Missing or invalid capabilities\n (Driver info: chromedriver=2.29,platform=Linux 4.11.5-1-ARCH x86_64)")}))', src/libcore/result.rs:859

from fantoccini.

jonhoo avatar jonhoo commented on May 27, 2024

Are you using the latest commit on master? And a recent version of Chrome + chromedriver?

from fantoccini.

kokinarido avatar kokinarido commented on May 27, 2024

yes

from fantoccini.

jonhoo avatar jonhoo commented on May 27, 2024

Seems this is happening on the latest version of Chrome for me too -- not clear why. I suspect Chrome's WebDriver implementation is deviating from the W3C spec again, so you should stick with geckodriver for now (since it's a conforming solution).

from fantoccini.

kokinarido avatar kokinarido commented on May 27, 2024

the latest version of geckodriver

thread 'main' panicked at 'unexpected webdriver error; webdriver returned error: connection refused', /home/user123/.cargo/registry/src/github.com-1ecc6299db9ec823/fantoccini-0.6.4/src/lib.rs:173
note: Run with `RUST_BACKTRACE=1` for a backtrace.

from fantoccini.

jonhoo avatar jonhoo commented on May 27, 2024

geckodriver takes a little while to start up -- make sure you wait for the server to be ready before trying to launch the Rust program. Beyond that, I don't know what to tell you. It works on my machine with geckodriver :/

from fantoccini.

jonhoo avatar jonhoo commented on May 27, 2024

Apparently the chromedriver issue is known, and has been fixed with chromedriver 2.30.

from fantoccini.

jonhoo avatar jonhoo commented on May 27, 2024

@kokinarido one workaround that might work for you for chromedriver is to replace

.map(|s| s.contains("cannot find dict 'desiredCapabilities'"))

with

.map(|s| s.contains("Missing or invalid capabilities"))

in the code. There should only be one place that it appears. This change and much more will eventually land in the next release (currently on the futures branch).

from fantoccini.

Related Issues (20)

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.