Comments (4)
For anyone who might with this struggle as I did, you need to add browserName, it won't process the args at all otherwise. Not sure if same applies for other browsers but my guess is, it does. I thought the driver can figure it on its own, but seems like it needs this "hint".
let cap: Capabilities = serde_json::from_str(
r#"{"browserName":"chrome","goog:chromeOptions":{"args":["--headless"]}}"#,
)
.unwrap();
let driver = ClientBuilder::native()
.capabilities(cap)
.connect("http://127.0.0.1:4444")
.await
.expect("failed to connect to WebDriver");
Machine: x86 macOS Ventura 13.1 (22C65)
Driver: ChromeDriver 113.0.5672.63
from fantoccini.
I think I found the issue! Should be fixed shortly in a new minor release :)
from fantoccini.
Wonderful, tysm!
from fantoccini.
Glad to hear you've found it useful! I'd also love to hear about any documentation shortcomings you may have come across so that we can improve things going forward! Documenting the use of serde_json::json!
for capabilities for example would be a great addition.
As for the issue at hand, that's pretty weird. What happens if you run chromedriver with --verbose
? Looking at the Chrome docs, what you pass in should be sufficient. Looking at this SO question, some people seem to be passing headless
without --
, and while that doesn't immediately make sense to me, it could be that that's necessary for some reason?
from fantoccini.
Related Issues (20)
- 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
- Can you automate the geckodriver session initialization? HOT 2
- 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 4
- How can I use it with no display? HOT 1
- scrollIntoView HOT 2
- incomplete attr HOT 1
- Panic when webdriver could not be reached HOT 1
- chrome fails to change browser name HOT 1
- Please help, can't run chrome browser HOT 1
- Errors related to the request to open cookies
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.