Hi all,
I am studying the code recently and I found an interesting piece of code when instantiating WebPage instance in Casper.
I am just wondering why ONLY when the page is not a web page, we should instantiate the new page instance?
Besides, I fill that we should always close the previous page instance before dereferencing it to avoid potential memory leak.
If PhantomJS didn't recycle this unused page properly, we may end up using a lot of memory if there are thousands of tests in a suite.
Please correct me if I missed anything.
Thanks!
Regards,
Kane