1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "baseline": { "violations": [{
10 "id": "button-name",
11 "impact": "serious",
12 "help": "Buttons must have discernible text",
13 "helpUrl": "https://dequeuniversity.com/rules/axe/4.10/button-name",
14 "tags": [
15 "wcag2a",
16 "wcag412",
17 ],
18 "nodes": [{ "target": ["#save-button"] }],
19 }] },
20 "current": { "violations": [{
21 "id": "image-alt",
22 "impact": "critical",
23 "help": "Images must have alternative text",
24 "helpUrl": "https://dequeuniversity.com/rules/axe/4.10/image-alt",
25 "tags": [
26 "wcag2a",
27 "wcag111",
28 ],
29 "nodes": [{ "target": ["img.hero"] }],
30 }] },
31}
32
33
34run = client.actor("enfex/wcag-regression-diff-auditor").call(run_input=run_input)
35
36
37print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
38for item in client.dataset(run["defaultDatasetId"]).iterate_items():
39 print(item)
40
41