GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Luo4507/examples: chromedp code examples.

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

46 Commits
46 Commits

Folders and files

NameName
Last commit message
Last commit date
click
click
 
 
cookie
cookie
 
 
emulate
emulate
 
 
eval
eval
 
 
headers
headers
 
 
keys
keys
 
 
logic
logic
 
 
remote
remote
 
 
screenshot
screenshot
 
 
submit
submit
 
 
text
text
 
 
upload
upload
 
 
visible
visible
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
gen.go
gen.go
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 

Repository files navigation

About chromedp examples

This folder contains a variety of code examples for working with chromedp. The godoc page contains a number of simple examples which are generally self-contained, while this repository holds more complex examples which tend to require internet access or external components.

Please note that when the chromedp package is being rewritten, these examples may break. Additionally, since these examples are written for specific websites, there is a good chance that the current selectors, etc break after the website they are written against changes.

While every effort is made to ensure that these examples are kept up-to-date, it is expected that the examples made available here may occassionally break.

To file issues, use the chromedp's issue tracker.

Building and Running an Example

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

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

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

# build example <prog>
$ go build -o <prog> github.com/chromedp/examples/<prog> && ./<prog>

Available Examples

The following examples are currently available:

Example Description
click use a selector to click on an element
cookie set a HTTP cookie on requests
emulate emulate a specific device
eval evaluate javascript and retrieve the result
headers set a HTTP header on requests
keys send key events to an element
logic more complex logic beyond simple actions
remote connect to an existing chromium instance using chromedp.NewRemoteAllocator
screenshot take a screenshot of a specific element and of the entire browser viewport
submit fill out and submit a form
text extract text from a specific element
upload upload a file on a form
visible wait until an element is visible

Contributing

Pull Requests and contributions to this project are encouraged and greatly welcomed! The chromedp project always needs new examples, and needs talented developers (such as yourself!) to submit fixes for the existing examples when they break (for example, when a website's layout/HTML changes).

About

chromedp code examples.

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.