Comments (3)
@timvol
Where does your headless browser runs: locally or in Docker container?
The DISPLAY
variable is usually required by Selenium to run @javascript
tests.
https://stackoverflow.com/questions/24653127/selenium-error-no-display-specified
The Docker image used to test this package already has everything setup https://github.com/drevops/behat-screenshot/blob/master/docker-compose.yml#L11 Maybe you can use it as-is.
from behat-screenshot.
I'm using geckodriver + Firefox, but I also tested it with chromedriver + Chrome and both are telling me the same message mentioned above. Currently the drivers and the browsers are both inside the container where my Behat test runs.
I'll try to "optimize" it so that I can run them in a separate container (you mentioned above). Maybe it solves the problem. I'll come back when I know more...
from behat-screenshot.
When this extension is enabled, it tries to start a browser session using one of the existing drivers. That driver would be communicating with the browser to get the session started. It is up to the browser's environment and installation to have all the tools required to be able to run it in a headless mode (like having Xvfb installed etc.).
Also, need to make sure that your Behat configuration uses the correct driver in the configuration.
For example, to test JS screenshots, this extension's own behat.yml
uses selenium2
driver. This driver then talks to browser through Selenium.
The driver may actually talk to browser in the headless mode around selenium. You would have to find a suitable driver for this.
See this list of supported drivers https://github.com/FriendsOfBehat/MinkExtension/tree/master/src/Behat/MinkExtension/ServiceContainer/Driver
I'm going to close this issue as it is not related to this extension directly.
from behat-screenshot.
Related Issues (20)
- Exception thrown if Selenium Driver's session has not been started
- Configure screenshot name pattern in behat.yml HOT 6
- Compatibility with Drupal 9 HOT 1
- Record scenario screenshots for every step HOT 3
- Configurable (templated) filenames for captures HOT 1
- Make initialisation consistent for Selenium and non-Selenium drivers HOT 1
- Move to the DrevOps namespace HOT 1
- Video record of test with chrome HOT 1
- Update repo structure to https://github.com/AlexSkrypnyk/scaffold HOT 1
- Install Docker Compose in CircleCI tasks HOT 1
- Selenium fails to connect (local and CircleCI) HOT 1
- Dependency Dashboard
- Unable to upgrade to the latest Selenium Docker container HOT 2
- Update step definition "language" to be consistent with Gherkin standards
- symfony 7, drop unsupported symfony HOT 1
- Move CI to GHA
- Update to Scaffold 0.12.1
- Update to 1.3.0 incompatible with drupal/drupal-extension requirements for symfony/http-client HOT 1
- Update readme and behat.yml.dist to contain new options added in #37
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 behat-screenshot.