-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdoc.go
28 lines (22 loc) · 946 Bytes
/
doc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
Package cri provides type-safe bindings for devtools protocol,
and can be used with Chrome or any other target that implements the interface.
Protocol is generated by script cmd/generate.sh, which fetches latest version of protocol
and creates types and domains (accessibility, animation, page, dom...) packages.
Script can be run by calling
go generate
To start using package, create a new connection to chrome
// connects to chrome at 127.0.0.1:9222
conn, connErr := cri.NewConnection()
Connection instance can now be used to send commands to chrome
// get Page instance
pi := page.New(conn)
// send Page.enable command
pi.Enable()
// send Page.navigate command with url parameter
pi.Navigate(&page.NavigateRequest{Url: "https://www.example.com"})
To get started with devtools read https://developers.google.com/web/updates/2017/04/headless-chrome
*/
package cri
//go:generate bash cmd/generate.sh
//go:generate gofmt -s -w .