oct-automation-utilities 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/oct-automation-utilities.rb +11 -15
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51ae10f24d475087473d2f8ed42c9a91129af2f7
|
4
|
+
data.tar.gz: 33ec1aa6bc9fdad71c3d044c6e16144da93b3373
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9379213986ef882df2099096c104d4f472b8e71ea611bdda06f9f6520a864248a12797409c1aab50c500ce037c8785e99aa807bfaff037ef8a48e9f676078cd2
|
7
|
+
data.tar.gz: 3c62c72c64698f16af73d2ba1e7478f63923545efc047efb8a8a87cb037157852eb696c10979cf12d831d6582048daa20d0f8998a68599e3b6f325799d76ed37
|
@@ -8,6 +8,7 @@ module OctAutomationUtilities
|
|
8
8
|
class Utilities
|
9
9
|
include Capybara::DSL
|
10
10
|
include Capybara::RSpecMatchers
|
11
|
+
include ::RSpec::Matchers
|
11
12
|
|
12
13
|
#test data
|
13
14
|
attr_accessor :capture_screen, :screen_shot_path, :exe_time, :test_name, :project_directory, :test_time
|
@@ -91,11 +92,11 @@ module OctAutomationUtilities
|
|
91
92
|
end
|
92
93
|
|
93
94
|
def verify_page_content(content = '')
|
94
|
-
page.
|
95
|
+
expect(page).to_not have_content('HTTP Status')
|
95
96
|
if content != nil
|
96
97
|
self.obj_expected_page_content = content
|
97
98
|
end
|
98
|
-
page.
|
99
|
+
expect(page).to have_content(self.obj_expected_page_content)
|
99
100
|
self.capture_screen_shot("Verify content - #{self.obj_expected_page_content}")
|
100
101
|
end
|
101
102
|
|
@@ -136,20 +137,16 @@ module OctAutomationUtilities
|
|
136
137
|
end
|
137
138
|
|
138
139
|
def close_current_window
|
139
|
-
|
140
|
-
page.
|
141
|
-
|
142
|
-
|
143
|
-
end
|
144
|
-
self.switchtonewlyopenedwindow
|
140
|
+
Capybara.reset_sessions! # Guarantees the session ID/Cache is cleared.
|
141
|
+
page.driver.browser.switch_to.window(page.driver.browser.window_handles.last)
|
142
|
+
page.execute_script "window.close();"
|
143
|
+
page.driver.browser.switch_to.window(page.driver.browser.window_handles.first)
|
145
144
|
end
|
146
145
|
|
147
146
|
def close_all_windows
|
148
|
-
|
149
|
-
|
150
|
-
page.
|
151
|
-
page.current_window.close
|
152
|
-
end
|
147
|
+
page.driver.browser.window_handles.each do |handle|
|
148
|
+
page.driver.browser.switch_to.window(page.driver.browser.window_handles.last)
|
149
|
+
page.execute_script "window.close()"
|
153
150
|
end
|
154
151
|
end
|
155
152
|
|
@@ -414,8 +411,7 @@ module OctAutomationUtilities
|
|
414
411
|
end
|
415
412
|
|
416
413
|
def switchtonewlyopenedwindow
|
417
|
-
|
418
|
-
page.driver.browser.switch_to.window(new_window)
|
414
|
+
page.driver.browser.switch_to.window(page.driver.browser.window_handles.last)
|
419
415
|
end
|
420
416
|
|
421
417
|
end
|
metadata
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oct-automation-utilities
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Tracy
|
8
|
+
- Nick Robertson
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
12
|
+
date: 2014-07-09 00:00:00.000000000 Z
|
12
13
|
dependencies: []
|
13
14
|
description: Utilities class that performs common automation functionality that can
|
14
15
|
be used over multiple projects
|