rwebspec-webdriver 0.3.4 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,10 +1,17 @@
1
1
  CHANGELOG
2
2
  =========
3
3
 
4
+ == 0.3.6
5
+ [Fix] check_box
6
+
7
+ == 0.3.5
8
+ [Fix] browser.text return body.text, remove dependency on sanitize gem
9
+
4
10
  == 0.3.4
5
11
 
6
12
  [Fix] not throwing select list's option not found
7
13
  [New] web_browser.driver returns underlying browser (web_driver instance)
14
+ [Fix] Set limit on message sent to TestWise
8
15
 
9
16
  == 0.3.3
10
17
 
data/Rakefile CHANGED
@@ -69,7 +69,7 @@ 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.3.4"
72
+ s.version = "0.3.6"
73
73
  s.summary = "Executable functional specification for web applications in RSpec syntax and Selenium-WebDriver"
74
74
  # s.description = ""
75
75
 
@@ -1,11 +1,19 @@
1
1
  require 'socket'
2
2
 
3
+ MAX_MESSAGE_LENGTH = 8192 # < 10K
4
+
3
5
  module RWebSpec
4
6
  module WebDriver
5
7
  module TestWisePlugin
6
8
 
7
9
  def debug(message)
8
- connect_to_testwise(" DEBUG", message.to_s + "\r\n") if $RUN_IN_TESTWISE && message
10
+ if $RUN_IN_TESTWISE && message
11
+ the_sent_msg = message.to_s
12
+ if the_sent_msg.size > MAX_MESSAGE_LENGTH
13
+ the_sent_msg = the_sent_msg[0..MAX_MESSAGE_LENGTH] + "..."
14
+ end
15
+ connect_to_testwise(" DEBUG", the_sent_msg + "\r\n")
16
+ end
9
17
  end
10
18
 
11
19
 
@@ -251,7 +251,8 @@ module RWebSpec
251
251
  page_text_string = page_text_string.squeeze(" ") if squeeze_spaces# remove duplicated (spaces)
252
252
  return page_text_string
253
253
  rescue => e
254
- puts "failed to santize html source => text, #{e}"
254
+ @browser.find_element(:tag_name, "body").text
255
+ # puts "failed to santize html source => text, #{e}"
255
256
  end
256
257
  # @browser.text
257
258
  end
@@ -554,7 +555,7 @@ module RWebSpec
554
555
 
555
556
  arys.each { |cbx_value|
556
557
  elements.each do |elem|
557
- elem.click if elem.attribute('value') == cbx_value && !the_checkbox.selected?
558
+ elem.click if elem.attribute('value') == cbx_value && !elem.selected?
558
559
  end
559
560
  }
560
561
  else
@@ -17,7 +17,7 @@ require 'spec'
17
17
  require 'selenium-webdriver'
18
18
 
19
19
  unless defined? RWEBSPEC_WEBDRIVER_VERSION
20
- RWEBSPEC_WEBDRIVER_VERSION = "0.3.4"
20
+ RWEBSPEC_WEBDRIVER_VERSION = "0.3.6"
21
21
  end
22
22
 
23
23
 
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rwebspec-webdriver
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
5
- prerelease:
4
+ prerelease: false
6
5
  segments:
7
6
  - 0
8
7
  - 3
9
- - 4
10
- version: 0.3.4
8
+ - 6
9
+ version: 0.3.6
11
10
  platform: ruby
12
11
  authors:
13
12
  - Zhimin Zhan
@@ -15,17 +14,16 @@ autorequire: rwebspec-webdriver
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2012-03-11 00:00:00 Z
17
+ date: 2012-04-11 00:00:00 +10:00
18
+ default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rspec
22
22
  prerelease: false
23
23
  requirement: &id001 !ruby/object:Gem::Requirement
24
- none: false
25
24
  requirements:
26
25
  - - "="
27
26
  - !ruby/object:Gem::Version
28
- hash: 11
29
27
  segments:
30
28
  - 1
31
29
  - 1
@@ -37,11 +35,9 @@ dependencies:
37
35
  name: selenium-webdriver
38
36
  prerelease: false
39
37
  requirement: &id002 !ruby/object:Gem::Requirement
40
- none: false
41
38
  requirements:
42
39
  - - ">="
43
40
  - !ruby/object:Gem::Version
44
- hash: 13
45
41
  segments:
46
42
  - 2
47
43
  - 0
@@ -53,11 +49,9 @@ dependencies:
53
49
  name: sanitize
54
50
  prerelease: false
55
51
  requirement: &id003 !ruby/object:Gem::Requirement
56
- none: false
57
52
  requirements:
58
53
  - - ">="
59
54
  - !ruby/object:Gem::Version
60
- hash: 15
61
55
  segments:
62
56
  - 2
63
57
  - 0
@@ -99,6 +93,7 @@ files:
99
93
  - lib/rwebspec-webdriver.rb
100
94
  - lib/webdriver_extensions.rb
101
95
  - lib/window_script_extensions.rb
96
+ has_rdoc: true
102
97
  homepage: http://github.com/zhimin/rwebspec-webdriver/tree/master
103
98
  licenses: []
104
99
 
@@ -108,27 +103,23 @@ rdoc_options: []
108
103
  require_paths:
109
104
  - lib
110
105
  required_ruby_version: !ruby/object:Gem::Requirement
111
- none: false
112
106
  requirements:
113
107
  - - ">="
114
108
  - !ruby/object:Gem::Version
115
- hash: 3
116
109
  segments:
117
110
  - 0
118
111
  version: "0"
119
112
  required_rubygems_version: !ruby/object:Gem::Requirement
120
- none: false
121
113
  requirements:
122
114
  - - ">="
123
115
  - !ruby/object:Gem::Version
124
- hash: 3
125
116
  segments:
126
117
  - 0
127
118
  version: "0"
128
119
  requirements:
129
120
  - none
130
121
  rubyforge_project: rwebspec-webdriver
131
- rubygems_version: 1.8.15
122
+ rubygems_version: 1.3.6
132
123
  signing_key:
133
124
  specification_version: 3
134
125
  summary: Executable functional specification for web applications in RSpec syntax and Selenium-WebDriver