MCPcopy Create free account
hub / github.com/tebeka/selenium / NewChromeDriverService

Function NewChromeDriverService

service.go:198–209  ·  view source on GitHub ↗

NewChromeDriverService starts a ChromeDriver instance in the background.

(path string, port int, opts ...ServiceOption)

Source from the content-addressed store, hash-verified

196
197// NewChromeDriverService starts a ChromeDriver instance in the background.
198func NewChromeDriverService(path string, port int, opts ...ServiceOption) (*Service, error) {
199 cmd := exec.Command(path, "--port="+strconv.Itoa(port), "--url-base=wd/hub", "--verbose")
200 s, err := newService(cmd, "/wd/hub", port, opts...)
201 if err != nil {
202 return nil, err
203 }
204 s.shutdownURLPath = "/shutdown"
205 if err := s.start(port); err != nil {
206 return nil, err
207 }
208 return s, nil
209}
210
211// NewGeckoDriverService starts a GeckoDriver instance in the background.
212func NewGeckoDriverService(path string, port int, opts ...ServiceOption) (*Service, error) {

Callers 1

TestChromeFunction · 0.85

Calls 2

newServiceFunction · 0.85
startMethod · 0.80

Tested by 1

TestChromeFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…