go-rod / rod

A Chrome DevTools Protocol driver for web automation and scraping.

Home Page:https://go-rod.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to hide chromium command prompt

GosMachine opened this issue · comments

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

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

Disable the leakless might do.