tebeka / selenium

Selenium/Webdriver client for Go
MIT License
2.51k stars 410 forks source link

For those who wants to use a http proxy or socks proxy #271

Open JobberRT opened 2 years ago

JobberRT commented 2 years ago

Just adding capabilities to the webdriver rather than using the AddProxy method

like this

caps := selenium.Capabilities{
    "browserName": "chrome",
}
caps.AddChrome(chrome.Capabilities{
    Prefs: map[string]interface{}{"profile.default_content_setting_values.notifications": 2},
    Args: []string{
        "--window-size=1920,1080",
        "--headless",
        "--no-sandbox",
        fmt.Sprintf("--proxy-server=%s", viper.GetString("selenium.proxy_url")),   #--proxy-server=http://127.0.0.1:1234
    },
})

To the author:

im graceful for you creating this amazing package, but if you can not keep it active, just make it archieve or involve more people to work together, rather than leaving this massiv issues down here.

yanxiao71 commented 2 years ago

How to use http proxy with auth