tebeka / selenium

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

unknown error - 33: Unable to create session from #300

Open work-ixiaozi-cn opened 1 year ago

work-ixiaozi-cn commented 1 year ago

my code

    caps := selenium.Capabilities{
        "browserName": "chrome",
        "chromeOptions": map[string]interface{}{
            "excludeSwitches": [1]string{"enable-automation"},
        },
    }
    caps.AddChrome(chrome.Capabilities{
        Path:               "",
        Args:             []string{},
    })
    driver, err := selenium.NewRemote(caps, "http://127.0.0.1:8095/wd/hub")
       if err != nil {
        log.Fatal("=================", err)
    }

debug error

2022/10/02 21:27:25 =================unknown error - 33: Unable to create session from {
  "desiredCapabilities": {
    "browserName": "chrome",
    "chromeOptions": {
      "w3c": false
    },
    "goog:chromeOptions": {
      "w3c": false
    }
  },
  "capabilities": {
    "firstMatch": [
      {
        "browserName": "chrome",
        "goog:chromeOptions": {
          "w3c": false
        }
      }
    ]
  }
}