How to get text from alertbox in spectron


#1

I am trying to get alert text as part of my test.
Can some one guide me what is wrong in the code.

https://stackoverflow.com/questions/46551003/how-to-get-text-from-alertbox-in-spectron-mocha-webdiverio

Thanks
Jk


#2

As discussed with webdriverio community its difficult to handle default alert() function and they suggested to implement my own alertbox. So using https://github.com/limonte/sweetalert2 I implemented my own l alert and test is working fine