All Projects → asciidoctor → asciidoctorj-screenshot

asciidoctor / asciidoctorj-screenshot

Licence: MIT license
A set of AsciidoctorJ extensions for adding automated screenshots to an AsciiDoc document.

Programming Languages

groovy
2714 projects
HTML
75241 projects

Projects that are alternatives of or similar to asciidoctorj-screenshot

asciidoctor-katex
Asciidoctor extension for converting latexmath using KaTeX at build time
Stars: ✭ 16 (-50%)
Mutual labels:  asciidoctor, asciidoctor-extension
gulp-asciidoctor
gulp-asciidoctor
Stars: ✭ 14 (-56.25%)
Mutual labels:  asciidoctor, asciidoctor-extension
dotfiles
. files
Stars: ✭ 37 (+15.63%)
Mutual labels:  screenshot
zipline
A ShareX/file upload server that is easy to use, packed with features, and with an easy setup!
Stars: ✭ 215 (+571.88%)
Mutual labels:  screenshot
vitalsource-printer
Take screenshot, click next page, then do it again...
Stars: ✭ 51 (+59.38%)
Mutual labels:  screenshot
mugshot
Framework independent visual testing library
Stars: ✭ 126 (+293.75%)
Mutual labels:  screenshot
LibQtScreen
Qt library for making directx and opengl screenshots.
Stars: ✭ 43 (+34.38%)
Mutual labels:  screenshot
screenshot.py
Taking a screenshot of a webpage.
Stars: ✭ 49 (+53.13%)
Mutual labels:  screenshot
animated-lamp
Telegram Bot For Screenshot Generation
Stars: ✭ 162 (+406.25%)
Mutual labels:  screenshot
ngx-feedback
Angular user feedback collector library
Stars: ✭ 17 (-46.87%)
Mutual labels:  screenshot
resumify
Capture screenshot and make PDF on your HTML presentation.
Stars: ✭ 28 (-12.5%)
Mutual labels:  screenshot
screenshot-tweet
Screenshot a tweet.
Stars: ✭ 66 (+106.25%)
Mutual labels:  screenshot
go-scrap
Go library to capture screen pixels for screenshots or screen recording
Stars: ✭ 68 (+112.5%)
Mutual labels:  screenshot
Katastrophe
Command Line Tool to download torrents
Stars: ✭ 85 (+165.63%)
Mutual labels:  screenshot
nightwatch-vrt
Visual Regression Testing tools for nightwatch.js
Stars: ✭ 59 (+84.38%)
Mutual labels:  screenshot
EasyScreenshot
The easy way to take screenshots of your app programmatically.
Stars: ✭ 16 (-50%)
Mutual labels:  screenshot
android-capture
Capture video and screenshots from Android devices and emulators.
Stars: ✭ 32 (+0%)
Mutual labels:  screenshot
RemoteAssistance-JAVA
RemoteControl like TeamViewer(JAVA)
Stars: ✭ 28 (-12.5%)
Mutual labels:  screenshot
screentray-distribution
macOS app for capturing, annotating and sharing screenshots
Stars: ✭ 28 (-12.5%)
Mutual labels:  screenshot
AutoScreenshot
Automatic screenshot maker for Windows
Stars: ✭ 49 (+53.13%)
Mutual labels:  screenshot

AsciidoctorJ Screenshot Extension

This AsciidoctorJ extension automates the documentation of your webapp using screenshots. No more hassles when you change simple settings like CSS or change that button that was too big. Your documentation stays up to date!

Quick reference

Basic usage is a block macro screenshot that points to a URL: The title of the block macro is used as the caption of the image.

.Google Landing page
screenshot::http://google.com[google]

Use a block geb to control the browser (e.g. for filling in a form or doing a login) The content of the block is passed to Geb. Geb is then taking control of the browser.

[geb]
....
go "http://google.com"
$("input", name: "q").value("asciidoctor")
Tread.sleep(5000)
....

Parameters

screenshot

The screenshot block macro has the syntax screenshot::<url>[<parameters>] and supports the following parameters (note: the URL is not needed when the browser was navigated to the page using a geb block or other means)

name

an optional unique file name (will be generated otherwise), the screenshot will be called <name>.png. This is the first positional parameter.

frame

Try awesomeness with iphone5, nexus5 or browser. This is the second positional parameter.

dimension

size of the screenshot in the format <width>x<height> for instance 800x600. Also the values of 'frame' are supported.

selector

the CSS-like dom selector to screenshot. Only this will be part of the image. For instance div #login_window.

width

if set the value is passed unchanged to the backend (e.g. HTML or PDF). The behavior is the same as setting this attribute on an image block.

height

if set the value is passed unchanged to the backend (e.g. HTML or PDF). The behavior is the same as setting this attribute on an image block.

Note: it is not allowed to set both 'frame' and 'dimension' or 'frame' and 'selector' for a screenshot. Note: screenshot::http://google.com[google] and screenshot::http://google.com[name=google] are equivalent.

geb

The geb block supports the following parameters:

dimension

size of the screenshot in the format <width>x<height> for instance 800x600. Also the values of 'frame' are supported. This is the first positional parameter.

The content of the geb block can be any valid groovy script. The following bindings are defined and my be used within the script:

Browser

The class geb.Browser

Dimension

The class org.openqa.selenium.Dimension

Keys

The class org.openqa.selenium.Keys

asciidoc

a map containing all attributes defined in the current asciidoc file (including the attributes of the geb block). This is useful to pass information like an URL, username, password, etc. to the script.

Examples

.The Google landing page
screenshot::http://google.com[google]
[geb]
....
$("input", name: "q").value("asciidoctor")
Tread.sleep(5000)
....
.Some propositions should appear
screenshot::[frame=BROWSER]
[geb, dimension=iphone5]
....
$("h3.r a").click()
....
.Look Ma, it's Nexus 5!
screenshot::[frame=nexus5]
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].