Unable to obtain chrome runtime in Puppeteer - puppeteer

I am trying to test an extension using Puppeteer. While Puppeteer shouldn't have chrome.runtime, on evaluating the automated browser runtime is also not available on Chromium as well.
The reason I ask this is because I can't use chrome because it doesn't allow loading of extensions using --disable-extensions-except. Any workaround this?
Again this question goes back to extension invocation using puppeteer. I was wondering if there is a way around this?

Related

Is it possible to display Extension information on Google Chrome Mac TouchBar? if not, what about network calls on the touchbar?

I am trying to come up with a way of having the touch bar on my mac display the network calls being made on the page I am navigating, I already have an extension that captures the exact network calls i need so If it is easier to just have an extension pass information to the mac touch bar then that would be even better.
I already tried using BetterTouchTool without luck.
No, the Chrome extension platform does not have TouchBar support. You may be able to accomplish your goal by creating a native app in Objective C or Swift and using the nativeMessaging API to share data between your extensions and application.

what's the principle of debugging react-native remotely in chrome?

I know that chrome devtool could be used as an open debugger frontend, with receiving debug info by a websocket from debugger host and displaying them such as source file and console log, it also supply a flow-control GUI for single step task as long as the host supports.
but according to the ReactNative's remote debug page:
React Native JS code runs as a web worker inside this tab.
it seems that the chrome is not only a frontend but also executes the code being debugged? so my question is:
1.how can the device-dependent code be executed in chrome?
2.will the device also execute code ? if it is, what's the relationship between it and chrome? if not, how does the app run in device?
1.how can the device-dependent code be executed in chrome?
In case of Chrome debugging mode, the JavaScript code runs within Chrome itself (instead of the JavaScriptCore on the device) and communicates with native code via WebSocket. Here, it will use the V8 engine. This allows us to see a lot of information on the Chrome debugging tools like network requests, console logs, etc.
Source: React Native Made Easy
Note that Chrome's V8 Javascript Engine is not the only React Native can use, you could debug in Safari as well and the code would run on Safari's JavascriptCore. See this for more
2.will the device also execute code ? if it is, what's the relationship between it and chrome? if not, how does the app run in device?
No, the JS code executes only in one place, either the browser's javascript engine if you are debugging, thus communicating with the device via Websockets, or the JavascriptCore of the device if running without debugging.

How to detect if Google Cast extension is installed in Chrome?

I am developing a Google Cast sender application and on my web page in chrome browser, I need to detect if the Google Cast extension is installed or not before doing something.
I did some searching and found some suggestions for detecting chrome extensions if developer owns both website and extension. In my case, I am trying to detect an extension not developed by me. Is there an API or another way to detect installation of a third party chrome extension?
The standard way (used by the library itself) of detecting whether the extension is installed is to try and load a web-accessible file from it.
This, however, leads to an unwanted effect of producing error messages in the console (which are "network" errors and not JS errors, and therefore cannot be hidden) when Cast is not installed.
Also, you should not do this probing yourself, specifically because you don't control Google Cast - and it's not guaranteed to be stable in how it operates internally. There is a library you're expected to use as a Sender, and you should rely on the library initialization callback for detecting Cast.

Interacting with firefox using an external program

I am looking for a way to interact with a web page and enter data to certain fields in it using an external program that interact with Firefox (or Chromium) web browser. The best I could find is the console commands for the browser, but they only let you go to a certain URL and not interact with the pages' content. I have also tried looking for some extension to do the job but I could not find any. Any suggestions?
You could create Chrome extension that communicates with your application via Chrome Native Messaging API: https://developer.chrome.com/extensions/messaging.html#native-messaging
Take a look at Selenium and the tools mentioned at Selenium alternatives?.

How to use Google Chrome with Developer Tools with Selenium RC

I can open a google chrome browser like this:
selenium = new DefaultSelenium(Server, ServerPort,
"*googlechrome", DomainURL);
but it would be really useful to have it opened with the Chrome Developer Tools enabled, to be able to debug problems when developing the tests.
I can't manage to enable them, anybody knows about this?
Thanks in advance
You need to use a custom profile that have developer tools enabled. Selenium is starting Chrome with a new clean profile each and every time you use it. Selenium 1 does not offer a mechanism for overriding this. Selenium 2's ChromeDriver, however, can use an example profile.
You can try using Firefox with Firebug