The symptoms of my issue is that when I call axe:scan I get the following messages returned to the console:
2024-07-03T12:57:29.185Z DEBUG webdriver: request failed due to response error: unknown method
[0-0] 2024-07-03T12:57:29.185Z WARN webdriver: Request failed with status 405 due to Method is not implemented
The same call works fine on a different non-WDIO project where I started my appium server explicitly with this command:
appium --use-plugins=axeDevToolsMobile
BUT I can reproduce the above errors in the non-WDIO project if I launch appium without specifying the plugin name.
I have a series of config files that permit execution in a variety of platforms but I focussed on the config file wwhere I specify the parameters for the local appium service. Here’s the latest version of that file:
import {config} from './wdio.shared.conf';
// ===================
// Test Configurations
// ===================
//
config.services = [
[
'appium',
{
command: 'appium',
usePlugins: 'axeDevToolsMobile',
port: 4723,
},
],
];
export default config;
I do have a valid Deque Axe Mobile API key and the code extracts from my spec file are:
const axeSettings = {
apiKey: process.env.AXE_MOBILE_API_KEY,// axe API key, required by axe DevTools Mobile
}
and my call to scan using Axe Mobile:
await driver.execute('axe:scan', axeSettings);
which is the command that gives rise to the errors in the WDIO example – but work fine in my non-WDIO sample…
Andy Wyatt is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.