LoginSignup
2
0

More than 1 year has passed since last update.

Go言語の「zserge/lorca」で「Microsoft Edgeは自動テスト ソフトウェアによって制御されています」を消したい

Last updated at Posted at 2022-03-25

2023.4.25 追記

Lorca、理由は不明ですかここ数日、強制終了する。
↓Webで検索すると同様な事象がある事が判明。信頼性が一番大事。
https://teratail.com/questions/unqysn0v2vbnl5

はじめに

go言語の「zserge/lorca」の実行時、Windows上部に以下の記述が出る。
image.png
非常にうっとうしい。
PythonのSeleniumでも同一事象が起きていて、ネットで消す方法を検索できるが、Go言語で見つからなので、ソースファイルを探ってみた。

結論

「github.com\zserge\lorca」のファイル「ui.go」内の以下の記述の「--」を消せばよい。

  • "--no-first-run", → "no-first-run",
  • "--enable-automation", → "enable-automation",

「ui.go」の修正箇所

var defaultChromeArgs = []string{
	"--disable-background-networking",
	"--disable-background-timer-throttling",
	"--disable-backgrounding-occluded-windows",
	"--disable-breakpad",
	"--disable-client-side-phishing-detection",
	"--disable-default-apps",
	"--disable-dev-shm-usage",
	"--disable-infobars",
	"--disable-extensions",
	"--disable-features=site-per-process",
	"--disable-hang-monitor",
	"--disable-ipc-flooding-protection",
	"--disable-popup-blocking",
	"--disable-prompt-on-repost",
	"--disable-renderer-backgrounding",
	"--disable-sync",
	"--disable-translate",
	"--disable-windows10-custom-titlebar",
	"--metrics-recording-only",

	//"--no-first-run",//←こちらは元の記述
	"no-first-run",//←このように「--」を消す

	"--no-default-browser-check",
	"--safebrowsing-disable-auto-update",

	//"--enable-automation",//←こちらは元の記述
	"enable-automation",//←このように「--」を消す
	
	"--password-store=basic",
	"--use-mock-keychain",
}

注意

  • ソースファイルに手を入れるので、気を付けてください。

参考

Github/zserge/lorca
Github/zserge/lorca/ui.go
【Python】Selenium:「Chromeは自動テストソフトウェアによって制御されています」を消す方法

参考:Loaca

Lorcaを使ってGoでHTML5アプリを作ろう!
golangでguiをつくれるライブラリをさがして、hello worldしてみる

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0