how to use playwright with plugin (like stylus, a chrome plugin) - plugins

I am using chromium.launchPersistentContext to open a head chrome. I want to use plugins, like stylus, that change the css of the page. Why chrome plugins does not appear with my local chrome instance ? I can see the bookmark, have the session saved, but no plugins appearing. Any idea ?

Extensions only work in Chrome / Chromium in non-headless mode, launched with a persistent context.
Are you using headless mode?
or have you tried --load-extension?
https://playwright.dev/docs/chrome-extensions

Related

Service-worker.js not available in the for debugging in the chrome dev tools

I understand service-worker runs as a separate thread parallel to the main thread.
I have an android app that runs Webview. My app is in react and i use workbox strategies for caching.
Service worker updates everytime I do a new build. However the source file of service-worker.js is not available in the chrome dev tools for me to debug.
Any idea how i can get the file there so that i can put breakpoints and debug ?
PS: just few days before i could get the file for debugging the dev tools. I am not sure what has changed. I havent changed any settings the the browser.
I'm having the exact same problem with the same symptoms and timeframe. I tried everything I can think of and can no longer get remote debugging of a service worker running in an Android WebView to work.
Like you I am sure it was working in mid-February and stopped working in the last few weeks.
I submitted a bug to Google which you can find here.
I think we can only hope it will be fixed in an upcoming release of Chrome.
You can inspect your extension's service worker but it's tricky, I don't know why Chrome doesn't show the service worker in the default chrome extension devtools.
here is how you can do it:
open chrome://serviceworker-internals/?devtools
find your extension there, there is a textarea that shows console logs, every console log will show the extension path in chrome e.g.
Console: {"lineNumber":688,"message":"[crx-helper] connection error","message_level":3,"sourceIdentifier":3,"sourceURL":"chrome-extension://aobpjedackhiamobjolncblfckdgfjbk/background.bundle.js"}
get that sourceUrl chrome-extension://aobpjedackhiamobjolncblfckdgfjbk/background.bundle.js yours will have a different id, which you can also see in chrome://extensions
paste that path in a new tab and open devtools (screenshot).

Is the Eclipse web browser using the default OS browser?

Is the Eclipse web browser an instance of the SWT Browser class or is actually using one of the browser I have installed in the OS? i.e: Chrome or Firefox, if so, is there a way to determine what browser is using?
I believe that if you are using a Linux distro, your default browser will be Mozilla Firefox. If you are using Windows the default is IE (this might have been changed in the current release of Eclipse). You can choose between internal and external browsers here:

Get error messages Chrome packaged app

How can I see error messages when running a Chrome packaged app? I've been running the app in the browser and using DevTools but this technique has it's limitations.
If you need to inspect app windows, you can reach them at chrome://inspect/#apps
Or, as Daniel mentions, use the Developer Tool app.
General Chrome Debugging
By opening
chrome://inspect/#apps
you may debug all Apps and Extensions.
You may also like the official Google Chrome Apps & Extensions Developer Tool
Debugging Chrome Extensions
As described in the chrome developer Tutorial you can activate the developer mode within the settings. Afterwards an inspect popup option is avaialbe when you right-click an app-icon.

Getting rid of browser restart on plugin installation

I have been working on a browser plugin for windows which involves displaying camera output in browser. Presently I'm working on Windows 7. After plugin installation, I want to start the plugin immediately without restarting the browser. I noticed that as soon as plugin is registered, it started working in Google Chrome Version 24.0.1312 as well as in Internet Explorer 9. But it fails to do so in Mozilla Firefox 18.0.1. Can anyone help me solve this problem of restarting the browser after plugin installation. And will this problem occur in MacOS as well?
Thanks
You need to do a navigator.plugins.refresh(false); in javascript to tell the browser to rescan the plugins.
Explore /Installer/js -folder in FireBreath sources

Eclipse: Choosing Run on Server doesn't launch Firefox, it launches Eclipse's internal browser

I am new to Eclipse and I have created a small web app and it works but when I do Run on Server (Tomcat) from Eclipse it launches the website in its own internal web browser.
I wondered if it was possible to have it launch Firefox for example?
Do I need to download Aptana?
I would just enter the URL in your preferred browser, and bookmark it. As simple as that. You'll have to do it with different browsers anyway if you want to test the app on multiple browsers.
You can also choose which browser is used by going to Window - Preferences - General - Web Browser.
yes if u want your application to get started on firefox ..Go to window tab at the top of your eclipse IDE from there preferences and the go to general from there select browsers
check radio button of use external web browser and select the browser u want firefox or IE..