-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OSX support? #31
Comments
Make sure that xvfb is available in 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. |
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 Thanks! |
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. Any idea? |
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 |
Thanks for explanation. |
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 ( |
Leonid, thanks for this. |
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 |
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. |
But it is right there in the 5th paragraph of the readme. In bold. :) |
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. |
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 |
@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. |
We use headless in the test helper for the city server, so its always Ideally headless would switch on RUBY_PLATFORM and just do nothing on osx On Sep 12, 2013 10:03 AM, "Leonid Shevtsov" [email protected]
|
OK, I'll think about it. |
Have found solution of the issue here |
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/ |
Using Mac OS X El Capitan. I had installed the latest XQuartz 2.7.9, and when running my tests kept getting |
Check if platform is not mac Cannot use headless on mac see: leonid-shevtsov/headless#31 (comment) Drop support of low resolution display, srew them.
is there any fallback for mac os? Just to skip xvfb requirement, without no code change |
For reference, this is now at http://old.afitnerd.com/2011/09/06/headless-browser-testing-on-mac/ |
On
ubuntu
you can installxvfb
byapt-get install
. OnOSX
, thexvfb
is inclued inXQuartz
. Though I have installedXQuartz
, the headless gem still doesn't work:How to tell
Headless
where is myxvfb
?The text was updated successfully, but these errors were encountered: