itms_automation 1.9 → 2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/itms_automation/version.rb +1 -1
- data/lib/itms_automation/web_steps_helper.rb +22 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef5b0f174d63ba42209fad531cd561dc3bf6398543f0fee23a3e90244871fc73
|
4
|
+
data.tar.gz: cefaf79a5d680b5dd9d1febe5a23a7d9add46c790328d98f84c707c6f09ad3dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e962ee90dd38c0487412b0814f958600acc01195909b010c7eaae2ccd8f7f9753bcc2420cf98fb45203185c669951fb46123769f29696d8bbd12e732e1e20d74
|
7
|
+
data.tar.gz: 9bfb98df8e2dc065c51e6345d70dcb5cd65982fb0340944a3252588a244839d6f6024905ba1e2f30aef9d8d7a00be398fdde680478a84d41d74a3527a44eb3dd
|
@@ -16,6 +16,28 @@ def execute_openbrowser(url_site)
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
+
def clear_cookie()
|
20
|
+
start = Time.now
|
21
|
+
begin
|
22
|
+
browser = Capybara.current_session.driver.browser
|
23
|
+
if browser.respond_to?(:clear_cookies)
|
24
|
+
# Rack::MockSession
|
25
|
+
browser.clear_cookies
|
26
|
+
print_log("passed", start, _method_)
|
27
|
+
elsif browser.respond_to?(:manage) and browser.manage.respond_to?(:delete_all_cookies)
|
28
|
+
# Selenium::WebDriver
|
29
|
+
browser.manage.delete_all_cookies
|
30
|
+
print_log("passed", start, _method_)
|
31
|
+
else
|
32
|
+
print_log("failed", start, _method_)
|
33
|
+
raise "Error: Don't know how to clear cookies. Weird driver?"
|
34
|
+
end
|
35
|
+
rescue Exception => e
|
36
|
+
print_log("failed", start, _method_)
|
37
|
+
raise "Error: #{e.message}"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
19
41
|
def execute_click(element)
|
20
42
|
start = Time.now
|
21
43
|
foundElement = find_object(element)
|