Hey, thanks for the demo repo! I think, at least as-is, it doesn't work with the latest versions of wdio and associated dependencies. If I change:
diff --git a/webdriver/package.json b/webdriver/package.json
index 609fbbc..9231a90 100644
--- a/webdriver/package.json
+++ b/webdriver/package.json
@@ -9,7 +9,7 @@
"webdriverio"
],
"dependencies": {
- "@wdio/cli": "^7.7.3",
+ "@wdio/cli": "^8.14.3",
"prettier": "^2.3.0"
}
}
diff --git a/webdriver/webdriverio/package.json b/webdriver/webdriverio/package.json
index 853d968..df91cf9 100644
--- a/webdriver/webdriverio/package.json
+++ b/webdriver/webdriverio/package.json
@@ -8,8 +8,8 @@
"format": "prettier --write \"./**/*.js\""
},
"devDependencies": {
- "@wdio/local-runner": "^7.7.3",
- "@wdio/mocha-framework": "^7.7.3",
- "@wdio/spec-reporter": "^7.7.3"
+ "@wdio/local-runner": "^8.14.3",
+ "@wdio/mocha-framework": "^8.14.0",
+ "@wdio/spec-reporter": "^8.14.0"
}
}
and run yarn install
, then I get this as output:
[0-0] 2023-08-11T04:33:32.841Z ERROR @wdio/runner: Error: No "browserName" defined in capabilities nor hostname or port found!
[0-0] If you like to run a mobile session with Appium, make sure to set "hostname" and "port" in your WebdriverIO options. If you like to run a local browser session make sure to pick from one of the following browser names: chrome,googlechrome,chromium,chromium-browser,firefox,ff,mozilla,mozilla firefox,edge,microsoftedge,msedge,safari,safari technology preview
Even if I stick with v7 of wdio, I find that I cannot interact with the UI. For example, if I try to click the header:
diff --git a/webdriver/webdriverio/test/specs/example.e2e.js b/webdriver/webdriverio/test/specs/example.e2e.js
index b795b7f..efc3a6a 100644
--- a/webdriver/webdriverio/test/specs/example.e2e.js
+++ b/webdriver/webdriverio/test/specs/example.e2e.js
@@ -14,6 +14,7 @@ function luma(hex) {
describe("Hello Tauri", () => {
it("should be cordial", async () => {
const header = await $("body > h1");
+ await header.click();
const text = await header.getText();
expect(text).toMatch(/^[hH]ello/);
});
then I get
[0-0] 2023-08-11T06:49:05.047Z INFO webdriver: COMMAND findElement("css selector", "body > h1")
[0-0] 2023-08-11T06:49:05.047Z INFO webdriver: [POST] http://localhost:4444/session/a1e2795a-f62e-4259-a33f-df8cdfbe133f/element
[0-0] 2023-08-11T06:49:05.047Z INFO webdriver: DATA { using: 'css selector', value: 'body > h1' }
[0-0] 2023-08-11T06:49:05.122Z INFO webdriver: RESULT {
[0-0] 'element-6066-11e4-a52e-4f735466cecf': 'node-FE6DB46D-13E4-49D0-AE79-DE8C06B344C6'
[0-0] }
[0-0] 2023-08-11T06:49:05.127Z INFO webdriver: COMMAND elementClick("node-FE6DB46D-13E4-49D0-AE79-DE8C06B344C6")
[0-0] 2023-08-11T06:49:05.128Z INFO webdriver: [POST] http://localhost:4444/session/a1e2795a-f62e-4259-a33f-df8cdfbe133f/element/node-FE6DB46D-13E4-49D0-AE79-DE8C06B344C6/click
[0-0] 2023-08-11T06:49:05.135Z WARN webdriver: Request failed with status 500 due to unknown error
...
[0-0] 2023-08-11T06:49:05.192Z ERROR webdriver: Request failed with status 500 due to unsupported operation: unknown error
[0-0] unsupported operation in "Hello Tauri.should be cordial"
unsupported operation: unknown error
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
...
[wry 0.24.3 linux #0-0] 1) Hello Tauri should be cordial
[wry 0.24.3 linux #0-0] unknown error
[wry 0.24.3 linux #0-0] unsupported operation: unknown error
[wry 0.24.3 linux #0-0] at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Just in case it was an issue with clicking H1 elements, I tried creating a button and clicking that instead. It could find the button, but failed to click it for presumably the same unknown reason. Manually POSTing the WebdriverIO request gives me this:
$ curl -X POST http://localhost:4444/session/9737f22a-539d-4f14-a911-eeba1e20056b/element/node-AC386962-86F0-46BD-BA8E-06E3914
81B9F/text
{"value":{"error":"unknown command","message":"Unknown command: /session/9737f22a-539d-4f14-a911-eeba1e20056b/element/node-AC386962-86F0-46BD-BA8E-06E391481B9F/text","stacktrace":""}}