-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbrowser.yml
More file actions
45 lines (42 loc) · 966 Bytes
/
browser.yml
File metadata and controls
45 lines (42 loc) · 966 Bytes
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
name: Browser Examples
description: Minimal test to verify browser can start
vars:
ci: "{{ CI ?? '' }}"
jobs:
- name: Get element text
steps:
- name: Simple Navigation Test
uses: browser
with:
headless: true
timeout: 1m
actions:
- name: navigate
url: https://example.com/
- name: wait_visible
selector: h1
- name: text
id: heading
selector: "h1"
test: res.code == 0 && res.results.heading != ""
echo: |
Heading: {{res.results.heading}}
-----
outputs:
load_time: res.time_ms
- name: Capture screenshot
steps:
- name: Get google
uses: browser
with:
window_w: 1280
window_h: 800
headless: "{{ vars.ci != '' }}"
timeout: 1m
actions:
- name: navigate
url: https://www.google.com/
- name: capture_screenshot
path: ./e2e/capture_screenshot.png
quality: 80
test: res.code == 0