NewChromeDriverService starts a ChromeDriver instance in the background.
(path string, port int, opts ...ServiceOption)
| 196 | |
| 197 | // NewChromeDriverService starts a ChromeDriver instance in the background. |
| 198 | func 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. |
| 212 | func NewGeckoDriverService(path string, port int, opts ...ServiceOption) (*Service, error) { |
searching dependent graphs…