Skip to content

hupe1980/gowebdriver

Repository files navigation

WebDriver client for Golang

Build Status Go Reference

Golang bindings that conform to the W3C WebDriver standard for controlling web browsers.

How to use

chromeDriver, err := webdriver.NewChromeDriver("/path/to/chromedriver")
err := chromeDriver.Start()
if err != nil {
	panic(err)
}

if err := chromeDriver.Start(); err != nil {
	panic(err)
}
defer chromeDriver.Stop()

session, err := chromeDriver.NewSession()
if err != nil {
    panic(err)
}
defer session.Close()

if err = session.NavigateTo("https://golang.org"); err != nil {
	 panic(err)
}

License

MIT