Closed filbertwjy closed 2 years ago
---here is the code---
import { startApp, stopApp } from "./hooks"; import { homePage, serverPage } from "./page-objects/General_Id"; describe("Server Access & Login Test ", () => { let app;
it("Open App", async () => { app = await startApp(); }); const accessButton = await app.client.$(serverPage.button); await accessButton.click();
---and here is the code to locate element id from General_Id files--- export const serverPage = { formId: "#serverId", button: "#submitButton", };
hi, im currently working on testing an electron application with spectron. I upgraded my electron app to 13.1.7 and my spectron to 15.0.0 something went wrong. the spectron cant locate the element , whereas I've already locate the element properly and matched with the id of the button of submit.
here is the further info: "author": "Filbert Wijaya", "license": "MIT", "devDependencies": { "@testing-library/webdriverio": "^3.0.2", "@wdio/cli": "^7.9.1", "chai": "^4.3.4", "electron": "^13.1.7", "eslint": "^7.30.0", "esm": "^3.2.25", "mocha": "^8.4.0", "spectron": "^15.0.0" }, "engines": { "node": "^13.12.0" }, "dependencies": { "@types/webdriverio": "^5.0.0", "webdriverio": "^7.9.1" } }