sapphire 0.5.3 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sapphire/Adapters/Selenium/RubySeleniumWebDriver.rb +190 -190
- data/lib/sapphire/DSL/Browser/ExecuteAgainstControl.rb +34 -45
- data/lib/sapphire/DSL/Browser/Extensions/Class.rb +29 -0
- data/lib/sapphire/DSL/Browser/Extensions/Hash.rb +11 -0
- data/lib/sapphire/DSL/Browser/Extensions/Numeric.rb +7 -0
- data/lib/sapphire/DSL/Browser/Extensions/Symbol.rb +37 -0
- data/lib/sapphire/DSL/Browser/{By.rb → Fluff/By.rb} +10 -10
- data/lib/sapphire/DSL/Browser/{To.rb → Fluff/To.rb} +10 -10
- data/lib/sapphire/DSL/Browser/{With.rb → Fluff/With.rb} +10 -10
- data/lib/sapphire/DSL/Browser/For.rb +10 -10
- data/lib/sapphire/DSL/Browser/{AlertBox.rb → Nouns/AlertBox.rb} +14 -14
- data/lib/sapphire/DSL/Browser/{Browser.rb → Nouns/Browser.rb} +17 -17
- data/lib/sapphire/DSL/Browser/{Day.rb → Nouns/Day.rb} +24 -24
- data/lib/sapphire/DSL/Browser/{Keys → Nouns}/Enter.rb +10 -10
- data/lib/sapphire/DSL/Browser/{Month.rb → Nouns/Month.rb} +24 -24
- data/lib/sapphire/DSL/Browser/{Popup.rb → Nouns/Popup.rb} +0 -0
- data/lib/sapphire/DSL/Browser/Should.rb +42 -42
- data/lib/sapphire/DSL/Browser/Tracker.rb +15 -15
- data/lib/sapphire/DSL/Browser/{Accept.rb → Verbs/Accept.rb} +9 -9
- data/lib/sapphire/DSL/Browser/Verbs/Check.rb +11 -0
- data/lib/sapphire/DSL/Browser/{IsHidden.rb → Verbs/Clear.rb} +9 -10
- data/lib/sapphire/DSL/Browser/Verbs/Click.rb +11 -0
- data/lib/sapphire/DSL/Browser/{Close.rb → Verbs/Close.rb} +11 -12
- data/lib/sapphire/DSL/Browser/{Compare.rb → Verbs/Compare.rb} +18 -18
- data/lib/sapphire/DSL/Browser/Verbs/Complete.rb +10 -0
- data/lib/sapphire/DSL/Browser/{Differ.rb → Verbs/Differ.rb} +18 -18
- data/lib/sapphire/DSL/Browser/{Disable.rb → Verbs/Disable.rb} +0 -0
- data/lib/sapphire/DSL/Browser/{Error.rb → Verbs/Error.rb} +25 -26
- data/lib/sapphire/DSL/Browser/{Exists.rb → Verbs/Exists.rb} +22 -22
- data/lib/sapphire/DSL/Browser/{Hide.rb → Verbs/Hide.rb} +25 -26
- data/lib/sapphire/DSL/Browser/Verbs/MouseOver.rb +11 -0
- data/lib/sapphire/DSL/Browser/{Navigate.rb → Verbs/Navigate.rb} +11 -11
- data/lib/sapphire/DSL/Browser/{Press.rb → Verbs/Press.rb} +8 -10
- data/lib/sapphire/DSL/Browser/{Reload.rb → Verbs/Reload.rb} +11 -11
- data/lib/sapphire/DSL/Browser/Verbs/Set.rb +10 -0
- data/lib/sapphire/DSL/Browser/{Show.rb → Verbs/Show.rb} +25 -26
- data/lib/sapphire/DSL/Browser/{Start.rb → Verbs/Start.rb} +16 -16
- data/lib/sapphire/DSL/Browser/{Switch.rb → Verbs/Switch.rb} +0 -0
- data/lib/sapphire/DSL/Browser/{Transition.rb → Verbs/Transition.rb} +25 -26
- data/lib/sapphire/DSL/Browser/Verbs/Uncheck.rb +11 -0
- data/lib/sapphire/DSL/Browser/{Virtually.rb → Verbs/Virtually.rb} +0 -0
- data/lib/sapphire/DSL/Browser/{Wait.rb → Verbs/Wait.rb} +2 -2
- data/lib/sapphire/DSL/Configuration/ConfiguredBrowser.rb +12 -12
- data/lib/sapphire/DSL/Configuration/ConfiguredUser.rb +10 -10
- data/lib/sapphire/DSL/Configuration/Use.rb +15 -15
- data/lib/sapphire/DSL/Data/Exist.rb +27 -27
- data/lib/sapphire/DSL/Data/Find.rb +10 -10
- data/lib/sapphire/DSL/Data/GetPageField.rb +17 -17
- data/lib/sapphire/DSL/Data/Underscore.rb +8 -8
- data/lib/sapphire/DSL/Data/Validate.rb +26 -26
- data/lib/sapphire/DSL/Data/Verify.rb +10 -10
- data/lib/sapphire/DSL/Scenarios/Is.rb +9 -9
- data/lib/sapphire/DSL/Scenarios/Pending.rb +28 -28
- data/lib/sapphire/DSL/Scenarios/and.rb +25 -25
- data/lib/sapphire/DSL/Scenarios/background.rb +33 -33
- data/lib/sapphire/DSL/Scenarios/dsl.rb +59 -59
- data/lib/sapphire/DSL/Scenarios/finally.rb +33 -33
- data/lib/sapphire/DSL/Scenarios/given.rb +57 -57
- data/lib/sapphire/DSL/Scenarios/runner.rb +40 -40
- data/lib/sapphire/DSL/Scenarios/scenario.rb +53 -53
- data/lib/sapphire/DSL/Scenarios/then.rb +34 -34
- data/lib/sapphire/DSL/Scenarios/when.rb +47 -47
- data/lib/sapphire/DSL.rb +10 -6
- data/lib/sapphire/Data.rb +1 -1
- data/lib/sapphire/DataAbstractions/Database.rb +57 -57
- data/lib/sapphire/DataAbstractions/Query.rb +19 -19
- data/lib/sapphire/JobAbstractions/Job.rb +32 -32
- data/lib/sapphire/Strategies/ClassStrategy.rb +1 -1
- data/lib/sapphire/Strategies/Strategy.rb +1 -2
- data/lib/sapphire/Strategies.rb +1 -1
- data/lib/sapphire/TeamCity.rb +8 -8
- data/lib/sapphire/Testing/Executable.rb +30 -30
- data/lib/sapphire/Testing/RakeTask.rb +108 -108
- data/lib/sapphire/Testing/ResultList.rb +18 -18
- data/lib/sapphire/Testing/ResultTree.rb +44 -44
- data/lib/sapphire/Testing/ScenarioResult.rb +36 -36
- data/lib/sapphire/Testing/TestResult.rb +21 -21
- data/lib/sapphire/Testing/TestRunnerAdapter.rb +69 -69
- data/lib/sapphire/Testing.rb +2 -2
- data/lib/sapphire/Virtualization.rb +7 -7
- data/lib/sapphire/Web.rb +2 -2
- data/lib/sapphire/WebAbstractions/Browsers/Chrome.rb +21 -21
- data/lib/sapphire/WebAbstractions/Browsers/FireFox.rb +22 -22
- data/lib/sapphire/WebAbstractions/Browsers/InternetExplorer.rb +21 -21
- data/lib/sapphire/WebAbstractions/Controls/Base/Control.rb +58 -59
- data/lib/sapphire/WebAbstractions/Controls/Base/Page.rb +61 -62
- data/lib/sapphire/WebAbstractions/Controls/Button.rb +7 -9
- data/lib/sapphire/WebAbstractions/Controls/CheckBox.rb +28 -28
- data/lib/sapphire/WebAbstractions/Controls/Date.rb +11 -11
- data/lib/sapphire/WebAbstractions/Controls/DropDown.rb +26 -26
- data/lib/sapphire/WebAbstractions/Controls/Hyperlink.rb +8 -8
- data/lib/sapphire/WebAbstractions/Controls/Image.rb +9 -9
- data/lib/sapphire/WebAbstractions/Controls/Label.rb +8 -8
- data/lib/sapphire/WebAbstractions/Controls/RadioButton.rb +18 -18
- data/lib/sapphire/WebAbstractions/Controls/TextBox.rb +31 -31
- data/lib/sapphire/WebAbstractions/Controls/Title.rb +12 -12
- data/lib/sapphire/version.rb +3 -3
- data/lib/sapphire.rb +38 -38
- metadata +46 -45
- data/lib/sapphire/DSL/Browser/Check.rb +0 -12
- data/lib/sapphire/DSL/Browser/Clear.rb +0 -13
- data/lib/sapphire/DSL/Browser/Click.rb +0 -12
- data/lib/sapphire/DSL/Browser/Complete.rb +0 -15
- data/lib/sapphire/DSL/Browser/CurrentUrl.rb +0 -11
- data/lib/sapphire/DSL/Browser/IsVisible.rb +0 -33
- data/lib/sapphire/DSL/Browser/MouseOver.rb +0 -12
- data/lib/sapphire/DSL/Browser/Set.rb +0 -18
- data/lib/sapphire/DSL/Browser/Uncheck.rb +0 -12
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sapphire
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-11-
|
12
|
+
date: 2011-11-15 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: selenium-webdriver
|
16
|
-
requirement: &
|
16
|
+
requirement: &10127556 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *10127556
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: colorize
|
27
|
-
requirement: &
|
27
|
+
requirement: &10127304 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *10127304
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: Platform
|
38
|
-
requirement: &
|
38
|
+
requirement: &10127052 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *10127052
|
47
47
|
description: An automated web acceptance test framework for non-technical resources
|
48
48
|
using selenium-wedriver.
|
49
49
|
email:
|
@@ -64,47 +64,48 @@ files:
|
|
64
64
|
- lib/sapphire/DataAbstractions/Database.rb
|
65
65
|
- lib/sapphire/DataAbstractions/NonQuery.rb
|
66
66
|
- lib/sapphire/DataAbstractions/Query.rb
|
67
|
-
- lib/sapphire/DSL/Browser/Accept.rb
|
68
|
-
- lib/sapphire/DSL/Browser/AlertBox.rb
|
69
|
-
- lib/sapphire/DSL/Browser/Browser.rb
|
70
|
-
- lib/sapphire/DSL/Browser/By.rb
|
71
|
-
- lib/sapphire/DSL/Browser/Check.rb
|
72
|
-
- lib/sapphire/DSL/Browser/Clear.rb
|
73
|
-
- lib/sapphire/DSL/Browser/Click.rb
|
74
|
-
- lib/sapphire/DSL/Browser/Close.rb
|
75
|
-
- lib/sapphire/DSL/Browser/Compare.rb
|
76
|
-
- lib/sapphire/DSL/Browser/Complete.rb
|
77
|
-
- lib/sapphire/DSL/Browser/CurrentUrl.rb
|
78
|
-
- lib/sapphire/DSL/Browser/Day.rb
|
79
|
-
- lib/sapphire/DSL/Browser/Differ.rb
|
80
|
-
- lib/sapphire/DSL/Browser/Disable.rb
|
81
|
-
- lib/sapphire/DSL/Browser/Error.rb
|
82
67
|
- lib/sapphire/DSL/Browser/ExecuteAgainstControl.rb
|
83
|
-
- lib/sapphire/DSL/Browser/
|
68
|
+
- lib/sapphire/DSL/Browser/Extensions/Class.rb
|
69
|
+
- lib/sapphire/DSL/Browser/Extensions/Hash.rb
|
70
|
+
- lib/sapphire/DSL/Browser/Extensions/Numeric.rb
|
71
|
+
- lib/sapphire/DSL/Browser/Extensions/Symbol.rb
|
72
|
+
- lib/sapphire/DSL/Browser/Fluff/By.rb
|
73
|
+
- lib/sapphire/DSL/Browser/Fluff/To.rb
|
74
|
+
- lib/sapphire/DSL/Browser/Fluff/With.rb
|
84
75
|
- lib/sapphire/DSL/Browser/For.rb
|
85
|
-
- lib/sapphire/DSL/Browser/Hide.rb
|
86
|
-
- lib/sapphire/DSL/Browser/IsHidden.rb
|
87
|
-
- lib/sapphire/DSL/Browser/IsVisible.rb
|
88
|
-
- lib/sapphire/DSL/Browser/Keys/Enter.rb
|
89
|
-
- lib/sapphire/DSL/Browser/Month.rb
|
90
|
-
- lib/sapphire/DSL/Browser/MouseOver.rb
|
91
|
-
- lib/sapphire/DSL/Browser/Navigate.rb
|
92
76
|
- lib/sapphire/DSL/Browser/Not.rb
|
93
|
-
- lib/sapphire/DSL/Browser/
|
94
|
-
- lib/sapphire/DSL/Browser/
|
95
|
-
- lib/sapphire/DSL/Browser/
|
96
|
-
- lib/sapphire/DSL/Browser/
|
77
|
+
- lib/sapphire/DSL/Browser/Nouns/AlertBox.rb
|
78
|
+
- lib/sapphire/DSL/Browser/Nouns/Browser.rb
|
79
|
+
- lib/sapphire/DSL/Browser/Nouns/Day.rb
|
80
|
+
- lib/sapphire/DSL/Browser/Nouns/Enter.rb
|
81
|
+
- lib/sapphire/DSL/Browser/Nouns/Month.rb
|
82
|
+
- lib/sapphire/DSL/Browser/Nouns/Popup.rb
|
97
83
|
- lib/sapphire/DSL/Browser/Should.rb
|
98
|
-
- lib/sapphire/DSL/Browser/Show.rb
|
99
|
-
- lib/sapphire/DSL/Browser/Start.rb
|
100
|
-
- lib/sapphire/DSL/Browser/Switch.rb
|
101
|
-
- lib/sapphire/DSL/Browser/To.rb
|
102
84
|
- lib/sapphire/DSL/Browser/Tracker.rb
|
103
|
-
- lib/sapphire/DSL/Browser/
|
104
|
-
- lib/sapphire/DSL/Browser/
|
105
|
-
- lib/sapphire/DSL/Browser/
|
106
|
-
- lib/sapphire/DSL/Browser/
|
107
|
-
- lib/sapphire/DSL/Browser/
|
85
|
+
- lib/sapphire/DSL/Browser/Verbs/Accept.rb
|
86
|
+
- lib/sapphire/DSL/Browser/Verbs/Check.rb
|
87
|
+
- lib/sapphire/DSL/Browser/Verbs/Clear.rb
|
88
|
+
- lib/sapphire/DSL/Browser/Verbs/Click.rb
|
89
|
+
- lib/sapphire/DSL/Browser/Verbs/Close.rb
|
90
|
+
- lib/sapphire/DSL/Browser/Verbs/Compare.rb
|
91
|
+
- lib/sapphire/DSL/Browser/Verbs/Complete.rb
|
92
|
+
- lib/sapphire/DSL/Browser/Verbs/Differ.rb
|
93
|
+
- lib/sapphire/DSL/Browser/Verbs/Disable.rb
|
94
|
+
- lib/sapphire/DSL/Browser/Verbs/Error.rb
|
95
|
+
- lib/sapphire/DSL/Browser/Verbs/Exists.rb
|
96
|
+
- lib/sapphire/DSL/Browser/Verbs/Hide.rb
|
97
|
+
- lib/sapphire/DSL/Browser/Verbs/MouseOver.rb
|
98
|
+
- lib/sapphire/DSL/Browser/Verbs/Navigate.rb
|
99
|
+
- lib/sapphire/DSL/Browser/Verbs/Press.rb
|
100
|
+
- lib/sapphire/DSL/Browser/Verbs/Reload.rb
|
101
|
+
- lib/sapphire/DSL/Browser/Verbs/Set.rb
|
102
|
+
- lib/sapphire/DSL/Browser/Verbs/Show.rb
|
103
|
+
- lib/sapphire/DSL/Browser/Verbs/Start.rb
|
104
|
+
- lib/sapphire/DSL/Browser/Verbs/Switch.rb
|
105
|
+
- lib/sapphire/DSL/Browser/Verbs/Transition.rb
|
106
|
+
- lib/sapphire/DSL/Browser/Verbs/Uncheck.rb
|
107
|
+
- lib/sapphire/DSL/Browser/Verbs/Virtually.rb
|
108
|
+
- lib/sapphire/DSL/Browser/Verbs/Wait.rb
|
108
109
|
- lib/sapphire/DSL/Configuration/ConfiguredBrowser.rb
|
109
110
|
- lib/sapphire/DSL/Configuration/ConfiguredUser.rb
|
110
111
|
- lib/sapphire/DSL/Configuration/Use.rb
|
@@ -199,7 +200,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
199
200
|
version: '0'
|
200
201
|
requirements: []
|
201
202
|
rubyforge_project:
|
202
|
-
rubygems_version: 1.8.
|
203
|
+
rubygems_version: 1.8.5
|
203
204
|
signing_key:
|
204
205
|
specification_version: 3
|
205
206
|
summary: An automated web acceptance test framework for non-technical resources
|
@@ -1,33 +0,0 @@
|
|
1
|
-
module Sapphire
|
2
|
-
module DSL
|
3
|
-
module Browser
|
4
|
-
def IsVisible(args)
|
5
|
-
@page.fields.each do |field|
|
6
|
-
field.keys.each do |field_key|
|
7
|
-
if(field_key == args)
|
8
|
-
begin
|
9
|
-
x = field[field_key].Find
|
10
|
-
if(x)
|
11
|
-
begin
|
12
|
-
wait = Selenium::WebDriver::Wait.new(:timeout => 30)
|
13
|
-
result = wait.until { y = x.displayed?
|
14
|
-
y unless y == false
|
15
|
-
}
|
16
|
-
return result
|
17
|
-
rescue
|
18
|
-
return false
|
19
|
-
end
|
20
|
-
end
|
21
|
-
rescue
|
22
|
-
return false
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
raise "cannot find control matching " + args.to_s + " for page " + @page.to_s
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
@@ -1,18 +0,0 @@
|
|
1
|
-
module Sapphire
|
2
|
-
module DSL
|
3
|
-
module Browser
|
4
|
-
def Set(hash)
|
5
|
-
if(hash.keys.first == AlertBox)
|
6
|
-
text = hash[item.keys.first]
|
7
|
-
klass = hash.keys.first.new
|
8
|
-
klass.Set text
|
9
|
-
else
|
10
|
-
ExecuteHashAgainstControl(hash, @page) do |control, arg|
|
11
|
-
control.Set arg
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|