dimanche 26 avril 2020

With TestCafe and Electron, is there a way to allow the Electron app to shut itself down which will not hang TestCafe?

I need to shut down our Electron app from within the Electron app UI. However, TestCafe often hangs when I do this as, most likely, it wants to shutdown the app itself and perform some kind of cleanup internally.

I have tried various solutions including hacking the TestCafe source itself and doing the UI shutdown in the various after and afterEach callbacks but have found no reliable solution. Sometimes TestCafe shuts down gracefully, other times it hangs with the error:

ERROR The Electron 3.0.2 / Windows 10 browser disconnected. This problem may appear when a browser hangs or is closed, or due to network issues.

Is there a method of allowing the tested Electron app to shut itself down which will not hang TestCafe? Any help appreciated.

m

Aucun commentaire:

Enregistrer un commentaire