Commit 12e6873c 12e6873cd6342c69f913cd0f23ca285c52551455 by Nicolas Perriault

removed Casper.waitForFrame() as it's not useful

1 parent 105cf017
......@@ -1732,24 +1732,6 @@ Casper.prototype.waitFor = function waitFor(testFx, then, onTimeout, timeout) {
};
/**
* Waits for a child frame page to be loaded.
*
* @param String frameName The frame name
* @param Function then The next step function (optional)
* @param Function onTimeout Function to call on operation timeout (optional)
* @param Number timeout Timeout in milliseconds (optional)
* @return Casper
*/
Casper.prototype.waitForFrame = function waitForFrame(frameName, then, onTimeout, timeout) {
"use strict";
return this.waitFor(function() {
return this.page.childFramesName().some(function(name) {
return name === frameName;
});
}, then, onTimeout, timeout);
};
/**
* Waits for a popup page having its url matching the provided pattern to be opened
* and loaded.
*
......
......@@ -2,16 +2,6 @@
/*jshint strict:false*/
casper.start('tests/site/frames.html');
casper.waitForFrame('frame1', function() {
this.test.pass('Casper.waithForFrame() can wait for a frame to be loaded.');
this.test.assertTitle('CasperJS test frames');
});
casper.waitForFrame('frame2', function() {
this.test.pass('Casper.waithForFrame() can wait for another frame to be loaded.');
this.test.assertTitle('CasperJS test frames');
});
casper.withFrame('frame1', function() {
this.test.assertTitle('CasperJS frame 1');
this.test.assertExists("#f1");
......@@ -37,5 +27,5 @@ casper.withFrame('frame2', function() {
casper.run(function() {
this.test.assertTitle('CasperJS test frames');
this.test.done(14);
this.test.done(10);
});
......