rwebspec-webdriver 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,6 +1,9 @@
1
1
  CHANGELOG
2
2
  =========
3
3
 
4
+ == 0.1.4
5
+ * Squeeze spaces out of browser.text
6
+
4
7
  == 0.1.3
5
8
  * optimize uncheck checkbox, using clear instead of click
6
9
  * optimize select_option, return after found matching option
@@ -10,7 +13,7 @@ CHANGELOG
10
13
  * Rewrite assert_hidden, assert_enabled...
11
14
  * Add assert test
12
15
 
13
- == 0.1.0
16
+ == 0.1.0
14
17
 
15
18
  * Initial release.
16
19
  * Most common web actions and assertions implemented.
data/Rakefile CHANGED
@@ -69,9 +69,9 @@ end
69
69
  spec = Gem::Specification.new do |s|
70
70
  s.platform= Gem::Platform::RUBY
71
71
  s.name = "rwebspec-webdriver"
72
- s.version = "0.1.3"
72
+ s.version = "0.1.4"
73
73
  s.summary = "Executable functional specification for web applications in RSpec syntax and Selenium-WebDriver"
74
- # s.description = ""
74
+ s.description = "Alternative web test syntax on top of Selenium-WebDriver"
75
75
 
76
76
  s.author = "Zhimin Zhan"
77
77
  s.email = "zhimin@agileway.net"
@@ -81,7 +81,7 @@ spec = Gem::Specification.new do |s|
81
81
  s.has_rdoc = true
82
82
  s.requirements << 'none'
83
83
  s.require_path = "lib"
84
- s.autorequire = "rwebspec-webdriver"
84
+ # s.autorequire = "rwebspec-webdriver"
85
85
 
86
86
  s.files = [ "Rakefile", "README", "CHANGELOG", "MIT-LICENSE" ]
87
87
  s.files = s.files + Dir.glob( "lib/**/*" )
@@ -17,7 +17,7 @@ require 'spec'
17
17
  require 'selenium-webdriver'
18
18
 
19
19
  unless defined? RWEBSPEC_VERSION
20
- RWEBSPEC_VERSION = "0.1.3"
20
+ RWEBSPEC_VERSION = "0.1.4"
21
21
  end
22
22
 
23
23
 
@@ -253,8 +253,14 @@ module RWebSpec
253
253
  end
254
254
 
255
255
  #TODO return plain text of current web page
256
- def text
257
- Sanitize.clean(html)
256
+ def text(squeeze_spaces = true)
257
+ begin
258
+ page_text_string = Sanitize.clean(html)
259
+ page_text_string = page_text_string.squeeze(" ") if squeeze_spaces# remove duplicated (spaces)
260
+ return page_text_string
261
+ rescue => e
262
+ puts "failed to santize html source => text, #{e}"
263
+ end
258
264
  # @browser.text
259
265
  end
260
266
 
metadata CHANGED
@@ -5,16 +5,16 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 3
9
- version: 0.1.3
8
+ - 4
9
+ version: 0.1.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Zhimin Zhan
13
- autorequire: rwebspec-webdriver
13
+ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-08-11 00:00:00 +10:00
17
+ date: 2011-11-25 00:00:00 +10:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -59,7 +59,7 @@ dependencies:
59
59
  version: 2.0.0
60
60
  type: :runtime
61
61
  version_requirements: *id003
62
- description:
62
+ description: Alternative web test syntax on top of Selenium-WebDriver
63
63
  email: zhimin@agileway.net
64
64
  executables: []
65
65