Disable developer mode extensions pop up in Chrome
Asked Answered
A

21

172

Since the latest release of chrome (34.0.1847.116) last week, I have been receiving the “Disable developer mode extensions" when running automated tests using watir-webdriver.

This seems to be the offensive extension but it doesn't make sense to me that this is a potentially hazardous extension given its used by the chromedriver.

Anyone that has found a fix for this, as i am unable to roll back to the previous version or find an installer for an older version to roll back to and this is playing havoc with my tests.

enter image description here

enter image description here

Aftertaste answered 14/4, 2014 at 8:43 Comment(6)
Use external clicks to kill the popup: https://mcmap.net/q/142910/-disable-developer-mode-extensions-pop-up-in-chromeGomes
I suggest #30288407Confer
@Confer doesn't work anymore, he also doesn't want to update anymore (which is understandable after 2 years of maintaining it).Reparative
after the popup shows, press esc button using robot type. Robot robot; try { robot = new Robot(); robot.keyPress(KeyEvent.VK_ENTER); // confirm by pressing Enter in the end robot.keyRelease(KeyEvent.VK_ENTER); } catch (AWTException e) { printStackTraceToString(e); }Wertheimer
Side note: Vivaldi browser is compatible with most chrome extensions and does not give this warningBreakneck
Another option is to use Chromium, it doesn't have the annoying popups or the "antivirus". There are good builds here or you can make your own build, which is not an easy process.Bahadur
E
82

The official way to disable the popup is this:

  1. Pack your extension: go to chrome://extensions, check Developer mode and click Pack extension

  2. Install the extension by dragging and dropping the .crx file into the chrome://extensions page.

You'll get an "Unsupported extensions disabled" popup if you try restarting Chrome at this point.

Then for Windows 7 or Windows 8:

  1. Download Chrome group policy templates here
  2. Copy [zip]\windows\admx\chrome.admx to c:\windows\policydefinitions
  3. Copy [zip]\windows\admx\[yourlanguage]\chrome.adml to c:\windows\policydefinitions\[yourlanguage]\chrome.adml (not c:\windows\[yourlanguage])
  4. In Chrome, go to the Extensions page: chrome://extensions
  5. Check Developer Mode
  6. Scroll down the list of disabled extensions and note the ID(s) of the extensions you want to enable.
  7. Click Start > Run, type gpedit.msc and hit enter.
  8. Click User Configuration > Administrative Templates > Google Chrome > Extensions
  9. Double click Configure extension installation whitelist policy
  10. Select Enabled, and click Show
  11. In the list, enter the ID(s) of the extensions you noted in Step 7
  12. Click OK and restart Chrome.

That's it!

EDIT: As of July 2018, this approach no longer works: it seems Google has stopped honouring the "whitelist".

EDIT 2: As of December 2018, this approach works in Chrome Version 69.0.3497.100 (Official Build) (64-bit):

  1. Temporarily enable Developer mode in chrome://extensions

  2. Uninstall the extension that causes the popup using the Load unpacked.

  3. Click on Pack extension, and find and select the folder containing the extension files. Don't enter the private key file if you don't have it.

  4. Click Pack extension. A .crx and .pem file will be created near the root directory of the extension. Install the extension using the .crx file and keep the .pem file safe.

  5. Copy the .crx installed extension ID to the whitelist and restart Chrome.

The popup should be gone.

Emboly answered 24/6, 2016 at 10:37 Comment(25)
Your link points to a discussion in 2014 (which seems like a long time ago as far as software is concerned), and I don't see anything about it coming from Google as "official".Haul
@Haul The homepage of those policy templates seems to be chromium.org/administrators/policy-templates This site is updated regularly (last update 54 minutes ago). I used this method on Jun 24 and the configuration works with most recent Chrome version today. If you prefer «Can't be disabled» to be the official version - it's your choice ;)Emboly
The warning message is still displayed whenever I start a Chrome browser via Selenium. I do not have the problem when I start Chrome manually. Any ideas?Saluki
I found out it is the Chrome Automation Extension, extension ID aapnijgdinlhnhlmodcfapnahmbfebeb. I added it to the white list, but to no avail.Saluki
I solved the problem via Selenium Chrome Driver options, see here.Saluki
@AntonyHatchkins Thanks!Haul
@Antony Hatchkins Upvote this because I used this myself and it did help for some time. From Chrome v. 55 however it stopped working..Prokopyevsk
@Prokopyevsk Thanks! I'm on 55.0.2883.87 m (win7 x64). The message doesn't show up as yet. What are the symptoms on your side?Emboly
@Antony Hatchkins I used the updated code from this answer #30288407 and it started working again. thanks for reacting!Prokopyevsk
@Prokopyevsk I had used to patch chrome after every update using that answer before I found this solution. I was hoping it would be permanent.Emboly
My Windows is Home Premium, I don't have gpedit.msc :/Pleasance
Works for me in Chrome 58.0.3029.81, Win 7 x64 :) Hoping this solution will last!Okeechobee
@Okeechobee happy to hear that :)Emboly
@Antony Hatchkins: Step 5 won't work in Chrome 59, hence my (attempted) edit. It should be: 3 dots > More Tools > Extensions, or chrome://extensions now.Okeechobee
Thank you very much! It works on 61.0.3163.100 and Win 10. Google won't let me publish my only fork of extension. At least, I can now use it myself.Wharton
Extension installed but then gave a different warning: Unsupported extensions disabledBernal
Anthony Hatchkins: You lost me at 'Pack your extension'Elodiaelodie
@SteveStaple I thought that if you happened to create an extension, packing it won't be a big issue for you ;) I've updated the instructions.Emboly
about the 2018 update you posted, I tried on Version 70.0.3538.77 (Official Build) (64-bit) but it's not working. If it is, could you explain more steps 4 (installing) and 5 (whitelisting)? ThanksGasteropod
"Then copy the crx installed extension ID to the whitelist and restart chrome. The popup should be gone" - How do you do this?Coats
@Aunt Jemima You need to use the new .crx file that you created from packing. After packing the original extension you can delete it. Drag & drop the .crx file into the Chrome extensions, then get the unique ID of the .crx extension and add it to the white list in Local Group. Also remove the old ID in the white list. It should work.Slue
If Windows is telling that it cannot find gpedit.msc, look at this article itechtics.com/enable-gpedit-windows-10-homeHalation
If under Administrative Templates you not see Google, go and follow this instructions to make it visible. Tested on Chrome 83.0.4103.97 and works perfectly.Fire
I think something changed on win10, I used to be able to just drag the packed extension to the extensions screen, and now it shows CRX_REQUIRED_PROOF_MISSING message.Skipper
Why keeping an answer depreciated then an history of "edit" from 2018? (And it does not work anymore). This answer should be updated, cleaned or removed.Batfish
E
36

While creating chrome driver, use option to disable it. Its working without any extensions.

Use following code snippet

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);
Enshroud answered 17/4, 2014 at 11:49 Comment(7)
where should we write this ?Maxwellmaxy
Added it to my Protractor conf.js file args list and that worked. Thanks a lot :)Hokanson
This worked great. In C# the code is: options.AddArgument("--disable-extensions");Nesmith
Is this Java? It's not Protractor (a Javascript e2e test lib) right? It'd be good if you mention what framework & language you have in mind.Outgoings
Today, I had to use options.AddArguments("chrome.switches", "--disable-extensions --disable-extensions-file-access-check --disable-extensions-http-throttling"); instead of just `--disable-extensions. I think one of the additional switches can be omitted, but not both.Ronna
can you explain it a bit for mortal humans? what is that script, or where to put it...Turnspit
If I am not mistaken, @amanpreet-kaur's answer is for people who are automating something using Chrome driver. In the snippet, Java was probably used to automate a Chrome driver. This answer does NOT apply for you if you yourself are just using Chrome as-is from your desktop. See: chromedriver.chromium.orgCrotchety
U
23

As of May 2015 Chrome beta/dev/canary on Windows (see lines 75-78) always display this warning.

  • I've just patched chrome.dll (dev channel, 32-bit) using hiew32 demo version: run it, switch to hex view (Enter key), search for ExtensionDeveloperModeWarning (F7) then press F6 to find the referring code, go to nearby INC EAX line, which is followed by RETN, press F3 to edit, type 90 instead of 40, which will be rendered as NOP (no-op), save (F9).

  • Simplified method found by @Gsx, which also works for 64-bit Chrome dev:

    1. run hiew32 demo (in admin mode) and open Chrome.dll
    2. switch to hex view (Enter key)
    3. search for ExtensionDeveloperModeWarning (F7)
    4. press F3 to edit and replace the first letter "E" with any other character
    5. save (F9).
  • patch.BAT script

Of course this will last only until the next update so whoever needs it frequently might write an auto-patcher or a launcher that patches the dll in memory.

Universalist answered 14/5, 2015 at 10:41 Comment(10)
Hi, I am trying to patch it with hiew32demo but I haven't been able to do so. When I open chrome.dll I get Hiew Demo doesn't support NE/LX/LE/NLM/ELF/PE64 files, but I can skip that warning. Then I change the mode with F4 to decode and search ExtensionDeveloperMo since _ExtensionDeveloperModeWarning _ doesn't fit. After it finds it I press F6 but I get Target not found. Could you help me?Mutter
I can't find '4578 7465 6e73 696f 6e44 6576' ('ExtensionDev') in chrome.dll. Does this method still work?Phonsa
Gsx, my method works for 32-bit Chrome on dev channel.Universalist
Emerson, this change has landed in the Dev channel just a week ago, so it's not in Stable. You'll have to find the relevant place by analyzing the previous version of source code.Universalist
Ah, ok. I am on 64-bit dev. I'll try to find another way.Mutter
@Gsx, well, if you have a 64-bit disassembler, the procedure shouldn't be too different from the one I described. Example for dev 64-bit 44.0.2398 (not tested but looks plausible): search for hex 33 DB 84 C0 74 07 B8 01 00 00 00, repeat the search to confirm it's the only occurence, replace the last 01 00 00 00 with 00 00 00 00 (basically there was MOV EAX, true which we replace with false)Universalist
@Universalist That failed also, but I have found a weird way XD. I searched for ExtensionDeveloperMo and changed that to EXtensionDeveloperMo and that seemed to work.Mutter
I switched from Beta to Dev channel (44.0.2403.9), I was able to search and find ExtensionDeveloperModeWa with hiew32 demo (admin mode). I changed Warning to Darling, saved it with F9, rechecked the changes and replaced the original chrome.dll with my modified one. But the warning still occurs. GrmlGirhiny
@nixda, just tried it on 44.0.2403.9, the method is working. Maybe you have some background Chrome-apps running? Check the processes tab in Windows Task Manager.Universalist
I think the .bat patch doesn't work anymore because of Chrome updates. It says that it's already patched but I can still see the popup. Version 66.0.3359.139 (Official Build) (64-bit)Variant
I
10

There is an alternative solution, use Chrome-Developer-Mode-Extension-Warning-Patcher:

  1. Download the latest release from here from Github.
  2. Close Chrome.
  3. Unpack the zip archive and run ChromeDevExtWarningPatcher.exe as administrator.
  4. Select your Chrome installation from the just opened GUI and then click on Patch button:

enter image description here

  1. Enjoy Chrome without any DevMode pop-up!
Indeterminate answered 3/5, 2020 at 9:58 Comment(2)
This was the best solution. This works even for portable installations.Armoury
It is 2023 Q4, and it is still works and the best solution indeed. Any other solution here either is deprecated and no longer works or too complicated, but this one solves it in just few clicks. It is really weird that Chrome and other Chrome based browser do not allow the annoying warning to be disabled by using built-in settings... it does not really help anything since those of us who want it disabled will find a way, so why make it more complicated than it should be? This is a rhetorical question obviously. Thank you for sharing the easy solution!Cirro
O
7

Can't be disabled. Quoting: "Sorry, we know it is annoying, but you the malware writers..."

Your only options are: adapt your automated tests to this new behavior, or upload the offending script to Chrome Web Store (which can be done in an "unlisted" fashion).

Oletta answered 14/4, 2014 at 9:47 Comment(4)
There are thousands of reason why i cant use my extension/apps in webstore, i need to run it locally. This was a very EVIL implementation from Google Chromium team, very EVIL, someone with knowledge should debat with Chromium and get it fixed. Horrible issue and seriously not appreciated. All the answer to this problem is just over killing for people who is working on kiosks project. its nightmare. please inform / knock/ debat with chromium community to give a fix for this.Gomes
It will only be a matter of time until you can't develop anything anymore using Chrome :)Spenserian
Right, it's because of the malware... we aren't trying to annoy people who use extensions we blocked from our store like Dissenter...Alanaalanah
I need to add custom manifest key and upload to web store is not an option.Unmask
K
6

(In reply to Antony Hatchkins)

This is the current, literally official way to set Chrome policies: https://support.google.com/chrome/a/answer/187202?hl=en

The Windows and Linux templates, as well as common policy documentation for all operating systems, can be found here: https://dl.google.com/dl/edgedl/chrome/policy/policy_templates.zip (Zip file of Google Chrome templates and documentation)

Instructions for Windows (with my additions):

Open the ADM or ADMX template you downloaded:

  • Extract "chrome.adm" in the language of your choice from the "policy_templates.zip" downloaded earlier (e.g. "policy_templates.zip\windows\adm\en-US\chrome.adm").
  • Navigate to Start > Run: gpedit.msc.
  • Navigate to Local Computer Policy > Computer / User Configuration > Administrative Templates.
  • Right-click Administrative Templates, and select Add/Remove Templates.
  • Add the "chrome.adm" template via the dialog.
  • Once complete, Classic Administrative Templates (ADM) / Google / Google Chrome folder will appear under Administrative Templates.
  • No matter whether you add the template under Computer Configuration or User Configuration, the settings will appear in both places, so you can configure Chrome at a machine or a user level.

Once you're done with this, continue from step 5 of Antony Hatchkins' answer. After you have added the extension ID(s), you can check that the policy is working in Chrome by opening chrome://policy (search for ExtensionInstallWhitelist).

Kung answered 22/9, 2017 at 10:24 Comment(3)
Thanks Panther. Added the "chrome.adm" template via the dialog, and got this error: The following entry in the [strings] sectin is too long and has been truncated. This is followed by a page of Cyrillic?Elodiaelodie
Use @ to automatically notify other user about your post (like @Panther).Emboly
@SteveStaple Sorry, but I don't know what would be the cause of such an issue. :( I'm not an expert at this, just followed the instructions from the page I linked. Fortunately it worked for me.Kung
A
4

The disable extensions setting did not work for me. Instead, I used the Robot class to click the Cancel button.

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();
    }
  }
}
Appalachian answered 31/3, 2015 at 19:8 Comment(2)
This answer is under-rated because it can be adapted to automate other annoying unavoidable GUI button clicking tasks.Caning
@momomo Obviously it can be set in a config or something, but this is just example code.Corrales
D
3

I was suffering from the same problem, and I tried the following:

  1. Pack the unpacked extension
  2. Turn off Developer Mode
  3. Drag and drop the .crx file from the packed extension
  4. Close Chrome, and then open it again.

A few things to note:

  • The .pem file should be kept with the .crx
  • Don't put the .crx and the .pem in the folder of the unpacked extension.

When I reopened Chrome, I got a popup that told me about the new packed extension, so I rebooted Chrome to see if it would do it again, and it did not.

I hope this solution worked!

Denverdeny answered 5/4, 2016 at 20:24 Comment(2)
I got "Unsupported extensions popup" after using your method. See my answer for details how to disable it as well.Emboly
i got "Apps, extensions, and user-scripts cannot be added from this website".Grist
I
2

Based on Antony Hatchkins's answer:

The official way to disable the popup seems to be like this:

  1. Pack your extension (chrome://extensions/, tick at 'Developer mode', hit 'Pack extension...') and install it via drag-and-dropping the .crx file into the chrome://extensions page.

    (Since the extension is not from Chrome Web Store, it will be disabled by default.)

Then for Windows:

  1. In Chrome, go to the Extensions page (chrome://extensions)
  2. Check the Developer Mode checkbox at the top
  3. Scroll down the list of disabled extensions and note the ID(s) of the extensions you want to enable. LogMeIn, for example, is ID: nmgnihglilniboicepgjclfiageofdfj
  4. Click Start > Run, and type regedit <ENTER>
  5. Under key HKLM\Software\Policies\Google\Chrome\ExtensionInstallWhitelist (create it if not exists), create a new string for each extension you want to enable with sequential names (indices), e.g. 1, 2, ...
  6. Enter the extension ID(s) as string values in any order. For example, there is a string with name 1 and value nmgnihglilniboicepgjclfiageofdfj
  7. Restart Chrome

That's it!

Note: When you update a whitelisted extension, you do not have to follow the same steps since the ID of the extension will not change.

Incitement answered 27/1, 2020 at 0:1 Comment(3)
Drag-and-dropping a .crx file just popup a save as window, and will not install it. Chrome version 80.0.3987.163.Worked
Could not find the registry key for edge chromiumBatfish
@Worked Drag-and-dropping a .crx file installs the extension in version 81.0.4044.122. @Batfish Look at Microsoft Edge - Policies - ExtensionInstallAllowlistThermodynamics
S
1

1) Wait for the popup balloon to appear.

2) Open a new tab.

3) Close the a new tab. The popup will be gone from the original tab.

A small Chrome extension can automate these steps:

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);

});

With this extension installed, launch Chrome and immediately switch apps before the popup appears... a few seconds later, the popup will be gone and you won't see it when you switch back to Chrome.

Spanner answered 3/7, 2018 at 3:41 Comment(5)
(Bonus tip 1) When using Selenium you can immediately open a new window, wait for the popup in the new window, and then close the new window to dismiss the popup. https://mcmap.net/q/144890/-chromedriver-disable-developer-mode-extensions-pop-up-on-selenium-webdriver-automationSpanner
(Bonus tip 2) You could also try this: Add the flag --enable-automation to avoid getting the popup.Spanner
This didn't work for me. Win 10, Chrome up to date. After following the steps, the popup remained.Asis
@Asis To figure out what worked, I had to experiment with various sequences of opening and closing tabs/windows. The sequence might be different for other OS’s and browser versions.Spanner
@Spanner The command line switch --enable-automation has its own obnoxious side effect: a div appears at the top of each page until dismissed (then it stops appearing). The Developer Mode popup can be dismissed by hitting ESC when it first appears. Annoying in either case!Plangent
C
0

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:

  1. 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.

browse root directory of extension

  1. after selecting root directory Click on Pack extension button displayed in red circle in below image.

enter image description here

  1. Now in check parent directory of your selected root directory of extension, 2 file would have created [extension name].crx and [extension name].pem.

  2. 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 on Add 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.

Capitalism answered 5/3, 2019 at 13:50 Comment(3)
unpacked extension works with developer mode warning. but with crx, the extension is disabled always. google requires the extension to be published on web store and installed from there.Berkley
Chrome doesn't let users install packaged extensions and says, package is invalid: CRX_REQUIRED_PROOF_MISSING.Ladin
@HarshitJuneja may be you have to whitelist the extension id, and restart chrome.Capitalism
C
0

This question is enormously old but is still the top result on google when you search for ways to try to disable this popup message as an extension developer who hasn't added their extension to the chrome store, doesn't have access to group policies due to their OS, and is not using the chrome dev build. There is currently no official solution in this circumstance so I'll post a somewhat 'hacky' one here.

This method has us immediately create a new window and close the old one. The popup window is associated with the original window so in normal use cases the popup never appears since that window gets closed.

The simplest solution here is we create a new window, and we close all windows that are not the window we just created in the callback:

chrome.windows.create({
    type: 'normal',
    focused: true,
    state: 'maximized'
}, function(window) {
    chrome.windows.getAll(function(windows) {
        for (var i = 0; i < windows.length; i++) {
            if (windows[i].id != window.id) {
                chrome.windows.remove(windows[i].id);
            }
        }
    });
});

Additionally we can detect how this extension is installed and only run this code if it is a development install (although probably best to completely remove altogether from release code). First we create the callback function for a chrome.management.getSelf call which allows us to check the extension's install type, which is basically just wrapping the code above in an if statement:

function suppress_dev_warning(info) {
    if (info.installType == "development") {
        chrome.windows.create({
            type: 'normal',
            focused: true,
            state: 'maximized'
        }, function(window) {
            chrome.windows.getAll(function(windows) {
                for (var i = 0; i < windows.length; i++) {
                    if (windows[i].id != window.id) {
                        chrome.windows.remove(windows[i].id);
                    }
                }
            });
        });
    }
}

next we call chrome.management.getSelf with the callback we made:

chrome.management.getSelf(suppress_dev_warning);

This method has some caveats, namely we are assuming a persistent background page which means the code runs only once when chrome is first opened. A second issue is that if we reload/refresh the extension from the chrome://extensions page, it will close all windows that are currently open and in my experience sometimes display the warning anyways. This special case can be avoided by checking if any tabs are open to "chrome://extensions" and not executing if they are.

Celadon answered 12/4, 2020 at 2:55 Comment(0)
H
0

Have you tried using the Developer Mode Extension Patcher on Github?

It automatically patches your Chrome/Chromium/Edge browser and hides the warning.

However answered 12/5, 2020 at 20:43 Comment(1)
Already described here: https://mcmap.net/q/142910/-disable-developer-mode-extensions-pop-up-in-chromeIndeterminate
A
0

I found something that will load user-packed extensions and works beautifully:

You'll still have to pack it in details for the problem extension, but after that you can turn off developer mode and load the packed CRX through this. You don't have to deal with signing it or anything.

https://chrome.google.com/webstore/detail/crosspilot/migomhggnppjdijnfkiimcpjgnhmnale?hl=en

Note: I'm not from their team, I've just been looking for an elegant solution for this for years.

Ammon answered 16/5, 2020 at 14:20 Comment(0)
C
0

Currently all solutions including https://github.com/Ceiridge/Chrome-Developer-Mode-Extension-Warning-Patcher did not work for me anymore. At the time of writing, the following issues are open (https://github.com/Ceiridge/Chrome-Developer-Mode-Extension-Warning-Patcher/issues/98 and https://github.com/Ceiridge/Chrome-Developer-Mode-Extension-Warning-Patcher/issues/99 as well) affecting at least Edge and Yandex Browser (which is Chrome-based), confirming I am not alone with the issue.

I kept searching for alternative solutions, and found this: https://sourceforge.net/projects/closevatel/ - basically, it just a small executable to be placed in a startup folder and it will detect and close annoying "Disable developer mode extensions" message. It comes with source code, which is very small and easy to review. Author included precompiled binary, so if you prefer to use it, just put it in the Windows startup folder and you are done, after reboot it will be working.

I preferred to compile myself, so below I describe how I did it for those who share the same preference. To compile it without errors I had to change source code a bit (my changes are mentioned in comments):

program closevatel; // Renamed from closevatel_2 to closevatel
                    // otherwise it failed to find its res file
uses Windows, Messages;
{$R *.res}

var Timer: WORD = 0;
// {$INCLUDE inc.inc} // This line caused error
hw: HWND;
hE: THandle;

procedure OnTimer;
begin
  hw:=Findwindow(nil,'Îòêëþ÷åíèå ðàñøèðåíèé â ðåæèìå ðàçðàáîò÷èêà');
                                          // ^ NBSP symbol
  if hw=0 then
    hw:=Findwindow(nil,'Îòêëþ÷åíèå ðàñøèðåíèé â ðåæèìå ðàçðàáîò÷èêà');
  if hw=0 then
    hw:=Findwindow(nil,'Disable developer mode extensions');
  if hw=0 then
    hw:=Findwindow(nil,'Disable developer mode extensions');
                                           // ^ NBSP symbol
  if hw<>0 then
    begin
      SetForegroundWindow(hw);
      Windows.SetFocus(hw);
      SendMessage(hw, WM_KEYDOWN, VK_ESCAPE, 0);
      SendMessage(hw, WM_KEYUP, VK_ESCAPE, 0);
    end;
end;

begin
  // PostMessage(0,Srcdata[0],0,0); // This line also caused an error
  while true do
    begin
      OnTimer;
      Sleep(200);
    end;
end.

I downloaded Delphi Community Edition for free from here https://www.embarcadero.com/products/delphi/starter/free-download and opened the closevatel.dpr file with the source code shown above, and clicked Project > Build closevatel (Shift+F9). Then I got closevatel.exe file I could put in the Windows startup folder.

Basically, what the code does, it looks every 200 milliseconds (defined by the "Sleep(200)" line) for English and Russian strings with the annoying "Disable developer mode extensions" warning including variations with NBSP in them, and closes it automatically. It does not have noticeable CPU usage, and should work more reliably than direct hacks of the browser's binaries.

Cirro answered 21/2 at 2:22 Comment(0)
B
-1

Ruby based watir-webdriver use something like this:

browser=Watir::Browser.new( :chrome, :switches => %w[ --disable-extensions ] )
Berberidaceous answered 19/5, 2014 at 20:39 Comment(0)
F
-1

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'
            ]
        }
    }
});
Fronde answered 18/8, 2016 at 12:34 Comment(1)
OP isn't using WebDriverIO. Moreover OP is asking to disable the popup, but you went to disable extensions instead.Planer
H
-1

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/";
Highroad answered 22/8, 2016 at 5:36 Comment(1)
Works like a charm (C# WebDriver 2.53.1.0, ChromeDriver 2.20.353145, Win7 x64)Meridel
C
-1

Now, we need to handle it using following -

ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("chrome.switches", "--disable-extensions --disable-extensions-file-access-check --disable-extensions-http-throttling");

Apart from --disable-extensions, we also need to add --disable-extensions-file-access-check (and/or) --disable-extensions-http-throttling chrome switches.

Cleric answered 6/1, 2020 at 11:26 Comment(0)
A
-2

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.

Aftertaste answered 14/4, 2014 at 10:25 Comment(5)
You can also use the beta channel. It's more stable than dev. At the same time, it has more features than the stable channel.Prepossession
@RobW asargent said that the popup is present in the beta channel too. Is that wrong? code.google.com/p/chromium/issues/detail?id=337734#c2Georg
@Georg Just tried on Windows, and you're correct. Thanks for the correction. I'm using Linux, so I don't experience this issue (:Prepossession
This no longer works: blog.chromium.org/2015/05/…Oletta
@RobW Could you post an update on the bug? (it's Restrict-AddIssueComment-EditIssue)Oletta
S
-4

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)

The popup 'Disable developer mode extensions' will not pop up.

Splat answered 17/8, 2016 at 13:52 Comment(1)
OP asks how to disable the popup, you instead decided to disable his extensions instead. :/Planer

© 2022 - 2024 — McMap. All rights reserved.