Replace message interaction through console.log with page.evaluate() and reading from window.properties instead.

as per request, to contribute to a fix for the "ugly hack"; not that this doesn't improve the functionality, it is just a cleaner interaction.