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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 511f7d022e41f5fe5a353ea6be91b3362472473c
|
4
|
+
data.tar.gz: a3fa9b4be74f2e8dbb67a8c1f3c881633e9c6906
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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