This repository was archived by the owner on May 30, 2023. It is now read-only.
Added "phantom.loadJs" and "phantom.includeJs", plus more "qDebug" usage#11
Merged
ariya merged 8 commits intoariya:masterfrom Apr 10, 2011
detro:master
Merged
Added "phantom.loadJs" and "phantom.includeJs", plus more "qDebug" usage#11ariya merged 8 commits intoariya:masterfrom detro:master
ariya merged 8 commits intoariya:masterfrom
detro:master
Conversation
* 'phantom.simulateMouseClick' accepts a 'selector' and clicks on every element that matches the selector * Added a couple of 'qDebug()' to help debugging PhantomJS
* "phantom.loadJs()" loads a JS file and executes it's content within the current Document Context. It's synchronous. * "phantom.includeJs()" adds a <script> tag include. It's asynchronous and accepts as second parameter a "callback", fired when the js file has been loaded. * Some more qDebug() calls * qDebug() output disabled by default in the .pro file NOTE: I'm adding qDebug() calls to make development of phantomjs easier and "debuggable"
Conflicts: src/phantomjs.cpp
…rce". Also: * I added a couple of "qFatal" where it makes sense. * Usage now mentions the fact that the input files that finish by ".coffee" are also acceptable
This was referenced Mar 15, 2013
This was referenced Mar 15, 2013
Closed
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi Ariya,
me again with some more code.
I developed a couple of calls that can make JS testing a bit smoother.
phantom.loadJs
This can be extremely useful when you want to run a test and your code depends on some other code to be in.
Examples:
phantom.includeJs
This instead is just a <script> tag injection. It allows to pass an eventHandler that will be executed when the script has been loaded.
Let me know what do you think.
Ivan