Cuando traté de hacer clic en un elemento usando Appium y Codeceptjs, recibí el siguiente error:
ERROR webdriver: Request failed with status 404 due to unknown command: The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource.Registro completo a continuación:
-- FAILURES: 1) login test something: The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource at getErrorFromResponseBody (C:\Users\DELL\node_modules\webdriver\build\utils.js:197:12) at NodeJSRequest._request (C:\Users\DELL\node_modules\webdriver\build\request\index.js:158:60) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async Browser.wrapCommandFn (C:\Users\DELL\node_modules\@wdio\utils\build\shim.js:137:29) Scenario Steps: - I.click("//android.widget.Button[@content-desc="Login"]/android.widget.TextView[2]") at Test.<anonymous> (.\login_test.js:9:7) - I.seeAppIsInstalled("com.wdiodemoapp") at Test.<anonymous> (.\login_test.js:8:7)Este registro de errores aparece cuando codeceptjs llama a I.click() api, creo. Intenté usar Accesibility ID y Xpath para obtener el elemento pero obtuve el mismo error
Mi código de prueba:
Feature('login'); const LOGIN_ICON = '~Login' const LOGIN_BTN = '~button-LOGIN' const EMAIL_TXT_FIELD = '~input-email' const PASSWORD_TXT_FIELD = '~input-password' Scenario('test something', ({ I }) => { I.seeAppIsInstalled("com.wdiodemoapp") I.click('//android.widget.Button[@content-desc="Login"]/android.widget.TextView[2]') I.fillField(EMAIL_TXT_FIELD, "abc") I.fillField(PASSWORD_TXT_FIELD, "12345678") I.click(LOGIN_BTN) });A continuación se muestra mi archivo de configuración:
exports.config = { tests: './*_test.js', output: './output', helpers: { Appium: { platform: 'Android', device: 'emulator', desiredCapabilities: { appPackage: "com.wdiodemoapp", appActivity: "MainActivity", deviceName: "emulator-5554", platformName: "Android", automationName: "UiAutomator2", } } }, include: { I: './steps_file.js' }, bootstrap: null, mocha: {}, name: 'codecept-mobile-auto' }Cualquier idea por favor !!! Soy nuevo en la herramienta de prueba de codeceptjs. Muchas gracias.