browsed 0.2.8 → 0.2.9

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: 8e688b3b3f2398cbd384699c58d39b385d63de2c85943de6e9c63a65cdeb45e2
4
- data.tar.gz: 0525237c271b47aa8d0d19c31664aec950809d780d8de8743c22007f7504b4f2
3
+ metadata.gz: 278284a08171aff994f5effaa073fe16176f25068251d4c4308c46fa6f6ba9b2
4
+ data.tar.gz: 99900aebcb0eefaa5b785eb8205fddfd496ed3b5197d2ceaaaf2f26ea7586e51
5
5
  SHA512:
6
- metadata.gz: ec6c792ea2a665fb944df8796a55ea7954fc5668ff5dcec881744b2d7a6674dcfc511f94e82b9c5cb50567c39f153295841351ba22876b52f9eedb4d58f6bf6b
7
- data.tar.gz: 342ec5e838bad81a9bddb404e8b2944695be21f3492ef8bcd8c3b6ebd934e8c3152e2672cb3da064ae0f81c0345e662dfd51f22c16f0a85988b06b001e0df8b2
6
+ metadata.gz: ce6401a9d324063ba14eaf445ed2ca22dbd9cc88067b01b46ab32d346a99f155e587f9bd173021ec842b252bac85cd3d459dbbca4e0be477f2ea5d1d19668887
7
+ data.tar.gz: 0775e561f9b18f1123b0589c7f245d60215864c84566aa2d14ccc018edff50bd25204f71a26e264aee56b8429c55c84db716fb95bb360a638cb9751713e7ef6d
@@ -9,8 +9,8 @@ module Browsed
9
9
  def resize!(res = nil)
10
10
  res ||= self.resolution
11
11
 
12
- if res && res.size.eql?(2) && resizable_browser? # Resolutions for Chrome & Poltergeist are set in the driver
13
- self.session.current_window.resize_to(res.first, res.last) # [width, height]
12
+ if self.session && res && res.size.eql?(2) && resizable_browser? # Resolutions for Chrome & Poltergeist are set in the driver
13
+ self.session&.current_window&.resize_to(res.first, res.last) # [width, height]
14
14
  end
15
15
  end
16
16
 
@@ -91,11 +91,12 @@ module Browsed
91
91
  end
92
92
 
93
93
  def reset_session!
94
- self.session.reset_session!
94
+ self.session.reset_session! rescue nil
95
95
  end
96
96
 
97
97
  def quit!(retries: 3)
98
98
  begin
99
+ reset_session!
99
100
  self.session.driver.quit
100
101
  rescue Exception
101
102
  retries -= 1
@@ -1,3 +1,3 @@
1
1
  module Browsed
2
- VERSION = "0.2.8"
2
+ VERSION = "0.2.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: browsed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-07-22 00:00:00.000000000 Z
11
+ date: 2019-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara