itms_automation 2.0 → 2.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22ff0afb795d8a0743046146c7c33211f2ba6713b08c8d163100905b15b365e4
|
4
|
+
data.tar.gz: fbd7065336f40f3891d6c78423804199b71088684c4a8ad55f4538016487bd66
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5f416aaec55dba549728e3083290d5d76064eb6ac88600550dfe9a794add4c08e403934b470eabd97579fa47bf432498626a3b84bad7ebe67102bb1b8bd5e1d
|
7
|
+
data.tar.gz: 1c1d9ad81b4f11ad8ae83eebdf4ba18e500cd579f5a1a5b61080b68a9da159447d94f8b7b08dc06a72522a10a4dfc1f6f434795e5a5294277a10eef940b8ba27
|
@@ -23,17 +23,17 @@ def clear_cookie()
|
|
23
23
|
if browser.respond_to?(:clear_cookies)
|
24
24
|
# Rack::MockSession
|
25
25
|
browser.clear_cookies
|
26
|
-
print_log("passed", start,
|
26
|
+
print_log("passed", start, __method__)
|
27
27
|
elsif browser.respond_to?(:manage) and browser.manage.respond_to?(:delete_all_cookies)
|
28
28
|
# Selenium::WebDriver
|
29
29
|
browser.manage.delete_all_cookies
|
30
|
-
print_log("passed", start,
|
30
|
+
print_log("passed", start, __method__)
|
31
31
|
else
|
32
|
-
print_log("failed", start,
|
32
|
+
print_log("failed", start, __method__)
|
33
33
|
raise "Error: Don't know how to clear cookies. Weird driver?"
|
34
34
|
end
|
35
35
|
rescue Exception => e
|
36
|
-
print_log("failed", start,
|
36
|
+
print_log("failed", start, __method__)
|
37
37
|
raise "Error: #{e.message}"
|
38
38
|
end
|
39
39
|
end
|
@@ -19,4 +19,28 @@ When /^Go to Test Cycle Sumary of iTMS project$/ do
|
|
19
19
|
switch_to_iframe("iframe1")
|
20
20
|
execute_click("itms_cyclesumarylink")
|
21
21
|
sleep(3)
|
22
|
+
custom_action
|
22
23
|
end
|
24
|
+
|
25
|
+
|
26
|
+
def custom_action()
|
27
|
+
begin
|
28
|
+
browser = Capybara.current_session.driver.browser
|
29
|
+
if browser.respond_to?(:clear_cookies)
|
30
|
+
# Rack::MockSession
|
31
|
+
browser.clear_cookies
|
32
|
+
print_log("passed", start, _method_)
|
33
|
+
elsif browser.respond_to?(:manage) and browser.manage.respond_to?(:delete_all_cookies)
|
34
|
+
# Selenium::WebDriver
|
35
|
+
browser.manage.delete_all_cookies
|
36
|
+
print_log("passed", start, _method_)
|
37
|
+
else
|
38
|
+
print_log("failed", start, _method_)
|
39
|
+
raise "Error: Don't know how to clear cookies. Weird driver?"
|
40
|
+
end
|
41
|
+
rescue Exception => e
|
42
|
+
print_log("failed", start, _method_)
|
43
|
+
raise "Error: #{e.message}"
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itms_automation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '2.
|
4
|
+
version: '2.1'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anh Pham
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02-
|
11
|
+
date: 2020-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: selenium-webdriver
|