Commit Graph

159 Commits (761f456c3286c1a5c47e3741a554a23e3b3e7473)

Author SHA1 Message Date
Nick Rowe 761f456c32 Change comment in run-jasmine example to be consistent with the way the code is written 2011-10-06 19:45:57 -07:00
Ariya Hidayat 8a4a13ccbc Merge branch 'master' into 1.3 2011-09-20 22:11:00 -07:00
Ariya Hidayat 8b0f13309a examples/follow: Update Sencha folks. 2011-09-20 21:55:24 -07:00
Gregor Martynus cec8b5672e Just a simple change to not only log the failed error, but also the actual message 2011-09-21 02:50:21 +03:00
Ariya Hidayat 42ff411c63 Keep using "new WebPage()" instead of module and 'require'.
http://code.google.com/p/phantomjs/issues/detail?id=237
2011-09-16 21:49:40 -07:00
Ariya Hidayat 1178637805 Remove unported examples that do not work anymore. 2011-09-16 17:49:09 -07:00
Ariya Hidayat e07307ec1d Merge pull request #155 from Roejames12/master
A ton of updates
2011-09-14 21:45:08 -07:00
IceArmy 5b24d2417a Fix injectme.coffee example which was injecting 'injectme.js' instead of itself 2011-09-13 14:50:12 -07:00
IceArmy c119a4788e Merge branch 'master' of git://github.com/ariya/phantomjs 2011-09-13 13:16:20 -07:00
Ivan De Marino e0e5535e0e Updated examples to use "require('webpage').create()" instead of "new WebPage()". 2011-09-12 21:17:54 +01:00
Ariya Hidayat bcd01d222b netlog.coffee: Fix wrong address to be loaded.
http://code.google.com/p/phantomjs/issues/detail?id=227
2011-09-10 11:05:25 -07:00
Ariya Hidayat 1fd9c20835 netlog: Example to dump live network traffic.
http://code.google.com/p/phantomjs/issues/detail?id=227
2011-09-10 09:15:34 -07:00
IceArmy e9d87f0fb2 Merge branch 'master' of git://github.com/ariya/phantomjs 2011-09-08 15:14:34 -07:00
Ariya Hidayat 6a79ea7e6d Implement require('fs').
This is mostly based on Ivan's work, see
https://github.com/ariya/phantomjs/pull/153

http://code.google.com/p/phantomjs/issues/detail?id=47
2011-09-08 10:00:07 -07:00
IceArmy f51b5144f0 Fix issue 225: netsniff.coffee produces invalid HAR 2011-09-08 00:25:51 -07:00
Ariya Hidayat e45c5328b9 CoffeeScript version of unrandomize example. 2011-09-07 17:52:58 -07:00
Julien Ammous 217b7ecbd4 typo 2011-08-29 00:12:48 +03:00
execjosh b5bb07faa4 Add examples for phantom.outputEncoding 2011-08-25 03:15:26 +09:00
Ariya Hidayat 051f3ea839 examples/pizza: Switch to use Yelp.
http://code.google.com/p/phantomjs/issues/detail?id=200
2011-08-23 23:34:50 -07:00
Ariya Hidayat 8af4fa714c examples/follow: Update Sencha dudes. 2011-08-21 00:16:37 -07:00
Ariya Hidayat 319fd80ec3 Add callback for page initialization.
http://code.google.com/p/phantomjs/issues/detail?id=143
2011-08-20 17:57:01 -07:00
Ivan De Marino 3046bd994e Spotted a mistake in "scandir.[js|coffee]": was still using "phantom.fs" API. 2011-08-04 22:00:18 +01:00
Alexey Palazhchenko ab138bc42c QUnit runner: exit with 1 if network is unreachable. 2011-07-06 14:30:58 +04:00
Ariya Hidayat 1354d65acf Merge pull request #100 from sujal/master
Simple comment correction in injectme.* example
2011-06-28 18:05:50 -07:00
sujal 59843bfcdf cleanup injectme.* example comment
the comment confused me at first, making me think there was a "better"
or alternate way to do this, so I spent 45 minutes searching the docs
for a mention of loadJsFile.

Hopefully this saves someone else a few minutes.
2011-06-28 19:34:01 -04:00
Ivan De Marino 3807b9dc4d Now, if "fs.open" fails, it throws an exception.
* This is implemented with a javascript-shim
2011-06-28 21:35:27 +01:00
Ivan De Marino a0e1888c2c Moved the "fs" object to be in the global/window space: will not be attached to the "phantom" object anymore.
* Once (and if) we implement support for CommonJS Module Loading, a "require("fs")" will be required.
2011-06-28 21:02:48 +01:00
Ivan De Marino 6b04ee23c1 Introducing File I/O API in PhantomJS.
* This is the  squash of 30 commits, so it's meaty
* Inspired by HammerJS (see https://github.com/senchalabs/hammerjs)
* Not yet 100% complete
* Final aim is to provide a CommonJS/Filesystem compliant API (see http://wiki.commonjs.org/wiki/Filesystem)
2011-06-27 23:14:05 +01:00
Ariya Hidayat da629874d3 examples/feature.js: Show supported/unsupported features.
Feature detection is done via Modernizr.
2011-06-26 14:05:48 -07:00
Dunk Fordyce 42472aa92f fix page/phantom variable wrongness 2011-06-21 14:34:41 +01:00
Ariya Hidayat 9931279ccc Remove unnecessary console redirection. 2011-06-19 15:28:58 -07:00
rgieseke e09da4e1d8 netsniff.coffee: Remove dot in prototype check. 2011-06-17 09:05:19 +02:00
rgieseke 7e4a5fd33e injectme.coffee: Add CoffeeScript version. 2011-06-17 09:04:08 +02:00
rgieseke 913b214d91 useragent.coffe: Change useragent as in js version. 2011-06-17 08:45:41 +02:00
rgieseke e5064db060 pizza.coffee: Add missing onConsoleMessage. 2011-06-17 08:25:35 +02:00
rgieseke 2c8e9bd5b4 Examples: new coffeescript versions. 2011-06-16 22:56:06 +02:00
Ivan De Marino e2ee86e0ac Minor cleanup on 'sleepsort.js' 2011-06-16 14:48:41 +01:00
Ivan De Marino d00ed3f2fc sleepsort.js - This must go in for 1.2 :P
* It's so silly, it has to.
* Also, it shows how "powerful" the function scoping is
2011-06-16 11:46:10 +01:00
Ariya Hidayat 6b28a956ac Refer to function argument 'startTime', not from page. 2011-06-13 08:11:40 -07:00
Ivan De Marino 22ee075cc2 Removing "page.click()" for now.
There is need for a discussion to decide how to do this.
2011-06-10 17:08:46 +01:00
Ivan De Marino 75403737c4 Added "includeJs()" to "page".
* It includes a script in the page
* It uses a callback to ensure any code dependent on the include runs afterwards
* It uses the signal "javaScriptAlertSent" to do the trick (is there another way to be notified of the "onLoad" event from outside the page context?)
* It uses a "private" slot "_appendScriptElement" to pass the script url in the page context (is there a better way?)
2011-06-10 17:08:46 +01:00
Ivan De Marino a0f8f2491d "loadJsFile()" -> "injectJs"
* According to Issue #32 (http://code.google.com/p/phantomjs/issues/detail?id=32) I added a "lookup logic" that searchs for the file following those steps:
*# Search for file at given path (relative to PWD or absolute - no difference)
*# Is file there? Inject it
*# Is file not there? Try looking for it in "scriptLookupDir"
*# Is file there? Inject it
*# Is file not there? abort
* "scriptLookupDir" is an extra property for WebPage, that, as by it's name, defines a place where to look to script to inject
* Script can alter the scriptLookupDir, if they want
* Updated "injectme.js" accordingly
2011-06-10 17:08:45 +01:00
Ivan De Marino bb0b820f72 Merge remote-tracking branch 'upstream/master' into utilities 2011-06-09 11:50:54 +01:00
IceArmy 0bfd28e67d example/netsniff.coffee: Format the output to HAR 1.2 specification. 2011-06-09 00:58:03 -07:00
Ariya Hidayat c2c6cbc287 example/netsniff.js: Format the output to HAR 1.2 specification. 2011-06-08 23:47:14 -07:00
Ariya Hidayat 751e471068 Better timing for onResourceRequested and onResourceReceived.
We record the time right inside the network access manager. This gives
better accuracy than doing it from JavaScript side, no loss due to the
latency of signal slot connection.
2011-06-08 23:32:14 -07:00
Ariya Hidayat 1cae77a3e0 Add 'onResourceReceived' event, fired when resource is being received.
This is now being used in the netsniff.js example.
2011-06-08 01:10:00 -07:00
Ivan De Marino 5b6f2731c4 Added support for "page.click()" and "page.loadJsFile()".
* click() accepts a "querySelectorAll" input - can click on multiple things in one call
* loadJsFile() is synchronous at loading JS in the page
* added 2 examples in JavaScript to show how to use (and test) the new methods
* NOTE: someone will have to generate the .coffee version - I tried using "http://ricostacruz.com/js2coffee/" but it hangs and I'm not willing to learn why :P - I don't like Coffee Script.
2011-06-07 17:20:22 +01:00
IceArmy 805c824ff3 Convert netsniff.js to CoffeeScript 2011-06-07 02:52:01 -07:00
Ariya Hidayat 8722399c0a Add "onResourceRequested" event, fired when request is started.
To see how this is being used, see the new examples/netsniff.js.

http://code.google.com/p/phantomjs/issues/detail?id=2
2011-06-07 00:06:08 -07:00