wdinstaller

package module
v0.0.0-...-cef70c4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2022 License: MIT Imports: 10 Imported by: 0

README

wdinstaller

Webdriver installer for Golang

This is the webdriver installer module. If webdriver is out of date or does not match your browser version, install the latest webdriver.

For now support:

ChromeDriver
GeckoDriver
MicrosoftEdgeDriver

Usage

Use it with agouti.

func main() {
  opt := wdinstaller.Option{DestPath: "./"}
  if err := wdinstaller.EdgeDriverInstaller(opt); err != nil {
    panic(err)
  }

  edgeDriver := agouti.EdgeDriver(agouti.Browser("msedge"))
  defer edgeDriver.Stop()
  if err := edgeDriver.Start(); err != nil {
	  panic(err)
  }
  edgePage, _ := edgeDriver.NewPage()
  edgePage.Navigate("https://www.google.com")
}
  

Instalation

$ go get github.com/daicmod/wdinstaller

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChromeDriverInstaller

func ChromeDriverInstaller(opt Option) error

func EdgeDriverInstaller

func EdgeDriverInstaller(opt Option) error

func GeckoDriverInstaller

func GeckoDriverInstaller(opt Option) error

Types

type Option

type Option struct {
	DestPath string
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL