@axe-core/webdriverjs 4.8.2-70ceac0.0 → 4.8.2-7f7e2bc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.d.mts +84 -0
  2. package/package.json +5 -6
@@ -0,0 +1,84 @@
1
+ import { WebDriver } from 'selenium-webdriver';
2
+ import { AxeResults, SerialFrameSelector, RunOptions, Spec } from 'axe-core';
3
+
4
+ interface BuilderOptions {
5
+ noSandbox?: boolean;
6
+ logIframeErrors?: boolean;
7
+ }
8
+ type CallbackFunction = (error: Error | null, results: AxeResults | null) => void;
9
+
10
+ declare class AxeBuilder {
11
+ private driver;
12
+ private axeSource;
13
+ private includes;
14
+ private excludes;
15
+ private option;
16
+ private config;
17
+ private builderOptions;
18
+ private legacyMode;
19
+ private errorUrl;
20
+ constructor(driver: WebDriver, axeSource?: string | null, builderOptions?: BuilderOptions);
21
+ /**
22
+ * Selector to include in analysis.
23
+ * This may be called any number of times.
24
+ */
25
+ include(selector: SerialFrameSelector): this;
26
+ /**
27
+ * Selector to exclude in analysis.
28
+ * This may be called any number of times.
29
+ */
30
+ exclude(selector: SerialFrameSelector): this;
31
+ /**
32
+ * Set options to be passed into axe-core
33
+ */
34
+ options(options: RunOptions): this;
35
+ /**
36
+ * Limit analysis to only the specified rules.
37
+ * Cannot be used with `AxeBuilder#withTags`
38
+ */
39
+ withRules(rules: string | string[]): this;
40
+ /**
41
+ * Limit analysis to only specified tags.
42
+ * Cannot be used with `AxeBuilder#withRules`
43
+ */
44
+ withTags(tags: string | string[]): this;
45
+ /**
46
+ * Set the list of rules to skip when running an analysis.
47
+ */
48
+ disableRules(rules: string | string[]): this;
49
+ /**
50
+ * Set configuration for `axe-core`.
51
+ * This value is passed directly to `axe.configure()`
52
+ */
53
+ configure(config: Spec): this;
54
+ /**
55
+ * Performs an analysis and retrieves results.
56
+ */
57
+ analyze(callback?: CallbackFunction): Promise<AxeResults>;
58
+ /**
59
+ * Use frameMessenger with <same_origin_only>
60
+ *
61
+ * This disables use of axe.runPartial() which is called in each frame, and
62
+ * axe.finishRun() which is called in a blank page. This uses axe.run() instead,
63
+ * but with the restriction that cross-origin frames will not be tested.
64
+ */
65
+ setLegacyMode(legacyMode?: boolean): this;
66
+ /**
67
+ * Analyzes the page, returning a promise
68
+ */
69
+ private analyzePromise;
70
+ /**
71
+ * Use axe.run() to get results from the page
72
+ */
73
+ private runLegacy;
74
+ /**
75
+ * Get partial results from the current context and its child frames
76
+ */
77
+ private runPartialRecursive;
78
+ /**
79
+ * Use axe.finishRun() to turn partial results into actual results
80
+ */
81
+ private finishRun;
82
+ }
83
+
84
+ export { AxeBuilder, AxeBuilder as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axe-core/webdriverjs",
3
- "version": "4.8.2-70ceac0.0+70ceac0",
3
+ "version": "4.8.2-7f7e2bc.0+7f7e2bc",
4
4
  "description": "Provides a method to inject and analyze web pages using axe",
5
5
  "contributors": [
6
6
  {
@@ -70,9 +70,9 @@
70
70
  "@types/chromedriver": "^81.0.1",
71
71
  "@types/express": "^4.17.14",
72
72
  "@types/mocha": "^10.0.0",
73
- "@types/node": "^18.8.3",
73
+ "@types/node": "^20.8.10",
74
74
  "@types/selenium-webdriver": "^4.1.5",
75
- "@types/test-listen": "^1.1.0",
75
+ "async-listen": "^3.0.1",
76
76
  "axe-test-fixtures": "github:dequelabs/axe-test-fixtures#v1",
77
77
  "chai": "^4.3.6",
78
78
  "chromedriver": "latest",
@@ -81,9 +81,8 @@
81
81
  "nyc": "^15.1.0",
82
82
  "rimraf": "^5.0.5",
83
83
  "selenium-webdriver": "^4.8.1",
84
- "test-listen": "^1.1.0",
85
84
  "ts-node": "^10.9.1",
86
- "tsup": "^6.7.0",
85
+ "tsup": "^7.2.0",
87
86
  "typescript": "^4.8.4"
88
87
  },
89
88
  "dependencies": {
@@ -111,5 +110,5 @@
111
110
  "functions": 85,
112
111
  "lines": 85
113
112
  },
114
- "gitHead": "70ceac0022a8d437a29f20eddc321b07cf29435d"
113
+ "gitHead": "7f7e2bcf7cc28d9801ef813a7118cb64d2a4b466"
115
114
  }