Open Sheap opened 1 year ago
Note: I'm not 100% sure I understand the boundary here between webdriver and tauri-driver. I suspect this issue is on the tauri driver end, as the error is coming back from the http request to the tauri-driver port. I can recreate it by making the same request directly using postman, but perhaps the request itself is incorrect.
I can reproduce this issue too.
After some investigation, I came up with the conclusions that, in WebDriver spec parlance, tauri-driver
is just an intermediary node (i.e., proxy) that launches the corresponding OS webview driver binary listening on a non-default port, and then forwards messages as-is to such driver, only mangling capabilities to be driver-neutral. On Linux, it launches the WebKit GTK driver (WebKitWebDriver
), while on Windows it launches the MS Edge driver (msedgedriver.exe
).
The issue at hand is not caused due to tauri-driver
's interference: I've confirmed using Wireshark that the affected requests are responses are passed verbatim to the underlying driver. In other words, the issue would happen even if Webdriver IO used the underlying driver directly.
My best guess about the root cause of the issue is that some Wry security feature or incompatibility is preventing the WebKit driver from doing its work. Given that E2E testing is a pretty advanced topic that doesn't tend to get much developer attention, it's likely that the driver stopped working at some point but almost nobody noticed. I'll update this comment if I get to dig further into this.
Adding e2e tests is something we as a team have discussed before, but have not implemented. I think it would be really valuable, but we are also cautious of requiring non-rust things to build the repo. This is why many examples are ignored. I think having a separate process for e2e would be perfectly fine, but requires maintenance.
Thank you @AlexTMjugador for the writeup, it's quite accurate. If you are interested in joining the working group, reach out on discord and I can help with that
I've just encountered this myself as well. Thank you for the workaround @Sheap , you just saved me a lot of time with the bubbles: true
trick :P
Describe the bug
When trying to use webdriver.io for e2e testing, many basic functions do not work, and simply return
Request failed with status 500 due to unsupported operation: unknown error
There are workarounds (using
browser.execute
, but having to manually replace these basic functions is tedious, and they are not exactly the same behaviourally.Reproduction
Expected behavior
The test should pass
Platform and versions
Stack trace
Additional context
.setValue() had similar issues for me, and the workaround (at least in a svelte app) were more complicated, as you also need to get events to fire properly. I used click as the example here as it is simpler.
For others having trouble with this issue, here are my current workarounds:
click
setValue