sridharbandi / java-a11y Goto Github PK
View Code? Open in Web Editor NEWAccessibility Automated Testing with Java Selenium
Home Page: https://sridharbandi.github.io/Java-a11y/
License: MIT License
Accessibility Automated Testing with Java Selenium
Home Page: https://sridharbandi.github.io/Java-a11y/
License: MIT License
Hey,
When we create a report using this plugin we get different result as to running it using the codesniffer web tool.
Could this be related due to version mismatch of the codesniffer you use and the one currently in the web tool and do you have plans on updating to the latest version?
Kind regards,
Mitch
Get NPE when using Java-a11y as a dependency jar file. Null pointer is because it cannot find the HTML_CS file and the templates in "ftl" dir.
Proposed solution: use rgetResourceAsStream
and setClassLoader
respectively to fix NPE
Hi,
While executing the code I'm getting the below error on the execute method can you please help me out with this,
Exception in thread "main" org.openqa.selenium.JavascriptException: javascript error: Cannot read property 'run' of undefined
(Session info: chrome=84.0.4147.125)
https://squizlabs.github.io/HTML_CodeSniffer/build/HTMLCS.js is blocked for me as im using in private network.Is there any other way to overcome the issue.
I added the example class mentioned in the project, but man test
failed:
14:23 $ mvn test
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< io.github.sridharbandi:java-a11y >------------------
[INFO] Building Java a11y 3.0.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ java-a11y ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 20 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ java-a11y ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 26 source files to /Users/syedahmed/QA/TOOLS/508-A11Y/Java-a11y/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/syedahmed/QA/TOOLS/508-A11Y/Java-a11y/src/main/java/io/github/sridharbandi/Example.java:[2,32] package io.github.bonigarcia.wdm does not exist
[ERROR] /Users/syedahmed/QA/TOOLS/508-A11Y/Java-a11y/src/main/java/io/github/sridharbandi/Example.java:[4,29] package org.junit.jupiter.api does not exist
[ERROR] /Users/syedahmed/QA/TOOLS/508-A11Y/Java-a11y/src/main/java/io/github/sridharbandi/Example.java:[5,29] package org.junit.jupiter.api does not exist
[ERROR] /Users/syedahmed/QA/TOOLS/508-A11Y/Java-a11y/src/main/java/io/github/sridharbandi/Example.java:[6,29] package org.junit.jupiter.api does not exist
[ERROR] /Users/syedahmed/QA/TOOLS/508-A11Y/Java-a11y/src/main/java/io/github/sridharbandi/Example.java:[7,29] package org.junit.jupiter.api does not exist
[ERROR] /Users/syedahmed/QA/TOOLS/508-A11Y/Java-a11y/src/main/java/io/github/sridharbandi/Example.java:[23,6] cannot find symbol
symbol: class BeforeEach
location: class Example
[ERROR] /Users/syedahmed/QA/TOOLS/508-A11Y/Java-a11y/src/main/java/io/github/sridharbandi/Example.java:[33,6] cannot find symbol
symbol: class AfterEach
location: class Example
[ERROR] /Users/syedahmed/QA/TOOLS/508-A11Y/Java-a11y/src/main/java/io/github/sridharbandi/Example.java:[39,6] cannot find symbol
symbol: class AfterAll
location: class Example
[ERROR] /Users/syedahmed/QA/TOOLS/508-A11Y/Java-a11y/src/main/java/io/github/sridharbandi/Example.java:[44,6] cannot find symbol
symbol: class Test
location: class Example
[ERROR] /Users/syedahmed/QA/TOOLS/508-A11Y/Java-a11y/src/main/java/io/github/sridharbandi/Example.java:[49,6] cannot find symbol
symbol: class Test
location: class Example
[INFO] 10 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.923 s
[INFO] Finished at: 2022-11-02T14:24:00-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project java-a11y: Compilation failure: Compilation failure:
[ERROR] /Users/syedahmed/QA/TOOLS/508-A11Y/Java-a11y/src/main/java/io/github/sridharbandi/Example.java:[2,32] package io.github.bonigarcia.wdm does not exist
[ERROR] /Users/syedahmed/QA/TOOLS/508-A11Y/Java-a11y/src/main/java/io/github/sridharbandi/Example.java:[4,29] package org.junit.jupiter.api does not exist
[ERROR] /Users/syedahmed/QA/TOOLS/508-A11Y/Java-a11y/src/main/java/io/github/sridharbandi/Example.java:[5,29] package org.junit.jupiter.api does not exist
[ERROR] /Users/syedahmed/QA/TOOLS/508-A11Y/Java-a11y/src/main/java/io/github/sridharbandi/Example.java:[6,29] package org.junit.jupiter.api does not exist
[ERROR] /Users/syedahmed/QA/TOOLS/508-A11Y/Java-a11y/src/main/java/io/github/sridharbandi/Example.java:[7,29] package org.junit.jupiter.api does not exist
[ERROR] /Users/syedahmed/QA/TOOLS/508-A11Y/Java-a11y/src/main/java/io/github/sridharbandi/Example.java:[23,6] cannot find symbol
[ERROR] symbol: class BeforeEach
[ERROR] location: class Example
[ERROR] /Users/syedahmed/QA/TOOLS/508-A11Y/Java-a11y/src/main/java/io/github/sridharbandi/Example.java:[33,6] cannot find symbol
[ERROR] symbol: class AfterEach
[ERROR] location: class Example
[ERROR] /Users/syedahmed/QA/TOOLS/508-A11Y/Java-a11y/src/main/java/io/github/sridharbandi/Example.java:[39,6] cannot find symbol
[ERROR] symbol: class AfterAll
[ERROR] location: class Example
[ERROR] /Users/syedahmed/QA/TOOLS/508-A11Y/Java-a11y/src/main/java/io/github/sridharbandi/Example.java:[44,6] cannot find symbol
[ERROR] symbol: class Test
[ERROR] location: class Example
[ERROR] /Users/syedahmed/QA/TOOLS/508-A11Y/Java-a11y/src/main/java/io/github/sridharbandi/Example.java:[49,6] cannot find symbol
[ERROR] symbol: class Test
[ERROR] location: class Example
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
Hi Sridhar,
We already had a test suite running on your 2.0 alpha 2 release. We decided to upgrade it to the latest 3.01, but we noticed that the below is no longer supported:
Hello,
How often are you maintaining this repository for Accessibility Testing. How to contact you?
Br,
Vikrant
email: [email protected]
Hi @sridharbandi , this was super helpful to achieve accessibility automation. Thanks a lot for this wonderful work.
I am facing issue with report, reports are not getting generated , i downloaded the jar : java-a11y-3.0.2 jar file and added to my intellij and here is my code looks like
HtmlCsRunner htmlCsRunner = new HtmlCsRunner(driver);
htmlCsRunner.setStandard(HTMLCS.WCAG2AAA);
htmlCsRunner.setPageTile("LP").execute();
htmlCsRunner.generateHtmlReport();
i am not able to add the line : Accessibility.REPORT_PATH = System.getProperty("user.dir")+"/target/accessibility in my before suite, looks like REPORT_PATH reference cannot be found
When an alert or prompt box is in front of page it returns the results as 0.
This is not a bug but rather a feature that will help to save the reports to custom folder rather than target folder.
Hi @sridharbandi same script with one url wrorking fine , but when try another url in driver.get(); --getting below error and report not generating
org.openqa.selenium.WebDriverException: unknown error: Runtime.evaluate threw exception: unknown
(Session info: chrome=109.0.5414.120)
Build info: version: '4.0.0', revision: '3a21814679'
System info: host: 'IND9FKYYD3', ip: '192.168.0.11', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.11'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Command: [246937baa4fd700b96e911f72e3b493c, executeScript {script=return axeData('{"standard":null,"ignoreCodes":null,"pageTitle":null}');async function axeData(params) {
const obj = JSON.parse(params);
await injectAxeScript();
var results = await runAxe()
results.id = 'id_' + (Date.now().toString(36) + Math.random().toString(36).substr(2, 5));
results.title = obj.pageTitle == null ? document.title : obj.pageTitle;
results.dimension = window.innerWidth + ' X ' + window.innerHeight;
results.device = device();
results.browser = getBrowser();
results.date = getFormattedDate();
return results;
}
function getBrowser() {
const userAgent = navigator.userAgent;
var browser = "Unkown";
// Detect browser name
browser = (/ucbrowser/i).test(userAgent) ? 'UCBrowser' : browser;
browser = (/edg/i).test(userAgent) ? 'Edge' : browser;
browser = (/googlebot/i).test(userAgent) ? 'GoogleBot' : browser;
browser = (/chromium/i).test(userAgent) ? 'Chromium' : browser;
browser = (/firefox|fxios/i).test(userAgent) && !(/seamonkey/i).test(userAgent) ? 'Firefox' : browser;
browser = (/; msie|trident/i).test(userAgent) && !(/ucbrowser/i).test(userAgent) ? 'IE' : browser;
browser = (/chrome|crios/i).test(userAgent) && !(/opr|opera|chromium|edg|ucbrowser|googlebot/i).test(userAgent) ? 'Chrome' : browser;
browser = (/safari/i).test(userAgent) && !(/chromium|edg|ucbrowser|chrome|crios|opr|opera|fxios|firefox/i).test(userAgent) ? 'Safari' : browser;
browser = (/opr|opera/i).test(userAgent) ? 'Opera' : browser;
// detect browser version
switch (browser) {
case 'UCBrowser':
return browser + ' ' + browserVersion(userAgent, /(ucbrowser)\/([\d\.]+)/i);
case 'Edge':
return browser + ' ' + browserVersion(userAgent, /(edge|edga|edgios|edg)\/([\d\.]+)/i);
case 'GoogleBot':
return browser + ' ' + browserVersion(userAgent, /(googlebot)\/([\d\.]+)/i);
case 'Chromium':
return browser + ' ' + browserVersion(userAgent, /(chromium)\/([\d\.]+)/i);
case 'Firefox':
return browser + ' ' + browserVersion(userAgent, /(firefox|fxios)\/([\d\.]+)/i);
case 'Chrome':
return browser + ' ' + browserVersion(userAgent, /(chrome|crios)\/([\d\.]+)/i);
case 'Safari':
return browser + ' ' + browserVersion(userAgent, /(safari)\/([\d\.]+)/i);
case 'Opera':
return browser + ' ' + browserVersion(userAgent, /(opera|opr)\/([\d\.]+)/i);
case 'IE':
const version = browserVersion(userAgent, /(trident)\/([\d\.]+)/i);
// IE version is mapped using trident version
// IE/8.0 = Trident/4.0, IE/9.0 = Trident/5.0
return version ? browser + ' ' + parseFloat(version) + 4.0 : browser + ' ' + 7.0;
default:
return 'Unknown 0.0.0.0';
}
}
function browserVersion(userAgent, regex) {
return userAgent.match(regex) ? userAgent.match(regex)[2] : null;
}
function device() {
var width = window.innerWidth;
if (width < 768) {
return 'Phone';
} else if (width < 992) {
return 'Tablet';
} else if (width < 1200) {
return 'Small Laptop';
} else {
return 'Laptop/Desktop';
}
}
function getFormattedDate() {
var date = new Date();
var formattedDate = date.getDate() + "/" + (date.getMonth() + 1) + "/" + date.getFullYear() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
return formattedDate;
}
function runAxe() {
return new Promise(function (resolve, reject) {
axe.run(document, {
runOnly: {type: 'tag', values: ['wcag2a', 'wcag2aa', 'section508']},
resultTypes: ['violations', 'incomplete', 'inapplicable'],
rules: { 'accesskeys': { enabled: false } },
reporter: 'v2'
}).then(results => resolve(results))
});
}
function injectAxeScript() {
return new Promise((resolve, reject) => {
const script = document.createElement('script');
script.src = "https://cdn.jsdelivr.net/npm/axe-core@latest/axe.min.js";
script.addEventListener('load', resolve);
script.addEventListener('error', e => reject(e.error));
document.head.appendChild(script);
});
}, args=[]}]
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 109.0.5414.120, chrome: {chromedriverVersion: 109.0.5414.74 (e7c5703604da..., userDataDir: C:\Users\akoda1\AppData\Loc...}, goog:chromeOptions: {debuggerAddress: localhost:59544}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(), se:cdp: ws://localhost:59544/devtoo..., se:cdpVersion: 109.0.5414.120, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true}
Session ID: 246937baa4fd700b96e911f72e3b493c
Running into issue with converting the axe json to html report.
It looks like axe allows impact to be null.
https://github.com/dequelabs/axe-core/blob/a38e93ef589d65ee764b07c1d55c411acb3ebf87/axe.d.ts#L6
Html report can't be generated because template needs to be updated to handle the null value.
Here is the error
- Failed at: #assign criticals = array?filter(x ->... [in template "axe/pagemetrics.ftl" at line 52, column 1]
- Reached through: #include "pagemetrics.ftl" [in template "axe/page.ftl" at line 10, column 5]
The following has evaluated to null or missing:
==> x.impact [in template "axe/pagemetrics.ftl" at line 52, column 39]
----
Tip: It's the step after the last dot that caused this error, not those before it.
----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
Parsed one of the json files generated by axe for the values of impact.
jq '.violations[].impact' 0fbc72be-3f36-42df-99a6-60133c30204f.json
"serious"
"minor"
jq '.incomplete[].impact' 0fbc72be-3f36-42df-99a6-60133c30204f.json
"serious"
null
Hello Sri,
I am not able to generate html report, json reports are getting created. See the screenshot below:
I am using using the following code in AfterSuite hook.
Accessibility.REPORT_PATH = System.getProperty("user.dir")+"/target/accessibility"; accessibilityRunner.generateHtmlReport();
Let me know what the issue is, thanks in advance. Also, is it Java11 compatible?
Hi Sridhar,
with selenium version 4.0.0-rc-3 the Axereporter.execute() is working
But when I use version 4.4.0 the Axereporter. execute() is throwing the below error
java.lang.NoSuchMethodError: org.openqa.selenium.support.ui.WebDriverWait.(Lorg/openqa/selenium/WebDriver;J)V
at io.github.sridharbandi.util.A11y.waitForLoad(A11y.java:54)
at io.github.sridharbandi.util.A11y.execute(A11y.java:41)
at io.github.sridharbandi.AxeRunner.execute(AxeRunner.java:24)
at Example.tearDown(Example.java:32)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptLifecycleMethod(TimeoutExtension.java:128)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptAfterEachMethod(TimeoutExtension.java:110)
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeMethodInExtensionContext(ClassBasedTestDescriptor.java:520)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$synthesizeAfterEachMethodAdapter$24(ClassBasedTestDescriptor.java:510)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeAfterEachMethods$10(TestMethodTestDescriptor.java:243)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeAllAfterMethodsOrCallbacks$13(TestMethodTestDescriptor.java:276)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeAllAfterMethodsOrCallbacks$14(TestMethodTestDescriptor.java:276)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeAllAfterMethodsOrCallbacks(TestMethodTestDescriptor.java:275)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeAfterEachMethods(TestMethodTestDescriptor.java:241)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:142)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:68)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)
at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:71)
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
@sridharbandi
I am using your accessibility libray for accessibility testing of Salesforce UI , however the test is failing when after " axeRunner.execute();"
Below is the code for executing the Axe scanning
axeRunner = new AxeRunner(getDriver());
getDriver().get(<salesforceurl>);
JavascriptExecutor javascriptExecutor = (JavascriptExecutor) getDriver();
String axe = Reader.getInstance().getAXE();
javascriptExecutor.executeScript(axe);
axeRunner.execute();
Below is the error I am getting
com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type java.lang.String
from Array value (token JsonToken.START_ARRAY
)
at [Source: (StringReader); line: 287, column: 20] (through reference chain: io.github.sridharbandi.modal.axe.Issues["incomplete"]->java.util.ArrayList[1]->io.github.sridharbandi.modal.axe.IssueType["nodes"]->java.util.ArrayList[0]->io.github.sridharbandi.modal.axe.Node["target"]->java.util.ArrayList[0])
at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)
at com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1741)
at com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1515)
at com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1420)
at com.fasterxml.jackson.databind.deser.std.StdDeserializer._parseString(StdDeserializer.java:1299)
at com.fasterxml.jackson.databind.deser.std.StringCollectionDeserializer.deserialize(StringCollectionDeserializer.java:216)
at com.fasterxml.jackson.databind.deser.std.StringCollectionDeserializer.deserialize(StringCollectionDeserializer.java:182)
at com.fasterxml.jackson.databind.deser.std.StringCollectionDeserializer.deserialize(StringCollectionDeserializer.java:25)
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:313)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:176)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer._deserializeFromArray(CollectionDeserializer.java:355)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:244)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:28)
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:313)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:176)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer._deserializeFromArray(CollectionDeserializer.java:355)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:244)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:28)
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:313)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:176)
at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:322)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4674)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3629)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3597)
at io.github.sridharbandi.util.A11y.execute(A11y.java:58)
at io.github.sridharbandi.AxeRunner.execute(AxeRunner.java:27)
[
GeneratedJSON.txt
](url)
Any help in resolving this error is appreciated.
The code works fine I run it against Google page (google.co.nz)
Hi,
Great work. Any idea why i might get this on generate html report?
java.lang.NoSuchFieldError: VERSION_2_3_29
at io.github.sridharbandi.ftl.FtlConfig.<init>(FtlConfig.java:42)
at io.github.sridharbandi.ftl.FtlConfig.getInstance(FtlConfig.java:52)
at io.github.sridharbandi.AccessibilityRunner.generateHtmlReport(AccessibilityRunner.java:114)
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.