viewdy / phantomjs2

Automatically exported from code.google.com/p/phantomjs
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Self test support with special image source #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
There should be a special image source, e.g. 'phantom://captured.png', which 
represents the current rendered web page. 

Any script can get this image, draw it onto a canvas, and inspect the pixel 
values. This allows self testing, e.g. to see whether setting the background 
color to red actually results in a red web page.

Original issue reported on code.google.com by ariya.hi...@gmail.com on 9 Jan 2011 at 6:36

GoogleCodeExporter commented 9 years ago
Meant to post this here:

The way I found this project was searching for exactly what phanomjs does in 
order to build some interesting tools for developers. Basically the idea of 
being able to test inside the web browser against the actual pixels the browser 
display due to that being disabled for security.

The first thing I was interested in developing was a simple evolutionary 
algorithm that took a graphic button as input, like from a PSD, and then 
iterated random CSS3 properties until it had closely matched the input graphic. 
Just what example of being able to test against actual browser output while 
inside the environment would allow.

Original comment by brandon.benvie on 15 Feb 2011 at 8:24

GoogleCodeExporter commented 9 years ago
Due to the security issue, issue 41 needs to be solved first.

Original comment by ariya.hi...@gmail.com on 14 Mar 2011 at 6:58

GoogleCodeExporter commented 9 years ago
We can implement this as a read-only propery in the WebPage object. It will 
share most of the code with WebPage#render.

Original comment by ariya.hi...@gmail.com on 28 May 2011 at 8:51

GoogleCodeExporter commented 9 years ago
Having the image rendering as a url is a nifty idea ;)

Original comment by detroniz...@gmail.com on 7 Nov 2011 at 8:36

GoogleCodeExporter commented 9 years ago
I welcome any idea on the API which makes sense for this.

Original comment by ariya.hi...@gmail.com on 8 Nov 2011 at 4:50

GoogleCodeExporter commented 9 years ago

Original comment by ariya.hi...@gmail.com on 15 Jun 2012 at 6:31

GoogleCodeExporter commented 9 years ago
This issue has been moved to GitHub: 
https://github.com/ariya/phantomjs/issues/10015

Original comment by james.m....@gmail.com on 16 Mar 2013 at 12:17