nightmare
                                
                                
                                
                                    nightmare copied to clipboard
                            
                            
                            
                        Use either toPng or toPNG when screenshot
If the img objects being resolved in electron don't have a toPng method, they may have a toPNG method depending on the version of electron being used.
This change will use the correct one or resolve with a ReferenceError
Would we prefer to use Error than ReferenceError?  Let me know and I'll adjust