Closed McSneaky closed 3 years ago
@McSneaky I wonder is it due to latest 0.29.0 upgrade or was true for previous versions too?
@McSneaky I wonder is it due to latest 0.29.0 upgrade or was true for previous versions too?
Sadly no idea :neutral_face: . The day I made the issue was the first time I ever used it
@McSneaky well, maybe a connection parameters should have some parameters to run in headless mode?
I don't know the webdriver specifics, but in our builds it works OK out-of-the-box:
docker run --rm -d --network=host --shm-size 512m \ --name medea-webdriver-firefox \ instrumentisto/geckodriver:84.0.2
GECKODRIVER_REMOTE="http://127.0.0.1:4444" \ WASM_BINDGEN_TEST_TIMEOUT=60 \ cargo test --target wasm32-unknown-unknown --features mockable Finished test [unoptimized + debuginfo] target(s) in 0.10s Running /home/runner/work/medea/medea/target/wasm32-unknown-unknown/debug/deps/medea_jason-870dc78cb583511a.wasm Running headless tests in Firefox on `http://127.0.0.1:4444/` Try find `webdriver.json` for configure browser's capabilities: Ok Starting new webdriver session... Visiting http://127.0.0.1:42725... Loading page elements... Waiting for test to finish... running 143 tests
Also, you can always use
-e MOZ_HEADLESS=1
indocker run
if your installation does require it.
I don't feel like it's something that should be baked into the image. But mentioning this issue in README makes sense. Would you like to submit a PR?
I don't know the webdriver specifics, but in our builds it works OK out-of-the-box:
@tyranron Hmm, that's odd
The command I used which caused problem: docker run --network=host instrumentisto/geckodriver
When running it with docker run --network=host -e MOZ_HEADLESS=1 instrumentisto/geckodriver
then everything is good
Using copy-paste of that first example in https://github.com/jonhoo/fantoccini#examples to test
I'll file in PR to mention it in readme :+1:
@McSneaky yeah, the guess was right. wasm-bindgen
explicitly requests headless mode when creates a new WebDriver session. Seems that fantoccini
doesn't do that out-of-the-box, but you always may specify them explicitly via Client::with_capabilities()
.
Thanks for the PR!
Aah, that's cool! Didn't know about wasm-bindgen
:yum:
I think the issue can be closed, since there are already 2 solutions for it in here and there's no real need to keep it open anymore
Without adding this environment variable every attempt to connect fails with error:
Not sure if it's intentional or not. Based on readme it feels like it should be headless and not require display output