Skip to content
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

How to hide chromium command prompt #1056

Open
GosMachine opened this issue May 4, 2024 · 2 comments
Open

How to hide chromium command prompt #1056

GosMachine opened this issue May 4, 2024 · 2 comments
Labels
question Questions related to rod

Comments

@GosMachine
Copy link

Rod Version: v0.115.0
I know this can be done with selenium, can I do this in rod?

The code to demonstrate your question

func (b *Browser) runBrowser(proxy, username, password, action string) error {
	u := launcher.New().
		// Delete("--headless").
		Set("--no-sandbox").
		Set("--no-first-run").
		Set("--new-window").
		Set("--window-size", "400,400").
		Set("--disable-blink-features", "AutomationControlled").
		Set("--disable-setuid-sandbox").
		Bin(b.binPath)
	launch, err := u.Launch()
	if err != nil {
		return err
	}
	browser := rod.New().ControlURL(launch)
	err = browser.Connect()
	if err != nil {
	        return err
	}
	if username != "" && password != "" {
		go browser.MustHandleAuth(username, password)()
	}
	b.browser = browser
	return nil
}

What you got

screen

What have you tried to solve the question

I do not have this problem in linux with chromium. When i am using google chrome in windows i do not have it too, but i need fix it with chromium on windows 10

@GosMachine GosMachine added the question Questions related to rod label May 4, 2024
Copy link

github-actions bot commented May 4, 2024

Please fix the format of your markdown:

34 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## What you got"]

generated by check-issue

@ysmood
Copy link
Collaborator

ysmood commented May 5, 2024

Disable the leakless might do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions related to rod
Projects
None yet
Development

No branches or pull requests

2 participants