Closed Zidious closed 5 months ago
Verified this with the latest RC-build (4.9.1-4cb64b0.0 ) I am seeing below error when executing on safari (working fine on chrome and firefox)
dq_padmavathi@DQPadmavathi-MacBook-Pro axe-core-npm % node tests/wdjs.js
/Users/dq_padmavathi/Desktop/DevtoolsAutomation/qa-axe-devtools-api-daf/axe-core-npm/node_modules/selenium-webdriver/remote/index.js:256
let cancelToken = earlyTermination.catch((e) => reject(Error(e.message)))
^
Error: Server terminated early with status 1
at /Users/dq_padmavathi/Desktop/DevtoolsAutomation/qa-axe-devtools-api-daf/axe-core-npm/node_modules/selenium-webdriver/remote/index.js:256:70
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v20.11.1
for this axe-core/webdriverjs -version is 4.9.1-4cb64b0.0
selenium-webdriver- version is 4.19.0, which is latest`
Code used
const { AxeBuilder } = require("@axe-core/webdriverjs");
const { Builder } = require("selenium-webdriver");
(async () => {
const driver = new Builder().forBrowser("safari").build();
await driver.get("https://www.google.com");
const results = await new AxeBuilder(driver).analyze();
console.log(results);
await driver.quit();
})();
and enabled the 'Allow Remote Automation' option in Safari's Develop menu also to control Safari via WebDriver
Label | Value |
---|---|
Product | axe-core-npm |
Version | 4.9.1-4cb64b0.0 |
Selenium-webdriver-Version | 4.19.0 |
OS-Details | _MACOS-Sonoma14.4 and Windows 11 |
BrowserDetails | Chrome Version 123.0.6312.87 && Firefox 123.0.1 |
@Zidious / @michael-siek can you please take a look into this
Note: Tried with Axe-core/webdriverjs@next version - 4.8.6-b72c735.0" and
selenium-webdriver-4.17.0` too same error getting
I'm not able to reproduce this, but I wonder if it's because of the requirement to enable safaridriver. If it is, how do we disable safaridriver locally to verify manually, and then test?
Getting the results when executing on Safari Browser, Valdiated with the RC-build -4.9.1-4cb64b0.0 Steps validated:
1. create a directory and cd to that
2. npm init -y
3. npm i @axe-core/webdriverjs@rc
4. npm i selenium-webdriver
5. create a test file 'test.js' with contents -
const { AxeBuilder } = require("@axe-core/webdriverjs");
const { Builder } = require("selenium-webdriver");
(async () => {
const driver = new Builder().forBrowser("safari").build();
await driver.get("https://www.google.com/");
const results = await new AxeBuilder(driver).analyze();
console.log(results);
await driver.quit();
})();
Execute with - node test.js
Gettting the Results:
Result file attaching with .txt.
format
Label | Value |
---|---|
Product | axe-core-npm |
Version | 4.9.1-4cb64b0.0 |
Selenium-webdriver-Version | 4.19.0 |
OS-Details | _MACOS-Sonoma14.4 |
BrowserDetails | Chrome Version 123.0.6312.87 , Safari Version 17.4.1 (19618.1.15.11.14) && Firefox 123.0.1 |
Product
webdriverjs
Product Version
4.8.0
Latest Version
Issue Description
Expectation
Print axe results
Actual
Throws an error
How to Reproduce
Additional context
Run into the same issue in Ruby and Java.
We should look to to removing: https://github.com/dequelabs/axe-core-npm/blob/5fcb30f8be6bdcd196484384efd0e036b0bc5184/packages/webdriverjs/src/index.ts#L276-L285
In favour of something like:
Selenium doesn't appear to document the above in their docs, but it's available within their source code