Ifd_Automation 0.1.6 → 0.1.7
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: d22e4b55211c68e04250579388ed907f1b7fe376
|
4
|
+
data.tar.gz: 053d7d2a18f140c94f85f70503e516cf5866ebda
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f82264d59320f62a5b822a9b1654e8ad7d688fd608bae696079cb7adb1b13f02642fbb78cc0b770bf7953b8d5a2cbb35516f75f8582ef727c568b85207a2007
|
7
|
+
data.tar.gz: 3a0d548f4e97224afc3f34ab21338072240983b62b4d6826e87bd4aab3d9980f18a8d221303ac19cce3116297ce486865115b273abfca1f28d0e0444bbb57d63
|
@@ -2,19 +2,19 @@
|
|
2
2
|
require_relative 'methods/required_files'
|
3
3
|
|
4
4
|
Then(/^I accept pop-up alert$/) do
|
5
|
-
handle_alert(accept)
|
5
|
+
handle_alert('accept')
|
6
6
|
end
|
7
7
|
|
8
8
|
Then(/^I dismiss pop-up alert$/) do
|
9
|
-
handle_alert(dismiss)
|
9
|
+
handle_alert('dismiss')
|
10
10
|
end
|
11
11
|
|
12
12
|
And /^I focus in new open page$/ do
|
13
|
-
switch_to_windows(last)
|
13
|
+
switch_to_windows('last')
|
14
14
|
end
|
15
15
|
|
16
16
|
And /^I focus in previous page$/ do
|
17
|
-
switch_to_windows(first)
|
17
|
+
switch_to_windows('first')
|
18
18
|
end
|
19
19
|
|
20
20
|
And /^I close current windows$/ do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require_relative 'required_files'
|
2
2
|
|
3
3
|
def handle_alert(decision)
|
4
|
-
if decision ==
|
4
|
+
if decision == 'accept'
|
5
5
|
page.driver.browser.switch_to.alert.accept
|
6
6
|
else
|
7
7
|
page.driver.browser.switch_to.alert.dismiss
|
@@ -9,7 +9,7 @@ def handle_alert(decision)
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def switch_to_windows(decision)
|
12
|
-
if decision ==
|
12
|
+
if decision == 'last'
|
13
13
|
page.driver.browser.switch_to.window(page.driver.browser.window_handles.last)
|
14
14
|
else
|
15
15
|
page.driver.browser.switch_to.window(page.driver.browser.window_handles.first)
|