compare-chromedp/

directory
v0.42.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2020 License: MIT

README

Rod comparison with chromedp

chromedp is one of the most popular libraries available for Go which controls the Chrome Devtools Protocol.

We have emulated the examples they provide using our own library so you can compare which one you prefer.

Occasionally, some of these examples may break if the Rod API gets updated or if the specific websites these examples use get updated. We suggest you create an issue.

You can build and run these examples in the usual Go way:

# retrieve examples
$ go get -u -d github.com/go-rod/rod/

# run example <prog>
$ go run $GOPATH/src/github.com/go-rod/rod/lib/examples/compare-chromedp/<prog>/main.go

# build example <prog>
$ go build -o <prog> github.com/go-rod/rod/lib/examples/compare-chromedp/<prog>/ && ./<prog>
Example chromedp Example Description
click click use a selector to click on an element
cookie cookie set a HTTP cookie on requests
emulate emulate emulate a specific device such as an iPhone
eval eval evaluate javascript and retrieve the result
headers headers set a HTTP header on requests
keys keys send key events to an element
logic logic more complex logic beyond simple actions
remote remote connect to an existing Chrome DevTools instance using a remote WebSocket URL
screenshot screenshot take a screenshot of a specific element and of the entire browser viewport
submit submit fill out and submit a form
text text extract text from a specific element
upload upload upload a file on a form
visible visible wait until an element is visible

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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