generated from actions/javascript-action
-
Notifications
You must be signed in to change notification settings - Fork 1
/
action.yml
46 lines (45 loc) · 1.56 KB
/
action.yml
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: 'Webpage Screenshot'
author: 'Karol Brejna'
description: 'Take a screenshot of a webpage or its element. Optionally, run a script (in the browser) before taking the screenshot.'
branding:
icon: 'layout'
color: 'blue'
inputs:
url:
description: 'The URLs of the pages to be captured'
required: true
mode:
description: |
Mode of operation. Possible values:
* page
* wholePage
* scrollToElement
* element - capture a specific element by selector (see: "selector" and "xpath" input)
default: wholePage
selector:
description: |
CSS selector of the element to be captured or element to which the view should be scrolled.
Can be used in "element" and "scrollToElement" modes.
Use "selector" or "xpath" input, not both.
required: false
xpath:
description: |
xpath expression for the element to be captured or element to which the view should be scrolled.
Can be used in "element" and "scrollToElement" modes.
Use "selector" or "xpath" input, not both.
required: false
scriptBefore:
description: |
Script to be executed before the screenshot is taken.
Can be used in "script", "page", "wholePage" mode.
required: false
output:
description: 'Output file name/path. If not specified, the screenshot will be saved to "screenshot.png" in the current directory.'
required: false
default: screenshot.png
outputs:
scriptResult:
description: 'JSON string with the result of the script execution.'
runs:
using: 'node16'
main: 'dist/index.js'