It’s interesting to see the solution that the AI came up with, but WebdriverIO and Appium already exist for this use case, are open source like Capacitor, and come recommended from the Capacitor developers. https://ionic.io/blog/introducing-the-ionic-end-to-end-testi...
Also https://maestro.dev/ is pretty good these days