testaro 78.0.1 → 78.0.2

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/package.json +1 -1
  2. package/procs/launch.js +4 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testaro",
3
- "version": "78.0.1",
3
+ "version": "78.0.2",
4
4
  "description": "Run 1300 web accessibility tests from 10 tools and get a standardized report",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/procs/launch.js CHANGED
@@ -83,9 +83,11 @@ const deSlash = url => (url || '').replace(/\/+$/, '');
83
83
  // Close a browser context and/or its browser, if they exist.
84
84
  const browserClose = exports.browserClose = async page => {
85
85
  if (page) {
86
- const browserContext = page.context;
86
+ // Get the context (i.e. window) of the page and the browser of the context. These are methods, not properties; referencing them as properties made this function silently fail to close anything, because a function object has no close method and the resulting TypeError was caught and discarded.
87
+ const browserContext = page.context();
87
88
  if (browserContext) {
88
- const {browser} = browserContext;
89
+ // The browser is null for a context not owned by a browser, such as a persistent context.
90
+ const browser = browserContext.browser();
89
91
  try {
90
92
  await browserContext.close();
91
93
  }