dequelabs / axe-core-maven-html

Tools for using axe for web accessibility testing with JUnit, Selenium, and Playwright

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] I am trying to use AxeBuilder for accessibility testing, its giving me dependency resolution issue

pranesh517 opened this issue · comments

I am trying to use AxeBuilder for accessibility testing and for that i added below gradle dependency:
implementation group: 'com.deque.html.axe-core', name: 'playwright', version: '4.4.1'

After running test with AxeResults axeResults = new AxeBuilder(page).analyze();
Getting below error:
Execution failed for task ':compileJava'.

Could not resolve all files for configuration ':compileClasspath'.
Could not resolve commons-codec:commons-codec:20041127.091804.
Required by:
project :
project : > com.deque.html.axe-core:playwright:4.4.1

Could not resolve commons-codec:commons-codec:20041127.091804.
inconsistent module metadata found. Descriptor: commons-codec:commons-codec:1.3 Errors: bad version: expected='20041127.091804' found='1.3'

I am using Playwright version 1.25.0.
Below is my build.gradle:
plugins {
id 'java'
}

group 'org.example'
version '1.0-SNAPSHOT'

repositories {
mavenCentral()
}

dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
// https://mvnrepository.com/artifact/com.microsoft.playwright/playwright
implementation group: 'com.microsoft.playwright', name: 'playwright', version: '1.25.0'
implementation group: 'com.deque.html.axe-core', name: 'playwright', version: '4.4.1'
}

test {
useJUnitPlatform()
}

commented

Hey @pranesh517,

Thank you for reporting this issue, we will investigate and get back to you as soon as possible.

commented

I was able to replicate this issue using Gradle. Maven however it is able to locate the dependency without issues. Looking at the maven2 repository with the commons-codec dependency: version: 20041127.091804 shows as 1.3.

Recently we updated our dependencies for all packages, specifically playwright's pom.xml. On Monday, I will raise this up with the team to cut a patch release which should resolve this issue.

Sounds great! This is also impacting us. Just for reference we are using Maven but not the apache maven repository and our repository did not have the very old version of commons-codec in it.

Verified with 'playwright', version: '4.4.2' using Gradle and maven, dependency issue is resolved. PFA screenshots
1)Using Gradle
Screenshot 2022-10-07 at 5 35 22 PM

2)Using Maven
Screenshot 2022-10-07 at 5 54 33 PM

commented

Hello all,

Closing this issue as the dependency issue is resolved.

Please let me know if you run into any other issues.