node-horseman
Advanced tools
Comparing version 1.4.1 to 1.5.0
# Change Log | ||
All notable changes to this project will be documented in this file. | ||
##1.5.0 - 2015-03-10 | ||
### Added | ||
- switchToChildFrame() (issue #18, thanks @easyrider) | ||
##1.4.1 - 2015-03-04 | ||
@@ -5,0 +9,0 @@ ### Fixed |
@@ -668,2 +668,9 @@ var fs = require("fs"); | ||
exports.switchToChildFrame = function( selector ){ | ||
debug(".switchToChildFrame()"); | ||
this.page.switchToChildFrame(selector); | ||
return this; | ||
}; | ||
exports.status = function(){ | ||
@@ -670,0 +677,0 @@ return this.responses[ this.targetUrl ]; |
{ | ||
"name": "node-horseman", | ||
"version": "1.4.1", | ||
"version": "1.5.0", | ||
"description": "Run PhantomJS from Node", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -100,2 +100,5 @@ Horseman | ||
#### .switchToChildFrame( selector ) | ||
Switches focus to the child frame specified by the `selector`. | ||
```js | ||
@@ -102,0 +105,0 @@ var status = horseman |
@@ -5,3 +5,2 @@ var Horseman = require('../lib'); | ||
var express = require('express'); | ||
//var eventEmitter = require('events').EventEmitter. | ||
@@ -672,2 +671,25 @@ process.setMaxListeners(0); | ||
}); | ||
/** | ||
* Iframes | ||
*/ | ||
describe("Frames", function() { | ||
var horseman = new Horseman(); | ||
after(function () { | ||
horseman.close(); | ||
}); | ||
it('should let you switch to a child frame', function() { | ||
horseman | ||
.open( serverUrl + "frames.html" ) | ||
.switchToChildFrame('frame1') | ||
.waitForSelector("h1") | ||
.html("h1") | ||
.should.equal( "This is frame 1." ) | ||
}); | ||
}); | ||
@@ -674,0 +696,0 @@ /** |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
156144
22
2016
467