bucky-core 0.9.8 → 0.9.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
  SHA1:
3
- metadata.gz: b95714bd12694e6553a7508e5ce8424c65016a3c
4
- data.tar.gz: 122c0438f73abb49378de85057b76bb484cb5dfe
3
+ metadata.gz: 511f7d022e41f5fe5a353ea6be91b3362472473c
4
+ data.tar.gz: a3fa9b4be74f2e8dbb67a8c1f3c881633e9c6906
5
5
  SHA512:
6
- metadata.gz: 466c39aa4ab15ad570b47f2f3dd453b9e5119517c0ea15d6e84b9a7e948a7aa697659812224cf55b7527e6e85b41381720842f2b8718b0c052bfc75712b202e4
7
- data.tar.gz: 4535e3f1e50b7ad9b74612872b3bba0a6d8cbea650fbaa018b8f4baebcaac8757a5c31ef0827121e48c0e47d82bfccf2b47e0b510978aacb3ae1bde3224abbc9
6
+ metadata.gz: a0141531d6df2501b8f69286e093f47a0ccd36c3f23dce749e5c676f3b84793df06e342f50848bcb691d12078348c9ff31a01c007162ac2e5ceb72a2e449f603
7
+ data.tar.gz: 84ad1fabdff7acb7571f742d86c22de5dd7539f10ffaf94222b23d8b506a66f32353d5d73a68ad94cf1fa8f1fb839a199c9de16363c1289d393be47b307ee151
@@ -49,6 +49,17 @@ module Bucky
49
49
  @driver.switch_to.window(@driver.window_handles.first)
50
50
  end
51
51
 
52
+ def switch_to_the_window(args)
53
+ # change ignore condition, NoSuchElementError to NoSuchWindowError
54
+ wait = Selenium::WebDriver::Wait.new(:timeout => 1, :interval => 0.1, :ignore => [Selenium::WebDriver::Error::NoSuchWindowError])
55
+ begin
56
+ # when the window successfully switched, return of switch_to.window is nil.
57
+ wait.until{ @driver.switch_to.window(args[:window_name]).nil? }
58
+ rescue Selenium::WebDriver::Error::TimeoutError
59
+ raise Selenium::WebDriver::Error::TimeoutError, "Exceeded the limit for trying switch_to_the_window.\n #{$ERROR_INFO.message}"
60
+ end
61
+ end
62
+
52
63
  # Close window
53
64
  def close(_)
54
65
  @driver.close
data/lib/bucky/version.rb CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Bucky
4
4
  module Version
5
- VERSION = '0.9.8'
5
+ VERSION = '0.9.9'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bucky-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.8
4
+ version: 0.9.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - NaotoKishino