google-chrome-extension

Automated testing of Chrome extension notification

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-25 18:01:28
问题 I have Selenium WebDriver + ChromeDriver successfully loading and interacting with my Chrome extension. My extension creates notifications, which I would like to be able to interact with from my automated tests, e.g. pressing a button on the notification. I take it this is not possible with Selenium, since notifications are not part of the DOM. Has anybody considered how they might include interactions with notifications when it comes to automated testing of Chrome extensions? 来源: https:/

Chrome Extension Chaing Content From the Javascript

删除回忆录丶 提交于 2020-01-25 17:27:30
问题 So, I am trying to do a basic Google Chrome Hello World kind of extension. Can someone explain me why the below code doesn't work? Thanks. popup.js: document.getElementById("foobar").innerHTML = "Hello Chrome Extensions"; popup.html: <!doctype html> <html> <head> <title>Hello Chrome</title> <script src="popup.js"></script> <div id="foobar"></div> </head> <body> </body> </html> I am following the "framework" of http://developer.chrome.com/extensions/getstarted.html. 回答1: It can be solved in

Automatically getting google search results from extension

自作多情 提交于 2020-01-25 15:32:06
问题 This might have been asked before in different forms. My use case is that i'm trying to generate http request from a chrome/firefox extension to a google search results page (by just the url of a search). Tried postman rest client for chrome, however google home page pops up. Thinking if there is something google dynamically doing to prevent seeing the results in the returned page? Isn't that request just like the client machine's request? I am able to paste the url in a different browser and

No response from content script for contextmenu chrome extension

感情迁移 提交于 2020-01-25 12:34:34
问题 I have already developed chrome extension for context menu and it worked.After the change over of new API by google chrome,my extension is not working.I saw the documents need to change the deprecated API. But no luck! Here are the files, manifest.json { "manifest_version": 2, "name": "ClickRight Plugin", "version": "1.0", "description": "Clickright utility for Chrome Browser", "permissions":["contextMenus","tabs","https://www.gmail.com"], "content_scripts" : [ { "matches" : [ "http://*/*",

No response from content script for contextmenu chrome extension

拟墨画扇 提交于 2020-01-25 12:34:32
问题 I have already developed chrome extension for context menu and it worked.After the change over of new API by google chrome,my extension is not working.I saw the documents need to change the deprecated API. But no luck! Here are the files, manifest.json { "manifest_version": 2, "name": "ClickRight Plugin", "version": "1.0", "description": "Clickright utility for Chrome Browser", "permissions":["contextMenus","tabs","https://www.gmail.com"], "content_scripts" : [ { "matches" : [ "http://*/*",

No response from content script for contextmenu chrome extension

久未见 提交于 2020-01-25 12:32:51
问题 I have already developed chrome extension for context menu and it worked.After the change over of new API by google chrome,my extension is not working.I saw the documents need to change the deprecated API. But no luck! Here are the files, manifest.json { "manifest_version": 2, "name": "ClickRight Plugin", "version": "1.0", "description": "Clickright utility for Chrome Browser", "permissions":["contextMenus","tabs","https://www.gmail.com"], "content_scripts" : [ { "matches" : [ "http://*/*",

Firebase Cloud Messaging's getToken() pending in Chrome Extension

喜你入骨 提交于 2020-01-25 09:26:05
问题 I want to use Firebase Cloud Messaging to show push notifications in my extension. I followed the official doc and successfully got the permission, but I am unable to get the Firebase token using messaging.getToken() . The method returns a promise but it is neither resolved nor gives an error. When I call it in console directly, all I get is a Promise object with Pending status. I have searched many questions but no solution applied to mine. Here is the initialization code I have written in

Log into Chrome Extension without OAuth2

醉酒当歌 提交于 2020-01-25 08:56:06
问题 I'm wondering if it's possible to set up secure login authentication in a Chrome extension without OAuth2 . I'm considering setting it up as follows: On opening the extension, send a POST to server which returns the CSRF token JavaScript inserts the token into the usual login form (as in Django template) [steps 1 and 2 replace the usual Django template rendering] User provides username and password and submits the form Success/Fail JSON response is returned and handled appropriately CSRF

chrome extension which uses AWS services

雨燕双飞 提交于 2020-01-25 07:47:32
问题 I'm setting up a new chrome extension that suppose to allow/block certain file download. I need to send urls to AWS lambda, process the file and return a boolean back. I already implemented the chrome extension part that listen to new downloads, pause them and extract the URL. I can't figure out how to send this URL to an AWS lambda service to process. I can't create an AWS object in order to use its services because I use JS on client side and not NodeJS. import { S3, Lambda } from 'aws-sdk'

Chrome.notifications.update does not updated

坚强是说给别人听的谎言 提交于 2020-01-25 06:48:52
问题 In my chrome extension app inside the background script, I am trying to implement this code, here is my code: function foo(title, message, timeout) { chrome.notifications.create({ type: 'progress', iconUrl: 'img/GS icon.png', title: title, message: message || '', progress: 0 }, function(id) { // Automatically close the notification in 4 seconds by default var progress = 0; var interval = setInterval(function() { if (++progress <= 100) { chrome.notifications.update(id, {progress: progress},