sapphire 0.7.26 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. data/lib/sapphire.rb +51 -40
  2. data/lib/sapphire/Adapters/Selenium/RubySeleniumWebDriver.rb +24 -68
  3. data/lib/sapphire/DSL.rb +18 -16
  4. data/lib/sapphire/DSL/Browser/Create.rb +10 -10
  5. data/lib/sapphire/DSL/Browser/ExecuteAgainstControl.rb +20 -20
  6. data/lib/sapphire/DSL/Browser/Fluff/By.rb +10 -10
  7. data/lib/sapphire/DSL/Browser/Fluff/To.rb +10 -10
  8. data/lib/sapphire/DSL/Browser/Fluff/With.rb +10 -10
  9. data/lib/sapphire/DSL/Browser/Nouns/Browser.rb +17 -17
  10. data/lib/sapphire/DSL/Browser/Nouns/Enter.rb +10 -10
  11. data/lib/sapphire/DSL/Browser/Tracker.rb +15 -15
  12. data/lib/sapphire/DSL/Browser/Verbs/Accept.rb +8 -8
  13. data/lib/sapphire/DSL/Browser/Verbs/Check.rb +10 -10
  14. data/lib/sapphire/DSL/Browser/Verbs/Clear.rb +8 -8
  15. data/lib/sapphire/DSL/Browser/Verbs/Click.rb +10 -10
  16. data/lib/sapphire/DSL/Browser/Verbs/Compare.rb +18 -18
  17. data/lib/sapphire/DSL/Browser/Verbs/Complete.rb +13 -13
  18. data/lib/sapphire/DSL/Browser/Verbs/Exists.rb +16 -16
  19. data/lib/sapphire/DSL/Browser/Verbs/Exit.rb +11 -11
  20. data/lib/sapphire/DSL/Browser/Verbs/MouseOver.rb +10 -10
  21. data/lib/sapphire/DSL/Browser/Verbs/Navigate.rb +10 -10
  22. data/lib/sapphire/DSL/Browser/Verbs/Press.rb +8 -8
  23. data/lib/sapphire/DSL/Browser/Verbs/Reload.rb +11 -11
  24. data/lib/sapphire/DSL/Browser/Verbs/Set.rb +10 -10
  25. data/lib/sapphire/DSL/Browser/Verbs/Uncheck.rb +10 -10
  26. data/lib/sapphire/DSL/Comparisons/CheckedComparison.rb +17 -17
  27. data/lib/sapphire/DSL/Comparisons/Comparison.rb +50 -50
  28. data/lib/sapphire/DSL/Comparisons/ContainsComparison.rb +17 -17
  29. data/lib/sapphire/DSL/Comparisons/DifferComparison.rb +17 -17
  30. data/lib/sapphire/DSL/Comparisons/EqualsComparison.rb +16 -16
  31. data/lib/sapphire/DSL/Comparisons/NotComparison.rb +20 -20
  32. data/lib/sapphire/DSL/Comparisons/SelectedComparison.rb +17 -17
  33. data/lib/sapphire/DSL/Comparisons/StartsWithComparison.rb +17 -17
  34. data/lib/sapphire/DSL/Comparisons/VisibleComparison.rb +17 -17
  35. data/lib/sapphire/DSL/Configuration/ConfiguredBrowser.rb +12 -12
  36. data/lib/sapphire/DSL/Configuration/ConfiguredUser.rb +10 -10
  37. data/lib/sapphire/DSL/Configuration/Use.rb +18 -18
  38. data/lib/sapphire/DSL/Data/Find.rb +10 -10
  39. data/lib/sapphire/DSL/Data/GetPageField.rb +13 -13
  40. data/lib/sapphire/DSL/Data/Verify.rb +10 -10
  41. data/lib/sapphire/DSL/Evaluations/ControlEvaluation.rb +13 -0
  42. data/lib/sapphire/DSL/Evaluations/Evaluation.rb +55 -45
  43. data/lib/sapphire/DSL/Evaluations/FieldNotDefinedEvaluation.rb +20 -20
  44. data/lib/sapphire/DSL/Evaluations/FieldNotFoundEvaluation.rb +22 -22
  45. data/lib/sapphire/DSL/Evaluators/Contain.rb +10 -10
  46. data/lib/sapphire/DSL/Evaluators/Count.rb +8 -8
  47. data/lib/sapphire/DSL/Evaluators/Differ.rb +10 -10
  48. data/lib/sapphire/DSL/Evaluators/Exist.rb +9 -9
  49. data/lib/sapphire/DSL/Evaluators/In.rb +10 -10
  50. data/lib/sapphire/DSL/Evaluators/Selected.rb +10 -10
  51. data/lib/sapphire/DSL/Evaluators/Show.rb +10 -10
  52. data/lib/sapphire/DSL/Evaluators/Transition.rb +10 -10
  53. data/lib/sapphire/DSL/Evaluators/Validate.rb +8 -8
  54. data/lib/sapphire/DSL/Events/Data.rb +12 -0
  55. data/lib/sapphire/DSL/Events/DataSegment.rb +18 -0
  56. data/lib/sapphire/DSL/Events/Event.rb +11 -3
  57. data/lib/sapphire/DSL/Events/Expect.rb +3 -11
  58. data/lib/sapphire/DSL/Events/Expectation.rb +14 -0
  59. data/lib/sapphire/DSL/Events/For.rb +11 -0
  60. data/lib/sapphire/DSL/Events/From.rb +9 -0
  61. data/lib/sapphire/DSL/Events/Where.rb +11 -0
  62. data/lib/sapphire/DSL/Profiles/Profile.rb +26 -0
  63. data/lib/sapphire/DSL/Profiles/Table.rb +9 -0
  64. data/lib/sapphire/DSL/Scenarios/Is.rb +9 -9
  65. data/lib/sapphire/DSL/Scenarios/Pending.rb +28 -28
  66. data/lib/sapphire/DSL/Scenarios/and.rb +25 -25
  67. data/lib/sapphire/DSL/Scenarios/dsl.rb +59 -59
  68. data/lib/sapphire/DSL/Scenarios/runner.rb +40 -40
  69. data/lib/sapphire/Data.rb +1 -1
  70. data/lib/sapphire/DataAbstractions/Database.rb +57 -57
  71. data/lib/sapphire/DataAbstractions/Query.rb +20 -20
  72. data/lib/sapphire/Extensions/Class.rb +2 -2
  73. data/lib/sapphire/Extensions/Hash.rb +112 -112
  74. data/lib/sapphire/Extensions/Module.rb +11 -0
  75. data/lib/sapphire/Extensions/Numeric.rb +6 -6
  76. data/lib/sapphire/Extensions/Object.rb +4 -0
  77. data/lib/sapphire/Extensions/String.rb +30 -23
  78. data/lib/sapphire/Extensions/Symbol.rb +1 -1
  79. data/lib/sapphire/JobAbstractions/Job.rb +32 -32
  80. data/lib/sapphire/Observable.rb +87 -0
  81. data/lib/sapphire/Observers.rb +2 -0
  82. data/lib/sapphire/Observers/FailedControlHighlighter.rb +41 -0
  83. data/lib/sapphire/Observers/Highlighter.rb +40 -0
  84. data/lib/sapphire/Observers/Observer.rb +23 -0
  85. data/lib/sapphire/Observers/ObserverRepository.rb +37 -0
  86. data/lib/sapphire/Observers/PassedControlHighlighter.rb +42 -0
  87. data/lib/sapphire/Observers/VerboseObserver.rb +36 -0
  88. data/lib/sapphire/TeamCity.rb +10 -10
  89. data/lib/sapphire/Testing.rb +3 -3
  90. data/lib/sapphire/Testing/RakeTask.rb +108 -108
  91. data/lib/sapphire/Testing/ResultList.rb +18 -18
  92. data/lib/sapphire/Testing/ScenarioResult.rb +36 -36
  93. data/lib/sapphire/Testing/TestResult.rb +21 -21
  94. data/lib/sapphire/Testing/TestRunnerAdapter.rb +85 -85
  95. data/lib/sapphire/UI/ProcessBuilder.rb +173 -173
  96. data/lib/sapphire/Virtualization.rb +7 -7
  97. data/lib/sapphire/Web.rb +2 -2
  98. data/lib/sapphire/WebAbstractions/Controls/AlertBox.rb +20 -20
  99. data/lib/sapphire/WebAbstractions/Controls/Base/Control.rb +43 -26
  100. data/lib/sapphire/WebAbstractions/Controls/Button.rb +7 -7
  101. data/lib/sapphire/WebAbstractions/Controls/CheckBox.rb +3 -3
  102. data/lib/sapphire/WebAbstractions/Controls/Date.rb +11 -11
  103. data/lib/sapphire/WebAbstractions/Controls/DropDown.rb +6 -8
  104. data/lib/sapphire/WebAbstractions/Controls/Hyperlink.rb +8 -8
  105. data/lib/sapphire/WebAbstractions/Controls/Image.rb +19 -19
  106. data/lib/sapphire/WebAbstractions/Controls/Label.rb +8 -8
  107. data/lib/sapphire/WebAbstractions/Controls/List.rb +16 -16
  108. data/lib/sapphire/WebAbstractions/Controls/RadioButton.rb +2 -2
  109. data/lib/sapphire/WebAbstractions/Controls/Title.rb +12 -12
  110. data/lib/sapphire/version.rb +1 -1
  111. metadata +26 -8
@@ -1,40 +1,51 @@
1
- $:.unshift File.expand_path("..", __FILE__)
2
-
3
- require 'rubygems'
4
- require 'Platform'
5
- require 'yaml'
6
- require 'selenium-webdriver'
7
- require 'delegate'
8
- require 'Forwardable'
9
-
10
- require 'sapphire/Adapters'
11
- require 'sapphire/Testing'
12
- require 'sapphire/Web'
13
- require 'sapphire/DSL'
14
- require 'sapphire/Extensions'
15
- require 'sapphire/CommandLine'
16
- require 'sapphire/Configuration'
17
- require 'sapphire/Data'
18
- require 'sapphire/Virtualization'
19
- require 'sapphire/TeamCity'
20
-
21
- module Sapphire
22
- module Sapphire
23
- include DSL
24
- include DSL::Scenarios
25
- include DSL::Browser
26
- include DSL::Configuration
27
- include DSL::Data
28
- include DSL::TestPlans
29
- include DSL::Coverage
30
- include Configuration
31
- include DataAbstractions
32
- include JobAbstractions
33
- include WebAbstractions
34
- include Testing
35
- include Testing::TeamCity
36
- include UI
37
- end
38
- end
39
-
40
- $driver = Sapphire::WebAbstractions::MetaBrowser.new(nil)
1
+ $:.unshift File.expand_path("..", __FILE__)
2
+
3
+ require 'rubygems'
4
+ require 'Platform'
5
+ require 'yaml'
6
+ require 'selenium-webdriver'
7
+ require 'delegate'
8
+ require 'Forwardable'
9
+
10
+ require 'sapphire/Observable'
11
+ require 'sapphire/Adapters'
12
+ require 'sapphire/Testing'
13
+ require 'sapphire/Web'
14
+ require 'sapphire/DSL'
15
+ require 'sapphire/Extensions'
16
+ require 'sapphire/CommandLine'
17
+ require 'sapphire/Configuration'
18
+ require 'sapphire/Data'
19
+ require 'sapphire/Virtualization'
20
+ require 'sapphire/TeamCity'
21
+ require 'sapphire/Observers'
22
+
23
+ module Sapphire
24
+ module Sapphire
25
+ include DSL
26
+ include DSL::Scenarios
27
+ include DSL::Browser
28
+ include DSL::Configuration
29
+ include DSL::Data
30
+ include DSL::TestPlans
31
+ include DSL::Coverage
32
+ include Configuration
33
+ include DataAbstractions
34
+ include JobAbstractions
35
+ include WebAbstractions
36
+ include Testing
37
+ include Testing::TeamCity
38
+ include Observers
39
+ include UI
40
+ end
41
+ end
42
+
43
+ $driver = Sapphire::WebAbstractions::MetaBrowser.new(nil)
44
+
45
+ Sapphire.sub_modules.each do |m|
46
+ m.sub_classes.each do |s|
47
+ m.const_get(s).observe() if m.const_get(s).respond_to? :observe
48
+ Sapphire::Observers::ObserverRepository.instance.Add(m.const_get(s).new) if m.const_get(s).respond_to? :IsObserver
49
+ end
50
+ end
51
+
@@ -175,118 +175,72 @@ module Sapphire
175
175
  return temp
176
176
  end
177
177
 
178
- def FindItem(array, comparator = nil)
178
+ def FindItem(by, value, comparator = nil)
179
179
 
180
180
  x = nil
181
- array.each do |item|
182
181
 
183
- if item.is_a? Hash
184
- begin
185
- x = self.FindElement item.keys.first, item.fetch(item.keys.first)
186
- rescue
187
- #do nothing, let it keep looping
188
- end
189
- end
190
-
191
- x = self.FindElement item[0], item[1] if item.is_a? Array
192
-
193
- return x if x != nil
194
- return x if comparator.Compare(x != nil, true) if comparator != nil
195
-
196
- end if array.is_a? Array
182
+ begin
183
+ x = self.FindElement by, value
184
+ rescue
185
+ #do nothing, let it keep looping
186
+ end
197
187
 
198
- x = self.FindElement array.keys.first, array.fetch(array.keys.first) if array.is_a? Hash
199
188
  return x if x != nil
200
189
  return x if comparator.Compare(x != nil, true) if comparator != nil
201
190
 
202
191
  end
203
192
 
204
- def FindItemWithWait(array, comparator=nil)
193
+ def FindItemWithWait(by, value, comparator=nil)
205
194
  masterWait = Selenium::WebDriver::Wait.new(:timeout => 20)
206
195
 
207
196
  element = masterWait.until {
208
- x = FindItem(array, comparator)
197
+ x = FindItem(by, value, comparator)
209
198
  return x if x != nil
210
199
  return x if comparator.Compare(x != nil, true) if comparator != nil
211
200
  }
212
201
 
213
202
  return element if element != nil
214
203
  return element if comparator.Compare(element != nil, true) if comparator != nil
215
- raise "Could not find control for array: " + array.to_s
204
+
205
+ raise "Could not find control using lookup #{by} and value #{value}."
216
206
 
217
207
  end
218
208
 
219
- def FindItemWithoutWait(array, comparator=nil)
209
+ def FindItemWithoutWait(by, value, comparator=nil)
220
210
 
221
- element = FindItem(array, comparator)
211
+ element = FindItem(by, value, comparator)
222
212
 
223
213
  return element if element != nil
224
214
  return element if comparator.Compare(element != nil, true) if comparator != nil
225
- raise "Could not find control for array: " + array.to_s
215
+ raise "Could not find control using lookup #{by} and value #{value}."
226
216
 
227
217
  end
228
218
 
229
- def FindAllItems(array)
219
+ def FindAllItems(by, value)
230
220
  masterWait = Selenium::WebDriver::Wait.new(:timeout => 20)
231
221
 
232
222
  element = masterWait.until {
233
223
  x = nil
234
- array.each do |item|
235
-
236
- if item.is_a? Hash
237
- begin
238
- x = self.FindElements item.keys.first, item.fetch(item.keys.first)
239
- x = nil if x.is_a? Array and x.empty?
240
- rescue
241
- #do nothing, let it keep looping
242
- end
243
- end
244
-
245
- x = self.FindElements item[0], item[1] if item.is_a? Array
224
+ begin
225
+ x = self.FindElements by, value
246
226
  x = nil if x.is_a? Array and x.empty?
247
- return x if x != nil
248
-
249
- end if array.is_a? Array
227
+ rescue
228
+ #do nothing, let it keep looping
229
+ end
250
230
 
251
- x = self.FindElement array.keys.first, array.fetch(array.keys.first) if array.is_a? Hash
231
+ x = nil if x.is_a? Array and x.empty?
252
232
  return x if x != nil
233
+
253
234
  }
254
235
  return element if element != nil
255
- raise "Could not find control for array: " + array.to_s
256
- end
257
-
258
- def Spectate(discriminator, selector)
259
- if ENV["spectator"] == "true"
260
- begin
261
- if(discriminator == :id)
262
- self.ExecuteScript("document.getElementById('#{selector}').style.backgroundColor = '#FFF467'; ")
263
- elsif (discriminator == :name )
264
- self.ExecuteScript("document.getElementByName('#{selector}').style.backgroundColor = '#FFF467'; ")
265
- elsif (discriminator == :xpath)
266
- self.ExecuteScript("document.evaluate( '#{selector}', document, null, XPathResult.ANY_TYPE, null ).iterateNext().style.backgroundColor = '#FFF467'; ")
267
- end
268
-
269
- sleep 1
270
-
271
- if(discriminator == :id)
272
- self.ExecuteScript("document.getElementById('#{selector}').style.backgroundColor = '#ACD372'; ")
273
- elsif (discriminator == :name )
274
- self.ExecuteScript("document.getElementByName('#{selector}').style.backgroundColor = '#ACD372'; ")
275
- elsif (discriminator == :xpath)
276
- self.ExecuteScript("document.evaluate( '#{selector}', document, null, XPathResult.ANY_TYPE, null ).iterateNext().style.backgroundColor = '#ACD372'; ")
277
- end
278
- rescue
279
- end
280
- end
236
+ raise "Could not find control using lookup #{by} and value #{value}."
281
237
  end
282
238
 
283
239
  def FindElement(discriminator, selector)
284
- self.Spectate(discriminator, selector)
285
240
  self.Browser().find_element discriminator, selector
286
241
  end
287
242
 
288
243
  def FindElements(discriminator, selector)
289
- self.Spectate(discriminator, selector)
290
244
  self.Browser().find_elements discriminator, selector
291
245
  end
292
246
 
@@ -297,6 +251,8 @@ module Sapphire
297
251
  def Create(type)
298
252
  Selenium::WebDriver.for type
299
253
  end
254
+
255
+ include Sapphire::Observable
300
256
  end
301
257
  end
302
258
  end
@@ -1,16 +1,18 @@
1
- require File.expand_path(File.dirname(__FILE__) +'/DSL/Evaluators/Evaluator.rb', __FILE__)
2
- require File.expand_path(File.dirname(__FILE__) +'/DSL/Comparisons/Comparison.rb', __FILE__)
3
- Dir[File.dirname(__FILE__) + '/DSL/Evaluators/*.rb'].each {|file| require file }
4
- Dir[File.dirname(__FILE__) + '/DSL/Comparisons/*.rb'].each {|file| require file }
5
- Dir[File.dirname(__FILE__) + '/DSL/Evaluations/*.rb'].each {|file| require file }
6
- Dir[File.dirname(__FILE__) + '/DSL/TestPlans/*.rb'].each {|file| require file }
7
- Dir[File.dirname(__FILE__) + '/DSL/Browser/*.rb'].each {|file| require file }
8
- Dir[File.dirname(__FILE__) + '/DSL/Browser/Fluff/*.rb'].each {|file| require file }
9
- Dir[File.dirname(__FILE__) + '/DSL/Browser/Nouns/*.rb'].each {|file| require file }
10
- Dir[File.dirname(__FILE__) + '/DSL/Browser/Verbs/*.rb'].each {|file| require file }
11
- Dir[File.dirname(__FILE__) + '/DSL/Browser/Keys/*.rb'].each {|file| require file }
12
- Dir[File.dirname(__FILE__) + '/DSL/Configuration/*.rb'].each {|file| require file }
13
- Dir[File.dirname(__FILE__) + '/DSL/Data/*.rb'].each {|file| require file }
14
- Dir[File.dirname(__FILE__) + '/DSL/Scenarios/*.rb'].each {|file| require file }
15
- Dir[File.dirname(__FILE__) + '/DSL/Events/*.rb'].each {|file| require file }
16
- Dir[File.dirname(__FILE__) + '/DSL/Coverage/*.rb'].each {|file| require file }
1
+ require File.expand_path(File.dirname(__FILE__) +'/DSL/Evaluators/Evaluator.rb', __FILE__)
2
+ require File.expand_path(File.dirname(__FILE__) +'/DSL/Comparisons/Comparison.rb', __FILE__)
3
+ require File.expand_path(File.dirname(__FILE__) +'/DSL/Evaluations/Evaluation.rb', __FILE__)
4
+ Dir[File.dirname(__FILE__) + '/DSL/Evaluators/*.rb'].each {|file| require file }
5
+ Dir[File.dirname(__FILE__) + '/DSL/Comparisons/*.rb'].each {|file| require file }
6
+ Dir[File.dirname(__FILE__) + '/DSL/Evaluations/*.rb'].each {|file| require file }
7
+ Dir[File.dirname(__FILE__) + '/DSL/TestPlans/*.rb'].each {|file| require file }
8
+ Dir[File.dirname(__FILE__) + '/DSL/Browser/*.rb'].each {|file| require file }
9
+ Dir[File.dirname(__FILE__) + '/DSL/Browser/Fluff/*.rb'].each {|file| require file }
10
+ Dir[File.dirname(__FILE__) + '/DSL/Browser/Nouns/*.rb'].each {|file| require file }
11
+ Dir[File.dirname(__FILE__) + '/DSL/Browser/Verbs/*.rb'].each {|file| require file }
12
+ Dir[File.dirname(__FILE__) + '/DSL/Browser/Keys/*.rb'].each {|file| require file }
13
+ Dir[File.dirname(__FILE__) + '/DSL/Configuration/*.rb'].each {|file| require file }
14
+ Dir[File.dirname(__FILE__) + '/DSL/Data/*.rb'].each {|file| require file }
15
+ Dir[File.dirname(__FILE__) + '/DSL/Scenarios/*.rb'].each {|file| require file }
16
+ Dir[File.dirname(__FILE__) + '/DSL/Events/*.rb'].each {|file| require file }
17
+ Dir[File.dirname(__FILE__) + '/DSL/Profiles/*.rb'].each {|file| require file }
18
+ Dir[File.dirname(__FILE__) + '/DSL/Coverage/*.rb'].each {|file| require file }
@@ -1,10 +1,10 @@
1
- module Sapphire
2
- module DSL
3
- module Browser
4
- def Create(item, &block)
5
- item.Create(item) do block.call end
6
- end
7
- end
8
- end
9
- end
10
-
1
+ module Sapphire
2
+ module DSL
3
+ module Browser
4
+ def Create(item, &block)
5
+ item.Create(item) do block.call end
6
+ end
7
+ end
8
+ end
9
+ end
10
+
@@ -1,20 +1,20 @@
1
- module Sapphire
2
- module DSL
3
- module Browser
4
- def ExecuteHashAgainstControl(hash, &block)
5
- hash.keys.each do |key|
6
- return block.call($page.Get(key), hash[key]) if($page.Contains key)
7
- end
8
-
9
- raise "Cannot find control matching " + hash.to_s + " for page " + $page.to_s
10
- end
11
-
12
- def ExecuteAgainstControl(item, &block)
13
- return block.call($page.Get(item), item) if($page.Contains item)
14
-
15
- raise "Cannot find controls matching: " + item.to_s + "for page " + $page.to_s
16
- end
17
- end
18
- end
19
- end
20
-
1
+ module Sapphire
2
+ module DSL
3
+ module Browser
4
+ def ExecuteHashAgainstControl(hash, &block)
5
+ hash.keys.each do |key|
6
+ return block.call($page.Get(key), hash[key]) if($page.Contains key)
7
+ end
8
+
9
+ raise "Cannot find control matching " + hash.to_s + " for page " + $page.to_s
10
+ end
11
+
12
+ def ExecuteAgainstControl(item, &block)
13
+ return block.call($page.Get(item), item) if($page.Contains item)
14
+
15
+ raise "Cannot find controls matching: " + item.to_s + "for page " + $page.to_s
16
+ end
17
+ end
18
+ end
19
+ end
20
+
@@ -1,10 +1,10 @@
1
- module Sapphire
2
- module DSL
3
- module Browser
4
- def By(value)
5
- value
6
- end
7
- end
8
- end
9
- end
10
-
1
+ module Sapphire
2
+ module DSL
3
+ module Browser
4
+ def By(value)
5
+ value
6
+ end
7
+ end
8
+ end
9
+ end
10
+
@@ -1,10 +1,10 @@
1
- module Sapphire
2
- module DSL
3
- module Browser
4
- def To(item)
5
- item
6
- end
7
- end
8
- end
9
- end
10
-
1
+ module Sapphire
2
+ module DSL
3
+ module Browser
4
+ def To(item)
5
+ item
6
+ end
7
+ end
8
+ end
9
+ end
10
+
@@ -1,10 +1,10 @@
1
- module Sapphire
2
- module DSL
3
- module Browser
4
- def With(item)
5
- item
6
- end
7
- end
8
- end
9
- end
10
-
1
+ module Sapphire
2
+ module DSL
3
+ module Browser
4
+ def With(item)
5
+ item
6
+ end
7
+ end
8
+ end
9
+ end
10
+
@@ -1,17 +1,17 @@
1
- module Sapphire
2
- module DSL
3
- module Browser
4
- class Browser
5
- def Close
6
- sleep(2)
7
- $driver.Close
8
- end
9
-
10
- def Switch
11
- $driver.Switch
12
- end
13
- end
14
- end
15
- end
16
- end
17
-
1
+ module Sapphire
2
+ module DSL
3
+ module Browser
4
+ class Browser
5
+ def Close
6
+ sleep(2)
7
+ $driver.Close
8
+ end
9
+
10
+ def Switch
11
+ $driver.Switch
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
17
+
@@ -1,11 +1,11 @@
1
- module Sapphire
2
- module DSL
3
- module Browser
4
- class Enter
5
- def Press
6
- $driver.Type("\n")
7
- end
8
- end
9
- end
10
- end
1
+ module Sapphire
2
+ module DSL
3
+ module Browser
4
+ class Enter
5
+ def Press
6
+ $driver.Type("\n")
7
+ end
8
+ end
9
+ end
10
+ end
11
11
  end