tebeka / selenium

Selenium/Webdriver client for Go
MIT License
2.52k stars 409 forks source link

Getting "error": "session not created"..."status": 33 #195

Open amrutasonawan opened 4 years ago

amrutasonawan commented 4 years ago

`package main

import ( "fmt" "os" "time"

"github.com/tebeka/selenium"

)

func main() { const ( seleniumPath = "some path" chromeDriverPath = "some path" port = 7080 ) opts := []selenium.ServiceOption{ selenium.StartFrameBuffer(), selenium.ChromeDriver(chromeDriverPath), // Specify the path to GeckoDriver in order to use Firefox. selenium.Output(os.Stderr), // Output debug information to STDERR. } selenium.SetDebug(true) service, err := selenium.NewSeleniumService(seleniumPath, port, opts...) if err != nil { panic(err) // panic is used only as an example and is not otherwise recommended. } defer service.Stop()

// Connect to the WebDriver instance running locally.
caps := selenium.Capabilities{"browserName": "chrome"}
wd, err := selenium.NewRemote(caps, fmt.Sprintf("http://localhost:%d/wd/hub", port))
if err != nil {
    panic(err)
}
defer wd.Quit()

// Navigate to the simple playground interface.
if err := wd.Get("http://play.golang.org/?simple=1"); err != nil {
    panic(err)
}
time.Sleep(time.Millisecond * 100)

// Output:
// Hello WebDriver!
//
// Program exited.

} `

amrutasonawan commented 4 years ago

@tebeka please help me in this.

tebeka commented 4 years ago

Hi @amrutasonawan, I no longer maintain the project. @minusnine can you help?

amrutasonawan commented 4 years ago

@tebeka thanks for your response. @minusnine can you please help me here.

maxcleme commented 4 years ago

I got same issue this morning, it was because the driver I used (from the vendor folder here) is not working with Chrome 83+, please try using a matching one according to official website, might solve the issue.

EDIT: In fact the error message was pretty straightforward : unknown error - 33: session not created: This version of ChromeDriver only supports Chrome version 80