https://github.com/ghetzel/go-webfriend
Your friendly friend in modern web automation and testing.
https://github.com/ghetzel/go-webfriend
automation chrome chrome-devtools golang
Last synced: 5 months ago
JSON representation
Your friendly friend in modern web automation and testing.
- Host: GitHub
- URL: https://github.com/ghetzel/go-webfriend
- Owner: ghetzel
- License: mit
- Created: 2018-03-28T23:59:38.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-05-04T00:01:28.000Z (about 2 years ago)
- Last Synced: 2025-08-13T17:45:09.338Z (10 months ago)
- Topics: automation, chrome, chrome-devtools, golang
- Language: JavaScript
- Size: 5.86 MB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
“Your friendly friend in modern web automation and testing.”
## ALPHA ALERT
This software is under _heavy_ development and should not be considered production-ready. Much of it works, but much is still yet to
be implemented. It is a ground-up rewrite of my [Python version](https://github.com/ghetzel/webfriend) of this project.
Documentation and examples are missing and incomplete at this time, but I am working on it as I am able.
I welcome polite feedback, comments, and suggestions.
## Overview
Webfriend is a Golang library and command-line utility that integrates with the [Chrome DevTools Protocol](https://chromedevtools.github.io/devtools-protocol/) to control a Google Chrome or Chromium browser instance. There is also a purpose-built scripting language (called [Friendscript](docs/intro.md)) that is designed to be an easy-to-learn environment for writing simple or complex browser automation scripts.
### Some of the things that you can use Webfriend for:
- Take full-page screenshots of web pages.
- Automate tedious or repetitive tasks on web pages that otherwise would require extensive user input with a keyboard, mouse, or touchscreen device.
- Execute pre-defined tests against web pages and serve as an automated testing framework for verifying frontend functionality.
* Automatically login to websites with complex authentication flows.
* Extract (i.e. _scrape_) information from web pages and present it in a structured way that other languages and scripts can use as input.
* Inject Javascript code into the browser, evaluate it, then return the results for output or further processing.
### Operation and Usage
Webfriend by default operates using [Headless Chrome](https://developers.google.com/web/updates/2017/04/headless-chrome) mode, but can also just as easily run Chrome in the foreground in a graphical environment. Importantly, headless operation allows you to **run Webfriend on servers without running `Xfvb` or `X11`.** In this sense, it operates as a potentially-faster alternative to phantomjs or Selenium while also providing almost all of the capabilities of the complete Google Chrome/Chromium browser.
Using [Friendscript](docs/intro.md), straightforward and composable scripts can be written and combined together to create fast, modular, and flexible processes that can be used to solve real problems.
## Installation
```
go install github.com/ghetzel/go-webfriend/webfriend
```
## Documentation
- Friendscript (Web Automation Scripting Language)
- [Beginner's Guide](INTRO.md)
- [Language Overview](LANGUAGE.md)
- [Command Reference](https://ghetzel.github.io/go-webfriend/#funcref)