Is Google Chrome embeddable? - google-chrome

I've asked myself if one can embed the google chrome browser engine in an own application. I'm using Delphi 2009. There's an IE ActiveX wrapper component delivered with the IDE. Also, there's a Firefox ActiveX component out there, but it's based on very old code.
I'd like to embed the chrome engine. Is there a way to do this?
Thanks in advance,
David

Google Chrome is basically WebKit layout engine + nice UI. And WebKit can be embedded.
There's also chromium embedded framework (CEF).
And finally, check out Awesomium.

Update 2:
A very good fit for this would be the new Electron Shell
Update:
As a commenter points out under this answer, this is no longer supported. For good reasons I guess.
Recently Google released the Chrome Frame active X for MS IE
see if that helps
http://code.google.com/chrome/chromeframe/

I've just release a pre-alpha version of CefSharp my .Net bindings for the Chromium Embedded Framework.
Check out source or grab bins and give me your thoughts: https://github.com/chillitom/CefSharp

Related

Puppeteer: Can't access iframe elements after update from 2.1 to 3.1 with built-in firefox

I recently updated my puppeteer version from 2.1 to 3.1. I was using pupeteer-firefox on the previous version. And now since pupeteer 3.1 has firefox built-in, I am using that. But it's only an experimental feature from pupeteer.
This code was working properly with the previous version.
const elementHandle = await page.$("iframe[src^=\"https://docs.google.com/picker\"] [id=\":7\"]")
await elementHandle.click()
Steps to reproduce
login to google: https://accounts.google.com/ServiceLogin?hl=en&gl=en
Go to: https://www.google.com/maps/d/?hl=en&gl=en
Create a new map
search for a location and add it to the map
click on the add image icon image icon
Now an iframe will open up. I need to click on the element with id=":7" inside the iframe and input image url. Can some one please help me out?
This is the official test result of puppeteer's firefox.
https://hg.mozilla.org/mozilla-central/file/tip/remote/puppeteer-expected.json
Every test against iframe is either FAIL or SKIP.
And google won't give support for firefox inside the pupeteer.
So I've come to the conclusion that it's not possible to access the iframe using pupetteer especially when cross-site scripting is banned.
I've abandoned puppeteer and started using microsoft's playwright. And everything's going good.
Please note that not Google is working on Puppeteer support in Firefox. And as you already said yourself Firefox support is in experimental stage right now. That said we are working hard to add better support for various features and APIs, but that's not a task that can be done within a week.
In regards of your question I can say that I added iframe support for a lot of APIs recently, and it's all available in Firefox 79 now.
Also note that Playwright is using a modified and unofficial Firefox build based on a recent Firefox beta.

How does the Brave browser have Chrome's dev-tools?

Really Quick question:
Why does the Brave browser have Chrome's dev-tools?
Does this also mean that I don't need to test my website in Brave if it works in Chrome?
Thanks :)
Take a look at their github page. Especially the tags they added:
Notice the word "Electron", now I could explain to you what Electron is but they have an excellent explanation on their Electron Home page:
Electron is an open source library developed by GitHub for building
cross-platform desktop applications with HTML, CSS, and JavaScript.
Electron accomplishes this by combining Chromium and Node.js into a
single runtime and apps can be packaged for Mac, Windows, and Linux.
As you can see, Electron uses "Chromium". I could explain but.... you've guessed it they offer a great explanation themselves:
The Chromium projects include Chromium and Chromium OS, the
open-source projects behind the Google Chrome browser and Google
Chrome OS, respectively. This site houses the documentation and code
related to the Chromium projects and is intended for developers
interested in learning about and contributing to the open-source
projects.
So thats why you can access the chrome dev tools inside Brave.
On to your other question:
I don't need to test in Brave if my website works in Chrome?
Yes and no, you can be fairly certain that Brave will do everything Chromium does. But in the end we can't be certain what Brave does to the pages loaded through it. Having said that I won't be giving you a firm answer on this :)
(PS: if you set up automatic testing it doesn't really matter if you have to test another browser)

Embed chromium with extension support

I'd like to experiment with building a browser based on Chromium, ideally with support for Chrome-extensions.
I've looked into the Chromium Embedded Framework, which does not include support for extensions.
Are the only options available to either:
reimplement the extension-API on top of CEF; or to
base the project on the Chromium source,
or are there other alternatives?
Are the only options available to either:
reimplement the extension-API on top of CEF; or
to base the project on the Chromium source,
Pretty much. But, as wOxxOm mentions in comments, CEF plans to implement the API - eventually.

How to promote to install Chrome Extensions from your own website?

When I visit some websites, on top of the browser it promotes me to install Chrome Extension by saying "This website now has Google Chrome Extension... Install".
Anyone knows how to do this? Does Google already provide scripts to do this?
Example: Visit the following site using Chrome:
http://www.independent.co.uk
Now, it's possible to do what you need. Just follow this link, that explains how to use "inline" installation once you've published your app or extension at Chrome Webstore.
PS. Inline installation only works in Chrome 15+
Paul Kinlan's Badgemator is a good resource for this sort of thing. It creates a JavaScript snippet that you can put on your site in order to direct users to the webstore entry.
It doesn't attempt to mimic Chrome's infobar in the same way that The Independent does, but I personally think that's a good thing. Pretending to be part of the browser is a good way to confuse users, and isn't something I'd recommend (especially now that the infobar extends outside the browser window into Chrome's own UI).
What you're seeing is not built into Chrome, and not provided by Google.
The site will have some code that detects your browser agent (either via Javascript or a server-side script), sees that it's Chrome, and then adds some extra HTML/CSS/Javascript to make a mock UI element to grab your attention. Inspect the element to see what's really happening.
Another example is http://page2rss.com/page?url=www.stackoverflow.com/
Also, see Alerting website visitors that a chrome extension is available - how?
I wrote a jQuery extension that does just that: http://blog.dreasgrech.com/2012/01/promoting-your-chrome-extension-with.html
The simplest way to use it is to simply pass the ID of your Chrome extension:
$.fn.extInfobar({
id: 'nbilgjjflfiiijecdjpnbganoiafneph'
});
That generates the following:
From Chrome 15 there is API for this.
Just ask Chrome if your extension is installed.
You need to publish your extension in Google Chrome Extensions site, then you'll be able to publish it in your site.
You'll need to pay a one-time fee ($5) in order to get registered as a developer.
As of 06/12/2018, inline installation is deprecated. For more information, read our Chromium Blog post and Migration FAQ.
From: https://developer.chrome.com/webstore/inline_installation

Tool/framework for automated web app testing in Google Chrome browser?

Is an opensource/commercial tool/framework, available for automated web app testing in Google Chrome browser on Windows XP / Vista? ( An alpha/beta Tool is also OK)
Thanks
Selenium supports Chrome pretty much out of the box because it works by injecting javascript in the web page. http://selenium-rc.openqa.org/
Webdriver has an early version of Chrome driver. http://code.google.com/p/webdriver/
Both are open source and works on Windows.
I found a tool called QA Agent (http://qaagent.com). This is a web based IDE where you can develop your tests using jQuery and javascript. Currently it supports only Chrome so may be it will be a good choice for you. And of course it is free.
For those who are not developers you could try FRET for automated web testing with Chrome. It's still in beta and even though it states that no programming is needed a basic understanding of HTML / CSS etc. is recommended.