Comments (20)
I'm sorry, but Headless would only work with applications using the X Server on OSX. Practically any native OSX application uses Quartz, the OSX graphics subsystem, and not X. That includes Chrome and Firefox on OSX.
The X Windowing System is the primary graphics subsystem for Linux, thus most, if not all, graphical Linux apps use the X Server and can be ran "headlessly" with Headless. That includes Chrome and Firefox on Linux.
On OSX the X Server is only included for compatibility (that's why it's not even packaged with 10.8). For example, Wine apps on OSX use the X Server, and some utilities from Linux land do.
If there is a way to run Quartz applications headlessly, then I know nothing about it and supporting Quartz is not a goal of Headless.
Read up here:
http://en.wikipedia.org/wiki/X_server
http://en.wikipedia.org/wiki/Quartz_(graphics_layer)
from headless.
Using Mac OS X El Capitan. I had installed the latest XQuartz 2.7.9, and when running my tests kept getting Xvfb is frozen (Headless::Exception)
. I looked all over for fixes to no avail (and this issue page kept popping up in my searches), and just couldn't get xvfb to run. Finally, I came across this post https://discussions.apple.com/thread/7590534?start=0&tstart=0. So I uninstalled XQuartz 2.7.9 (https://xquartz.macosforge.org/trac/wiki/X11-UsersFAQ#UninstallSnowLeopardorLater), and installed XQuartz 2.7.8, and running my tests ran without any errors from headless.
from headless.
I followed your guide, and am using headless in object mode, however whenever I launch chrome, it's not actually running headless. I've verified that xvfb is installed (path is /usr/X11/bin/xvfb). I'm using OS X (version 10.7.4).
headless = Headless.new
headless.start
driver = Selenium::WebDriver.for :chrome
driver.navigate.to 'http://www.google.com'
Thanks!
from headless.
Make sure that xvfb is available in PATH
. Headless just calls which xvfb
to locate the executable.
Still, this isn't really "OSX support", since xvfb will only work with X applications, which are a very small subset of (ususally non-native) OS X applications.
from headless.
I have the same problem on OS X Lion (10.8.2). I installed XQuartz and I have xvfb on my hd. When I run the demo code the browser doesn't run headless.
I get no error.
Any idea?
from headless.
Thanks for explanation.
Is there any way to run Firefox headlessly on OS X?
from headless.
If you want to avoid the window popping up when you are running tests, maybe pinning it to a separate Space will help. Or starting it in the background (open --hide /Applications/Firefox.app/Contents/MacOS/firefox
)
from headless.
Leonid, thanks for this.
Do you maybe know how its possible to launch firefox in the background / in silent mode with Watir?
It doesn't appear that it supports passing arguments to the browser..
from headless.
PhantomJS runs headlessly on Mac OS X using an agnostic WebKit-based browser. I believe it uses Xvfb to accomplish this? It's been a while, so I'm not 100% sure of the details.
I understand someone has a capybara/phantomjs gem. Not sure if there's a hybrid solution in there for Headless
from headless.
Should we put it in the readme, that headless gem does not support mac osx? As, its confusing people and searching all over to find an answer.
from headless.
But it is right there in the 5th paragraph of the readme. In bold. :)
from headless.
Oh ok, its probably not direct. Headless will not hide :). We can probably say it directly, "headless" is not for mac osx in the very first paragraph.
from headless.
Could it possibly be made not to require XVfb on OSX? it's a bit annoying to have to install a 1.5Gb package, in order to not use it. I'm sure the answer is "Don't use headless on OSX", but building an implementation that swaps out Headless
for NotHeadless
based on RUBY_PLATFORM
seems like something that might be more widely useful than just at my client's place?
from headless.
@leehambley could you elaborate on the problem you're having? If you're not using Headless, why do you need to install Xvfb?
The 1.5G package can't be avoided, because Xvfb is just a small slice of the entire X Server layer, all of which is required for the apps to work.
from headless.
We use headless in the test helper for the city server, so its always
loaded, and in all setup and teardown blocks.
Ideally headless would switch on RUBY_PLATFORM and just do nothing on osx
(ie not even check for xvfb)
On Sep 12, 2013 10:03 AM, "Leonid Shevtsov" [email protected]
wrote:
@leehambley could you elaborate on the problem you're having? If you're
not using Headless, why do you need to install Xvfb?The 1.5G package can't be avoided, because Xvfb is just a small slice of
the entire X Server layer, all of which is required for the apps to work.—
Reply to this email directly or view it on GitHub.
from headless.
OK, I'll think about it.
from headless.
Have found solution of the issue here
https://github.com/firstbanco/jasmine-coverage/issues/5#issuecomment-21822887
from headless.
FYI, for those pointing out xvfb issue for FF and Chrome on Mac (for Selenium, etc.), you may need to find an x11 build/version of FF (and/or Chrome, but for Mac?), not the standard OS binary/install. This old article is one reference: http://afitnerd.com/2011/09/06/headless-browser-testing-on-mac/
from headless.
is there any fallback for mac os? Just to skip xvfb requirement, without no code change
from headless.
FYI, for those pointing out xvfb issue for FF and Chrome on Mac (for Selenium, etc.), you may need to find an x11 build/version of FF (and/or Chrome, but for Mac?), not the standard OS binary/install. This old article is one reference: http://afitnerd.com/2011/09/06/headless-browser-testing-on-mac/
For reference, this is now at http://old.afitnerd.com/2011/09/06/headless-browser-testing-on-mac/
from headless.
Related Issues (20)
- "Cannot establish any listening sockets" error precludes autopick: true
- Dimension problem HOT 1
- audio problem
- Display socket is taken but lock file is missing on mac within sidekiq
- Chrome Webdriver hangup on ruby 2.6 HOT 1
- New release? HOT 2
- cant require file HOT 2
- read_nonblock issue HOT 1
- How could I produce a fragmented mp4? HOT 2
- Display socket is taken but lock file is missing HOT 14
- Run Concurrently (using different ports?) HOT 5
- Question: how do you anticipate headless to work with Docker Selenium HOT 4
- Audio Video recording HOT 1
- Few ideas HOT 1
- import: unable to open X server `localhost:100' @ error/import.c/ImportImageCommand/364. HOT 2
- ffmpeg issue on Mac HOT 5
- Running headless with flash HOT 1
- dimensions not the same as what I've set HOT 1
- how to use on command line
- Using headless in a multithreaded program
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 headless.