poltergeist 1.18.0 → 1.18.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b7f5bf350711720abecb06c20bab6cea6489844fc3cd60b89a19d89c64723b02
4
- data.tar.gz: 10b8c208d718baecf0515a7e3add9d185f522e04ad62773c41dd562de8a8817f
3
+ metadata.gz: '0832563d66cb058b873a787ca7337761932f3aab8b7c8269f26e60a362bf98f9'
4
+ data.tar.gz: 5ce500b0b2b502ac73e4aa14171af96813a2d7e4ae5c020d215c3e15cc9eeaec
5
5
  SHA512:
6
- metadata.gz: 18313bbc53ca8455008626bb7d521ad1cdd3f66daefad18b859a2a4a2132e38b4f306f46bc8e4a5c8bb80bd2232b3e7693653d3d7be12d86c7470ec01319d63c
7
- data.tar.gz: bc7d1dd21d97d69b2902e77a4cf175be3fbec635650d5879e240fe29ec90511e96200cced21dbc225d82babd8154aaa47b60653cc75b813a1692893c13bbca31
6
+ metadata.gz: 98f7fa89f4718f099ddfdd96f3a0b2eb9db0bce236421c92be88dfd83a05d3e8394f60df11601d28f9447beeea75d0dd859fe13276e07952ca3723869c110f30
7
+ data.tar.gz: 592bfbdc77932d4cacebc9d5869709eb87596ba815ebf0f9b22f4b51990a1c78790a18192876f5af54370b060e2da768a267ca5b9ff74eece860d73f54dd582f
data/README.md CHANGED
@@ -9,7 +9,7 @@ provided by [PhantomJS](http://phantomjs.org/).
9
9
  **If you're viewing this at https://github.com/teampoltergeist/poltergeist,
10
10
  you're reading the documentation for the master branch.
11
11
  [View documentation for the latest release
12
- (1.18.0).](https://github.com/teampoltergeist/poltergeist/tree/v1.18.0)**
12
+ (1.18.1).](https://github.com/teampoltergeist/poltergeist/tree/v1.18.1)**
13
13
 
14
14
  ## Getting help ##
15
15
 
@@ -392,12 +392,12 @@ Poltergeist.WebPage = (function() {
392
392
  };
393
393
 
394
394
  WebPage.prototype.currentUrl = function() {
395
- return this["native"]().url;
395
+ return this["native"]().url || this.runCommand('frameUrl');
396
396
  };
397
397
 
398
398
  WebPage.prototype.frameUrl = function() {
399
399
  if (phantom.version.major > 2 || (phantom.version.major === 2 && phantom.version.minor >= 1)) {
400
- return this["native"]().frameUrl;
400
+ return this["native"]().frameUrl || this.runCommand('frameUrl');
401
401
  } else {
402
402
  return this.runCommand('frameUrl');
403
403
  }
@@ -236,11 +236,13 @@ class Poltergeist.WebPage
236
236
  this.native().frameTitle
237
237
 
238
238
  currentUrl: ->
239
- @native().url
239
+ # native url doesn't return anything when about:blank
240
+ # in that case get the frame url which will be main window
241
+ @native().url || @runCommand('frameUrl')
240
242
 
241
243
  frameUrl: ->
242
244
  if phantom.version.major > 2 || (phantom.version.major == 2 && phantom.version.minor >= 1)
243
- @native().frameUrl
245
+ @native().frameUrl || @runCommand('frameUrl')
244
246
  else
245
247
  @runCommand('frameUrl')
246
248
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Capybara
4
4
  module Poltergeist
5
- VERSION = "1.18.0"
5
+ VERSION = "1.18.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: poltergeist
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.18.0
4
+ version: 1.18.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Leighton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-01 00:00:00.000000000 Z
11
+ date: 2018-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara