-
Notifications
You must be signed in to change notification settings - Fork 541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running with latest Chrome version #167
Comments
While it should be added, in the meantime you can pass custom args to the New method: func New(url, dir string, width, height int, customArgs ...string) (UI, error) |
Yes, I have seen that, but how? It is not just a matter of specifying something like "--enable-automation" because no such argument exists. |
I could not find a method to set "excludeSwitches" via Chrome's command-line arguments. |
Ah, it seems to be a flag, experimental, the New method does not allow to pass flags. The chrome instance object must have the methods to enable/disable flags, I did not check yet. |
Any ideas? |
hi guys, Has good idea? |
Can you guys check this: https://peter.sh/experiments/chromium-command-line-switches/#enable-automation
It looks that the Line 52 in 1006348
|
Tiny demo, no message bar and no shadow: package main
import (
"os/exec"
)
func main() {
browser := "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
args := []string{
"--no-first-run",
// "--enable-automation",
"--app=data:text/html, <h1>hello!</h1>",
"--window-size=300,200",
"--remote-debugging-port=0",
"--user-data-dir=./a/",
}
cmd := exec.Command(browser, args...)
cmd.Start()
} May be you should clear the user data dir at first. |
it`s work |
Doesn't work for me. Did you have to delete some cached data? I pass an empty string to lorca.New dir parameter, so the user data should be deleted already in my case. |
I only modified the source code 'defaultChromeArgs' . |
Strange, I do the same, and "Chrome is being controlled by automated test software" is still shown. |
my code
|
Thanks, now it does work for me too. The issue for me was that the source code was in read-only mode. |
Actually, I've found that removing the "--enable-automation" flag alone is not a great fix. This causes the "save password" bubble to pop up whenever you use lorca to log in somewhere. This comment explains the side effects of disabling automation: puppeteer/puppeteer#2070 (comment) The flag "--disable-save-password-bubble" has apparently also been removed a while back. It seems they have made it very difficult to hide both the password bubble and the automation infobar at the same time. |
I am also having the same problem. Deleting Chrome's cache and temporary files did not change the result. Is there a temporary way to address this issue? Environments : |
Has anyone had any luck removing both the infobar and the save password prompt at the same time? On a somewhat related note, I have been able to disable the google translate UI by passing an experimental flag into New() like this: "--disable-features=Translate". Can we perhaps leverage the "--disable-features=x" argument to solve the issue? Based on some additional research, it seems that the CommandLineFlagSecurityWarningsEnabled policy can actually control the infobar on newer chrome versions, like disable-infobars used to. |
Any solution? I'm having the same problem... |
modify lorca/ui.go:
it's ok for me, chrome v103 with mac |
Two tea for this sir! |
Removing the "--enable-automation" flag from |
use this args --disable-features=automation |
Latest Chrome version no longer supports the "--disable-infobars" argument, so lorca now runs with the text "Chrome is being controlled by automated test software" in the info-bar.
To be fair ...It does not break the running of the program but it is annoying.
Argument should be replaced by an "enable-automation" Chrome option.
The text was updated successfully, but these errors were encountered: