Chrome에서 개발자 모드 확장 프로그램 팝업 사용 중지
지난 주 최신 크롬 (34.0.1847.116) 릴리스 이후 watir-webdriver를 사용하여 자동 테스트를 실행할 때“개발자 모드 확장 사용 중지”가 표시되었습니다.
이것은 공격적인 확장으로 보이지만 크롬 드라이버가 사용했을 때 잠재적으로 위험한 확장이라는 것은 의미가 없습니다.
이전 버전으로 롤백 할 수 없거나 롤백 할 이전 버전의 설치 프로그램을 찾을 수 없으므로이 문제를 해결 한 사람이 내 테스트에 혼란을 겪고 있습니다.
공식적인 방법 팝업을 해제하기 위해이 같은 것 같다 :
확장 프로그램을 포장하고 (
chrome://extensions/
, '개발자 모드'를 선택하고 '확장 프로그램 포장 ...'을 누르십시오).crx
파일을chrome://extensions
페이지에 끌어서 놓아 설치 하십시오.이 단계에서 Chrome을 다시 시작하면 '지원되지 않는 확장 프로그램 사용 중지됨'팝업이 표시됩니다.
그런 다음 Win7 / 8의 경우 :
- 다음에서 Chrome 그룹 정책 템플릿을 다운로드하십시오.
http://dl.google.com/dl/edgedl/chrome/policy/policy_templates.zip
- 복사
[zip]\windows\admx\chrome.admx
에c:\windows\policydefinitions
- 복사
[zip]\windows\admx\[yourlanguage]\chrome.adml
에
c:\windows\policydefinitions\[yourlanguage]\chrome.adml
(안c:\windows\[yourlanguage]
) - Chrome에서 확장 프로그램 페이지 ( chrome : // extensions )로 이동하십시오.
- 상단의 개발자 모드 확인란을 선택하십시오.
- 비활성화 된 확장 목록을 아래로 스크롤하여 활성화하려는 확장의 ID를 확인하십시오. 예를 들어 LogMeIn은 ID입니다.
nmgnihglilniboicepgjclfiageofdfj
Start
>를 클릭Run
하고 다음을 입력하십시오.gpedit.msc
<ENTER>
- 확장
User Configuration
>Administrative Templates
>Google Chrome
>Extensions
Configure extension installation whitelist
정책 을 열려면 두 번 클릭하십시오.- 을 선택한
Enabled
다음Show...
- 목록에서 7 단계에서 적어 둔 확장 프로그램의 ID를 입력하십시오.
- 클릭
OK
하고 Chrome을 다시 시작
그게 다야!
2018 년 7 월 현재이 접근 방식은 더 이상 작동하지 않습니다. Google이 "허용 목록"을 인정하지 않는 것 같습니다.
편집 : 2018 년 10 월 16 일 현재이 접근법은 효과가 있습니다. (Chrome 버전 69.0.3497.100 (공식 빌드) (64 비트))
1. chrome : // extensions /에서 개발자 모드를 일시적으로 활성화
2. "포장 풀기"를 사용하여 설치 한 확장을 제거하십시오 (팝업을 일으키는 확장을 정확하게하기 위해).
3. 팩 확장명을 클릭하고 파일의 루트 디렉토리를 입력하십시오 (확장을 유발하는 오류마다 단일 폴더 / 하나의 폴더에 확장 파일을 넣습니다). 개인 키 파일이 없으면 입력하지 마십시오.
4. pack extension을 클릭하면 확장자의 루트 디렉토리 근처에 .crx 및 .pem 파일이 생성됩니다. crx 파일을 사용하여 확장을 설치하고 pem 파일을 안전하게 유지하십시오. 삭제하거나 파일이 없으면 문제가 발생하면 확장을 다시 포장 할 수 있습니다.
5. crx가 설치된 확장 프로그램 ID를 화이트리스트에 복사하고 Chrome을 다시 시작하십시오.
팝업이 사라져야합니다.
크롬 드라이버를 만드는 동안 옵션을 사용하여 비활성화하십시오. 확장없이 작동합니다.
다음 코드 스 니펫 사용
ChromeOptions options = new ChromeOptions();
options.addArguments("chrome.switches","--disable-extensions");
System.setProperty("webdriver.chrome.driver",(System.getProperty("user.dir") + "//src//test//resources//chromedriver_new.exe"));
driver = new ChromeDriver(options);
현재 2015년 5월 크롬 베타 / dev에 / 카나리아 Windows에서 항상이 경고를 표시 (라인 75-78 참조).
방금 hiew32 데모 버전을 사용하여 chrome.dll (dev 채널, 32 비트)을 패치했습니다. 실행하고 16 진수보기 (Enter 키)로 전환하고 ExtensionDeveloperModeWarning (F7)을 검색 한 다음 F6을 눌러 참조 코드를 찾으십시오. 근처의 INC EAX 행 뒤에 RETN이 오면 F3을 눌러 편집하고 40 대신 90을 입력하면 NOP (no-op)로 표시되고 저장 (F9)됩니다.
@Gsx에서 찾은 단순화 된 방법으로 64 비트 Chrome 개발자에서도 작동합니다.
- hiew32 데모 (관리자 모드)를 실행하고 Chrome.dll을 엽니 다
- 16 진보기로 전환 (
Enter
키) - ExtensionDeveloperModeWarning (
F7
) 검색 F3
첫 번째 문자 "E"를 다른 문자로 편집하고 바꾸려면을 누르십시오.- 저장 (
F9
).
patch.BAT
스크립트
물론 이것은 다음 업데이트 때까지만 지속되므로 자주 필요한 사람은 자동 패치 또는 메모리에 dll을 패치하는 실행기를 작성할 수 있습니다.
비활성화 할 수 없습니다. 인용 : "죄송 합니다만, 귀하는 악성 코드 작성자입니다 ..."
유일한 옵션은 다음과 같습니다.이 새로운 동작에 자동 테스트를 적용하거나 문제가되는 스크립트를 Chrome 웹 스토어에 업로드합니다 ( "비공식"방식으로 수행 할 수 있음).
(Antony Hatchkins에 대한 답변)
이것이 Chrome 정책을 설정 하는 현재 공식적 으로 공식적인 방법입니다 : https://support.google.com/chrome/a/answer/187202?hl=ko
https://dl.google.com/dl/edgedl/chrome/policy/policy_templates.zip(Google 크롬 템플릿의 ZIP 파일)에서 Windows 및 Linux 템플릿과 모든 운영 체제에 대한 일반적인 정책 설명서를 찾을 수 있습니다. 및 문서)
Windows에 대한 지침 (내 추가 사항 포함) :
다운로드 한 ADM 또는 ADMX 템플릿을 엽니 다.
- 앞서 다운로드 한 "policy_templates.zip"에서 선택한 언어로 "chrome.adm"을 추출하십시오 (예 : "policy_templates.zip \ windows \ adm \ en-US \ chrome.adm").
- 시작> 실행 : gpedit.msc로 이동하십시오.
- 로컬 컴퓨터 정책> 컴퓨터 / 사용자 구성> 관리 템플릿으로 이동하십시오.
- 관리 템플릿을 마우스 오른쪽 버튼으로 클릭하고 템플릿 추가 / 제거를 선택합니다.
- 대화 상자를 통해 "chrome.adm"템플릿을 추가하십시오.
- 완료되면 ADM (Classic Administrative Templates) / Google / Google Chrome 폴더가 관리 템플릿 아래에 나타납니다.
- 컴퓨터 구성 또는 사용자 구성에서 템플릿을 추가하든 관계없이 설정이 두 곳에 표시되므로 기기 또는 사용자 수준에서 Chrome을 구성 할 수 있습니다.
이 작업이 끝나면 Antony Hatchkins의 답변 5 단계부터 계속하십시오 . 확장 프로그램 ID를 추가 한 후 chrome://policy
( ExtensionInstallWhitelist 검색)을 열어 Chrome에서 정책이 작동 중인지 확인할 수 있습니다 .
나는 같은 문제로 고통 받고 있었고 다음을 시도했다.
- 압축이 풀린 확장 포장
- 개발자 모드 끄기
- 압축 파일에서 .crx 파일을 끌어다 놓습니다.
- Chrome을 닫았다가 다시 엽니 다.
몇 가지 참고할 사항 :
- .pem 파일은 .crx와 함께 보관해야합니다
- 압축을 푼 확장자의 폴더에 .crx 및 .pem을 넣지 마십시오.
Chrome을 다시 열었을 때 새로운 패키지 확장 프로그램에 대해 알려주는 팝업이 표시되어 Chrome을 재부팅하여 다시 확장되는지 확인했습니다.
이 솔루션이 효과가 있기를 바랍니다!
확장 프로그램 비활성화 설정이 작동하지 않았습니다. 대신 로봇 클래스를 사용 하여 취소 버튼을 클릭했습니다.
import java.awt.Robot;
import java.awt.event.InputEvent;
public class kiosk {
public static void main(String[] args) {
// As long as you don't move the Chrome window, the Cancel button should appear here.
int x = 410;
int y = 187;
try {
Thread.sleep(7000);// can also use robot.setAutoDelay(500);
Robot robot = new Robot();
robot.mouseMove(x, y);
robot.mousePress(InputEvent.BUTTON1_MASK);
robot.mouseRelease(InputEvent.BUTTON1_MASK);
Thread.sleep(3000);// can also use robot.setAutoDelay(500);
} catch (AWTException e) {
System.err.println("Error clicking Cancel.");
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
1) 팝업 풍선이 나타날 때까지 기다립니다.
2) 새 탭을 엽니 다.
3) 새 탭을 닫습니다. 팝업은 원래 탭에서 사라집니다.
작은 Chrome 확장 프로그램은 다음 단계를 자동화 할 수 있습니다.
manifest.json
{
"name": "Open and close tab",
"description": "After Chrome starts, open and close a new tab.",
"version": "1.0",
"manifest_version": 2,
"permissions": ["tabs"],
"background": {
"scripts": ["background.js"],
"persistent": false
}
}
background.js
// This runs when Chrome starts up
chrome.runtime.onStartup.addListener(function() {
// Execute the inner function after a few seconds
setTimeout(function() {
// Open new tab
chrome.tabs.create({url: "about:blank"});
// Get tab ID of newly opened tab, then close the tab
chrome.tabs.query({'currentWindow': true}, function(tabs) {
var newTabId = tabs[1].id;
chrome.tabs.remove(newTabId);
});
}, 5000);
});
이 확장 프로그램을 설치하면 Chrome이 시작되고 팝업이 표시되기 전에 즉시 앱을 전환합니다. 몇 초 후에 팝업이 사라지고 Chrome으로 다시 전환하면 팝업이 표시되지 않습니다.
For anyone using WebdriverIO, you can disable extensions by creating your client like this:
var driver = require('webdriverio');
var client = driver.remote({
desiredCapabilities: {
browserName: 'chrome',
chromeOptions: {
args: [
'disable-extensions'
]
}
}
});
I'm not sure if this is still a problem for people or not. However, I read through this post and several others and finally played around with this and was able to make it work in C# using this code. I derived it all from this post and possible some posts linked to this post.
I hope this helps, it certainly solved my problems in C# console application.
Using version 52.0.2743.116 m of Chrome Selenium 2.9 Server Driver
var chromeService = ChromeDriverService.CreateDefaultService(@"C:\Selenium\InstalledServerDrivers\");
var options = new ChromeOptions();
options.AddArgument("--disable-extensions");
IWebDriver driver = new ChromeDriver(chromeService, options);
driver.Url = "http://www.google.com/";
I am working on Windows And I have tried lots of things provided here as answer but Pop up was disabling the extension continually then i have tried following steps and it works now:
- Go to chrome://extensions page and click
Pack extension
button and select your root Directory of extension by clicking on red rectangled browse button displayed in below image.
- after selecting root directory Click on
Pack extension
button displayed in red circle in below image.
Now in check
parent directory
of your selectedroot directory
of extension, 2 file would have created[extension name].crx
and[extension name].pem
.Now just drag and drop the
[extension name].crx
file onto the chrome://extensions page and it will ask using add app dialog box click onAdd app
and refresh the page it is installed now.
Note: Before doing anything as above make sure to enable Developer mode for extensions. If this was not enabled, refresh the chrome://extensions page after enabling it.
Ruby based watir-webdriver use something like this:
browser=Watir::Browser.new( :chrome, :switches => %w[ --disable-extensions ] )
Unfortunately I cant automate setting it to developer mode because of restrictions in width using the browser in iphone mode. I have found a dangerous workaround for now, install the dev channel version of chrome. It does not have the warning message, but im sure it will cause me more problems in the long run when problems are introduced. Still will hopefully give me a few days to find a workaround.
For AngularJS and Protractor: (not explained anywhere else here)
Edit conf.js, add a capabilities
section:
exports.config = {
...
capabilities: {
'browserName': 'chrome',
'chromeOptions': {
// Prevent warning about dev tools, which breaks some tests, in Windows at least.
'args': ['--disable-extensions']
}
},
(based on this answer: https://stackoverflow.com/a/33113360/694469 about something a bit related but different)
Using selenium with Python, you start the driver with extensions disabled like this:
from selenium import webdriver
options = webdriver.chrome.options.Options()
options.add_argument("--disable-extensions")
driver = webdriver.Chrome(chrome_options=options)
'개발자 모드 확장 사용 중지'팝업이 표시되지 않습니다.
참고 URL : https://stackoverflow.com/questions/23055651/disable-developer-mode-extensions-pop-up-in-chrome
'IT' 카테고리의 다른 글
UIWebView에 표시되는 HTML 페이지의 제목을 얻는 방법? (0) | 2020.06.18 |
---|---|
IFRAME로드가 완료되면 Javascript 콜백? (0) | 2020.06.18 |
스택 샘플링을 넘어서 : C ++ 프로파일 러 (0) | 2020.06.18 |
Android Studio 및 gradle을 사용하여 Android 라이브러리를 작성하는 방법은 무엇입니까? (0) | 2020.06.18 |
2012 년 허드슨 vs 젠킨스 (0) | 2020.06.18 |