If I were undertaking to choose an approach to doing such browser interaction testing from scratch, I would want to consider:
- How much do I care about being able to do black-box testing of my app on many different platforms? Using webdriver makes that possible—but the disadvantage is that writing tests is inevitably going to be a bit painful for the reasons outlined above.
- For some key tests (particularly any involving browser navigation) it may be worth it, but for many interaction tests a more ergonomic approach might be to do white-box testing set as our existing mocha test suite is, where the tests and the code under test run together in the same runtime (page). This would lose some fidelity (you can't can't reliably simulate all possible kinds of user interaction from within the browser) but for many tests the advantages of being able to directly introspect the state of the app from the tests would make writing such tests much easier and more pleasant.
- Unfortunately it's not possible to use use webdriverio in the browser to have a page to control itself—unfortunate because that would make white-box interaction testing way easier, with the tests and code being tested running in the same run time (as our mocha unit tests currently do) while still having all the flexibility to simulate user interaction that the webdriver protocol provides.
- On the other hand, there are test frameworks such as Cypress which, though they still have a node.js script controlling the browser, claim to "directly in the browser, you can debug failed tests using the in-browser developer tools". I've not tried it but that sounds like it would make developing tests much easier.
I'd encourage you to try writing a few sample tests in each of a few different frameworks (selenium-webdriver, webdriverio, Playwright, Cypress…) and see which was most pleasant to use (as well as whether any were missing key features) before making a final choice. After all, the easier and more pleasant it is to write tests the more likely one's app is to be well tested…
---------
* Notably including Playwright, which if nothing else certainly appears to have a very pretty, very GitHub-inspired UI.
** This reply is longer than necessary in part because the next thing on my to-do list is writing more such tests.