TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Headless Chrome is coming soon

293 pointsby AnbeSivamalmost 9 years ago

13 comments

jakozauralmost 9 years ago
That would be so awesome. The current alternatives:<p>1. Use PhantomJS: It easy to script, but it lags over real browser by few years and development is stagnant. Many real website doesn&#x27;t work in PhantomJS.<p>2. Use Chrome&#x2F;Firefox xvfb. You have real browser, but scripting is hard. E.g. even hello world examples like make a thumbnail of a website takes a lot of time to get right.<p>According to some rumors, headless Chrome existed before even Chrome was released to the public. Google use it to do web scraping. However, though headless browsers are great for developers, they are also great for spammers and ad fraud. So the main developer likely has conflict of interests whether to invest resources into making headless Chrome public.
评论 #11841060 未加载
评论 #11842032 未加载
评论 #11840830 未加载
评论 #11841210 未加载
评论 #11840255 未加载
评论 #11840444 未加载
juliangamblealmost 9 years ago
If this would benefit you - please star this issue: <a href="https:&#x2F;&#x2F;bugs.chromium.org&#x2F;p&#x2F;chromium&#x2F;issues&#x2F;detail?id=546953" rel="nofollow">https:&#x2F;&#x2F;bugs.chromium.org&#x2F;p&#x2F;chromium&#x2F;issues&#x2F;detail?id=546953</a>
frikalmost 9 years ago
From the bug comments:<p><pre><code> headless: Implement screenshot capturing (based on patch from skyostil@, also sets default window size to 800x600 to enable basic snapshot support) With the --screenshot option, headless shell will save a PNG screenshot of the loaded page.</code></pre>
评论 #11839941 未加载
jsprogrammeralmost 9 years ago
I just use XVFB.<p><pre><code> xvfb-run --server-args=&#x27;-screen 0 1024x768x24 -ac&#x27; chromium-browser --user-data-dir &lt;url&gt;</code></pre>
评论 #11839750 未加载
joshschreuderalmost 9 years ago
Could this be used for Selenium tests too? And with visual diff testing tools?
评论 #11839465 未加载
评论 #11840452 未加载
emilongalmost 9 years ago
This is great news. In general I&#x27;m hoping this makes it easier to do browser testing in more CI services, rather than isolating this type of testing to services that have to specialize in it just to get it to to work.<p>One (minor?) benefit over Phantom is having working file uploads, though it would be awesome to have that in Phantom too.
评论 #11839822 未加载
juliangamblealmost 9 years ago
Another way to solve this problem is to have Chrome in a docker container that you can start up: <a href="https:&#x2F;&#x2F;github.com&#x2F;SeleniumHQ&#x2F;docker-selenium" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;SeleniumHQ&#x2F;docker-selenium</a>
评论 #11839841 未加载
fuzionmonkeyalmost 9 years ago
This is awesome. I&#x27;ve been using Electron for browser tests which has been a big improvement over Phantom, but setting up xvfb can be a pain.
erikbalmost 9 years ago
Please link the source and not twitter next time.
gildasalmost 9 years ago
Great news! I hope this will allow to change the hard-coded limit of the maximum number of connection per server in Chrome [1].<p>[1] <a href="https:&#x2F;&#x2F;bugs.chromium.org&#x2F;p&#x2F;chromium&#x2F;issues&#x2F;detail?id=85323" rel="nofollow">https:&#x2F;&#x2F;bugs.chromium.org&#x2F;p&#x2F;chromium&#x2F;issues&#x2F;detail?id=85323</a>
shimon_ealmost 9 years ago
Isn&#x27;t chromium already bundled with chromedriver? Or at least it is on arch linux. (fyi, chromedriver conflicts chromium in aur because of this)
评论 #11839563 未加载
qzncalmost 9 years ago
I wanted this 10 years ago. It is fascinating that it took so long already.
评论 #11839928 未加载
shanemhansenalmost 9 years ago
I&#x27;m most excited about integration testing on sites with http&#x2F;2 deployed.