谷歌浏览器

how open chrome settings in new tab using javascript

匿名 (未验证) 提交于 2019-12-03 02:31:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I wont open "chrome://settings/contentExceptions#media-stream" in new tab using JavaScript href="chrome://settings/contentExceptions#media-stream" or onclick="window.top.location='chrome://settings/contentExceptions#media-stream'" doesn't work any ideas ? 回答1: You are not allowed to load local resources, your best bet would be to inform the user how to reach that page in a nice way. 文章来源: how open chrome settings in new tab using javascript

How to set Chrome preferences using Selenium Webdriver .NET binding?

匿名 (未验证) 提交于 2019-12-03 02:30:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Here is what I'm using, user agent can be successfully set, while download preferences cannot. Windows 7, Chrome 26, Selenium-dotnet-2.31.2, chromedriver_win_26.0.1383.0 ChromeOptions chromeOptions = new ChromeOptions (); var prefs = new Dictionary { { "download.default_directory" , @ "C:\code" }, { "download.prompt_for_download" , false } }; chromeOptions . AddAdditionalCapability ( "chrome.prefs" , prefs ); chromeOptions . AddArgument ( "--user-agent=" + "some safari agent" ); var driver = new ChromeDriver ( chromeOptions );

chrome.filesystem save file without prompt location

匿名 (未验证) 提交于 2019-12-03 02:27:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: can i save file in custom location ( /home/Users/user1/ ) with name file1.txt . I have this code: chrome.fileSystem.chooseEntry({type:'openDirectory'}, function(entry) { chrome.fileSystem.getWritableEntry(entry, function(entry) { entry.getFile('file1.txt', {create:true}, function(entry) { entry.createWriter(function(writer) { writer.write(new Blob(['Lorem'], {type: 'text/plain'})); }); }); }); }); With this code, i get prompt so i need to choose directory, but i want without that, i wanna declare directory location in settings. Any solution

chrome.storage.local.get and set [duplicate]

匿名 (未验证) 提交于 2019-12-03 02:26:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: This question already has an answer here: Why is my variable unaltered after I modify it inside of a function? - Asynchronous code reference 6 answers I'm trying to use chrome.storage.local in my extension, and it doesn't seem to work. I used localStorage but realized that I can't use it in content scripts over multiple pages. So, this is what I've come up with: function save() { var channels = $("#channels").val(); var keywords = $("#keywords").val(); chrome.storage.local.set({'channels': channels}); chrome.storage.local.set({'keywords':

Chromedriver error “Chrome version must be >= 52” using Nightwatch

匿名 (未验证) 提交于 2019-12-03 02:24:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to setup Nightwatch , and am using the latest chromedriver which says it supports chrome v52-54 . BUT, when I try to run the tests, it says 'Error: Chrome version must be >=52.0.2743.' Here's everything that I'm using: ChromeDriver 2.24 Selenium 2.53.1 Nightwatch v0.9.8 Node v6.5.0 Java v1.7.0_111 Project Structure |-- nightwatch.json |-- bin/ | |-- chromedriver | |-- selenium-server-standalone-2.53.1.jar |-- tests/ | |-- sample.js |-- results/ |-- screens/ |-- node_modules/ | |-- (lots of modules here) And here is my

org.openqa.selenium.WebDriverException: unknown error: cannot get automation extension

匿名 (未验证) 提交于 2019-12-03 02:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Chrome Driver is not able to maximize the window : ChromeDriver Version:2.24.417431 Chrome Version :57.0.2987.110 org.openqa.selenium.WebDriverException: unknown error: cannot get automation extension from unknown error: page could not be found: chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html (Session info: chrome=57.0.2987.110) (Driver info: chromedriver=2.24.417431 (9aea000394714d2fbb20850021f6204f2256b9cf),platform=Windows NT 6.3.9600 x86_64) (WARNING: The server did not provide any stacktrace

Why does Browser still sends request for cache-control public with max-age?

匿名 (未验证) 提交于 2019-12-03 02:14:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have Amazon S3 objects, and for each object, I have set Cache-Control: public, max-age=3600000 That is roughly 41 days. And I have Amazon CloudFront Distribution set with Minimum TTL also with 3600000. This is the first request after clearing cache. GET /1.0.8/web-atoms.js HTTP/1.1 Host: d3bhjcyci8s9i2.cloudfront.net Connection: keep-alive Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36 Accept-Encoding:

Automatic login to a website on windows 7/Chrome via batch file

匿名 (未验证) 提交于 2019-12-03 02:14:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a batch file. I have case select. if user types 26 it will open link 1 chrome. if user types 27 it will open link 2 in chrome. But I still can't figure out, how can I make batch login automatically into website with username and password. I looked for such a script on the google but didn't find anything useful. I know a bit of C++, unix,(also some html and java script) I don't know if it can be done on windows machine using these languages but even if it could be done I think it would be difficult compared to VB or C## or some other

Font-size <12px doesn't have effect in Google Chrome

匿名 (未验证) 提交于 2019-12-03 02:14:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Elements with css font-size <12px doesn't have effect in Google Chrome - remains font-size 12px. What should I do? My Google Chrome browser uses default settings. My version is 4.0.249.89. I am using Windows XP. You can paste the following code to your Google Chrome to test it: <html> <body> <p style="font-size:6px;">test 6px</p> <p style="font-size:7px;">test 7px</p> <p style="font-size:8px;">test 8px</p> <p style="font-size:9px;">test 9px</p> <p style="font-size:10px;">test 10px</p> <p style="font-size:11px;">test 11px</p> <p style="font

chrome.tabs returns undefined in content script

匿名 (未验证) 提交于 2019-12-03 02:11:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: chrome.tabs returns undefined despite the fact I set tabs in the permissions block. "permissions": [ "tabs", "http://*/*", "https://*/*" ], "content_scripts": [ { "matches": [ "http://*/*", "https://*/*" ], "js": [ "js/myScript.js" ], "all_frames": true } ], But in myScript.js the following returns undefined. chrome.tabs 回答1: As content script has its own limitations, chrome.tabs is only available in background scripts and popup scripts. If you wanna to use chrome.tabs then pass message from content_script to background script and play with