Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

175
Vistas
Appium basic test - ReferenceError: beforeAll is not defined

I am trying to run an appium test as described here, https://blog.logrocket.com/testing-your-react-native-app-with-appium/

However, I get an error - how can I get my basic test to work?

> webdriverio-sample-appium-tests@1.0.0 test /Users/user/apps/myracnative/appium
> mocha test/basic


ReferenceError: beforeAll is not defined
    at Object.<anonymous> (/Users/user/apps/myracnative/appium/test/basic/index.js:16:1)

Test:

index.js

const wd = require("wd");
const jasmine = require("jasmine");
jasmine.DEFAULT_TIMEOUT_INTERVAL = 600000;
const PORT = 4723;

const config = {
    platformName: "iOS",
    platformVersion: "14.4",
    deviceName: "iPhone 11",
    app: "../../../apps/myracnative.ipa",
    automationName: "XCUITest", // UiAutomator2, Espresso, or UiAutomator1 for Android
};

const driver = wd.promiseChainRemote("localhost", PORT);

beforeAll(async () => {
    await driver.init(config);
});

test("Test Accessibilty Id", async () => {
    expect(
        await driver.hasElementByAccessibilityId("Create account")
    ).toBe(true);
    expect(await driver.hasElementByAccessibilityId("Log in")).toBe(true);
});

Here is a link to my test repo:

https://bitbucket.org/mharrisRAC/appium-example/src/master/

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda