rwebspec 4.3.3 → 4.3.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,5 +1,9 @@
1
1
  CHANGELOG
2
2
  =========
3
+
4
+ 4.3.4
5
+ [Fixes] check_checkbox and uncheck_checkbox handle when more than one matching element
6
+
3
7
  4.3.3
4
8
  [Fixes] assert_option_equals for Selenium
5
9
  [Fixes] assert_option_present for Selenium
data/Rakefile CHANGED
@@ -78,7 +78,7 @@ end
78
78
  spec = Gem::Specification.new do |s|
79
79
  s.platform= Gem::Platform::RUBY
80
80
  s.name = "rwebspec"
81
- s.version = "4.3.3"
81
+ s.version = "4.3.4"
82
82
  s.summary = "Web application functional specification in Ruby"
83
83
  s.description = "Executable functional specification for web applications in RSpec syntax with Watir or Selenium"
84
84
 
@@ -582,7 +582,7 @@ module RWebSpec
582
582
  if values
583
583
  values.class == Array ? arys = values : arys = [values]
584
584
  elements = find_elements(:name, checkBoxName)
585
- the_checkbox = elements[0] if elements.size == 1
585
+ the_checkbox = elements[0] if elements.size > 0
586
586
  if the_checkbox
587
587
  the_checkbox.click unless the_checkbox.selected?
588
588
  return
@@ -599,7 +599,7 @@ module RWebSpec
599
599
  end
600
600
  end
601
601
 
602
- # Check a checkbox
602
+ # Uncheck a checkbox
603
603
  # Usage:
604
604
  # uncheck_checkbox("agree")
605
605
  # uncheck_checkbox("agree", "false")
@@ -607,7 +607,7 @@ module RWebSpec
607
607
  if values
608
608
  values.class == Array ? arys = values : arys = [values]
609
609
  elements = find_elements(:name, checkBoxName)
610
- the_checkbox = elements[0] if elements.size == 1
610
+ the_checkbox = elements[0] if elements.size > 0
611
611
  if the_checkbox
612
612
  the_checkbox.click if the_checkbox.selected?
613
613
  return
@@ -615,7 +615,7 @@ module RWebSpec
615
615
 
616
616
  arys.each { |cbx_value|
617
617
  elements.each do |elem|
618
- elem.click if elem.attribute('value') == cbx_value && the_checkbox && the_checkbox.selected?
618
+ elem.click if elem.attribute('value') == cbx_value && elem && elem.selected?
619
619
  end
620
620
  }
621
621
  else
data/lib/rwebspec.rb CHANGED
@@ -16,7 +16,7 @@ end
16
16
  require 'rspec'
17
17
 
18
18
  unless defined? RWEBSPEC_VERSION
19
- RWEBSPEC_VERSION = RWEBUNIT_VERSION = "4.3.3"
19
+ RWEBSPEC_VERSION = RWEBUNIT_VERSION = "4.3.4"
20
20
  end
21
21
 
22
22
  $testwise_polling_interval = 1 # seconds
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rwebspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.3
4
+ version: 4.3.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire: rwebspec
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-30 00:00:00.000000000 Z
12
+ date: 2013-08-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec