Currently using the NPM package gulp-open to open the desired browser via gulp. It is working for chrome, firefox and internet explorer, however not with the Microsoft Edge browser.
My gulp task:
return gulp.src(base.app)
.pipe(open({
uri: 'localhost/' + cwd + "/app/" + path_base,
app: browser // chrome, iexplore, firefox
}));
I have tried with the following for the edge browser MicrosoftEdge, edge, Edge, microsoft-edge. Maybe it has something to do with the fact that you can't even open the edge browser from the system with a double click?
Edge can be found on the file system here: C:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftEdge.exe
Running it via the CLI also works like this (from here):
$ start microsoft-edge:http://www.cnn.com
How to open it via the gulp-open package?
I was wondering this myself, and I got the answer from the author stevelacy
You can see in the issue
As he says you can open any program as long as it is listed in the PATH. The IE worked for me as 'iexplore'.
You can find more info in this thread. https://superuser.com/questions/113345/how-to-launch-internet-explorer-from-the-command-prompt
The answer comes late, but I hope it is useful to some visitor.
cheers
Related
When i run the framework7 (basically cordova inside) with "start dev" => on browser it works.
I'm using "#bity/oauth2-auth-code-pkce": "^2.13.0"
Switching it to android (my app also needs to work for ios) doesn't work anymore. I guess thats cause the redirectUrl which is localhost on browser doesn't suit (no way back from OAuth-Server back to app (not the browser).
I was told to use "custom scheme" so i installed cordova-plugin-customurlscheme too, but it doesn't help when i say redirectUrl = "myChoosenSchemeName://" or something similar.
Am I on the right track? Can someone please tell me what to do to get OAuth2 Server happy with my app (the server responses with "invalid url").
Thanks!
Specifying path/filename to downloading file does not work in chrome.downloads api but does work for firefox browser.downloads api.
I have a very simple call in popup.js for chrome and firefox:
chrome.downloads.download({url: address, filename: path + "/" + filename, saveAs: false});
Here's another one for Firefox:
browser.downloads.download({url: addresss, filename: path + "/" + filename, saveAs: false});
It works perfectly as expected in firefox, but no matter what, I can't ever get it to work in chrome. Even with a simple download of google's image to a different file name never works chrome but does in firefox, such as:
chrome.downloads.download({url: "https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png", filname: "temp/temp.png"});
What am I doing wrong?
It's been awhile but I'll post my solution for whoever comes across this issue for their extension. It turns out that specifying a custom filename isn't working is because there are extension conflicts.
If there is another extension using the chrome.downloads API, specifically the chrome.downloads.onDeterminingFilename.addListener, which tries to specify the filename that overrides the original filename suggestion. This also happens even if the conflicting extension did not change your download options but just added a listener for onDeterminingFilename without doing any logic. This is a known chromium issue here: https://bugs.chromium.org/p/chromium/issues/detail?id=579563. That issue has been opened since 2016 and the devs still have not addressed it.
Workaround solution: implement your own chrome.downloads.onDeterminingFilename.addListener to suggest your custom filename. Make sure that you're only capturing downloads that you started yourself but comparing the download item's id and extension id. The only caveat is that the conflicting extension will produce an error saying they could not suggest their own filename.
Firefox does not have this issue because their extension API does not have onDeterminingFilename.
I am sure many of us are using Selenium to test applications with URL starting with https://....
I am facing this issue in my client network local and Jumpboxes, whenever I do a driver.get(“https://....”) to these URLs.
URLs starting with http://.... works fine.
I am using gecko 0.14, selenium 3.3.1 standalone server and Mozilla 50.1.0. Also checked with gecko 0.15.
Went through the suggestions over net and tried out the following workarounds :
• Creating new profile and setting capabilities and other properties. This helps manually , but through selenium the same issue persists.
• Adding Exception in Browser for new profile as well as default profile.
• Downloaded Mozilla 52.0 and tried the same.
None of them helped me out.
Questions :
Is this a proxy issue.
Can this be resolved.
Issue going on for a while. Please let us know if anything helped you out to resolve this.
Thanks,
Arpan
First you need to create a new FireFox profile say "myProfile".
ProfilesIni prof = new ProfilesIni()
FirefoxProfile ffProfile= prof.getProfile ("myProfile")
Now we need to set "setAcceptUntrustedCertificates" and "setAssumeUntrustedCertificateIssuer" properties in the FireFox profile.
ffProfile.setAcceptUntrustedCertificates(true)
ffProfile.setAssumeUntrustedCertificateIssuer(false)
WebDriver driver = new FirefoxDriver (ffProfile)
"setAcceptUntrustedCertificates" and "setAssumeUntrustedCertificateIssuer" are capabilities to handle the certificate errors in web browsers.
Hi I am new to chrome extension. I have build the basic chrome extension and I want to install it using inline installation. I followed the following link :
https://developer.chrome.com/webstore/inline_installation#already-installed
All is working properly. I want to check if extension is already installed or not so I referred the above document, whenever user install the extension at that time we are appending the new div using content script to my installation page on website. If that div is present it means the extension is already installed.
Following code is added in my content_script of chrome extension for appending the div whenever the extension is installed:
var isInstalledNode = document.createElement('div');
isInstalledNode.id = 'extension-is-installed';
document.body.appendChild(isInstalledNode);
Then my installation page can check for the presence of that DOM node, which signals that the extension is already installed:
if (document.getElementById('extension-is-installed')) {
document.getElementById('install-button').style.display = 'none';
}
But I am facing one problem, whenever I deleted my extension from settings/extensions, still the div is present on extension's installation page.
Is their any provision to remove the div when my extension is deleted or removed from browser?
You can't catch the uninstallation event for your own extension, though there is an management.onUninstalled, it is used for listening to other extensions/apps. See following answer for more details:
How to listen to uninstallation event in javascript from a chrome extension?
I just come up with two workarounds, one is creating another extension to listen to the uninstall of your first extension; another one is using runtime.setUninstallURL to visit a URL upon uninstallation, you can do something in server if you want.
BTW, for isInstalledNode, you needn't/shouldn't set the id, since there may be other elements in the webpage with the same id, you just need to create the node and use document.body.contains(isIntalledNode) to check if it exists.
I built a chrome extension. I don't want to host it (yet) in the chrome webstore. I want to self host it. I have packaged the .crx, and deployed it to my localhost. Here is the code I use to serve it:
app.get('/myext.crx', function(req, res){
var file = __dirname + '/public/myext.crx';
res.download(file);
});
Then I have an anchor tag that points to the file:
Install <strong>myExt for Chrome</strong>
When it downloads, it has the correct content-type header (per the instructions http://developer.chrome.com/extensions/hosting.html). Here is the info from the Network tab in Chrome Devtools when I click the anchor:
**Response Headers**
Connection:keep-alive
Content-Description:File Transfer
Content-disposition:attachment; filename=myext.crx
Content-type:application/x-chrome-extension
Date:Sat, 14 Dec 2013 07:09:46 GMT
Transfer-Encoding:chunked
X-Powered-By:Express
It all looks good, but Chrome still shows me the yellow banner error saying "Apps, extensions, and user scripts cannot be added from this website".
Am I missing a setting in the manifest? Can someone tell me what the issue is? Does it have anything to do with the fact that I am serving on localhost and the "homepage_url" and the "update_url" both point to my actual domain name?
Anyone, please.
UPDATE
It downloads the file, but gives me the aforementioned error. If I open Tools > Extensions and then drag the file from the bottom of Chrome onto the Extensions page, it won't install it. Nothing happens. HOWEVER, if I open a Finder window and drag it from the Finder window onto Tools > Extensions page, it installs fine.
Not sure if this info helps or not.
Chrome is starting to block extension installs that are not from the Chrome Web Store. If you don't want an extension to be fully published in the CWS, you can limit the audience with the publish to test accounts or accessible by URL only features.